diff options
author | Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> | 2018-05-14 08:27:39 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-05-16 12:58:41 +0200 |
commit | 788ef64a2caee38cc4b8890abd3d7e54dfa3bcc9 (patch) | |
tree | d30d0a599df3ca130513ee7400ed266b8e4432d1 /sound/xen/xen_snd_front.c | |
parent | ALSA: xen-front: Read sound driver configuration from Xen store (diff) | |
download | linux-788ef64a2caee38cc4b8890abd3d7e54dfa3bcc9.tar.xz linux-788ef64a2caee38cc4b8890abd3d7e54dfa3bcc9.zip |
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) |