Commit 3e2dc6bd authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai
Browse files

ALSA: dice: fix fallback from protocol extension into limited functionality



At failure of attempt to detect protocol extension, ALSA dice driver
should be fallback to limited functionality. However it's not.

This commit fixes it.

Cc: <stable@vger.kernel.org> # v4.18+
Fixes: 58579c05 ("ALSA: dice: use extended protocol to detect available stream formats")
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jp


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 747d1f07
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -159,10 +159,13 @@ int snd_dice_detect_extension_formats(struct snd_dice *dice)
		int j;

		for (j = i + 1; j < 9; ++j) {
			if (pointers[i * 2] == pointers[j * 2])
			if (pointers[i * 2] == pointers[j * 2]) {
				// Fallback to limited functionality.
				err = -ENXIO;
				goto end;
			}
		}
	}

	section_addr = DICE_EXT_APP_SPACE + be32_to_cpu(pointers[12]) * 4;
	err = detect_stream_formats(dice, section_addr);