diff options
Diffstat (limited to 'sound/pci/echoaudio/layla24_dsp.c')
-rw-r--r-- | sound/pci/echoaudio/layla24_dsp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/pci/echoaudio/layla24_dsp.c b/sound/pci/echoaudio/layla24_dsp.c index 97e42e115147..d61b5cbcccad 100644 --- a/sound/pci/echoaudio/layla24_dsp.c +++ b/sound/pci/echoaudio/layla24_dsp.c | |||
@@ -42,7 +42,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) | |||
42 | int err; | 42 | int err; |
43 | 43 | ||
44 | DE_INIT(("init_hw() - Layla24\n")); | 44 | DE_INIT(("init_hw() - Layla24\n")); |
45 | snd_assert((subdevice_id & 0xfff0) == LAYLA24, return -ENODEV); | 45 | if (snd_BUG_ON((subdevice_id & 0xfff0) != LAYLA24)) |
46 | return -ENODEV; | ||
46 | 47 | ||
47 | if ((err = init_dsp_comm_page(chip))) { | 48 | if ((err = init_dsp_comm_page(chip))) { |
48 | DE_INIT(("init_hw - could not initialize DSP comm page\n")); | 49 | DE_INIT(("init_hw - could not initialize DSP comm page\n")); |
@@ -73,7 +74,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) | |||
73 | return err; | 74 | return err; |
74 | 75 | ||
75 | err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); | 76 | err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); |
76 | snd_assert(err >= 0, return err); | 77 | if (err < 0) |
78 | return err; | ||
77 | err = set_professional_spdif(chip, TRUE); | 79 | err = set_professional_spdif(chip, TRUE); |
78 | 80 | ||
79 | DE_INIT(("init_hw done\n")); | 81 | DE_INIT(("init_hw done\n")); |
@@ -158,8 +160,9 @@ static int set_sample_rate(struct echoaudio *chip, u32 rate) | |||
158 | { | 160 | { |
159 | u32 control_reg, clock, base_rate; | 161 | u32 control_reg, clock, base_rate; |
160 | 162 | ||
161 | snd_assert(rate < 50000 || chip->digital_mode != DIGITAL_MODE_ADAT, | 163 | if (snd_BUG_ON(rate >= 50000 && |
162 | return -EINVAL); | 164 | chip->digital_mode == DIGITAL_MODE_ADAT)) |
165 | return -EINVAL; | ||
163 | 166 | ||
164 | /* Only set the clock for internal mode. */ | 167 | /* Only set the clock for internal mode. */ |
165 | if (chip->input_clock != ECHO_CLOCK_INTERNAL) { | 168 | if (chip->input_clock != ECHO_CLOCK_INTERNAL) { |