aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/sb/sb8_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/sb/sb8_main.c')
-rw-r--r--sound/isa/sb/sb8_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
index fe03bb820532..658d55769c9c 100644
--- a/sound/isa/sb/sb8_main.c
+++ b/sound/isa/sb/sb8_main.c
@@ -111,7 +111,9 @@ static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream)
111 switch (chip->hardware) { 111 switch (chip->hardware) {
112 case SB_HW_PRO: 112 case SB_HW_PRO:
113 if (runtime->channels > 1) { 113 if (runtime->channels > 1) {
114 snd_assert(rate == SB8_RATE(11025) || rate == SB8_RATE(22050), return -EINVAL); 114 if (snd_BUG_ON(rate != SB8_RATE(11025) &&
115 rate != SB8_RATE(22050)))
116 return -EINVAL;
115 chip->playback_format = SB_DSP_HI_OUTPUT_AUTO; 117 chip->playback_format = SB_DSP_HI_OUTPUT_AUTO;
116 break; 118 break;
117 } 119 }
@@ -237,7 +239,9 @@ static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream)
237 switch (chip->hardware) { 239 switch (chip->hardware) {
238 case SB_HW_PRO: 240 case SB_HW_PRO:
239 if (runtime->channels > 1) { 241 if (runtime->channels > 1) {
240 snd_assert(rate == SB8_RATE(11025) || rate == SB8_RATE(22050), return -EINVAL); 242 if (snd_BUG_ON(rate != SB8_RATE(11025) &&
243 rate != SB8_RATE(22050)))
244 return -EINVAL;
241 chip->capture_format = SB_DSP_HI_INPUT_AUTO; 245 chip->capture_format = SB_DSP_HI_INPUT_AUTO;
242 break; 246 break;
243 } 247 }