[PATCH 0/6] ALSA: bebob/fireworks: device entry corrections
Hi,
After working for hardware database of systemd[1], I realize that current device entries of ALSA bebob/fireworks drivers includes some issues. This patchset corrects them.
[1] https://github.com/systemd/systemd/pull/19124
Takashi Sakamoto (6): ALSA: bebob: fulfil device entries ALSA: fireworks: fulfil device entries ALSA: bebob: correct device entry for Mackie D.2 FireWire option card ALSA: bebob: correct device entry for Acoustic Reality eAR Master One, Eroica, Figaro, and Ciaccona ALSA: bebob: code refactoring for M-Audio models ALSA: bebob: correct device entries for Phonic Helix Board and FireFly series
sound/firewire/bebob/bebob.c | 92 ++++++++++++++-------------- sound/firewire/bebob/bebob.h | 9 --- sound/firewire/fireworks/fireworks.c | 15 +++++ sound/firewire/fireworks/fireworks.h | 8 --- 4 files changed, 61 insertions(+), 63 deletions(-)
Although unit directory in root directory of configuration ROM has the same value (0x00a02d) for its specifier_id entry to express AV/C device, it has two cases for the value (0x010001/0x014001) to version entry.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/bebob/bebob.c | 30 +++++++++++++++++------------- sound/firewire/bebob/bebob.h | 9 --------- 2 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index 452317e53565..5ce25ddcbf5c 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -348,6 +348,22 @@ static const struct snd_bebob_spec spec_normal = { .meter = NULL };
+#define SPECIFIER_1394TA 0x00a02d + +// The immediate entry for version in unit directory differs depending on models: +// * 0x010001 +// * 0x014001 +#define SND_BEBOB_DEV_ENTRY(vendor, model, data) \ +{ \ + .match_flags = IEEE1394_MATCH_VENDOR_ID | \ + IEEE1394_MATCH_MODEL_ID | \ + IEEE1394_MATCH_SPECIFIER_ID, \ + .vendor_id = vendor, \ + .model_id = model, \ + .specifier_id = SPECIFIER_1394TA, \ + .driver_data = (kernel_ulong_t)data \ +} + static const struct ieee1394_device_id bebob_id_table[] = { /* Edirol, FA-66 */ SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010049, &spec_normal), @@ -425,19 +441,7 @@ static const struct ieee1394_device_id bebob_id_table[] = { /* Focusrite, SaffirePro 26 I/O */ SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec), /* Focusrite, SaffirePro 10 I/O */ - { - // The combination of vendor_id and model_id is the same as the - // same as the one of Liquid Saffire 56. - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID | - IEEE1394_MATCH_SPECIFIER_ID | - IEEE1394_MATCH_VERSION, - .vendor_id = VEN_FOCUSRITE, - .model_id = 0x000006, - .specifier_id = 0x00a02d, - .version = 0x010001, - .driver_data = (kernel_ulong_t)&saffirepro_10_spec, - }, + SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x000006, &saffirepro_10_spec), /* Focusrite, Saffire(no label and LE) */ SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH, &saffire_spec), diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h index dff8e25c6ca3..c06579d9380e 100644 --- a/sound/firewire/bebob/bebob.h +++ b/sound/firewire/bebob/bebob.h @@ -253,13 +253,4 @@ extern const struct snd_bebob_spec maudio_special_spec; int snd_bebob_maudio_special_discover(struct snd_bebob *bebob, bool is1814); int snd_bebob_maudio_load_firmware(struct fw_unit *unit);
-#define SND_BEBOB_DEV_ENTRY(vendor, model, data) \ -{ \ - .match_flags = IEEE1394_MATCH_VENDOR_ID | \ - IEEE1394_MATCH_MODEL_ID, \ - .vendor_id = vendor, \ - .model_id = model, \ - .driver_data = (kernel_ulong_t)data \ -} - #endif
All of devices with Echo Audio Fireworks board module has the same combination of specifier_id (0x00a02d) and version (0x010000) in unit directory.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/fireworks/fireworks.c | 15 +++++++++++++++ sound/firewire/fireworks/fireworks.h | 8 -------- 2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c index 865dac3b37e6..ffb6dd796243 100644 --- a/sound/firewire/fireworks/fireworks.c +++ b/sound/firewire/fireworks/fireworks.c @@ -300,6 +300,21 @@ static void efw_remove(struct fw_unit *unit) snd_card_free(efw->card); }
+#define SPECIFIER_1394TA 0x00a02d +#define VERSION_EFW 0x010000 + +#define SND_EFW_DEV_ENTRY(vendor, model) \ +{ \ + .match_flags = IEEE1394_MATCH_VENDOR_ID | \ + IEEE1394_MATCH_MODEL_ID | \ + IEEE1394_MATCH_SPECIFIER_ID | \ + IEEE1394_MATCH_VERSION, \ + .vendor_id = vendor,\ + .model_id = model, \ + .specifier_id = SPECIFIER_1394TA, \ + .version = VERSION_EFW, \ +} + static const struct ieee1394_device_id efw_id_table[] = { SND_EFW_DEV_ENTRY(VENDOR_LOUD, MODEL_MACKIE_400F), SND_EFW_DEV_ENTRY(VENDOR_LOUD, MODEL_MACKIE_1200F), diff --git a/sound/firewire/fireworks/fireworks.h b/sound/firewire/fireworks/fireworks.h index 2c0c7de8b824..c8d5879efe28 100644 --- a/sound/firewire/fireworks/fireworks.h +++ b/sound/firewire/fireworks/fireworks.h @@ -224,12 +224,4 @@ int snd_efw_get_multiplier_mode(unsigned int sampling_rate, unsigned int *mode);
int snd_efw_create_hwdep_device(struct snd_efw *efw);
-#define SND_EFW_DEV_ENTRY(vendor, model) \ -{ \ - .match_flags = IEEE1394_MATCH_VENDOR_ID | \ - IEEE1394_MATCH_MODEL_ID, \ - .vendor_id = vendor,\ - .model_id = model \ -} - #endif
For Mackie D.2 FireWire option card, 0x00000f is used for the value of immediate entry for vendor in unit directory. The value comes from report by FFADO user in below page:
* http://subversion.ffado.org/wiki/AvcModels/MackieD.2.
However, it seems to be wrong. There are two causes; vendor's mistake to decide value for GUID field in configuration ROM against standard, as Stefan Richter mentioned in below post:
* https://lore.kernel.org/alsa-devel/1443917823-13516-1-git-send-email-o-takas...
Another is implementation of libffado. The library doesn't print out the value from immediate entry for vendor in unit directory. It just print out the first 6 bytes of GUID as vendor ID.
This commit replaces with correct vendor OUI.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/bebob/bebob.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index 5ce25ddcbf5c..db1c1dfc0484 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -40,8 +40,7 @@ static DECLARE_BITMAP(devices_used, SNDRV_CARDS); #define VEN_EDIROL 0x000040ab #define VEN_PRESONUS 0x00000a92 #define VEN_BRIDGECO 0x000007f5 -#define VEN_MACKIE1 0x0000000f -#define VEN_MACKIE2 0x00000ff2 +#define VEN_MACKIE 0x00000ff2 #define VEN_STANTON 0x00001260 #define VEN_TASCAM 0x0000022e #define VEN_BEHRINGER 0x00001564 @@ -380,9 +379,9 @@ static const struct ieee1394_device_id bebob_id_table[] = { /* BridgeCo, Audio5 */ SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ - SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), + SND_BEBOB_DEV_ENTRY(VEN_MACKIE, 0x00010065, &spec_normal), // Mackie, d.2 (optional Firewire card with DM1000). - SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), + SND_BEBOB_DEV_ENTRY(VEN_MACKIE, 0x00010067, &spec_normal), /* Stanton, ScratchAmp */ SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), /* Tascam, IF-FW DM */
The value of vendor OUI is invalid. Furthermore it seems to be Terratec OEM.
* http://subversion.ffado.org/wiki/AvcModels/AcousticRealityeARMasterOne
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/bebob/bebob.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index db1c1dfc0484..6784ab2cb678 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -46,7 +46,6 @@ static DECLARE_BITMAP(devices_used, SNDRV_CARDS); #define VEN_BEHRINGER 0x00001564 #define VEN_APOGEE 0x000003db #define VEN_ESI 0x00000f1b -#define VEN_ACOUSTIC 0x00000002 #define VEN_CME 0x0000000a #define VEN_PHONIC 0x00001496 #define VEN_LYNX 0x000019e5 @@ -403,8 +402,8 @@ static const struct ieee1394_device_id bebob_id_table[] = { SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x01eeee, &spec_normal), /* ESI, Quatafire610 */ SND_BEBOB_DEV_ENTRY(VEN_ESI, 0x00010064, &spec_normal), - /* AcousticReality, eARMasterOne */ - SND_BEBOB_DEV_ENTRY(VEN_ACOUSTIC, 0x00000002, &spec_normal), + // AcousticReality, eARMasterOne. Terratec OEM. + SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal), /* CME, MatrixKFW */ SND_BEBOB_DEV_ENTRY(VEN_CME, 0x00030000, &spec_normal), /* Phonic, Helix Board 12 MkII */
For M-Audio FireWire 410, the value of immediate entry for vendor in unit directory is the value for BridgeCo. AG OUI. It seems that M-Audio uses initial settings as is for its product.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/bebob/bebob.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index 6784ab2cb678..9f8df57c1e8b 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -54,8 +54,7 @@ static DECLARE_BITMAP(devices_used, SNDRV_CARDS); #define VEN_TERRATEC 0x00000aac #define VEN_YAMAHA 0x0000a0de #define VEN_FOCUSRITE 0x0000130e -#define VEN_MAUDIO1 0x00000d6c -#define VEN_MAUDIO2 0x000007f5 +#define VEN_MAUDIO 0x00000d6c #define VEN_DIGIDESIGN 0x00a07e
#define MODEL_FOCUSRITE_SAFFIRE_BOTH 0x00000000 @@ -159,7 +158,7 @@ check_audiophile_booted(struct fw_unit *unit)
static int detect_quirks(struct snd_bebob *bebob, const struct ieee1394_device_id *entry) { - if (entry->vendor_id == VEN_MAUDIO1) { + if (entry->vendor_id == VEN_MAUDIO) { switch (entry->model_id) { case MODEL_MAUDIO_PROFIRELIGHTBRIDGE: // M-Audio ProFire Lightbridge has a quirk to transfer packets with @@ -192,7 +191,7 @@ static int bebob_probe(struct fw_unit *unit, const struct ieee1394_device_id *en if (entry->vendor_id == VEN_FOCUSRITE && entry->model_id == MODEL_FOCUSRITE_SAFFIRE_BOTH) spec = get_saffire_spec(unit); - else if (entry->vendor_id == VEN_MAUDIO1 && + else if (entry->vendor_id == VEN_MAUDIO && entry->model_id == MODEL_MAUDIO_AUDIOPHILE_BOTH && !check_audiophile_booted(unit)) spec = NULL; @@ -200,7 +199,8 @@ static int bebob_probe(struct fw_unit *unit, const struct ieee1394_device_id *en spec = (const struct snd_bebob_spec *)entry->driver_data;
if (spec == NULL) { - if (entry->vendor_id == VEN_MAUDIO1 || entry->vendor_id == VEN_MAUDIO2) + // To boot up M-Audio models. + if (entry->vendor_id == VEN_MAUDIO || entry->vendor_id == VEN_BRIDGECO) return snd_bebob_maudio_load_firmware(unit); else return -ENODEV; @@ -280,7 +280,7 @@ static int bebob_probe(struct fw_unit *unit, const struct ieee1394_device_id *en if (err < 0) goto error;
- if (entry->vendor_id == VEN_MAUDIO1 && + if (entry->vendor_id == VEN_MAUDIO && (entry->model_id == MODEL_MAUDIO_FW1814 || entry->model_id == MODEL_MAUDIO_PROJECTMIX)) { // This is a workaround. This bus reset seems to have an effect to make devices // correctly handling transactions. Without this, the devices have gap_count @@ -443,26 +443,26 @@ static const struct ieee1394_device_id bebob_id_table[] = { /* Focusrite, Saffire(no label and LE) */ SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH, &saffire_spec), - /* M-Audio, Firewire 410 */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010058, NULL), /* bootloader */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010046, &maudio_fw410_spec), + // M-Audio, Firewire 410. The vendor field is left as BridgeCo. AG. + SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010058, NULL), + SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010046, &maudio_fw410_spec), /* M-Audio, Firewire Audiophile */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_AUDIOPHILE_BOTH, + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, MODEL_MAUDIO_AUDIOPHILE_BOTH, &maudio_audiophile_spec), /* M-Audio, Firewire Solo */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010062, &maudio_solo_spec), + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, 0x00010062, &maudio_solo_spec), /* M-Audio, Ozonic */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x0000000a, &maudio_ozonic_spec), + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, 0x0000000a, &maudio_ozonic_spec), /* M-Audio NRV10 */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010081, &maudio_nrv10_spec), + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, 0x00010081, &maudio_nrv10_spec), /* M-Audio, ProFireLightbridge */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_PROFIRELIGHTBRIDGE, &spec_normal), + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, MODEL_MAUDIO_PROFIRELIGHTBRIDGE, &spec_normal), /* Firewire 1814 */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010070, NULL), /* bootloader */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_FW1814, + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, 0x00010070, NULL), /* bootloader */ + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, MODEL_MAUDIO_FW1814, &maudio_special_spec), /* M-Audio ProjectMix */ - SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_PROJECTMIX, + SND_BEBOB_DEV_ENTRY(VEN_MAUDIO, MODEL_MAUDIO_PROJECTMIX, &maudio_special_spec), /* Digidesign Mbox 2 Pro */ SND_BEBOB_DEV_ENTRY(VEN_DIGIDESIGN, 0x0000a9, &spec_normal),
Phonic shipped Helix board and FireFly series with IEEE 1394 functionality. Regarding to the parameters in unit directory, these series have two cases below:
1. the same parameters in unit directory * Firefly 202 * Firefly 302 * Firefly 808 Universal * HelixBoard 12 FireWire, 12 Universal * HelixBoard 18 FireWire, 18 Universal * HelixBoard 24 FireWire, 24 Universal
2. Unique parameters in unit directory * FireFly 808 * HelixBoard 12 FireWire MkII * HelixBoard 18 FireWire MkII * HelixBoard 24 FireWire MkII
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/bebob/bebob.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index 9f8df57c1e8b..e8d5ba105480 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -406,13 +406,16 @@ static const struct ieee1394_device_id bebob_id_table[] = { SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal), /* CME, MatrixKFW */ SND_BEBOB_DEV_ENTRY(VEN_CME, 0x00030000, &spec_normal), - /* Phonic, Helix Board 12 MkII */ + // Phonic Helix Board 12 FireWire MkII. SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00050000, &spec_normal), - /* Phonic, Helix Board 18 MkII */ + // Phonic Helix Board 18 FireWire MkII. SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00060000, &spec_normal), - /* Phonic, Helix Board 24 MkII */ + // Phonic Helix Board 24 FireWire MkII. SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00070000, &spec_normal), - /* Phonic, Helix Board 12 Universal/18 Universal/24 Universal */ + // Phonic FireFly 808 FireWire. + SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00080000, &spec_normal), + // Phonic FireFly 202, 302, 808 Universal. + // Phinic Helix Board 12/18/24 FireWire, 12/18/24 Universal SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00000000, &spec_normal), /* Lynx, Aurora 8/16 (LT-FW) */ SND_BEBOB_DEV_ENTRY(VEN_LYNX, 0x00000001, &spec_normal), @@ -476,11 +479,6 @@ static const struct ieee1394_device_id bebob_id_table[] = { /* Infrasonic, Windy6 */ /* Mackie, Digital X Bus x.200 */ /* Mackie, Digital X Bus x.400 */ - /* Phonic, HB 12 */ - /* Phonic, HB 24 */ - /* Phonic, HB 18 */ - /* Phonic, FireFly 202 */ - /* Phonic, FireFly 302 */ /* Rolf Spuler, Firewire Guitar */ {} };
On Fri, 11 Jun 2021 11:37:24 +0200, Takashi Sakamoto wrote:
Hi,
After working for hardware database of systemd[1], I realize that current device entries of ALSA bebob/fireworks drivers includes some issues. This patchset corrects them.
[1] https://github.com/systemd/systemd/pull/19124
Takashi Sakamoto (6): ALSA: bebob: fulfil device entries ALSA: fireworks: fulfil device entries ALSA: bebob: correct device entry for Mackie D.2 FireWire option card ALSA: bebob: correct device entry for Acoustic Reality eAR Master One, Eroica, Figaro, and Ciaccona ALSA: bebob: code refactoring for M-Audio models ALSA: bebob: correct device entries for Phonic Helix Board and FireFly series
Thanks, applied all fix patches.
Takashi
participants (2)
-
Takashi Iwai
-
Takashi Sakamoto