linux/sound/soc/codecs/wm8998.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * wm8998.c -- ALSA SoC Audio driver for WM8998 codecs
 *
 * Copyright 2015 Cirrus Logic, Inc.
 *
 * Author: Richard Fitzgerald <[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 "arizona.h"
#include "wm8998.h"

struct wm8998_priv {};

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

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

static const char * const wm8998_inmux_texts[] =;

static SOC_ENUM_SINGLE_DECL(wm8998_in1muxl_enum,
			    ARIZONA_ADC_DIGITAL_VOLUME_1L,
			    ARIZONA_IN1L_SRC_SHIFT,
			    wm8998_inmux_texts);

static SOC_ENUM_SINGLE_DECL(wm8998_in1muxr_enum,
			    ARIZONA_ADC_DIGITAL_VOLUME_1R,
			    ARIZONA_IN1R_SRC_SHIFT,
			    wm8998_inmux_texts);

static SOC_ENUM_SINGLE_DECL(wm8998_in2mux_enum,
			    ARIZONA_ADC_DIGITAL_VOLUME_2L,
			    ARIZONA_IN2L_SRC_SHIFT,
			    wm8998_inmux_texts);

static const struct snd_kcontrol_new wm8998_in1mux[2] =;

static const struct snd_kcontrol_new wm8998_in2mux =;

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(ng_tlv, -10200, 600, 0);

#define WM8998_NG_SRC(name, base)

static const struct snd_kcontrol_new wm8998_snd_controls[] =;

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_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_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();

static const char * const wm8998_aec_loopback_texts[] =;

static const unsigned int wm8998_aec_loopback_values[] =;

static SOC_VALUE_ENUM_SINGLE_DECL(wm8998_aec1_loopback,
				  ARIZONA_DAC_AEC_CONTROL_1,
				  ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 0xf,
				  wm8998_aec_loopback_texts,
				  wm8998_aec_loopback_values);

static SOC_VALUE_ENUM_SINGLE_DECL(wm8998_aec2_loopback,
				  ARIZONA_DAC_AEC_CONTROL_2,
				  ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 0xf,
				  wm8998_aec_loopback_texts,
				  wm8998_aec_loopback_values);

static const struct snd_kcontrol_new wm8998_aec_loopback_mux[] =;

static const struct snd_soc_dapm_widget wm8998_dapm_widgets[] =;

#define ARIZONA_MIXER_INPUT_ROUTES(name)

static const struct snd_soc_dapm_route wm8998_dapm_routes[] =;

#define WM8998_RATES

#define WM8998_FORMATS

static struct snd_soc_dai_driver wm8998_dai[] =;

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

static int wm8998_component_probe(struct snd_soc_component *component)
{}

static void wm8998_component_remove(struct snd_soc_component *component)
{}

#define WM8998_DIG_VU

static unsigned int wm8998_digital_vu[] =;

static const struct snd_soc_component_driver soc_component_dev_wm8998 =;

static int wm8998_probe(struct platform_device *pdev)
{}

static void wm8998_remove(struct platform_device *pdev)
{}

static struct platform_driver wm8998_codec_driver =;

module_platform_driver();

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