diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-07 20:05:21 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-17 12:02:42 +0200 |
commit | 18b7f18ff694983c69523e8136f9a256596edd59 (patch) | |
tree | bcb2cc90bf38b86332654e9a30dc680f09bdc9a2 /sound/firewire/digi00x/digi00x-pcm.c | |
parent | 94c8101a2717a96457b474580e47142a0ef933c9 (diff) | |
download | linux-18b7f18ff694983c69523e8136f9a256596edd59.tar.bz2 |
ALSA: firewire-digi00x: 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-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/digi00x/digi00x-pcm.c')
-rw-r--r-- | sound/firewire/digi00x/digi00x-pcm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/firewire/digi00x/digi00x-pcm.c b/sound/firewire/digi00x/digi00x-pcm.c index 18e561b26625..9ced309d61fa 100644 --- a/sound/firewire/digi00x/digi00x-pcm.c +++ b/sound/firewire/digi00x/digi00x-pcm.c @@ -167,9 +167,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(&dg00x->mutex); - err = snd_dg00x_stream_reserve_duplex(dg00x, rate); + err = snd_dg00x_stream_reserve_duplex(dg00x, rate, + frames_per_period); if (err >= 0) ++dg00x->substreams_counter; mutex_unlock(&dg00x->mutex); |