From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757930AbYDNKV7 (ORCPT ); Mon, 14 Apr 2008 06:21:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757341AbYDNKVi (ORCPT ); Mon, 14 Apr 2008 06:21:38 -0400 Received: from mail.suse.de ([195.135.220.2]:60654 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755645AbYDNKVh (ORCPT ); Mon, 14 Apr 2008 06:21:37 -0400 Date: Mon, 14 Apr 2008 12:21:35 +0200 Message-ID: From: Takashi Iwai To: Pavel Machek Cc: perex@perex.cz, kernel list Subject: Re: usb audio: Fix another Dallas quirk In-Reply-To: <20080329223241.GA5348@elf.ucw.cz> References: <20080329223241.GA5348@elf.ucw.cz> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Sat, 29 Mar 2008 23:32:41 +0100, Pavel Machek wrote: > > > 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 Applied this to ALSA tree, too. Thanks. Takashi > > 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 >