]> www.infradead.org Git - users/dwmw2/linux.git/commit
ALSA: firewire-tascam: check intermediate state of clock status and retry
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 10 Sep 2019 13:51:52 +0000 (22:51 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:14:01 +0000 (13:14 +0200)
commit6e8f051e504d15da929385a1eef66c8f5d91e167
tree3503cccebd3b5dd4a5ebce5d7c28e5fd39363e25
parent75c1a117e1f779f541aea3463050f6eb66ca2288
ALSA: firewire-tascam: check intermediate state of clock status and retry

commit e1a00b5b253a4f97216b9a33199a863987075162 upstream.

2 bytes in MSB of register for clock status is zero during intermediate
state after changing status of sampling clock in models of TASCAM FireWire
series. The duration of this state differs depending on cases. During the
state, it's better to retry reading the register for current status of
the clock.

In current implementation, the intermediate state is checked only when
getting current sampling transmission frequency, then retry reading.
This care is required for the other operations to read the register.

This commit moves the codes of check and retry into helper function
commonly used for operations to read the register.

Fixes: e453df44f0d6 ("ALSA: firewire-tascam: add PCM functionality")
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20190910135152.29800-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/firewire/tascam/tascam-stream.c