diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-07 20:05:22 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-17 12:02:42 +0200 |
commit | 262542ed93921c2632abb8a900daecff2b28057c (patch) | |
tree | 91c77c88a71bc562a8a4a6c2507f8284022695af /sound/firewire/tascam/tascam-pcm.c | |
parent | 18b7f18ff694983c69523e8136f9a256596edd59 (diff) | |
download | linux-262542ed93921c2632abb8a900daecff2b28057c.tar.bz2 |
ALSA: firewire-tascam: 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-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/tascam/tascam-pcm.c')
-rw-r--r-- | sound/firewire/tascam/tascam-pcm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/firewire/tascam/tascam-pcm.c b/sound/firewire/tascam/tascam-pcm.c index 2377732caa52..cea26d5eff1a 100644 --- a/sound/firewire/tascam/tascam-pcm.c +++ b/sound/firewire/tascam/tascam-pcm.c @@ -99,9 +99,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(&tscm->mutex); - err = snd_tscm_stream_reserve_duplex(tscm, rate); + err = snd_tscm_stream_reserve_duplex(tscm, rate, + frames_per_period); if (err >= 0) ++tscm->substreams_counter; mutex_unlock(&tscm->mutex); |