diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-07 14:05:24 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-17 13:02:43 +0300 |
commit | 9d9ff58c2f45f2bf926f7ee7c70bcc01bad4c0e8 (patch) | |
tree | 9f2204d46698c66739600fdfe31acf2d66a2129e /sound/firewire/fireface/ff-pcm.c | |
parent | 0d39cd0e449925a6221da48835ef962cd72f330f (diff) | |
download | linux-9d9ff58c2f45f2bf926f7ee7c70bcc01bad4c0e8.tar.xz |
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.c | 3 |
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); |