summaryrefslogtreecommitdiff
path: root/sound/firewire/bebob/bebob_pcm.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-10-07 14:05:17 +0300
committerTakashi Iwai <tiwai@suse.de>2019-10-17 13:02:40 +0300
commit8737209fe4a251a7d1de8f77c126ce7b69d926e7 (patch)
tree3568d1af0c49ffedd38768a686504ce06ffe18e4 /sound/firewire/bebob/bebob_pcm.c
parentd68c3123ba88dcd6692c90e698473d57856578e1 (diff)
downloadlinux-8737209fe4a251a7d1de8f77c126ce7b69d926e7.tar.xz
ALSA: bebob: 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-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob_pcm.c')
-rw-r--r--sound/firewire/bebob/bebob_pcm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/firewire/bebob/bebob_pcm.c b/sound/firewire/bebob/bebob_pcm.c
index 0fb9eed46837..3b2227abf8a9 100644
--- a/sound/firewire/bebob/bebob_pcm.c
+++ b/sound/firewire/bebob/bebob_pcm.c
@@ -197,9 +197,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(&bebob->mutex);
- err = snd_bebob_stream_reserve_duplex(bebob, rate);
+ err = snd_bebob_stream_reserve_duplex(bebob, rate,
+ frames_per_period);
if (err >= 0)
++bebob->substreams_counter;
mutex_unlock(&bebob->mutex);