linux/sound/soc/codecs/wm8731.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * wm8731.c  --  WM8731 ALSA SoC Audio driver
 *
 * Copyright 2005 Openedhand Ltd.
 * Copyright 2006-12 Wolfson Microelectronics, plc
 *
 * Author: Richard Purdie <[email protected]>
 *
 * Based on wm8753.c by Liam Girdwood
 */

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/clk.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 "wm8731.h"

static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] =;

/*
 * wm8731 register cache
 */
static const struct reg_default wm8731_reg_defaults[] =;

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

#define wm8731_reset(m)

static const char *wm8731_input_select[] =;

static SOC_ENUM_SINGLE_DECL(wm8731_insel_enum,
			    WM8731_APANA, 2, wm8731_input_select);

static int wm8731_deemph[] =;

static int wm8731_set_deemph(struct snd_soc_component *component)
{}

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

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

static const DECLARE_TLV_DB_SCALE(in_tlv, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -1500, 300, 0);
static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
static const DECLARE_TLV_DB_SCALE(mic_tlv, 0, 2000, 0);

static const struct snd_kcontrol_new wm8731_snd_controls[] =;

/* Output Mixer */
static const struct snd_kcontrol_new wm8731_output_mixer_controls[] =;

/* Input mux */
static const struct snd_kcontrol_new wm8731_input_mux_controls =;

static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] =;

static int wm8731_check_osc(struct snd_soc_dapm_widget *source,
			    struct snd_soc_dapm_widget *sink)
{}

static const struct snd_soc_dapm_route wm8731_intercon[] =;

struct _coeff_div {};

/* codec mclk clock divider coefficients */
static const struct _coeff_div coeff_div[] =;

/* rates constraints */
static const unsigned int wm8731_rates_12000000[] =;

static const unsigned int wm8731_rates_12288000_18432000[] =;

static const unsigned int wm8731_rates_11289600_16934400[] =;

static const struct snd_pcm_hw_constraint_list wm8731_constraints_12000000 =;

static const
struct snd_pcm_hw_constraint_list wm8731_constraints_12288000_18432000 =;

static const
struct snd_pcm_hw_constraint_list wm8731_constraints_11289600_16934400 =;

static inline int get_coeff(int mclk, int rate)
{}

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

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

static int wm8731_set_dai_sysclk(struct snd_soc_dai *codec_dai,
		int clk_id, unsigned int freq, int dir)
{}


static int wm8731_set_dai_fmt(struct snd_soc_dai *codec_dai,
		unsigned int fmt)
{}

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

static int wm8731_startup(struct snd_pcm_substream *substream,
	struct snd_soc_dai *dai)
{}

#define WM8731_RATES

#define WM8731_FORMATS

static const struct snd_soc_dai_ops wm8731_dai_ops =;

static struct snd_soc_dai_driver wm8731_dai =;

static const struct snd_soc_component_driver soc_component_dev_wm8731 =;

int wm8731_init(struct device *dev, struct wm8731_priv *wm8731)
{}
EXPORT_SYMBOL_GPL();

const struct regmap_config wm8731_regmap =;
EXPORT_SYMBOL_GPL();

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