diff options
author | Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> | 2018-05-14 09:27:39 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-05-16 13:58:41 +0300 |
commit | 788ef64a2caee38cc4b8890abd3d7e54dfa3bcc9 (patch) | |
tree | d30d0a599df3ca130513ee7400ed266b8e4432d1 /sound/xen/xen_snd_front.c | |
parent | fd3b36045c2c612b5f44a47f388677af256d1d0a (diff) | |
download | linux-788ef64a2caee38cc4b8890abd3d7e54dfa3bcc9.tar.xz |
ALSA: xen-front: Implement Xen event channel handling
Handle Xen event channels:
- create for all configured streams and publish
corresponding ring references and event channels in Xen store,
so backend can connect
- implement event channels interrupt handlers
- create and destroy event channels with respect to Xen bus state
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/xen/xen_snd_front.c')
-rw-r--r-- | sound/xen/xen_snd_front.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c index 70fa91683c71..277214d4fd0a 100644 --- a/sound/xen/xen_snd_front.c +++ b/sound/xen/xen_snd_front.c @@ -18,9 +18,11 @@ #include <xen/interface/io/sndif.h> #include "xen_snd_front.h" +#include "xen_snd_front_evtchnl.h" static void xen_snd_drv_fini(struct xen_snd_front_info *front_info) { + xen_snd_front_evtchnl_free_all(front_info); } static int sndback_initwait(struct xen_snd_front_info *front_info) @@ -32,7 +34,12 @@ static int sndback_initwait(struct xen_snd_front_info *front_info) if (ret < 0) return ret; - return 0; + /* create event channels for all streams and publish */ + ret = xen_snd_front_evtchnl_create_all(front_info, num_streams); + if (ret < 0) + return ret; + + return xen_snd_front_evtchnl_publish_all(front_info); } static int sndback_connect(struct xen_snd_front_info *front_info) |