#include <linux/module.h>
#include <linux/string.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <sound/pcm_drm_eld.h>
#include <sound/hdmi-codec.h>
#include <sound/pcm_iec958.h>
#include <drm/drm_crtc.h>
#include <drm/drm_eld.h>
#define HDMI_CODEC_CHMAP_IDX_UNKNOWN …
enum hdmi_codec_cea_spk_placement { … };
struct hdmi_codec_cea_spk_alloc { … };
static const struct snd_pcm_chmap_elem hdmi_codec_stereo_chmaps[] = …;
static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = …;
static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = …;
struct hdmi_codec_priv { … };
static const struct snd_soc_dapm_widget hdmi_widgets[] = …;
enum { … };
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 unsigned long hdmi_codec_spk_mask_from_alloc(int spk_alloc)
{ … }
static void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp)
{ … }
static int hdmi_codec_get_ch_alloc_table_idx(struct hdmi_codec_priv *hcp,
unsigned char channels)
{ … }
static int hdmi_codec_chmap_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdmi_codec_iec958_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int hdmi_codec_iec958_default_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdmi_codec_iec958_default_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdmi_codec_iec958_mask_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdmi_codec_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static void hdmi_codec_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int hdmi_codec_fill_codec_params(struct snd_soc_dai *dai,
unsigned int sample_width,
unsigned int sample_rate,
unsigned int channels,
struct hdmi_codec_params *hp)
{ … }
static int hdmi_codec_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int hdmi_codec_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int hdmi_codec_i2s_set_fmt(struct snd_soc_dai *dai,
unsigned int fmt)
{ … }
static int hdmi_codec_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static const u64 hdmi_codec_formats = …;
#define HDMI_RATES …
#define SPDIF_FORMATS …
#define I2S_FORMATS …
static struct snd_kcontrol_new hdmi_codec_controls[] = …;
static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
struct snd_soc_dai *dai)
{ … }
static int hdmi_dai_probe(struct snd_soc_dai *dai)
{ … }
static void hdmi_codec_jack_report(struct hdmi_codec_priv *hcp,
unsigned int jack_status)
{ … }
static void plugged_cb(struct device *dev, bool plugged)
{ … }
static int hdmi_codec_set_jack(struct snd_soc_component *component,
struct snd_soc_jack *jack,
void *data)
{ … }
static int hdmi_dai_spdif_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = …;
static const struct snd_soc_dai_ops hdmi_codec_spdif_dai_ops = …;
static const struct snd_soc_dai_driver hdmi_i2s_dai = …;
static const struct snd_soc_dai_driver hdmi_spdif_dai = …;
static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
struct device_node *endpoint)
{ … }
static int hdmi_probe(struct snd_soc_component *component)
{ … }
static void hdmi_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver hdmi_driver = …;
static int hdmi_codec_probe(struct platform_device *pdev)
{ … }
static struct platform_driver hdmi_codec_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;