diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-07 20:05:17 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-17 12:02:40 +0200 |
commit | 8737209fe4a251a7d1de8f77c126ce7b69d926e7 (patch) | |
tree | 3568d1af0c49ffedd38768a686504ce06ffe18e4 /sound/firewire/bebob/bebob_stream.c | |
parent | d68c3123ba88dcd6692c90e698473d57856578e1 (diff) |
ALSA: bebob: 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-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob_stream.c')
-rw-r--r-- | sound/firewire/bebob/bebob_stream.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c index 73fee991bd75..f1db3ddc3e00 100644 --- a/sound/firewire/bebob/bebob_stream.c +++ b/sound/firewire/bebob/bebob_stream.c @@ -554,7 +554,8 @@ static int keep_resources(struct snd_bebob *bebob, struct amdtp_stream *stream, return cmp_connection_reserve(conn, amdtp_stream_get_max_payload(stream)); } -int snd_bebob_stream_reserve_duplex(struct snd_bebob *bebob, unsigned int rate) +int snd_bebob_stream_reserve_duplex(struct snd_bebob *bebob, unsigned int rate, + unsigned int frames_per_period) { unsigned int curr_rate; int err; @@ -607,6 +608,14 @@ int snd_bebob_stream_reserve_duplex(struct snd_bebob *bebob, unsigned int rate) cmp_connection_release(&bebob->out_conn); return err; } + + err = amdtp_domain_set_events_per_period(&bebob->domain, + frames_per_period); + if (err < 0) { + cmp_connection_release(&bebob->out_conn); + cmp_connection_release(&bebob->in_conn); + return err; + } } return 0; |