]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ALSA: dice: fix fallback from protocol extension into limited functionality
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 13 Jan 2020 08:46:28 +0000 (17:46 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 13 Jan 2020 09:43:27 +0000 (10:43 +0100)
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: 61567bb6773db ("ALSA: dice: use extended protocol to detect available stream formats")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/dice/dice-extension.c

index a63fcbc875adc3b9906f90d13fb3f5c8ea4ebbec..02f4a8318e38e7309da42b3274a59fee95d8349f 100644 (file)
@@ -159,8 +159,11 @@ 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;
+                       }
                }
        }