WIP FPC-III support
[linux/fpc-iii.git] / sound / xen / xen_snd_front.h
blob05611f113b9432771acdfc898bce0a7b92b75dc1
1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
3 /*
4 * Xen para-virtual sound device
6 * Copyright (C) 2016-2018 EPAM Systems Inc.
8 * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
9 */
11 #ifndef __XEN_SND_FRONT_H
12 #define __XEN_SND_FRONT_H
14 #include "xen_snd_front_cfg.h"
16 struct xen_snd_front_card_info;
17 struct xen_snd_front_evtchnl;
18 struct xen_snd_front_evtchnl_pair;
19 struct xen_front_pgdir_shbuf;
20 struct xensnd_query_hw_param;
22 struct xen_snd_front_info {
23 struct xenbus_device *xb_dev;
25 struct xen_snd_front_card_info *card_info;
27 int num_evt_pairs;
28 struct xen_snd_front_evtchnl_pair *evt_pairs;
30 struct xen_front_cfg_card cfg;
33 int xen_snd_front_stream_query_hw_param(struct xen_snd_front_evtchnl *evtchnl,
34 struct xensnd_query_hw_param *hw_param_req,
35 struct xensnd_query_hw_param *hw_param_resp);
37 int xen_snd_front_stream_prepare(struct xen_snd_front_evtchnl *evtchnl,
38 struct xen_front_pgdir_shbuf *shbuf,
39 u8 format, unsigned int channels,
40 unsigned int rate, u32 buffer_sz,
41 u32 period_sz);
43 int xen_snd_front_stream_close(struct xen_snd_front_evtchnl *evtchnl);
45 int xen_snd_front_stream_write(struct xen_snd_front_evtchnl *evtchnl,
46 unsigned long pos, unsigned long count);
48 int xen_snd_front_stream_read(struct xen_snd_front_evtchnl *evtchnl,
49 unsigned long pos, unsigned long count);
51 int xen_snd_front_stream_trigger(struct xen_snd_front_evtchnl *evtchnl,
52 int type);
54 #endif /* __XEN_SND_FRONT_H */