#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/dmi.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.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/es83xx-dsm-common.h"
#include "../atom/sst-atom-controls.h"
#include "../common/soc-intel-quirks.h"
#define MAX_NO_PROPS …
struct byt_cht_es8316_private { … };
enum { … };
#define BYT_CHT_ES8316_MAP(quirk) …
#define BYT_CHT_ES8316_SSP0 …
#define BYT_CHT_ES8316_MONO_SPEAKER …
#define BYT_CHT_ES8316_JD_INVERTED …
static unsigned long quirk;
static int quirk_override = …;
module_param_named(quirk, quirk_override, int, 0444);
MODULE_PARM_DESC(…) …;
static void log_quirks(struct device *dev)
{ … }
static int byt_cht_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget byt_cht_es8316_widgets[] = …;
static const struct snd_soc_dapm_route byt_cht_es8316_audio_map[] = …;
static const struct snd_soc_dapm_route byt_cht_es8316_intmic_in1_map[] = …;
static const struct snd_soc_dapm_route byt_cht_es8316_intmic_in2_map[] = …;
static const struct snd_soc_dapm_route byt_cht_es8316_ssp0_map[] = …;
static const struct snd_soc_dapm_route byt_cht_es8316_ssp2_map[] = …;
static const struct snd_kcontrol_new byt_cht_es8316_controls[] = …;
static struct snd_soc_jack_pin byt_cht_es8316_jack_pins[] = …;
static int byt_cht_es8316_init(struct snd_soc_pcm_runtime *runtime)
{ … }
static int byt_cht_es8316_codec_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{ … }
static int byt_cht_es8316_aif1_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops byt_cht_es8316_aif1_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-ESSX8316:00", "ES8316 HiFi")));
SND_SOC_DAILINK_DEF(platform,
DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));
static struct snd_soc_dai_link byt_cht_es8316_dais[] = …;
static char codec_name[SND_ACPI_I2C_ID_LEN];
#if !IS_ENABLED(CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES)
static char long_name[50];
#endif
static char components_string[32];
static int byt_cht_es8316_suspend(struct snd_soc_card *card)
{ … }
static int byt_cht_es8316_resume(struct snd_soc_card *card)
{ … }
#define SOF_CARD_NAME …
#define SOF_DRIVER_NAME …
#define CARD_NAME …
#define DRIVER_NAME …
static struct snd_soc_card byt_cht_es8316_card = …;
static const struct acpi_gpio_params first_gpio = …;
static const struct acpi_gpio_mapping byt_cht_es8316_gpios[] = …;
static const struct dmi_system_id byt_cht_es8316_quirk_table[] = …;
static int byt_cht_es8316_get_quirks_from_dsm(struct byt_cht_es8316_private *priv,
bool is_bytcr)
{ … }
static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
{ … }
static void snd_byt_cht_es8316_mc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver snd_byt_cht_es8316_mc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;