diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-18 00:54:17 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-18 04:35:47 +0200 |
commit | ecb40fd2c8afdb66da7e309b43c6dc90e419c2dc (patch) | |
tree | 7078e1abf238e3eef343e82b431b1144a718aac9 /sound/firewire/dice/dice-stream.c | |
parent | 3299d2a0f74c0774da0672d0bc54741da4bbda6e (diff) | |
download | lwn-ecb40fd2c8afdb66da7e309b43c6dc90e419c2dc.tar.gz lwn-ecb40fd2c8afdb66da7e309b43c6dc90e419c2dc.zip |
ALSA: dice: share PCM buffer size for both direction
This commit allows ALSA dice driver to share PCM buffer size for both
capture and playback PCM substream. When AMDTP domain starts for one
of the PCM substream, buffer size of the PCM substream is stores to
AMDTP domain structure. Some AMDTP streams have already run with the
buffer size when another PCM substream starts, therefore the PCM
substream has a constraint to its buffer size.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20191017155424.885-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/dice/dice-stream.c')
-rw-r--r-- | sound/firewire/dice/dice-stream.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/firewire/dice/dice-stream.c b/sound/firewire/dice/dice-stream.c index b4ef08bd7e8f..0cff346e8052 100644 --- a/sound/firewire/dice/dice-stream.c +++ b/sound/firewire/dice/dice-stream.c @@ -279,7 +279,8 @@ static void finish_session(struct snd_dice *dice, struct reg_params *tx_params, } int snd_dice_stream_reserve_duplex(struct snd_dice *dice, unsigned int rate, - unsigned int events_per_period) + unsigned int events_per_period, + unsigned int events_per_buffer) { unsigned int curr_rate; int err; @@ -327,7 +328,7 @@ int snd_dice_stream_reserve_duplex(struct snd_dice *dice, unsigned int rate, goto error; err = amdtp_domain_set_events_per_period(&dice->domain, - events_per_period, 0); + events_per_period, events_per_buffer); if (err < 0) goto error; } |