* snd_dice: category ID
@ 2012-02-13 17:46 Rolf Anderegg
2012-02-13 21:24 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Rolf Anderegg @ 2012-02-13 17:46 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: Uli Franke, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
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
[-- Attachment #2: weiss_categoryID.patch --]
[-- Type: text/plain, Size: 1125 bytes --]
diff --git a/sound/firewire/dice.c b/sound/firewire/dice.c
index 208ca0a..a2bef4e 100644
--- a/sound/firewire/dice.c
+++ b/sound/firewire/dice.c
@@ -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
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: snd_dice: category ID
2012-02-13 17:46 snd_dice: category ID Rolf Anderegg
@ 2012-02-13 21:24 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2012-02-13 21:24 UTC (permalink / raw)
To: rolf.anderegg; +Cc: Uli Franke, alsa-devel
Rolf Anderegg wrote:
> 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 0x00 since the beginning of our DICE product-line, alas
> this should be considered in snd-dice's dice_interface_check.
Kernel patches require a Signed-off-by tag (see Documentation/SubmittingPatches).
But I rewrote it anyway ... :)
Regards,
Clemens
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-13 21:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 17:46 snd_dice: category ID Rolf Anderegg
2012-02-13 21:24 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.