#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/asoundef.h>
#include <sound/tlv.h>
#include <sound/hdaudio.h>
#include <sound/hda_i915.h>
#include <sound/hda_chmap.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_jack.h"
#include "hda_controller.h"
static bool static_hdmi_pcm;
module_param(static_hdmi_pcm, bool, 0644);
MODULE_PARM_DESC(…) …;
static bool enable_acomp = …;
module_param(enable_acomp, bool, 0444);
MODULE_PARM_DESC(…) …;
static bool enable_silent_stream = …
IS_ENABLED(…);
module_param(enable_silent_stream, bool, 0644);
MODULE_PARM_DESC(…) …;
static bool enable_all_pins;
module_param(enable_all_pins, bool, 0444);
MODULE_PARM_DESC(…) …;
struct hdmi_spec_per_cvt { … };
#define HDA_MAX_CONNECTIONS …
struct hdmi_spec_per_pin { … };
struct hdmi_ops { … };
struct hdmi_pcm { … };
enum { … };
struct hdmi_spec { … };
#ifdef CONFIG_SND_HDA_COMPONENT
static inline bool codec_has_acomp(struct hda_codec *codec)
{ … }
#else
#define codec_has_acomp …
#endif
struct hdmi_audio_infoframe { … };
struct dp_audio_infoframe { … };
audio_infoframe;
#define get_pin(spec, idx) …
#define get_cvt(spec, idx) …
#define get_hdmi_pcm(spec, idx) …
#define get_pcm_rec(spec, idx) …
static int pin_id_to_pin_index(struct hda_codec *codec,
hda_nid_t pin_nid, int dev_id)
{ … }
static int hinfo_to_pcm_index(struct hda_codec *codec,
struct hda_pcm_stream *hinfo)
{ … }
static int hinfo_to_pin_index(struct hda_codec *codec,
struct hda_pcm_stream *hinfo)
{ … }
static struct hdmi_spec_per_pin *pcm_idx_to_pin(struct hdmi_spec *spec,
int pcm_idx)
{ … }
static int cvt_nid_to_cvt_index(struct hda_codec *codec, hda_nid_t cvt_nid)
{ … }
static int hdmi_eld_ctl_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int hdmi_eld_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new eld_bytes_ctl = …;
static int hdmi_create_eld_ctl(struct hda_codec *codec, int pcm_idx,
int device)
{ … }
#ifdef BE_PARANOID
static void hdmi_get_dip_index(struct hda_codec *codec, hda_nid_t pin_nid,
int *packet_index, int *byte_index)
{
int val;
val = snd_hda_codec_read(codec, pin_nid, 0,
AC_VERB_GET_HDMI_DIP_INDEX, 0);
*packet_index = val >> 5;
*byte_index = val & 0x1f;
}
#endif
static void hdmi_set_dip_index(struct hda_codec *codec, hda_nid_t pin_nid,
int packet_index, int byte_index)
{ … }
static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t pin_nid,
unsigned char val)
{ … }
static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid)
{ … }
#ifdef CONFIG_SND_PROC_FS
static void print_eld_info(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{ … }
static void write_eld_info(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{ … }
static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
{ … }
static void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
{ … }
#else
static inline int eld_proc_new(struct hdmi_spec_per_pin *per_pin,
int index)
{
return 0;
}
static inline void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
{
}
#endif
static void hdmi_start_infoframe_trans(struct hda_codec *codec,
hda_nid_t pin_nid)
{ … }
static void hdmi_stop_infoframe_trans(struct hda_codec *codec,
hda_nid_t pin_nid)
{ … }
static void hdmi_debug_dip_size(struct hda_codec *codec, hda_nid_t pin_nid)
{ … }
static void hdmi_clear_dip_buffers(struct hda_codec *codec, hda_nid_t pin_nid)
{ … }
static void hdmi_checksum_audio_infoframe(struct hdmi_audio_infoframe *hdmi_ai)
{ … }
static void hdmi_fill_audio_infoframe(struct hda_codec *codec,
hda_nid_t pin_nid,
u8 *dip, int size)
{ … }
static bool hdmi_infoframe_uptodate(struct hda_codec *codec, hda_nid_t pin_nid,
u8 *dip, int size)
{ … }
static int hdmi_pin_get_eld(struct hda_codec *codec, hda_nid_t nid,
int dev_id, unsigned char *buf, int *eld_size)
{ … }
static void hdmi_pin_setup_infoframe(struct hda_codec *codec,
hda_nid_t pin_nid, int dev_id,
int ca, int active_channels,
int conn_type)
{ … }
static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
bool non_pcm)
{ … }
static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll);
static void check_presence_and_report(struct hda_codec *codec, hda_nid_t nid,
int dev_id)
{ … }
static void jack_callback(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res,
struct hda_jack_tbl *jack)
{ … }
static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res)
{ … }
static void hdmi_unsol_event(struct hda_codec *codec, unsigned int res)
{ … }
static void haswell_verify_D0(struct hda_codec *codec,
hda_nid_t cvt_nid, hda_nid_t nid)
{ … }
#define is_hbr_format(format) …
static int hdmi_pin_hbr_setup(struct hda_codec *codec, hda_nid_t pin_nid,
int dev_id, bool hbr)
{ … }
static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
hda_nid_t pin_nid, int dev_id,
u32 stream_tag, int format)
{ … }
static int hdmi_choose_cvt(struct hda_codec *codec,
int pin_idx, int *cvt_id,
bool silent)
{ … }
static void intel_verify_pin_cvt_connect(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static int intel_cvt_id_to_mux_idx(struct hdmi_spec *spec,
hda_nid_t cvt_nid)
{ … }
static void intel_not_share_assigned_cvt(struct hda_codec *codec,
hda_nid_t pin_nid,
int dev_id, int mux_idx)
{ … }
static void intel_not_share_assigned_cvt_nid(struct hda_codec *codec,
hda_nid_t pin_nid, int dev_id, hda_nid_t cvt_nid)
{ … }
static void pin_cvt_fixup(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
hda_nid_t cvt_nid)
{ … }
static int hdmi_pcm_open_no_pin(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx)
{ … }
static int hdmi_find_pcm_slot(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void hdmi_attach_hda_pcm(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void hdmi_detach_hda_pcm(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static int hdmi_get_pin_cvt_mux(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin, hda_nid_t cvt_nid)
{ … }
static bool check_non_pcm_per_cvt(struct hda_codec *codec, hda_nid_t cvt_nid);
static void hdmi_pcm_setup_pin(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void hdmi_pcm_reset_pin(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static struct snd_jack *pin_idx_to_pcm_jack(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void update_eld(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
struct hdmi_eld *eld,
int repoll)
{ … }
static void hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
int repoll)
{ … }
#define I915_SILENT_RATE …
#define I915_SILENT_CHANNELS …
#define I915_SILENT_FORMAT_BITS …
#define I915_SILENT_FMT_MASK …
static void silent_stream_enable_i915(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void silent_stream_set_kae(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
bool enable)
{ … }
static void silent_stream_enable(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void silent_stream_disable(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void sync_eld_via_acomp(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin)
{ … }
static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
{ … }
static void hdmi_repoll_eld(struct work_struct *work)
{ … }
static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
{ … }
static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
{ … }
static const struct snd_pci_quirk force_connect_list[] = …;
static int hdmi_parse_codec(struct hda_codec *codec)
{ … }
static bool check_non_pcm_per_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
{ … }
static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static const struct hda_pcm_ops generic_ops = …;
static int hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
{ … }
static void hdmi_get_chmap(struct hdac_device *hdac, int pcm_idx,
unsigned char *chmap)
{ … }
static void hdmi_set_chmap(struct hdac_device *hdac, int pcm_idx,
unsigned char *chmap, int prepared)
{ … }
static bool is_hdmi_pcm_attached(struct hdac_device *hdac, int pcm_idx)
{ … }
static int generic_hdmi_build_pcms(struct hda_codec *codec)
{ … }
static void free_hdmi_jack_priv(struct snd_jack *jack)
{ … }
static int generic_hdmi_build_jack(struct hda_codec *codec, int pcm_idx)
{ … }
static int generic_hdmi_build_controls(struct hda_codec *codec)
{ … }
static int generic_hdmi_init_per_pins(struct hda_codec *codec)
{ … }
static int generic_hdmi_init(struct hda_codec *codec)
{ … }
static void hdmi_array_init(struct hdmi_spec *spec, int nums)
{ … }
static void hdmi_array_free(struct hdmi_spec *spec)
{ … }
static void generic_spec_free(struct hda_codec *codec)
{ … }
static void generic_hdmi_free(struct hda_codec *codec)
{ … }
static int generic_hdmi_suspend(struct hda_codec *codec)
{ … }
static int generic_hdmi_resume(struct hda_codec *codec)
{ … }
static const struct hda_codec_ops generic_hdmi_patch_ops = …;
static const struct hdmi_ops generic_standard_hdmi_ops = …;
static int alloc_generic_hdmi(struct hda_codec *codec)
{ … }
static int patch_generic_hdmi(struct hda_codec *codec)
{ … }
static void reprogram_jack_detect(struct hda_codec *codec, hda_nid_t nid,
int dev_id, bool use_acomp)
{ … }
static void generic_acomp_notifier_set(struct drm_audio_component *acomp,
bool use_acomp)
{ … }
static int generic_acomp_master_bind(struct device *dev,
struct drm_audio_component *acomp)
{ … }
static void generic_acomp_master_unbind(struct device *dev,
struct drm_audio_component *acomp)
{ … }
static int match_bound_vga(struct device *dev, int subtype, void *data)
{ … }
static void generic_acomp_pin_eld_notify(void *audio_ptr, int port, int dev_id)
{ … }
static void setup_drm_audio_ops(struct hda_codec *codec,
const struct drm_audio_component_audio_ops *ops)
{ … }
static void generic_acomp_init(struct hda_codec *codec,
const struct drm_audio_component_audio_ops *ops,
int (*port2pin)(struct hda_codec *, int))
{ … }
#define INTEL_GET_VENDOR_VERB …
#define INTEL_SET_VENDOR_VERB …
#define INTEL_EN_DP12 …
#define INTEL_EN_ALL_PIN_CVTS …
static void intel_haswell_enable_all_pins(struct hda_codec *codec,
bool update_tree)
{ … }
static void intel_haswell_fixup_enable_dp12(struct hda_codec *codec)
{ … }
static void haswell_set_power_state(struct hda_codec *codec, hda_nid_t fg,
unsigned int power_state)
{ … }
static int intel_base_nid(struct hda_codec *codec)
{ … }
static int intel_pin2port(void *audio_ptr, int pin_nid)
{ … }
static int intel_port2pin(struct hda_codec *codec, int port)
{ … }
static void intel_pin_eld_notify(void *audio_ptr, int port, int pipe)
{ … }
static const struct drm_audio_component_audio_ops intel_audio_ops = …;
static void register_i915_notifier(struct hda_codec *codec)
{ … }
static int i915_hsw_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
hda_nid_t pin_nid, int dev_id, u32 stream_tag,
int format)
{ … }
static void i915_pin_cvt_fixup(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
hda_nid_t cvt_nid)
{ … }
static int i915_adlp_hdmi_suspend(struct hda_codec *codec)
{ … }
static int i915_adlp_hdmi_resume(struct hda_codec *codec)
{ … }
static int alloc_intel_hdmi(struct hda_codec *codec)
{ … }
static int parse_intel_hdmi(struct hda_codec *codec)
{ … }
static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
const int *port_map, int port_num, int dev_num,
bool send_silent_stream)
{ … }
static int patch_i915_hsw_hdmi(struct hda_codec *codec)
{ … }
static int patch_i915_glk_hdmi(struct hda_codec *codec)
{ … }
static int patch_i915_icl_hdmi(struct hda_codec *codec)
{ … }
static int patch_i915_tgl_hdmi(struct hda_codec *codec)
{ … }
static int patch_i915_adlp_hdmi(struct hda_codec *codec)
{ … }
static int patch_i915_byt_hdmi(struct hda_codec *codec)
{ … }
static int patch_i915_cpt_hdmi(struct hda_codec *codec)
{ … }
static int simple_playback_build_pcms(struct hda_codec *codec)
{ … }
static void simple_hdmi_unsol_event(struct hda_codec *codec,
unsigned int res)
{ … }
#define simple_hdmi_build_jack …
static int simple_playback_build_controls(struct hda_codec *codec)
{ … }
static int simple_playback_init(struct hda_codec *codec)
{ … }
static void simple_playback_free(struct hda_codec *codec)
{ … }
#define Nv_VERB_SET_Channel_Allocation …
#define Nv_VERB_SET_Info_Frame_Checksum …
#define Nv_VERB_SET_Audio_Protection_On …
#define Nv_VERB_SET_Audio_Protection_Off …
#define nvhdmi_master_con_nid_7x …
#define nvhdmi_master_pin_nid_7x …
static const hda_nid_t nvhdmi_con_nids_7x[4] = …;
static const struct hda_verb nvhdmi_basic_init_7x_2ch[] = …;
static const struct hda_verb nvhdmi_basic_init_7x_8ch[] = …;
#ifdef LIMITED_RATE_FMT_SUPPORT
#define SUPPORTED_RATES …
#define SUPPORTED_MAXBPS …
#define SUPPORTED_FORMATS …
#else
#define SUPPORTED_RATES …
#define SUPPORTED_MAXBPS …
#define SUPPORTED_FORMATS …
#endif
static int nvhdmi_7x_init_2ch(struct hda_codec *codec)
{ … }
static int nvhdmi_7x_init_8ch(struct hda_codec *codec)
{ … }
static const unsigned int channels_2_6_8[] = …;
static const unsigned int channels_2_8[] = …;
static const struct snd_pcm_hw_constraint_list hw_constraints_2_6_8_channels = …;
static const struct snd_pcm_hw_constraint_list hw_constraints_2_8_channels = …;
static int simple_playback_pcm_open(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int simple_playback_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int simple_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static const struct hda_pcm_stream simple_pcm_playback = …;
static const struct hda_codec_ops simple_hdmi_patch_ops = …;
static int patch_simple_hdmi(struct hda_codec *codec,
hda_nid_t cvt_nid, hda_nid_t pin_nid)
{ … }
static void nvhdmi_8ch_7x_set_info_frame_parameters(struct hda_codec *codec,
int channels)
{ … }
static int nvhdmi_8ch_7x_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static const struct hda_pcm_stream nvhdmi_pcm_playback_8ch_7x = …;
static int patch_nvhdmi_2ch(struct hda_codec *codec)
{ … }
static int nvhdmi_7x_8ch_build_pcms(struct hda_codec *codec)
{ … }
static int nvhdmi_7x_8ch_build_controls(struct hda_codec *codec)
{ … }
static int patch_nvhdmi_8ch_7x(struct hda_codec *codec)
{ … }
static int nvhdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap,
struct hdac_cea_channel_speaker_allocation *cap, int channels)
{ … }
static int nvhdmi_chmap_validate(struct hdac_chmap *chmap,
int ca, int chs, unsigned char *map)
{ … }
static int nvhdmi_pin2port(void *audio_ptr, int pin_nid)
{ … }
static int nvhdmi_port2pin(struct hda_codec *codec, int port)
{ … }
static const struct drm_audio_component_audio_ops nvhdmi_audio_ops = …;
static int patch_nvhdmi(struct hda_codec *codec)
{ … }
static int patch_nvhdmi_legacy(struct hda_codec *codec)
{ … }
#define NVIDIA_AFG_NID …
#define NVIDIA_SET_HOST_INTR …
#define NVIDIA_GET_SCRATCH0 …
#define NVIDIA_SET_SCRATCH0_BYTE0 …
#define NVIDIA_SET_SCRATCH0_BYTE1 …
#define NVIDIA_SET_SCRATCH0_BYTE2 …
#define NVIDIA_SET_SCRATCH0_BYTE3 …
#define NVIDIA_SCRATCH_TRIGGER …
#define NVIDIA_SCRATCH_VALID …
#define NVIDIA_GET_SCRATCH1 …
#define NVIDIA_SET_SCRATCH1_BYTE0 …
#define NVIDIA_SET_SCRATCH1_BYTE1 …
#define NVIDIA_SET_SCRATCH1_BYTE2 …
#define NVIDIA_SET_SCRATCH1_BYTE3 …
static void tegra_hdmi_set_format(struct hda_codec *codec,
hda_nid_t cvt_nid,
unsigned int format)
{ … }
static int tegra_hdmi_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int tegra_hdmi_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static struct hda_pcm *hda_find_pcm_by_type(struct hda_codec *codec, int type)
{ … }
static int tegra_hdmi_build_pcms(struct hda_codec *codec)
{ … }
static int tegra_hdmi_init(struct hda_codec *codec)
{ … }
static int patch_tegra_hdmi(struct hda_codec *codec)
{ … }
static int patch_tegra234_hdmi(struct hda_codec *codec)
{ … }
#define is_amdhdmi_rev3_or_later(codec) …
#define has_amd_full_remap_support(codec) …
#define ATI_VERB_SET_CHANNEL_ALLOCATION …
#define ATI_VERB_SET_DOWNMIX_INFO …
#define ATI_VERB_SET_MULTICHANNEL_01 …
#define ATI_VERB_SET_MULTICHANNEL_23 …
#define ATI_VERB_SET_MULTICHANNEL_45 …
#define ATI_VERB_SET_MULTICHANNEL_67 …
#define ATI_VERB_SET_HBR_CONTROL …
#define ATI_VERB_SET_MULTICHANNEL_1 …
#define ATI_VERB_SET_MULTICHANNEL_3 …
#define ATI_VERB_SET_MULTICHANNEL_5 …
#define ATI_VERB_SET_MULTICHANNEL_7 …
#define ATI_VERB_SET_MULTICHANNEL_MODE …
#define ATI_VERB_GET_CHANNEL_ALLOCATION …
#define ATI_VERB_GET_DOWNMIX_INFO …
#define ATI_VERB_GET_MULTICHANNEL_01 …
#define ATI_VERB_GET_MULTICHANNEL_23 …
#define ATI_VERB_GET_MULTICHANNEL_45 …
#define ATI_VERB_GET_MULTICHANNEL_67 …
#define ATI_VERB_GET_HBR_CONTROL …
#define ATI_VERB_GET_MULTICHANNEL_1 …
#define ATI_VERB_GET_MULTICHANNEL_3 …
#define ATI_VERB_GET_MULTICHANNEL_5 …
#define ATI_VERB_GET_MULTICHANNEL_7 …
#define ATI_VERB_GET_MULTICHANNEL_MODE …
#define ATI_VERB_SET_RAMP_RATE …
#define ATI_VERB_GET_RAMP_RATE …
#define ATI_OUT_ENABLE …
#define ATI_MULTICHANNEL_MODE_PAIRED …
#define ATI_MULTICHANNEL_MODE_SINGLE …
#define ATI_HBR_CAPABLE …
#define ATI_HBR_ENABLE …
static int atihdmi_pin_get_eld(struct hda_codec *codec, hda_nid_t nid,
int dev_id, unsigned char *buf, int *eld_size)
{ … }
static void atihdmi_pin_setup_infoframe(struct hda_codec *codec,
hda_nid_t pin_nid, int dev_id, int ca,
int active_channels, int conn_type)
{ … }
static int atihdmi_paired_swap_fc_lfe(int pos)
{ … }
static int atihdmi_paired_chmap_validate(struct hdac_chmap *chmap,
int ca, int chs, unsigned char *map)
{ … }
static int atihdmi_pin_set_slot_channel(struct hdac_device *hdac,
hda_nid_t pin_nid, int hdmi_slot, int stream_channel)
{ … }
static int atihdmi_pin_get_slot_channel(struct hdac_device *hdac,
hda_nid_t pin_nid, int asp_slot)
{ … }
static int atihdmi_paired_chmap_cea_alloc_validate_get_type(
struct hdac_chmap *chmap,
struct hdac_cea_channel_speaker_allocation *cap,
int channels)
{ … }
static void atihdmi_paired_cea_alloc_to_tlv_chmap(struct hdac_chmap *hchmap,
struct hdac_cea_channel_speaker_allocation *cap,
unsigned int *chmap, int channels)
{ … }
static int atihdmi_pin_hbr_setup(struct hda_codec *codec, hda_nid_t pin_nid,
int dev_id, bool hbr)
{ … }
static int atihdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
hda_nid_t pin_nid, int dev_id,
u32 stream_tag, int format)
{ … }
static int atihdmi_init(struct hda_codec *codec)
{ … }
static int atihdmi_pin2port(void *audio_ptr, int pin_nid)
{ … }
static int atihdmi_port2pin(struct hda_codec *codec, int port)
{ … }
static const struct drm_audio_component_audio_ops atihdmi_audio_ops = …;
static int patch_atihdmi(struct hda_codec *codec)
{ … }
#define VIAHDMI_CVT_NID …
#define VIAHDMI_PIN_NID …
static int patch_via_hdmi(struct hda_codec *codec)
{ … }
static int patch_gf_hdmi(struct hda_codec *codec)
{ … }
static const struct hda_device_id snd_hda_id_hdmi[] = …;
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_hdmi);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
static struct hda_codec_driver hdmi_driver = …;
module_hda_codec_driver(…) …;