#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/processor.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 <asm/cpu_device_id.h>
#include "../utils.h"
#define ES8336_CODEC_DAI …
struct avs_card_drvdata { … };
static const struct acpi_gpio_params enable_gpio = …;
static const struct acpi_gpio_mapping speaker_gpios[] = …;
static int avs_es8336_speaker_power_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget card_widgets[] = …;
static const struct snd_soc_dapm_route card_routes[] = …;
static const struct snd_kcontrol_new card_controls[] = …;
static const struct snd_soc_jack_pin card_headset_pins[] = …;
static int avs_es8336_codec_init(struct snd_soc_pcm_runtime *runtime)
{ … }
static void avs_es8336_codec_exit(struct snd_soc_pcm_runtime *runtime)
{ … }
static int avs_es8336_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static const struct snd_soc_ops avs_es8336_ops = …;
static int avs_es8336_be_fixup(struct snd_soc_pcm_runtime *runtime,
struct snd_pcm_hw_params *params)
{ … }
static int avs_create_dai_link(struct device *dev, const char *platform_name, int ssp_port,
int tdm_slot, struct snd_soc_dai_link **dai_link)
{ … }
static int avs_card_suspend_pre(struct snd_soc_card *card)
{ … }
static int avs_card_resume_post(struct snd_soc_card *card)
{ … }
static int avs_es8336_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id avs_es8336_driver_ids[] = …;
MODULE_DEVICE_TABLE(platform, avs_es8336_driver_ids);
static struct platform_driver avs_es8336_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;