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

Commit a5ba6beb authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: riptide - Fix detection / load of firmware files

The detection and loading of firmeware on riptide driver has been broken
due to rewrite of some codes, checking the presense wrongly.
This patch fixes the logic again.

Reference: kernel bug 16596
	https://bugzilla.kernel.org/show_bug.cgi?id=16596



Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent da5cabf8
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1224,16 +1224,15 @@ static int try_to_load_firmware(struct cmdif *cif, struct snd_riptide *chip)
		    firmware.firmware.ASIC, firmware.firmware.CODEC,
		    firmware.firmware.AUXDSP, firmware.firmware.PROG);

	if (!chip)
		return 1;

	for (i = 0; i < FIRMWARE_VERSIONS; i++) {
		if (!memcmp(&firmware_versions[i], &firmware, sizeof(firmware)))
			break;
	}
	if (i >= FIRMWARE_VERSIONS)
		return 0; /* no match */

	if (!chip)
			return 1; /* OK */

	}

	snd_printdd("Writing Firmware\n");
	if (!chip->fw_entry) {
		err = request_firmware(&chip->fw_entry, "riptide.hex",