summaryrefslogtreecommitdiffstats
path: root/sound/firewire/tascam/tascam-stream.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-10-17 17:54:19 +0200
committerTakashi Iwai <tiwai@suse.de>2019-10-18 04:35:50 +0200
commit128307d5f947d43a89e68dd8357879a0f111821d (patch)
tree2687fc2becab1e2d0a3a87e61f59382ffe7d20b9 /sound/firewire/tascam/tascam-stream.c
parentALSA: firewire-digi00x: share PCM buffer size for both direction (diff)
downloadlinux-128307d5f947d43a89e68dd8357879a0f111821d.tar.xz
linux-128307d5f947d43a89e68dd8357879a0f111821d.zip
ALSA: firewire-tascam: share PCM buffer size for both direction
This commit allows ALSA firewire-tascam driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20191017155424.885-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/tascam/tascam-stream.c')
-rw-r--r--sound/firewire/tascam/tascam-stream.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/firewire/tascam/tascam-stream.c b/sound/firewire/tascam/tascam-stream.c
index 1e4d44ed8bed..a9b3b7eb6d21 100644
--- a/sound/firewire/tascam/tascam-stream.c
+++ b/sound/firewire/tascam/tascam-stream.c
@@ -384,7 +384,8 @@ void snd_tscm_stream_destroy_duplex(struct snd_tscm *tscm)
}
int snd_tscm_stream_reserve_duplex(struct snd_tscm *tscm, unsigned int rate,
- unsigned int frames_per_period)
+ unsigned int frames_per_period,
+ unsigned int frames_per_buffer)
{
unsigned int curr_rate;
int err;
@@ -416,7 +417,7 @@ int snd_tscm_stream_reserve_duplex(struct snd_tscm *tscm, unsigned int rate,
}
err = amdtp_domain_set_events_per_period(&tscm->domain,
- frames_per_period, 0);
+ frames_per_period, frames_per_buffer);
if (err < 0) {
fw_iso_resources_free(&tscm->tx_resources);
fw_iso_resources_free(&tscm->rx_resources);