snd_dice: category ID
Hi Clemens,
I'd like to request the following patch to be applied on the firewire-kernel-streaming branch (current commit head 526795d69f5be6d058bdf89a65a303a1ee136aba).
It involves handling Weiss DICE devices which use a dedicated category ID (other than TCAT's default Cat ID (0x04), which is not necessarily binding). Citing (one of many) TC's user guide:
[...]
The manufacturer is free to use the lower 5 bytes of the WWUID in any way. The DICE firmware, by default, uses the chip ID as follows:
Upper 32 bits of WWUID
+------------------------+--------+ | 24 bit OUI – 0x000166 | Cat | +------------------------+--------+
Category 8 bits: TCAT uses 0x04 for this field.
Lower 32 bits of WWUID
+----------------------------+----------------+ | 10 bit product identifier | 22 bit serial# | +----------------------------+----------------+
[...]
Presumably, few of the other vendors have changed TCATs default Cat. ID. We have decided to change it to 0x00 since the beginning of our DICE product-line, alas this should be considered in snd-dice's dice_interface_check. Thanks in advance.
Rolf Anderegg
sound/firewire/dice.c +15 -3
@@ -1113,6 +1113,9 @@ static void dice_card_free(struct snd_card *card)#define DICE_CATEGORY_ID 0x04 +#define DICE_VENDOR_ID_WEISS 0x1C6A +#define DICE_CATEGORY_ID_WEISS 0x00 +static int __devinit dice_interface_check (struct fw_unit *unit) {static const int min_values[10 ]__devinitconst = {
@@ -1146,9 +1149,18 @@ static int __devinit dice_interface_check(struct fw_unit *unit)break ; } } -if (device->config_rom[3 ] != ((vendor <<8 ) |DICE_CATEGORY_ID ) || - device->config_rom[4 ] >>22 != model) -return -ENODEV ; +switch (vendor) { +case DICE_VENDOR_ID_WEISS : +if (device->config_rom[3 ] != ((vendor <<8 ) |DICE_CATEGORY_ID_WEISS ) || + device->config_rom[4 ] >>22 != model) +return -ENODEV ; +break ; +default : +if (device->config_rom[3 ] != ((vendor <<8 ) |DICE_CATEGORY_ID ) || + device->config_rom[4 ] >>22 != model) +return -ENODEV ; +break ; + }/* * Check that the sub address spaces exist and are located inside the
Clemens Ladisch
maintainerQuoted 9 lines · Rolf Anderegg
I'd like to request the following patch to be applied on the firewire-kernel-streaming branch (current commit head
526795d69f5be6d058bdf89a65a303a1ee136aba).
It involves handling Weiss DICE devices which use a dedicated category ID (other than TCAT's default Cat ID (0x04), which is not necessarily binding).Presumably, few of the other vendors have changed TCATs default Cat. ID. We have decided to change it to
0x00since the beginning of our DICE product-line, alas this should be considered in snd-dice'sdice_interface_check.
Kernel patches require a Signed-off-by tag (see Documentation/SubmittingPatches). But I rewrote it anyway ... :)
Regards,
Clemens