]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: firewire-tascam: use the same size of period for PCM substream in AMDTP streams
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 7 Oct 2019 11:05:30 +0000 (20:05 +0900)
committerTakashi Iwai <tiwai@suse.de>
Thu, 17 Oct 2019 10:02:46 +0000 (12:02 +0200)
commit2022ab64bc5c127d864cc87ca3e5c85cddf6b570
tree3f208cab3d967fec525c39d5147fbb6fe3e25cb4
parent859d0ad59b2d5a74430f87ba88b8301447354a2a
ALSA: firewire-tascam: use the same size of period for PCM substream in AMDTP streams

In current implementation, when opening a PCM substream, it's needed to
check whether the opposite PCM substream runs. This is to assign
effectual constraints (e.g. sampling rate) to opened PCM substream.

The number of PCM substreams on AMDTP streams in domain is recorded in
own structure. Usage of this count is an alternative of the above check.
This is better because the count is incremented in pcm.hw_params earlier
than pcm.trigger.

This commit replaces the check with the substream count and the value for
the size of PCM period. Unlike the other drivers in ALSA firewire stack,
no MIDI substream is multiplexed into AMDTP stream.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20191007110532.30270-16-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/tascam/tascam-pcm.c