diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-08-04 09:21:20 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-08-05 20:57:16 +0300 |
commit | 3ec3d7a3ff10692d4f8a2baa0ff18fe10a9b6ad4 (patch) | |
tree | 04f14c26c7c4bdeb71fe7d5855d006ce3f66a4f7 /sound/firewire/amdtp-stream.c | |
parent | b6fcab14ff027c4d54505d9cdff41535c3daf077 (diff) | |
download | linux-3ec3d7a3ff10692d4f8a2baa0ff18fe10a9b6ad4.tar.xz |
ALSA: firewire-lib: add AMDTP domain structure to handle several isoc contexts
This commit adds 'struct amdtp_domain' structure. This structure
has list of instance of AMDTP stream to handle a couple of
isochronous contexts.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.c')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 369e75e33120..02077696fa77 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -1136,3 +1136,25 @@ void amdtp_stream_pcm_abort(struct amdtp_stream *s) snd_pcm_stop_xrun(pcm); } EXPORT_SYMBOL(amdtp_stream_pcm_abort); + +/** + * amdtp_domain_init - initialize an AMDTP domain structure + * @d: the AMDTP domain to initialize. + */ +int amdtp_domain_init(struct amdtp_domain *d) +{ + INIT_LIST_HEAD(&d->streams); + + return 0; +} +EXPORT_SYMBOL_GPL(amdtp_domain_init); + +/** + * amdtp_domain_destroy - destroy an AMDTP domain structure + * @d: the AMDTP domain to destroy. + */ +void amdtp_domain_destroy(struct amdtp_domain *d) +{ + WARN_ON(!list_empty(&d->streams)); +} +EXPORT_SYMBOL_GPL(amdtp_domain_destroy); |