xref: /openbmc/linux/sound/xen/xen_snd_front_cfg.h (revision 0bf49ffb)
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_CFG_H
12 #define __XEN_SND_FRONT_CFG_H
13 
14 #include <sound/core.h>
15 #include <sound/pcm.h>
16 
17 struct xen_snd_front_info;
18 
19 struct xen_front_cfg_stream {
20 	int index;
21 	char *xenstore_path;
22 	struct snd_pcm_hardware pcm_hw;
23 };
24 
25 struct xen_front_cfg_pcm_instance {
26 	char name[80];
27 	int device_id;
28 	struct snd_pcm_hardware pcm_hw;
29 	int  num_streams_pb;
30 	struct xen_front_cfg_stream *streams_pb;
31 	int  num_streams_cap;
32 	struct xen_front_cfg_stream *streams_cap;
33 };
34 
35 struct xen_front_cfg_card {
36 	char name_short[32];
37 	char name_long[80];
38 	struct snd_pcm_hardware pcm_hw;
39 	int num_pcm_instances;
40 	struct xen_front_cfg_pcm_instance *pcm_instances;
41 };
42 
43 int xen_snd_front_cfg_card(struct xen_snd_front_info *front_info,
44 			   int *stream_cnt);
45 
46 #endif /* __XEN_SND_FRONT_CFG_H */
47