#include <linux/init.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <asm/unaligned.h>
#include <sound/hda_chmap.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
enum eld_versions { … };
enum cea_edid_versions { … };
static const char * const eld_connection_type_names[4] = …;
enum cea_audio_coding_types { … };
enum cea_audio_coding_xtypes { … };
static const char * const cea_audio_coding_type_names[] = …;
static const int cea_sample_sizes[4] = …;
static const int cea_sampling_frequencies[8] = …;
static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid,
int byte_index)
{ … }
#define GRAB_BITS(buf, byte, lowbit, bits) …
static void hdmi_update_short_audio_desc(struct hda_codec *codec,
struct cea_sad *a,
const unsigned char *buf)
{ … }
int snd_hdmi_parse_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e,
const unsigned char *buf, int size)
{ … }
int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid)
{ … }
int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid,
unsigned char *buf, int *eld_size)
{ … }
static void hdmi_print_pcm_rates(int pcm, char *buf, int buflen)
{ … }
#define SND_PRINT_RATES_ADVISED_BUFSIZE …
static void hdmi_show_short_audio_desc(struct hda_codec *codec,
struct cea_sad *a)
{ … }
void snd_hdmi_show_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e)
{ … }
#ifdef CONFIG_SND_PROC_FS
static void hdmi_print_sad_info(int i, struct cea_sad *a,
struct snd_info_buffer *buffer)
{ … }
void snd_hdmi_print_eld_info(struct hdmi_eld *eld,
struct snd_info_buffer *buffer,
hda_nid_t pin_nid, int dev_id, hda_nid_t cvt_nid)
{ … }
void snd_hdmi_write_eld_info(struct hdmi_eld *eld,
struct snd_info_buffer *buffer)
{ … }
#endif
void snd_hdmi_eld_update_pcm_info(struct parsed_hdmi_eld *e,
struct hda_pcm_stream *hinfo)
{ … }
#define ATI_VERB_SET_AUDIO_DESCRIPTOR …
#define ATI_VERB_SET_SINK_INFO_INDEX …
#define ATI_VERB_GET_SPEAKER_ALLOCATION …
#define ATI_VERB_GET_AUDIO_DESCRIPTOR …
#define ATI_VERB_GET_AUDIO_VIDEO_DELAY …
#define ATI_VERB_GET_SINK_INFO_INDEX …
#define ATI_VERB_GET_SINK_INFO_DATA …
#define ATI_SPKALLOC_SPKALLOC …
#define ATI_SPKALLOC_TYPE_HDMI …
#define ATI_SPKALLOC_TYPE_DISPLAYPORT …
#define ATI_AUDIODESC_CHANNELS …
#define ATI_AUDIODESC_RATES …
#define ATI_AUDIODESC_LPCM_STEREO_RATES …
#define ATI_DELAY_VIDEO_LATENCY …
#define ATI_DELAY_AUDIO_LATENCY …
enum ati_sink_info_idx { … };
int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid,
unsigned char *buf, int *eld_size, bool rev3_or_later)
{ … }