#include <linux/delay.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <linux/irqchip/irq-madera.h>
#include <linux/mfd/madera/core.h>
#include <linux/mfd/madera/registers.h>
#include "madera.h"
#include "wm_adsp.h"
#define CS47L35_NUM_ADSP …
#define CS47L35_MONO_OUTPUTS …
#define DRV_NAME …
struct cs47l35 { … };
static const struct cs_dsp_region cs47l35_dsp1_regions[] = …;
static const struct cs_dsp_region cs47l35_dsp2_regions[] = …;
static const struct cs_dsp_region cs47l35_dsp3_regions[] = …;
static const struct cs_dsp_region *cs47l35_dsp_regions[] = …;
static const int wm_adsp2_control_bases[] = …;
static const char * const cs47l35_outdemux_texts[] = …;
static SOC_ENUM_SINGLE_DECL(cs47l35_outdemux_enum, SND_SOC_NOPM, 0,
cs47l35_outdemux_texts);
static const struct snd_kcontrol_new cs47l35_outdemux = …;
static int cs47l35_adsp_power_ev(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{ … }
#define CS47L35_NG_SRC(name, base) …
static void cs47l35_hp_post_enable(struct snd_soc_dapm_widget *w)
{ … }
static void cs47l35_hp_post_disable(struct snd_soc_dapm_widget *w)
{ … }
static int cs47l35_hp_ev(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_kcontrol_new cs47l35_snd_controls[] = …;
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_DSP_AUX_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_DSP_AUX_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_DSP_AUX_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MIXER_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
MADERA_MUX_ENUMS(…);
static const char * const cs47l35_aec_loopback_texts[] = …;
static const unsigned int cs47l35_aec_loopback_values[] = …;
static const struct soc_enum cs47l35_aec1_loopback = …;
static const struct soc_enum cs47l35_aec2_loopback = …;
static const struct snd_kcontrol_new cs47l35_aec_loopback_mux[] = …;
static const struct snd_soc_dapm_widget cs47l35_dapm_widgets[] = …;
#define MADERA_MIXER_INPUT_ROUTES(name) …
static const struct snd_soc_dapm_route cs47l35_dapm_routes[] = …;
static int cs47l35_set_fll(struct snd_soc_component *component, int fll_id,
int source, unsigned int fref, unsigned int fout)
{ … }
static const struct snd_soc_dai_ops cs47l35_dai_ops = …;
static struct snd_soc_dai_driver cs47l35_dai[] = …;
static int cs47l35_open(struct snd_soc_component *component,
struct snd_compr_stream *stream)
{ … }
static irqreturn_t cs47l35_adsp2_irq(int irq, void *data)
{ … }
static const struct snd_soc_dapm_route cs47l35_mono_routes[] = …;
static int cs47l35_component_probe(struct snd_soc_component *component)
{ … }
static void cs47l35_component_remove(struct snd_soc_component *component)
{ … }
#define CS47L35_DIG_VU …
static unsigned int cs47l35_digital_vu[] = …;
static const struct snd_compress_ops cs47l35_compress_ops = …;
static const struct snd_soc_component_driver soc_component_dev_cs47l35 = …;
static int cs47l35_probe(struct platform_device *pdev)
{ … }
static void cs47l35_remove(struct platform_device *pdev)
{ … }
static struct platform_driver cs47l35_codec_driver = …;
module_platform_driver(…) …;
MODULE_SOFTDEP(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;