xen_snd_front_shbuf.h 844 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 OR MIT */
  2. /*
  3. * Xen para-virtual sound device
  4. *
  5. * Copyright (C) 2016-2018 EPAM Systems Inc.
  6. *
  7. * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
  8. */
  9. #ifndef __XEN_SND_FRONT_SHBUF_H
  10. #define __XEN_SND_FRONT_SHBUF_H
  11. #include <xen/grant_table.h>
  12. #include "xen_snd_front_evtchnl.h"
  13. struct xen_snd_front_shbuf {
  14. int num_grefs;
  15. grant_ref_t *grefs;
  16. u8 *directory;
  17. u8 *buffer;
  18. size_t buffer_sz;
  19. };
  20. grant_ref_t xen_snd_front_shbuf_get_dir_start(struct xen_snd_front_shbuf *buf);
  21. int xen_snd_front_shbuf_alloc(struct xenbus_device *xb_dev,
  22. struct xen_snd_front_shbuf *buf,
  23. unsigned int buffer_sz);
  24. void xen_snd_front_shbuf_clear(struct xen_snd_front_shbuf *buf);
  25. void xen_snd_front_shbuf_free(struct xen_snd_front_shbuf *buf);
  26. #endif /* __XEN_SND_FRONT_SHBUF_H */