From: Pavel Machek <pavel@suse.cz>
To: perex@perex.cz, kernel list <linux-kernel@vger.kernel.org>,
tiwai@suse.de
Subject: usb audio: Fix another Dallas quirk
Date: Sat, 29 Mar 2008 23:32:41 +0100 [thread overview]
Message-ID: <20080329223241.GA5348@elf.ucw.cz> (raw)
Dallas USB speakers are buggy in more than one way. One of configs
they offer does not work at all.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 257a4e1..b6b2490 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
int format;
struct audioformat *fp;
unsigned char *fmt, *csep;
+ int num;
dev = chip->dev;
/* parse the interface's altsettings */
iface = usb_ifnum_to_if(dev, iface_no);
- for (i = 0; i < iface->num_altsetting; i++) {
+ num = iface->num_altsetting;
+
+ /* Dallas DS4201 workaround: It presents 5 altsettings, but the last
+ one misses syncpipe, and does not produce any sound. */
+ if (chip->usb_id == USB_ID(0x04fa, 0x4201))
+ num = 4;
+
+ for (i = 0; i < num; i++) {
alts = &iface->altsetting[i];
altsd = get_iface_desc(alts);
/* skip invalid one */
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next reply other threads:[~2008-03-29 22:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-29 22:32 Pavel Machek [this message]
2008-04-01 19:20 ` usb audio: Fix another Dallas quirk Andrew Morton
2008-04-02 12:49 ` Pavel Machek
2008-04-14 10:21 ` Takashi Iwai
2008-04-14 10:47 ` Pavel Machek
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=20080329223241.GA5348@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox