summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorPavel Machek <pavel@suse.cz>2008-04-14 15:14:22 +0400
committerTakashi Iwai <tiwai@suse.de>2008-04-24 14:00:34 +0400
commit2a56f51bcc3650ecff806450f7fdab5edf57618f (patch)
treefada90c226de13fe84e14f622d6b28064b8a9696 /sound
parentb9d43bcd061956c8144bcb453d07d13236b6ab28 (diff)
downloadlinux-2a56f51bcc3650ecff806450f7fdab5edf57618f.tar.xz
[ALSA] usb audio: make quirk handling more readable, and fix commented-out code
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/usbaudio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index ff2e09a46133..26fb5769d951 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -1427,8 +1427,8 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
subs->cur_audiofmt = fmt;
#if 0
- printk("setting done: format = %d, rate = %d, channels = %d\n",
- fmt->format, fmt->rate, fmt->channels);
+ 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
@@ -2468,11 +2468,12 @@ static int parse_audio_format_i_type(struct snd_usb_audio *chip, struct audiofor
}
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;