#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/dmi.h>
#include <linux/slab.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/jack.h>
#include <sound/soc-acpi.h>
#include "../../codecs/rt5645.h"
#include "../atom/sst-atom-controls.h"
#include "../common/soc-intel-quirks.h"
#define CHT_PLAT_CLK_3_HZ …
#define CHT_CODEC_DAI1 …
#define CHT_CODEC_DAI2 …
struct cht_acpi_card { … };
struct cht_mc_private { … };
#define CHT_RT5645_MAP(quirk) …
#define CHT_RT5645_SSP2_AIF2 …
#define CHT_RT5645_SSP0_AIF1 …
#define CHT_RT5645_SSP0_AIF2 …
#define CHT_RT5645_PMC_PLT_CLK_0 …
static unsigned long cht_rt5645_quirk = …;
static void log_quirks(struct device *dev)
{ … }
static int platform_clock_control(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{ … }
static const struct snd_soc_dapm_widget cht_dapm_widgets[] = …;
static const struct snd_soc_dapm_route cht_rt5645_audio_map[] = …;
static const struct snd_soc_dapm_route cht_rt5650_audio_map[] = …;
static const struct snd_soc_dapm_route cht_rt5645_ssp2_aif1_map[] = …;
static const struct snd_soc_dapm_route cht_rt5645_ssp2_aif2_map[] = …;
static const struct snd_soc_dapm_route cht_rt5645_ssp0_aif1_map[] = …;
static const struct snd_soc_dapm_route cht_rt5645_ssp0_aif2_map[] = …;
static const struct snd_kcontrol_new cht_mc_controls[] = …;
static struct snd_soc_jack_pin cht_bsw_jack_pins[] = …;
static int cht_aif1_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int cht_rt5645_quirk_cb(const struct dmi_system_id *id)
{ … }
static const struct dmi_system_id cht_rt5645_quirk_table[] = …;
static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
{ … }
static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{ … }
static int cht_aif1_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops cht_aif1_ops = …;
static const struct snd_soc_ops cht_be_ssp2_ops = …;
SND_SOC_DAILINK_DEF(dummy,
DAILINK_COMP_ARRAY(COMP_DUMMY()));
SND_SOC_DAILINK_DEF(media,
DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai")));
SND_SOC_DAILINK_DEF(deepbuffer,
DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai")));
SND_SOC_DAILINK_DEF(ssp2_port,
DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port")));
SND_SOC_DAILINK_DEF(ssp2_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5645:00", "rt5645-aif1")));
SND_SOC_DAILINK_DEF(platform,
DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));
static struct snd_soc_dai_link cht_dailink[] = …;
#define SOF_CARD_RT5645_NAME …
#define SOF_CARD_RT5650_NAME …
#define SOF_DRIVER_NAME …
#define CARD_RT5645_NAME …
#define CARD_RT5650_NAME …
#define DRIVER_NAME …
static struct snd_soc_card snd_soc_card_chtrt5645 = …;
static struct snd_soc_card snd_soc_card_chtrt5650 = …;
static struct cht_acpi_card snd_soc_cards[] = …;
static char cht_rt5645_codec_name[SND_ACPI_I2C_ID_LEN];
struct acpi_chan_package { … };
static int snd_cht_mc_probe(struct platform_device *pdev)
{ … }
static struct platform_driver snd_cht_mc_driver = …;
module_platform_driver(…) …
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;