diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-18 00:54:21 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-18 04:35:52 +0200 |
commit | 4de3eb062e2daf04646d23417a39b8843df4508b (patch) | |
tree | 35c8004b3735a8369c4151f90412900f7ebd8a63 /sound/firewire/fireface/ff-stream.c | |
parent | 0f5482e7875bc2d507e6d92fcc8de22ff75fbdda (diff) |
ALSA: fireface: share PCM buffer size for both direction
This commit allows ALSA fireface 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-10-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff-stream.c')
-rw-r--r-- | sound/firewire/fireface/ff-stream.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/firewire/fireface/ff-stream.c b/sound/firewire/fireface/ff-stream.c index cbe0e5087b05..a13754f914e8 100644 --- a/sound/firewire/fireface/ff-stream.c +++ b/sound/firewire/fireface/ff-stream.c @@ -107,7 +107,8 @@ void snd_ff_stream_destroy_duplex(struct snd_ff *ff) } int snd_ff_stream_reserve_duplex(struct snd_ff *ff, unsigned int rate, - unsigned int frames_per_period) + unsigned int frames_per_period, + unsigned int frames_per_buffer) { unsigned int curr_rate; enum snd_ff_clock_src src; @@ -153,7 +154,7 @@ int snd_ff_stream_reserve_duplex(struct snd_ff *ff, unsigned int rate, return err; err = amdtp_domain_set_events_per_period(&ff->domain, - frames_per_period, 0); + frames_per_period, frames_per_buffer); if (err < 0) { fw_iso_resources_free(&ff->tx_resources); fw_iso_resources_free(&ff->rx_resources); |