aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-06-17 14:54:47 +0200
committerTakashi Iwai <tiwai@suse.de>2011-06-17 14:54:47 +0200
commit3409fcd1f71d02025e3f179127a8ba243c525d78 (patch)
tree365b2e3f8901c358f6ea216c2ba03e7a1f48a359 /sound/usb
parentALSA: firewire-speakers, oxygen, ua101: allow > 10 s periods (diff)
parentALSA: hda - Fix no NID error with VIA codecs (diff)
downloadlinux-dev-3409fcd1f71d02025e3f179127a8ba243c525d78.tar.xz
linux-dev-3409fcd1f71d02025e3f179127a8ba243c525d78.zip
Merge branch 'fix/hda' into topic/misc
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/6fire/pcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c
index b137b25865cc..d144cdb2f159 100644
--- a/sound/usb/6fire/pcm.c
+++ b/sound/usb/6fire/pcm.c
@@ -395,12 +395,12 @@ static int usb6fire_pcm_open(struct snd_pcm_substream *alsa_sub)
alsa_rt->hw = pcm_hw;
if (alsa_sub->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- if (rt->rate >= 0)
+ if (rt->rate < ARRAY_SIZE(rates))
alsa_rt->hw.rates = rates_alsaid[rt->rate];
alsa_rt->hw.channels_max = OUT_N_CHANNELS;
sub = &rt->playback;
} else if (alsa_sub->stream == SNDRV_PCM_STREAM_CAPTURE) {
- if (rt->rate >= 0)
+ if (rt->rate < ARRAY_SIZE(rates))
alsa_rt->hw.rates = rates_alsaid[rt->rate];
alsa_rt->hw.channels_max = IN_N_CHANNELS;
sub = &rt->capture;