diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-18 00:54:15 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-18 04:35:44 +0200 |
commit | 659c6af569a2bd08b3b3c1f5e445a58510de02c8 (patch) | |
tree | 095b3e0612974ec500a05aa26a616ea027b533cf /sound/firewire/fireworks/fireworks_stream.c | |
parent | 1fde7a447a7f423b893ac3fcac0ba65893924189 (diff) | |
download | linux-659c6af569a2bd08b3b3c1f5e445a58510de02c8.tar.bz2 |
ALSA: fireworks: share PCM buffer size for both direction
This commit allows ALSA fireworks 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-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireworks/fireworks_stream.c')
-rw-r--r-- | sound/firewire/fireworks/fireworks_stream.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/firewire/fireworks/fireworks_stream.c b/sound/firewire/fireworks/fireworks_stream.c index e4d4dd08c60a..f35a33d4d4e6 100644 --- a/sound/firewire/fireworks/fireworks_stream.c +++ b/sound/firewire/fireworks/fireworks_stream.c @@ -182,7 +182,8 @@ static int keep_resources(struct snd_efw *efw, struct amdtp_stream *stream, } int snd_efw_stream_reserve_duplex(struct snd_efw *efw, unsigned int rate, - unsigned int frames_per_period) + unsigned int frames_per_period, + unsigned int frames_per_buffer) { unsigned int curr_rate; int err; @@ -231,7 +232,7 @@ int snd_efw_stream_reserve_duplex(struct snd_efw *efw, unsigned int rate, } err = amdtp_domain_set_events_per_period(&efw->domain, - frames_per_period, 0); + frames_per_period, frames_per_buffer); if (err < 0) { cmp_connection_release(&efw->in_conn); cmp_connection_release(&efw->out_conn); |