aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/echo3g_dsp.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/echoaudio/echo3g_dsp.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/echoaudio/echo3g_dsp.c')
-rw-r--r--sound/pci/echoaudio/echo3g_dsp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/echoaudio/echo3g_dsp.c b/sound/pci/echoaudio/echo3g_dsp.c
index 48eb7c59911..417e25add82 100644
--- a/sound/pci/echoaudio/echo3g_dsp.c
+++ b/sound/pci/echoaudio/echo3g_dsp.c
@@ -47,7 +47,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
47 47
48 local_irq_enable(); 48 local_irq_enable();
49 DE_INIT(("init_hw() - Echo3G\n")); 49 DE_INIT(("init_hw() - Echo3G\n"));
50 snd_assert((subdevice_id & 0xfff0) == ECHO3G, return -ENODEV); 50 if (snd_BUG_ON((subdevice_id & 0xfff0) != ECHO3G))
51 return -ENODEV;
51 52
52 if ((err = init_dsp_comm_page(chip))) { 53 if ((err = init_dsp_comm_page(chip))) {
53 DE_INIT(("init_hw - could not initialize DSP comm page\n")); 54 DE_INIT(("init_hw - could not initialize DSP comm page\n"));
@@ -104,9 +105,11 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
104 if ((err = init_line_levels(chip)) < 0) 105 if ((err = init_line_levels(chip)) < 0)
105 return err; 106 return err;
106 err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); 107 err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA);
107 snd_assert(err >= 0, return err); 108 if (err < 0)
109 return err;
108 err = set_phantom_power(chip, 0); 110 err = set_phantom_power(chip, 0);
109 snd_assert(err >= 0, return err); 111 if (err < 0)
112 return err;
110 err = set_professional_spdif(chip, TRUE); 113 err = set_professional_spdif(chip, TRUE);
111 114
112 DE_INIT(("init_hw done\n")); 115 DE_INIT(("init_hw done\n"));