#include <linux/module.h>
#include <linux/platform_device.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include "../../codecs/nau8825.h"
#include "../../codecs/hdac_hdmi.h"
#define SKL_NUVOTON_CODEC_DAI …
#define SKL_MAXIM_CODEC_DAI …
#define DMIC_CH(p) …
static struct snd_soc_jack skylake_headset;
static struct snd_soc_card skylake_audio_card;
static const struct snd_pcm_hw_constraint_list *dmic_constraints;
static struct snd_soc_jack skylake_hdmi[3];
struct skl_hdmi_pcm { … };
struct skl_nau8825_private { … };
enum { … };
static int platform_clock_control(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{ … }
static const struct snd_kcontrol_new skylake_controls[] = …;
static const struct snd_soc_dapm_widget skylake_widgets[] = …;
static struct snd_soc_jack_pin jack_pins[] = …;
static const struct snd_soc_dapm_route skylake_map[] = …;
static int skylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{ … }
static int skylake_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd)
{ … }
static int skylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd)
{ … }
static int skylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd)
{ … }
static int skylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd)
{ … }
static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)
{ … }
static const unsigned int rates[] = …;
static const struct snd_pcm_hw_constraint_list constraints_rates = …;
static const unsigned int channels[] = …;
static const struct snd_pcm_hw_constraint_list constraints_channels = …;
static int skl_fe_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops skylake_nau8825_fe_ops = …;
static int skylake_nau8825_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static const struct snd_soc_ops skylake_nau8825_ops = …;
static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{ … }
static const unsigned int channels_dmic[] = …;
static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = …;
static const unsigned int dmic_2ch[] = …;
static const struct snd_pcm_hw_constraint_list constraints_dmic_2ch = …;
static int skylake_dmic_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops skylake_dmic_ops = …;
static const unsigned int rates_16000[] = …;
static const struct snd_pcm_hw_constraint_list constraints_16000 = …;
static const unsigned int ch_mono[] = …;
static const struct snd_pcm_hw_constraint_list constraints_refcap = …;
static int skylake_refcap_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops skylake_refcap_ops = …;
SND_SOC_DAILINK_DEF(dummy,
DAILINK_COMP_ARRAY(COMP_DUMMY()));
SND_SOC_DAILINK_DEF(system,
DAILINK_COMP_ARRAY(COMP_CPU("System Pin")));
SND_SOC_DAILINK_DEF(reference,
DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin")));
SND_SOC_DAILINK_DEF(dmic,
DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin")));
SND_SOC_DAILINK_DEF(hdmi1,
DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin")));
SND_SOC_DAILINK_DEF(hdmi2,
DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin")));
SND_SOC_DAILINK_DEF(hdmi3,
DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin")));
SND_SOC_DAILINK_DEF(ssp0_pin,
DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin")));
SND_SOC_DAILINK_DEF(ssp0_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("MX98357A:00", SKL_MAXIM_CODEC_DAI)));
SND_SOC_DAILINK_DEF(ssp1_pin,
DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin")));
SND_SOC_DAILINK_DEF(ssp1_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508825:00",
SKL_NUVOTON_CODEC_DAI)));
SND_SOC_DAILINK_DEF(dmic_pin,
DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin")));
SND_SOC_DAILINK_DEF(dmic_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
SND_SOC_DAILINK_DEF(idisp1_pin,
DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin")));
SND_SOC_DAILINK_DEF(idisp1_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
SND_SOC_DAILINK_DEF(idisp2_pin,
DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin")));
SND_SOC_DAILINK_DEF(idisp2_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
SND_SOC_DAILINK_DEF(idisp3_pin,
DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin")));
SND_SOC_DAILINK_DEF(idisp3_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
SND_SOC_DAILINK_DEF(platform,
DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3")));
static struct snd_soc_dai_link skylake_dais[] = …;
#define NAME_SIZE …
static int skylake_card_late_probe(struct snd_soc_card *card)
{ … }
static struct snd_soc_card skylake_audio_card = …;
static int skylake_audio_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id skl_board_ids[] = …;
MODULE_DEVICE_TABLE(platform, skl_board_ids);
static struct platform_driver skylake_audio = …;
module_platform_driver(…) …
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;