summaryrefslogtreecommitdiff
path: root/sound/xen/xen_snd_front.c
diff options
context:
space:
mode:
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>2018-05-14 09:27:39 +0300
committerTakashi Iwai <tiwai@suse.de>2018-05-16 13:58:41 +0300
commit788ef64a2caee38cc4b8890abd3d7e54dfa3bcc9 (patch)
treed30d0a599df3ca130513ee7400ed266b8e4432d1 /sound/xen/xen_snd_front.c
parentfd3b36045c2c612b5f44a47f388677af256d1d0a (diff)
downloadlinux-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.c9
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)