aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/vx222/vx222_ops.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:12:14 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:38 -0400
commitda3cec35dd3c31d8706db4bf379372ce70d92118 (patch)
tree9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/vx222/vx222_ops.c
parent622207dc31895b4e82c39100db8635d885c795e2 (diff)
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/vx222/vx222_ops.c')
-rw-r--r--sound/pci/vx222/vx222_ops.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index 631f3a639993..7e87f398ff0b 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -253,7 +253,8 @@ static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
253 int offset = pipe->hw_ptr; 253 int offset = pipe->hw_ptr;
254 u32 *addr = (u32 *)(runtime->dma_area + offset); 254 u32 *addr = (u32 *)(runtime->dma_area + offset);
255 255
256 snd_assert(count % 4 == 0, return); 256 if (snd_BUG_ON(count % 4))
257 return;
257 258
258 vx2_setup_pseudo_dma(chip, 1); 259 vx2_setup_pseudo_dma(chip, 1);
259 260
@@ -291,7 +292,8 @@ static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
291 u32 *addr = (u32 *)(runtime->dma_area + offset); 292 u32 *addr = (u32 *)(runtime->dma_area + offset);
292 unsigned long port = vx2_reg_addr(chip, VX_DMA); 293 unsigned long port = vx2_reg_addr(chip, VX_DMA);
293 294
294 snd_assert(count % 4 == 0, return); 295 if (snd_BUG_ON(count % 4))
296 return;
295 297
296 vx2_setup_pseudo_dma(chip, 0); 298 vx2_setup_pseudo_dma(chip, 0);
297 /* Transfer using pseudo-dma. 299 /* Transfer using pseudo-dma.
@@ -675,7 +677,8 @@ static void vx2_write_akm(struct vx_core *chip, int reg, unsigned int data)
675 a look up table, as there is no linear matching between the driver codec values 677 a look up table, as there is no linear matching between the driver codec values
676 and the real dBu value 678 and the real dBu value
677 */ 679 */
678 snd_assert(data < sizeof(vx2_akm_gains_lut), return); 680 if (snd_BUG_ON(data >= sizeof(vx2_akm_gains_lut)))
681 return;
679 682
680 switch (reg) { 683 switch (reg) {
681 case XX_CODEC_LEVEL_LEFT_REGISTER: 684 case XX_CODEC_LEVEL_LEFT_REGISTER:
@@ -823,7 +826,8 @@ static void vx2_set_input_level(struct snd_vx222 *chip)
823 preamp++; /* raise pre ampli + 18dB */ 826 preamp++; /* raise pre ampli + 18dB */
824 miclevel -= (18 * 2); /* lower level 18 dB (*2 because of 0.5 dB steps !) */ 827 miclevel -= (18 * 2); /* lower level 18 dB (*2 because of 0.5 dB steps !) */
825 } 828 }
826 snd_assert(preamp < 4, return); 829 if (snd_BUG_ON(preamp >= 4))
830 return;
827 831
828 /* set pre-amp level */ 832 /* set pre-amp level */
829 chip->regSELMIC &= ~MICRO_SELECT_PREAMPLI_MASK; 833 chip->regSELMIC &= ~MICRO_SELECT_PREAMPLI_MASK;