diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:12:14 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:38 -0400 |
commit | da3cec35dd3c31d8706db4bf379372ce70d92118 (patch) | |
tree | 9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/echoaudio/echoaudio_3g.c | |
parent | 622207dc31895b4e82c39100db8635d885c795e2 (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/echoaudio/echoaudio_3g.c')
-rw-r--r-- | sound/pci/echoaudio/echoaudio_3g.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/pci/echoaudio/echoaudio_3g.c b/sound/pci/echoaudio/echoaudio_3g.c index 52a933189576..c3736bbd819e 100644 --- a/sound/pci/echoaudio/echoaudio_3g.c +++ b/sound/pci/echoaudio/echoaudio_3g.c | |||
@@ -103,9 +103,11 @@ static int set_digital_mode(struct echoaudio *chip, u8 mode) | |||
103 | int err, i, o; | 103 | int err, i, o; |
104 | 104 | ||
105 | /* All audio channels must be closed before changing the digital mode */ | 105 | /* All audio channels must be closed before changing the digital mode */ |
106 | snd_assert(!chip->pipe_alloc_mask, return -EAGAIN); | 106 | if (snd_BUG_ON(chip->pipe_alloc_mask)) |
107 | return -EAGAIN; | ||
107 | 108 | ||
108 | snd_assert(chip->digital_modes & (1 << mode), return -EINVAL); | 109 | if (snd_BUG_ON(!(chip->digital_modes & (1 << mode)))) |
110 | return -EINVAL; | ||
109 | 111 | ||
110 | previous_mode = chip->digital_mode; | 112 | previous_mode = chip->digital_mode; |
111 | err = dsp_set_digital_mode(chip, mode); | 113 | err = dsp_set_digital_mode(chip, mode); |
@@ -267,8 +269,9 @@ static int set_sample_rate(struct echoaudio *chip, u32 rate) | |||
267 | return 0; | 269 | return 0; |
268 | } | 270 | } |
269 | 271 | ||
270 | snd_assert(rate < 50000 || chip->digital_mode != DIGITAL_MODE_ADAT, | 272 | if (snd_BUG_ON(rate >= 50000 && |
271 | return -EINVAL); | 273 | chip->digital_mode == DIGITAL_MODE_ADAT)) |
274 | return -EINVAL; | ||
272 | 275 | ||
273 | clock = 0; | 276 | clock = 0; |
274 | control_reg = le32_to_cpu(chip->comm_page->control_register); | 277 | control_reg = le32_to_cpu(chip->comm_page->control_register); |