From: Rolf Anderegg <rolf.anderegg@weiss.ch>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: Uli Franke <uli.franke@weiss.ch>,
alsa-devel <alsa-devel@alsa-project.org>
Subject: snd_dice: category ID
Date: Mon, 13 Feb 2012 18:46:36 +0100 [thread overview]
Message-ID: <4F394C7C.1090007@weiss.ch> (raw)
[-- 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 --]
next reply other threads:[~2012-02-13 17:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 17:46 Rolf Anderegg [this message]
2012-02-13 21:24 ` snd_dice: category ID Clemens Ladisch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F394C7C.1090007@weiss.ch \
--to=rolf.anderegg@weiss.ch \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=uli.franke@weiss.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.