From 4e675e7d45af2fab1ab8d8a6e8d0c86bc4a2a960 Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Wed, 5 Sep 2018 14:53:53 +1000 Subject: Move ALSA info into coreinfo, for export to Audio Paths Remove the avirt_alsa_driver Signed-off-by: Mark Farrugia --- core.h | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'core.h') diff --git a/core.h b/core.h index a31c916..de428c2 100644 --- a/core.h +++ b/core.h @@ -12,16 +12,7 @@ #include -#define DINFO(ap, fmt, args...) \ - printk(KERN_INFO "[%s]: %d:%s " fmt "\n", ap, __LINE__, __func__, \ - ##args) - -#define DERROR(ap, fmt, args...) \ - printk(KERN_ERR "[%s]: %d:%s " fmt "\n", ap, __LINE__, __func__, ##args) - -#define DPRINT(ap, fmt, args...) \ - printk(KERN_DEBUG "[%s]: %d:%s " fmt "\n", ap, __LINE__, __func__, \ - ##args) +#define MAX_NAME_LEN 32 /** * PCM buffer complete callback @@ -31,6 +22,9 @@ */ typedef int (*avirt_buff_complete)(struct snd_pcm_substream *substream); +/** + * AVIRT Audio Path info + */ struct avirt_audiopath { const char *name; unsigned version[3]; @@ -41,10 +35,30 @@ struct avirt_audiopath { void *context; }; +/* + * ALSA Substream device configuration + */ +struct avirt_alsa_devconfig { + const char devicename[MAX_NAME_LEN]; + int channels; +}; + +/** + * Collection of ALSA devices + */ +struct avirt_alsa_group { + struct avirt_alsa_devconfig *config; + int devices; +}; + +/** + * AVIRT core info + */ struct avirt_coreinfo { unsigned version[3]; - unsigned playback_num; - unsigned capture_num; + + struct avirt_alsa_group playback; + struct avirt_alsa_group capture; avirt_buff_complete pcm_buff_complete; }; -- cgit 1.2.3-korg