mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-11 15:14:03 +08:00
f302240da5
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
/*
|
|
* For multichannel support
|
|
*/
|
|
|
|
#ifndef __SOUND_HDA_CHMAP_H
|
|
#define __SOUND_HDA_CHMAP_H
|
|
|
|
#include <sound/hdaudio.h>
|
|
|
|
struct hdac_cea_channel_speaker_allocation {
|
|
int ca_index;
|
|
int speakers[8];
|
|
|
|
/* derived values, just for convenience */
|
|
int channels;
|
|
int spk_mask;
|
|
};
|
|
struct hdac_chmap;
|
|
|
|
struct hdac_chmap_ops {
|
|
/*
|
|
* Helpers for producing the channel map TLVs. These can be overridden
|
|
* for devices that have non-standard mapping requirements.
|
|
*/
|
|
int (*chmap_cea_alloc_validate_get_type)(struct hdac_chmap *chmap,
|
|
struct hdac_cea_channel_speaker_allocation *cap, int channels);
|
|
void (*cea_alloc_to_tlv_chmap)
|
|
(struct hdac_cea_channel_speaker_allocation *cap,
|
|
unsigned int *chmap, int channels);
|
|
|
|
/* check that the user-given chmap is supported */
|
|
int (*chmap_validate)(int ca, int channels, unsigned char *chmap);
|
|
|
|
void (*get_chmap)(struct hdac_device *hdac, int pcm_idx,
|
|
unsigned char *chmap);
|
|
void (*set_chmap)(struct hdac_device *hdac, int pcm_idx,
|
|
unsigned char *chmap, int prepared);
|
|
bool (*is_pcm_attached)(struct hdac_device *hdac, int pcm_idx);
|
|
};
|
|
|
|
struct hdac_chmap {
|
|
unsigned int channels_max; /* max over all cvts */
|
|
struct hdac_chmap_ops ops;
|
|
struct hdac_device *hdac;
|
|
};
|
|
|
|
#endif /* __SOUND_HDA_CHMAP_H */
|