From: Takashi Iwai <tiwai@suse.de>
To: Pavel Machek <pavel@suse.cz>
Cc: perex@perex.cz, kernel list <linux-kernel@vger.kernel.org>,
Trivial patch monkey <trivial@kernel.org>
Subject: Re: usb audio: make quirk handling more readable, and fix commented-out code
Date: Mon, 14 Apr 2008 12:21:15 +0200 [thread overview]
Message-ID: <s5hd4oshh44.wl%tiwai@suse.de> (raw)
In-Reply-To: <20080329223540.GA5506@elf.ucw.cz>
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 <pavel@suse.cz>
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
>
prev parent reply other threads:[~2008-04-14 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-29 22:35 usb audio: make quirk handling more readable, and fix commented-out code Pavel Machek
2008-04-14 10:21 ` Takashi Iwai [this message]
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=s5hd4oshh44.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=perex@perex.cz \
--cc=trivial@kernel.org \
/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