summaryrefslogtreecommitdiff
path: root/sound/firewire/motu/motu-pcm.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-10-07 20:05:23 +0900
committerTakashi Iwai <tiwai@suse.de>2019-10-17 12:02:43 +0200
commit0d39cd0e449925a6221da48835ef962cd72f330f (patch)
tree2df3a3cf00190e6ecfcc275245ee6a697b6b4cd1 /sound/firewire/motu/motu-pcm.c
parent262542ed93921c2632abb8a900daecff2b28057c (diff)
ALSA: firewire-motu: 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-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu/motu-pcm.c')
-rw-r--r--sound/firewire/motu/motu-pcm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/firewire/motu/motu-pcm.c b/sound/firewire/motu/motu-pcm.c
index aa2e584da6fe..9a54c562494b 100644
--- a/sound/firewire/motu/motu-pcm.c
+++ b/sound/firewire/motu/motu-pcm.c
@@ -202,9 +202,11 @@ 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(&motu->mutex);
- err = snd_motu_stream_reserve_duplex(motu, rate);
+ err = snd_motu_stream_reserve_duplex(motu, rate,
+ frames_per_period);
if (err >= 0)
++motu->substreams_counter;
mutex_unlock(&motu->mutex);