]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/isa/sb/sb8_main.c
ALSA: Kill snd_assert() in sound/isa/*
[linux-2.6-omap-h63xx.git] / sound / isa / sb / sb8_main.c
index 6304c3a89ba0650b5a644c555f81dfded2cd2620..658d55769c9cd5ff44adf13aee830b455b215f5f 100644 (file)
@@ -111,7 +111,9 @@ static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream)
        switch (chip->hardware) {
        case SB_HW_PRO:
                if (runtime->channels > 1) {
-                       snd_assert(rate == SB8_RATE(11025) || rate == SB8_RATE(22050), return -EINVAL);
+                       if (snd_BUG_ON(rate != SB8_RATE(11025) &&
+                                      rate != SB8_RATE(22050)))
+                               return -EINVAL;
                        chip->playback_format = SB_DSP_HI_OUTPUT_AUTO;
                        break;
                }
@@ -237,7 +239,9 @@ static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream)
        switch (chip->hardware) {
        case SB_HW_PRO:
                if (runtime->channels > 1) {
-                       snd_assert(rate == SB8_RATE(11025) || rate == SB8_RATE(22050), return -EINVAL);
+                       if (snd_BUG_ON(rate != SB8_RATE(11025) &&
+                                      rate != SB8_RATE(22050)))
+                               return -EINVAL;
                        chip->capture_format = SB_DSP_HI_INPUT_AUTO;
                        break;
                }
@@ -277,7 +281,7 @@ static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream)
        } else {
                snd_sbdsp_command(chip, 256 - runtime->rate_den);
        }
-       if (chip->capture_format != SB_DSP_OUTPUT) {
+       if (chip->capture_format != SB_DSP_INPUT) {
                count--;
                snd_sbdsp_command(chip, SB_DSP_BLOCK_SIZE);
                snd_sbdsp_command(chip, count & 0xff);