Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c914f55f authored by Mark Hills's avatar Mark Hills Committed by Takashi Iwai
Browse files

ALSA: echoaudio: Remove incorrect part of assertion



This assertion seems to imply that chip->dsp_code_to_load is a pointer.
It's actually an integer handle on the actual firmware, and 0 has no
special meaning.

The assertion prevents initialisation of a Darla20 card, but would also
affect other models. It seems it was introduced in commit dd7b254d.

ALSA sound/pci/echoaudio/echoaudio.c:2061 Echoaudio driver starting...
ALSA sound/pci/echoaudio/echoaudio.c:1969 chip=ebe4e000
ALSA sound/pci/echoaudio/echoaudio.c:2007 pci=ed568000 irq=19 subdev=0010 Init hardware...
ALSA sound/pci/echoaudio/darla20_dsp.c:36 init_hw() - Darla20
------------[ cut here ]------------
WARNING: at sound/pci/echoaudio/echoaudio_dsp.c:478 init_hw+0x1d1/0x86c [snd_darla20]()
Hardware name: Dell DM051
BUG? (!chip->dsp_code_to_load || !chip->comm_page)

Signed-off-by: default avatarMark Hills <mark@pogo.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e9e7183f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip)
	const struct firmware *fw;
	const struct firmware *fw;
	int box_type, err;
	int box_type, err;


	if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page))
	if (snd_BUG_ON(!chip->comm_page))
		return -EPERM;
		return -EPERM;


	/* See if the ASIC is present and working - only if the DSP is already loaded */
	/* See if the ASIC is present and working - only if the DSP is already loaded */