Lines Matching +full:unit +full:- +full:addresses

1 // SPDX-License-Identifier: GPL-2.0-only
3 * tascam.c - a part of driver for TASCAM FireWire series
11 MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>");
16 .name = "FW-1884",
25 .name = "FW-1082",
34 .name = "FW-1804",
46 struct fw_device *fw_dev = fw_parent_device(tscm->unit); in identify_model()
47 const u32 *config_rom = fw_dev->config_rom; in identify_model()
52 if (fw_dev->config_rom_length < 30) { in identify_model()
53 dev_err(&tscm->unit->device, in identify_model()
55 return -ENODEV; in identify_model()
58 /* Pick up model name from certain addresses. */ in identify_model()
60 c = config_rom[28 + i / 4] >> (24 - 8 * (i % 4)); in identify_model()
69 tscm->spec = &model_specs[i]; in identify_model()
73 if (tscm->spec == NULL) in identify_model()
74 return -ENODEV; in identify_model()
76 strcpy(tscm->card->driver, "FW-TASCAM"); in identify_model()
77 strcpy(tscm->card->shortname, model); in identify_model()
78 strcpy(tscm->card->mixername, model); in identify_model()
79 snprintf(tscm->card->longname, sizeof(tscm->card->longname), in identify_model()
81 fw_dev->config_rom[3], fw_dev->config_rom[4], in identify_model()
82 dev_name(&tscm->unit->device), 100 << fw_dev->max_speed); in identify_model()
89 struct snd_tscm *tscm = card->private_data; in tscm_card_free()
94 mutex_destroy(&tscm->mutex); in tscm_card_free()
95 fw_unit_put(tscm->unit); in tscm_card_free()
98 static int snd_tscm_probe(struct fw_unit *unit, in snd_tscm_probe() argument
105 err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE, sizeof(*tscm), &card); in snd_tscm_probe()
108 card->private_free = tscm_card_free; in snd_tscm_probe()
110 tscm = card->private_data; in snd_tscm_probe()
111 tscm->unit = fw_unit_get(unit); in snd_tscm_probe()
112 dev_set_drvdata(&unit->device, tscm); in snd_tscm_probe()
113 tscm->card = card; in snd_tscm_probe()
115 mutex_init(&tscm->mutex); in snd_tscm_probe()
116 spin_lock_init(&tscm->lock); in snd_tscm_probe()
117 init_waitqueue_head(&tscm->hwdep_wait); in snd_tscm_probe()
155 static void snd_tscm_update(struct fw_unit *unit) in snd_tscm_update() argument
157 struct snd_tscm *tscm = dev_get_drvdata(&unit->device); in snd_tscm_update()
161 mutex_lock(&tscm->mutex); in snd_tscm_update()
163 mutex_unlock(&tscm->mutex); in snd_tscm_update()
166 static void snd_tscm_remove(struct fw_unit *unit) in snd_tscm_remove() argument
168 struct snd_tscm *tscm = dev_get_drvdata(&unit->device); in snd_tscm_remove()
171 snd_card_free(tscm->card); in snd_tscm_remove()
175 // Tascam, FW-1884.
184 // Tascam, FE-8 (.version = 0x800001)
185 // This kernel module doesn't support FE-8 because the most of features
191 // Tascam, FW-1082.
200 // Tascam, FW-1804.