#include <linux/module.h>
#include <sound/control.h>
#include <sound/tlv.h>
#include <sound/hda_chmap.h>
enum cea_speaker_placement { … };
static const char * const cea_speaker_allocation_names[] = …;
static const int eld_speaker_allocation_bits[] = …;
static int hdmi_channel_mapping[0x32][8] = …;
static struct hdac_cea_channel_speaker_allocation channel_allocations[] = …;
static int hdmi_pin_set_slot_channel(struct hdac_device *codec,
hda_nid_t pin_nid, int asp_slot, int channel)
{ … }
static int hdmi_pin_get_slot_channel(struct hdac_device *codec,
hda_nid_t pin_nid, int asp_slot)
{ … }
static int hdmi_get_channel_count(struct hdac_device *codec, hda_nid_t cvt_nid)
{ … }
static void hdmi_set_channel_count(struct hdac_device *codec,
hda_nid_t cvt_nid, int chs)
{ … }
static void init_channel_allocations(void)
{ … }
static int get_channel_allocation_order(int ca)
{ … }
void snd_hdac_print_channel_allocation(int spk_alloc, char *buf, int buflen)
{ … }
EXPORT_SYMBOL_GPL(…);
static int hdmi_channel_allocation_spk_alloc_blk(struct hdac_device *codec,
int spk_alloc, int channels)
{ … }
static void hdmi_debug_channel_mapping(struct hdac_chmap *chmap,
hda_nid_t pin_nid)
{ … }
static void hdmi_std_setup_channel_mapping(struct hdac_chmap *chmap,
hda_nid_t pin_nid,
bool non_pcm,
int ca)
{ … }
struct channel_map_table { … };
static struct channel_map_table map_tables[] = …;
int snd_hdac_chmap_to_spk_mask(unsigned char c)
{ … }
EXPORT_SYMBOL_GPL(…);
static int to_cea_slot(int ordered_ca, unsigned char pos)
{ … }
int snd_hdac_spk_to_chmap(int spk)
{ … }
EXPORT_SYMBOL_GPL(…);
static int from_cea_slot(int ordered_ca, unsigned char slot)
{ … }
static int hdmi_manual_channel_allocation(int chs, unsigned char *map)
{ … }
static int hdmi_manual_setup_channel_mapping(struct hdac_chmap *chmap,
hda_nid_t pin_nid,
int chs, unsigned char *map,
int ca)
{ … }
static void hdmi_setup_fake_chmap(unsigned char *map, int ca)
{ … }
void snd_hdac_setup_channel_mapping(struct hdac_chmap *chmap,
hda_nid_t pin_nid, bool non_pcm, int ca,
int channels, unsigned char *map,
bool chmap_set)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_hdac_get_active_channels(int ca)
{ … }
EXPORT_SYMBOL_GPL(…);
struct hdac_cea_channel_speaker_allocation *snd_hdac_get_ch_alloc_from_ca(int ca)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_hdac_channel_allocation(struct hdac_device *hdac, int spk_alloc,
int channels, bool chmap_set, bool non_pcm, unsigned char *map)
{ … }
EXPORT_SYMBOL_GPL(…);
static int hdmi_chmap_ctl_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int hdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap,
struct hdac_cea_channel_speaker_allocation *cap, int channels)
{ … }
static void hdmi_cea_alloc_to_tlv_chmap(struct hdac_chmap *hchmap,
struct hdac_cea_channel_speaker_allocation *cap,
unsigned int *chmap, int channels)
{ … }
static int spk_mask_from_spk_alloc(int spk_alloc)
{ … }
static int hdmi_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag,
unsigned int size, unsigned int __user *tlv)
{ … }
static int hdmi_chmap_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int chmap_value_check(struct hdac_chmap *hchmap,
const struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdmi_chmap_ctl_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct hdac_chmap_ops chmap_ops = …;
void snd_hdac_register_chmap_ops(struct hdac_device *hdac,
struct hdac_chmap *chmap)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_hdac_add_chmap_ctls(struct snd_pcm *pcm, int pcm_idx,
struct hdac_chmap *hchmap)
{ … }
EXPORT_SYMBOL_GPL(…);