aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/echo3g_dsp.c
diff options
context:
space:
mode:
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 48eb7c599111..417e25add82b 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"));