Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
[linux-2.6-microblaze.git] / sound / xen / xen_snd_front_shbuf.h
1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2
3 /*
4  * Xen para-virtual sound device
5  *
6  * Copyright (C) 2016-2018 EPAM Systems Inc.
7  *
8  * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
9  */
10
11 #ifndef __XEN_SND_FRONT_SHBUF_H
12 #define __XEN_SND_FRONT_SHBUF_H
13
14 #include <xen/grant_table.h>
15
16 #include "xen_snd_front_evtchnl.h"
17
18 struct xen_snd_front_shbuf {
19         int num_grefs;
20         grant_ref_t *grefs;
21         u8 *directory;
22         u8 *buffer;
23         size_t buffer_sz;
24 };
25
26 grant_ref_t xen_snd_front_shbuf_get_dir_start(struct xen_snd_front_shbuf *buf);
27
28 int xen_snd_front_shbuf_alloc(struct xenbus_device *xb_dev,
29                               struct xen_snd_front_shbuf *buf,
30                               unsigned int buffer_sz);
31
32 void xen_snd_front_shbuf_clear(struct xen_snd_front_shbuf *buf);
33
34 void xen_snd_front_shbuf_free(struct xen_snd_front_shbuf *buf);
35
36 #endif /* __XEN_SND_FRONT_SHBUF_H */