#include <linux/acpi.h>
#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_data/x86/soc.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spi/spi.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/wm5102.h"
#include "../atom/sst-atom-controls.h"
#define WM5102_MAX_SYSCLK_4K …
#define WM5102_MAX_SYSCLK_11025 …
struct byt_wm5102_private { … };
#define BYT_WM5102_IN_MAP …
#define BYT_WM5102_OUT_MAP …
#define BYT_WM5102_SSP2 …
#define BYT_WM5102_MCLK_19_2MHZ …
enum { … };
enum { … };
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_wm5102_spkvdd_power_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int byt_wm5102_prepare_and_enable_pll1(struct snd_soc_dai *codec_dai, int rate)
{ … }
static int platform_clock_control(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{ … }
static const struct snd_soc_dapm_widget byt_wm5102_widgets[] = …;
static const struct snd_soc_dapm_route byt_wm5102_audio_map[] = …;
static const struct snd_soc_dapm_route bytcr_wm5102_ssp0_map[] = …;
static const struct snd_soc_dapm_route bytcr_wm5102_ssp2_map[] = …;
static const struct snd_soc_dapm_route byt_wm5102_spk_spk_map[] = …;
static const struct snd_soc_dapm_route byt_wm5102_spk_hpout2_map[] = …;
static const struct snd_soc_dapm_route byt_wm5102_intmic_in3l_hsmic_in1l_map[] = …;
static const struct snd_soc_dapm_route byt_wm5102_intmic_in1l_hsmic_in2l_map[] = …;
static const struct snd_kcontrol_new byt_wm5102_controls[] = …;
static struct snd_soc_jack_pin byt_wm5102_pins[] = …;
static int byt_wm5102_init(struct snd_soc_pcm_runtime *runtime)
{ … }
static int byt_wm5102_codec_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{ … }
static int byt_wm5102_aif1_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops byt_wm5102_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(ssp0_port,
DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port")));
SND_SOC_DAILINK_DEF(ssp0_codec,
DAILINK_COMP_ARRAY(COMP_CODEC(
"wm5102-codec",
"wm5102-aif1")));
SND_SOC_DAILINK_DEF(platform,
DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));
static struct snd_soc_dai_link byt_wm5102_dais[] = …;
#define SOF_CARD_NAME …
#define SOF_DRIVER_NAME …
#define CARD_NAME …
#define DRIVER_NAME …
static struct snd_soc_card byt_wm5102_card = …;
static char byt_wm5102_components[64];
static int snd_byt_wm5102_mc_probe(struct platform_device *pdev)
{ … }
static void snd_byt_wm5102_mc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver snd_byt_wm5102_mc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;