linux/sound/soc/codecs/wm5102.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * wm5102.c  --  WM5102 ALSA SoC Audio driver
 *
 * Copyright 2012 Wolfson Microelectronics plc
 *
 * Author: Mark Brown <[email protected]>
 */

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/jack.h>
#include <sound/initval.h>
#include <sound/tlv.h>

#include <linux/mfd/arizona/core.h>
#include <linux/mfd/arizona/registers.h>
#include <asm/unaligned.h>

#include "arizona.h"
#include "wm5102.h"
#include "wm_adsp.h"

#define DRV_NAME

struct wm5102_priv {};

static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0);
static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
static DECLARE_TLV_DB_SCALE(noise_tlv, -13200, 600, 0);
static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);

static const struct cs_dsp_region wm5102_dsp1_regions[] =;

static const struct reg_default wm5102_sysclk_reva_patch[] =;

static const struct reg_default wm5102_sysclk_revb_patch[] =;

static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w,
			    struct snd_kcontrol *kcontrol, int event)
{}

static int wm5102_adsp_power_ev(struct snd_soc_dapm_widget *w,
				struct snd_kcontrol *kcontrol, int event)
{}

static int wm5102_out_comp_coeff_get(struct snd_kcontrol *kcontrol,
				     struct snd_ctl_elem_value *ucontrol)
{}

static int wm5102_out_comp_coeff_put(struct snd_kcontrol *kcontrol,
				     struct snd_ctl_elem_value *ucontrol)
{}

static int wm5102_out_comp_switch_get(struct snd_kcontrol *kcontrol,
				      struct snd_ctl_elem_value *ucontrol)
{}

static int wm5102_out_comp_switch_put(struct snd_kcontrol *kcontrol,
				      struct snd_ctl_elem_value *ucontrol)
{}

static const char * const wm5102_osr_text[] =;

static const unsigned int wm5102_osr_val[] =;

static const struct soc_enum wm5102_hpout_osr[] =;

#define WM5102_NG_SRC(name, base)

static const struct snd_kcontrol_new wm5102_snd_controls[] =;

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_MUX_ENUMS();
ARIZONA_MUX_ENUMS();
ARIZONA_MUX_ENUMS();
ARIZONA_MUX_ENUMS();

ARIZONA_MUX_ENUMS();
ARIZONA_MUX_ENUMS();

ARIZONA_MUX_ENUMS();
ARIZONA_MUX_ENUMS();

ARIZONA_MUX_ENUMS();
ARIZONA_MUX_ENUMS();

ARIZONA_MUX_ENUMS();
ARIZONA_MUX_ENUMS();

ARIZONA_MIXER_ENUMS();
ARIZONA_MIXER_ENUMS();

ARIZONA_DSP_AUX_ENUMS();

static const char * const wm5102_aec_loopback_texts[] =;

static const unsigned int wm5102_aec_loopback_values[] =;

static const struct soc_enum wm5102_aec_loopback =;

static const struct snd_kcontrol_new wm5102_aec_loopback_mux =;

static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] =;

#define ARIZONA_MIXER_INPUT_ROUTES(name)

static const struct snd_soc_dapm_route wm5102_dapm_routes[] =;

static int wm5102_set_fll(struct snd_soc_component *component, int fll_id,
			  int source, unsigned int Fref, unsigned int Fout)
{}

#define WM5102_RATES

#define WM5102_FORMATS

static const struct snd_soc_dai_ops wm5102_dai_ops =;

static struct snd_soc_dai_driver wm5102_dai[] =;

static int wm5102_open(struct snd_soc_component *component,
		       struct snd_compr_stream *stream)
{}

static irqreturn_t wm5102_adsp2_irq(int irq, void *data)
{}

static int wm5102_component_probe(struct snd_soc_component *component)
{}

static void wm5102_component_remove(struct snd_soc_component *component)
{}

#define WM5102_DIG_VU

static unsigned int wm5102_digital_vu[] =;

static const struct snd_compress_ops wm5102_compress_ops =;

static const struct snd_soc_component_driver soc_component_dev_wm5102 =;

static int wm5102_probe(struct platform_device *pdev)
{}

static void wm5102_remove(struct platform_device *pdev)
{}

static struct platform_driver wm5102_codec_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_ALIAS();