Skip to content

Commit 2d012c6

Browse files
takaswietiwai
authored andcommitted
ALSA: firewire-motu: use 'version' field of unit directory to identify model
Current ALSA firewire-motu driver uses the value of 'model' field of unit directory in configuration ROM for modalias for MOTU FireWire models. However, as long as I checked, Pre8 and 828mk3(Hybrid) have the same value for the field (=0x100800). unit | version | model --------------- | --------- | ---------- 828mkII | 0x000003 | 0x101800 Traveler | 0x000009 | 0x107800 Pre8 | 0x00000f | 0x100800 <- 828mk3(FW) | 0x000015 | 0x106800 AudioExpress | 0x000033 | 0x104800 828mk3(Hybrid) | 0x000035 | 0x100800 <- When updating firmware for MOTU 8pre FireWire from v1.0.0 to v1.0.3, I got change of the value from 0x100800 to 0x103800. On the other hand, the value of 'version' field is fixed to 0x00000f. As a quick glance, the higher 12 bits of the value of 'version' field represent firmware version, while the lower 12 bits is unknown. By induction, the value of 'version' field represents actual model. This commit changes modalias to match the value of 'version' field, instead of 'model' field. For degug, long name of added sound card includes hexadecimal value of 'model' field. Fixes: 6c5e1ac ("ALSA: firewire-motu: add support for Motu Traveler") Signed-off-by: Takashi Sakamoto <[email protected]> Cc: <[email protected]> # v4.19+ Signed-off-by: Takashi Iwai <[email protected]>
1 parent dcd0fea commit 2d012c6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

sound/firewire/motu/motu.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void name_card(struct snd_motu *motu)
3636
fw_csr_iterator_init(&it, motu->unit->directory);
3737
while (fw_csr_iterator_next(&it, &key, &val)) {
3838
switch (key) {
39-
case CSR_VERSION:
39+
case CSR_MODEL:
4040
version = val;
4141
break;
4242
}
@@ -46,7 +46,7 @@ static void name_card(struct snd_motu *motu)
4646
strcpy(motu->card->shortname, motu->spec->name);
4747
strcpy(motu->card->mixername, motu->spec->name);
4848
snprintf(motu->card->longname, sizeof(motu->card->longname),
49-
"MOTU %s (version:%d), GUID %08x%08x at %s, S%d",
49+
"MOTU %s (version:%06x), GUID %08x%08x at %s, S%d",
5050
motu->spec->name, version,
5151
fw_dev->config_rom[3], fw_dev->config_rom[4],
5252
dev_name(&motu->unit->device), 100 << fw_dev->max_speed);
@@ -237,20 +237,20 @@ static const struct snd_motu_spec motu_audio_express = {
237237
#define SND_MOTU_DEV_ENTRY(model, data) \
238238
{ \
239239
.match_flags = IEEE1394_MATCH_VENDOR_ID | \
240-
IEEE1394_MATCH_MODEL_ID | \
241-
IEEE1394_MATCH_SPECIFIER_ID, \
240+
IEEE1394_MATCH_SPECIFIER_ID | \
241+
IEEE1394_MATCH_VERSION, \
242242
.vendor_id = OUI_MOTU, \
243-
.model_id = model, \
244243
.specifier_id = OUI_MOTU, \
244+
.version = model, \
245245
.driver_data = (kernel_ulong_t)data, \
246246
}
247247

248248
static const struct ieee1394_device_id motu_id_table[] = {
249-
SND_MOTU_DEV_ENTRY(0x101800, &motu_828mk2),
250-
SND_MOTU_DEV_ENTRY(0x107800, &snd_motu_spec_traveler),
251-
SND_MOTU_DEV_ENTRY(0x106800, &motu_828mk3), /* FireWire only. */
252-
SND_MOTU_DEV_ENTRY(0x100800, &motu_828mk3), /* Hybrid. */
253-
SND_MOTU_DEV_ENTRY(0x104800, &motu_audio_express),
249+
SND_MOTU_DEV_ENTRY(0x000003, &motu_828mk2),
250+
SND_MOTU_DEV_ENTRY(0x000009, &snd_motu_spec_traveler),
251+
SND_MOTU_DEV_ENTRY(0x000015, &motu_828mk3), /* FireWire only. */
252+
SND_MOTU_DEV_ENTRY(0x000035, &motu_828mk3), /* Hybrid. */
253+
SND_MOTU_DEV_ENTRY(0x000033, &motu_audio_express),
254254
{ }
255255
};
256256
MODULE_DEVICE_TABLE(ieee1394, motu_id_table);

0 commit comments

Comments
 (0)