]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ALSA: bebob: expand sleep just after breaking connections for protocol version 1
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 1 Nov 2019 13:13:21 +0000 (22:13 +0900)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 05:04:26 +0000 (00:04 -0500)
BugLink: https://bugs.launchpad.net/bugs/1860490
[ Upstream commit d3eabe939aee3ffd5b133766a932629a9746298c ]

As long as I investigated, some devices with BeBoB protocol version 1
can be freezed during several hundreds milliseconds after breaking
connections. When accessing during the freezed time, any transaction
is corrupted. In the worst case, the device is going to reboot.

I can see this issue in:
 * Roland FA-66
 * M-Audio FireWire Solo

This commit expands sleep just after breaking connections to avoid
the freezed time as much as possible. I note that the freeze/reboot
behaviour is similar to below models:
 * Focusrite Saffire Pro 10 I/O
 * Focusrite Saffire Pro 26 I/O

The above models certainly reboot after breaking connections.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20191101131323.17300-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/firewire/bebob/bebob_stream.c

index 80ea162bf1a1b9c9e3bd4ea6b9a90bfa18b0b73f..40db01e4747664e755619d446c2e2f9332cd584f 100644 (file)
@@ -415,15 +415,16 @@ static int make_both_connections(struct snd_bebob *bebob)
        return 0;
 }
 
-static void
-break_both_connections(struct snd_bebob *bebob)
+static void break_both_connections(struct snd_bebob *bebob)
 {
        cmp_connection_break(&bebob->in_conn);
        cmp_connection_break(&bebob->out_conn);
 
-       /* These models seems to be in transition state for a longer time. */
-       if (bebob->maudio_special_quirk != NULL)
-               msleep(200);
+       // These models seem to be in transition state for a longer time. When
+       // accessing in the state, any transactions is corrupted. In the worst
+       // case, the device is going to reboot.
+       if (bebob->version < 2)
+               msleep(600);
 }
 
 static int