linux-stable/sound/firewire/tascam
Takashi Sakamoto 2e21e5b225 ALSA: firewire-tascam: check intermediate state of clock status and retry
commit e1a00b5b25 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: e453df44f0 ("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>
2019-10-05 13:10:00 +02:00
..
amdtp-tascam.c locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
Makefile ALSA: firewire-tascam: add support for MIDI functionality 2015-10-12 14:16:18 +02:00
tascam-hwdep.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
tascam-midi.c ALSA: firewire-tascam: support drain callback for MIDI playback substream 2017-04-14 14:50:43 +02:00
tascam-pcm.c ALSA: firewire-tascam: handle error code when getting current source of clock 2019-10-05 13:10:00 +02:00
tascam-proc.c sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
tascam-stream.c ALSA: firewire-tascam: check intermediate state of clock status and retry 2019-10-05 13:10:00 +02:00
tascam-transaction.c locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
tascam.c ALSA: firewire-tascam: fix memory leak of private data 2018-09-13 15:14:39 +02:00
tascam.h ALSA: firewire: remove support for 16 bit PCM samples in playback substream 2017-05-22 16:24:08 +02:00