]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/via82xx.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / via82xx.c
index 6781be9e3078ac702364770f407fbc4458486882..84ea35d8b252f00a1cdbd3c00c6d10a0a922ef71 100644 (file)
@@ -824,7 +824,8 @@ static snd_pcm_uframes_t snd_via686_pcm_pointer(struct snd_pcm_substream *substr
        struct viadev *viadev = substream->runtime->private_data;
        unsigned int idx, ptr, count, res;
 
-       snd_assert(viadev->tbl_entries, return 0);
+       if (snd_BUG_ON(!viadev->tbl_entries))
+               return 0;
        if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE))
                return 0;
 
@@ -855,7 +856,8 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst
        unsigned int idx, count, res;
        int status;
        
-       snd_assert(viadev->tbl_entries, return 0);
+       if (snd_BUG_ON(!viadev->tbl_entries))
+               return 0;
 
        spin_lock(&chip->reg_lock);
        count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT));
@@ -1037,7 +1039,7 @@ static int snd_via8233_playback_prepare(struct snd_pcm_substream *substream)
        else
                rbits = (0x100000 / 48000) * runtime->rate +
                        ((0x100000 % 48000) * runtime->rate) / 48000;
-       snd_assert((rbits & ~0xfffff) == 0, return -EINVAL);
+       snd_BUG_ON(rbits & ~0xfffff);
        snd_via82xx_channel_reset(chip, viadev);
        snd_via82xx_set_table_ptr(chip, viadev);
        outb(chip->playback_volume[viadev->reg_offset / 0x10][0],