aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire/fireface/ff-pcm.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-10-07 20:05:24 +0900
committerTakashi Iwai <tiwai@suse.de>2019-10-17 12:02:43 +0200
commit9d9ff58c2f45f2bf926f7ee7c70bcc01bad4c0e8 (patch)
tree9f2204d46698c66739600fdfe31acf2d66a2129e /sound/firewire/fireface/ff-pcm.c
parentALSA: firewire-motu: register the size of PCM period to AMDTP domain (diff)
downloadlinux-dev-9d9ff58c2f45f2bf926f7ee7c70bcc01bad4c0e8.tar.xz
linux-dev-9d9ff58c2f45f2bf926f7ee7c70bcc01bad4c0e8.zip
ALSA: fireface: register the size of PCM period to AMDTP domain
This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20191007110532.30270-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff-pcm.c')
-rw-r--r--sound/firewire/fireface/ff-pcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/firewire/fireface/ff-pcm.c b/sound/firewire/fireface/ff-pcm.c
index 9eab3ad283ce..4f2208202494 100644
--- a/sound/firewire/fireface/ff-pcm.c
+++ b/sound/firewire/fireface/ff-pcm.c
@@ -211,9 +211,10 @@ static int pcm_hw_params(struct snd_pcm_substream *substream,
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
unsigned int rate = params_rate(hw_params);
+ unsigned int frames_per_period = params_period_size(hw_params);
mutex_lock(&ff->mutex);
- err = snd_ff_stream_reserve_duplex(ff, rate);
+ err = snd_ff_stream_reserve_duplex(ff, rate, frames_per_period);
if (err >= 0)
++ff->substreams_counter;
mutex_unlock(&ff->mutex);