#include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/iio/consumer.h>
#include <linux/mfd/wm8994/registers.h>
#include <linux/input-event-codes.h>
#include <linux/module.h>
#include <linux/of.h>
#include <sound/jack.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include "i2s.h"
#include "../codecs/wm8994.h"
#define MCLK1_RATE …
#define MCLK2_RATE …
#define DEFAULT_FLL1_RATE …
struct midas_priv { … };
static struct snd_soc_jack_pin headset_jack_pins[] = …;
static struct snd_soc_jack_zone headset_jack_zones[] = …;
static struct snd_soc_jack_zone headset_key_zones[] = …;
static int headset_jack_check(void *data)
{ … }
static int headset_key_check(void *data)
{ … }
static struct snd_soc_jack_gpio headset_gpio[] = …;
static int midas_start_fll1(struct snd_soc_pcm_runtime *rtd, unsigned int rate)
{ … }
static int midas_stop_fll1(struct snd_soc_pcm_runtime *rtd)
{ … }
static int midas_aif1_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static const struct snd_soc_ops midas_aif1_ops = …;
static int midas_ext_spkmode(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int midas_fm_set(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int midas_line_set(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_kcontrol_new midas_controls[] = …;
static const struct snd_soc_dapm_widget midas_dapm_widgets[] = …;
static const struct snd_soc_dapm_route midas_dapm_routes[] = …;
static int midas_set_bias_level(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{ … }
static int midas_late_probe(struct snd_soc_card *card)
{ … }
static struct snd_soc_dai_driver midas_ext_dai[] = …;
static const struct snd_soc_component_driver midas_component = …;
SND_SOC_DAILINK_DEFS(…);
SND_SOC_DAILINK_DEFS(…);
SND_SOC_DAILINK_DEFS(…);
static struct snd_soc_dai_link midas_dai[] = …;
static struct snd_soc_card midas_card = …;
static int midas_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id midas_of_match[] = …;
MODULE_DEVICE_TABLE(of, midas_of_match);
static struct platform_driver midas_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;