From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757230AbYDNKV0 (ORCPT ); Mon, 14 Apr 2008 06:21:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752289AbYDNKVR (ORCPT ); Mon, 14 Apr 2008 06:21:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:50068 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756649AbYDNKVQ (ORCPT ); Mon, 14 Apr 2008 06:21:16 -0400 Date: Mon, 14 Apr 2008 12:21:15 +0200 Message-ID: From: Takashi Iwai To: Pavel Machek Cc: perex@perex.cz, kernel list , Trivial patch monkey Subject: Re: usb audio: make quirk handling more readable, and fix commented-out code In-Reply-To: <20080329223540.GA5506@elf.ucw.cz> References: <20080329223540.GA5506@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:35:40 +0100, Pavel Machek wrote: > > > usb audio contains useful debugging code, protected by #if > 0. Unfortunately, it will not compile because variable names changed; > fix it. > > Dallas workaround is formatted in a way where it is not quite obvious > what is normal code and what is quirk. Reformat it to make it obvious. > > Signed-off-by: Pavel Machek Applied to ALSA tree now. 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 > @@ -1427,9 +1433,9 @@ static int set_format(struct snd_usb_sub > > subs->cur_audiofmt = fmt; > > -#if 0 > - printk("setting done: format = %d, rate = %d, channels = %d\n", > - fmt->format, fmt->rate, fmt->channels); > +#if 0 > + printk("setting done: format = %d, rate = %d..%d, channels = %d\n", > + fmt->format, fmt->rate_min, fmt->rate_max, fmt->channels); > printk(" datapipe = 0x%0x, syncpipe = 0x%0x\n", > subs->datapipe, subs->syncpipe); > #endif > @@ -2464,11 +2470,12 @@ static int parse_audio_format_i_type(str > } > break; > case USB_AUDIO_FORMAT_PCM8: > - /* Dallas DS4201 workaround */ > + pcm_format = SNDRV_PCM_FORMAT_U8; > + > + /* Dallas DS4201 workaround: it advertises U8 format, but really > + supports S8. */ > if (chip->usb_id == USB_ID(0x04fa, 0x4201)) > pcm_format = SNDRV_PCM_FORMAT_S8; > - else > - pcm_format = SNDRV_PCM_FORMAT_U8; > break; > case USB_AUDIO_FORMAT_IEEE_FLOAT: > pcm_format = SNDRV_PCM_FORMAT_FLOAT_LE; > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html >