linux/sound/soc/codecs/wm8770.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * wm8770.c  --  WM8770 ALSA SoC Audio driver
 *
 * Copyright 2010 Wolfson Microelectronics plc
 *
 * Author: Dimitris Papastamos <[email protected]>
 */

#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/spi/spi.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/tlv.h>

#include "wm8770.h"

#define WM8770_NUM_SUPPLIES
static const char *wm8770_supply_names[WM8770_NUM_SUPPLIES] =;

static const struct reg_default wm8770_reg_defaults[] =;

static bool wm8770_volatile_reg(struct device *dev, unsigned int reg)
{}

struct wm8770_priv {};

static int vout12supply_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event);
static int vout34supply_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event);

/*
 * We can't use the same notifier block for more than one supply and
 * there's no way I can see to get from a callback to the caller
 * except container_of().
 */
#define WM8770_REGULATOR_EVENT(n)

WM8770_REGULATOR_EVENT()
WM8770_REGULATOR_EVENT()
WM8770_REGULATOR_EVENT()

static const DECLARE_TLV_DB_SCALE(adc_tlv, -1200, 100, 0);
static const DECLARE_TLV_DB_SCALE(dac_dig_tlv, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(dac_alg_tlv, -12700, 100, 1);

static const char *dac_phase_text[][2] =;

static const struct soc_enum dac_phase[] =;

static const struct snd_kcontrol_new wm8770_snd_controls[] =;

static const char *ain_text[] =;

static SOC_ENUM_DOUBLE_DECL(ain_enum,
			    WM8770_ADCMUX, 0, 4, ain_text);

static const struct snd_kcontrol_new ain_mux =;

static const struct snd_kcontrol_new vout1_mix_controls[] =;

static const struct snd_kcontrol_new vout2_mix_controls[] =;

static const struct snd_kcontrol_new vout3_mix_controls[] =;

static const struct snd_kcontrol_new vout4_mix_controls[] =;

static const struct snd_soc_dapm_widget wm8770_dapm_widgets[] =;

static const struct snd_soc_dapm_route wm8770_intercon[] =;

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

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

static int wm8770_reset(struct snd_soc_component *component)
{}

static int wm8770_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{}

static const int mclk_ratios[] =;

static int wm8770_hw_params(struct snd_pcm_substream *substream,
			    struct snd_pcm_hw_params *params,
			    struct snd_soc_dai *dai)
{}

static int wm8770_mute(struct snd_soc_dai *dai, int mute, int direction)
{}

static int wm8770_set_sysclk(struct snd_soc_dai *dai,
			     int clk_id, unsigned int freq, int dir)
{}

static int wm8770_set_bias_level(struct snd_soc_component *component,
				 enum snd_soc_bias_level level)
{}

#define WM8770_FORMATS

static const struct snd_soc_dai_ops wm8770_dai_ops =;

static struct snd_soc_dai_driver wm8770_dai =;

static int wm8770_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_wm8770 =;

static const struct of_device_id wm8770_of_match[] =;
MODULE_DEVICE_TABLE(of, wm8770_of_match);

static const struct regmap_config wm8770_regmap =;

static int wm8770_spi_probe(struct spi_device *spi)
{}

static struct spi_driver wm8770_spi_driver =;

module_spi_driver();

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