1*fd3b3604SOleksandr Andrushchenko /* SPDX-License-Identifier: GPL-2.0 OR MIT */ 2*fd3b3604SOleksandr Andrushchenko 3*fd3b3604SOleksandr Andrushchenko /* 4*fd3b3604SOleksandr Andrushchenko * Xen para-virtual sound device 5*fd3b3604SOleksandr Andrushchenko * 6*fd3b3604SOleksandr Andrushchenko * Copyright (C) 2016-2018 EPAM Systems Inc. 7*fd3b3604SOleksandr Andrushchenko * 8*fd3b3604SOleksandr Andrushchenko * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> 9*fd3b3604SOleksandr Andrushchenko */ 10*fd3b3604SOleksandr Andrushchenko 11*fd3b3604SOleksandr Andrushchenko #ifndef __XEN_SND_FRONT_CFG_H 12*fd3b3604SOleksandr Andrushchenko #define __XEN_SND_FRONT_CFG_H 13*fd3b3604SOleksandr Andrushchenko 14*fd3b3604SOleksandr Andrushchenko #include <sound/core.h> 15*fd3b3604SOleksandr Andrushchenko #include <sound/pcm.h> 16*fd3b3604SOleksandr Andrushchenko 17*fd3b3604SOleksandr Andrushchenko struct xen_snd_front_info; 18*fd3b3604SOleksandr Andrushchenko 19*fd3b3604SOleksandr Andrushchenko struct xen_front_cfg_stream { 20*fd3b3604SOleksandr Andrushchenko int index; 21*fd3b3604SOleksandr Andrushchenko char *xenstore_path; 22*fd3b3604SOleksandr Andrushchenko struct snd_pcm_hardware pcm_hw; 23*fd3b3604SOleksandr Andrushchenko }; 24*fd3b3604SOleksandr Andrushchenko 25*fd3b3604SOleksandr Andrushchenko struct xen_front_cfg_pcm_instance { 26*fd3b3604SOleksandr Andrushchenko char name[80]; 27*fd3b3604SOleksandr Andrushchenko int device_id; 28*fd3b3604SOleksandr Andrushchenko struct snd_pcm_hardware pcm_hw; 29*fd3b3604SOleksandr Andrushchenko int num_streams_pb; 30*fd3b3604SOleksandr Andrushchenko struct xen_front_cfg_stream *streams_pb; 31*fd3b3604SOleksandr Andrushchenko int num_streams_cap; 32*fd3b3604SOleksandr Andrushchenko struct xen_front_cfg_stream *streams_cap; 33*fd3b3604SOleksandr Andrushchenko }; 34*fd3b3604SOleksandr Andrushchenko 35*fd3b3604SOleksandr Andrushchenko struct xen_front_cfg_card { 36*fd3b3604SOleksandr Andrushchenko char name_short[32]; 37*fd3b3604SOleksandr Andrushchenko char name_long[80]; 38*fd3b3604SOleksandr Andrushchenko struct snd_pcm_hardware pcm_hw; 39*fd3b3604SOleksandr Andrushchenko int num_pcm_instances; 40*fd3b3604SOleksandr Andrushchenko struct xen_front_cfg_pcm_instance *pcm_instances; 41*fd3b3604SOleksandr Andrushchenko }; 42*fd3b3604SOleksandr Andrushchenko 43*fd3b3604SOleksandr Andrushchenko int xen_snd_front_cfg_card(struct xen_snd_front_info *front_info, 44*fd3b3604SOleksandr Andrushchenko int *stream_cnt); 45*fd3b3604SOleksandr Andrushchenko 46*fd3b3604SOleksandr Andrushchenko #endif /* __XEN_SND_FRONT_CFG_H */ 47