linux/sound/soc/codecs/wm8971.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * wm8971.c  --  WM8971 ALSA SoC Audio driver
 *
 * Copyright 2005 Lab126, Inc.
 *
 * Author: Kenneth Kiraly <[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/i2c.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/initval.h>

#include "wm8971.h"

#define WM8971_REG_COUNT

/* codec private data */
struct wm8971_priv {};

/*
 * wm8971 register cache
 * We can't read the WM8971 register space when we
 * are using 2 wire for device control, so we cache them instead.
 */
static const struct reg_default wm8971_reg_defaults[] =;

#define wm8971_reset(c)

/* WM8971 Controls */
static const char *wm8971_bass[] =;
static const char *wm8971_bass_filter[] =;
static const char *wm8971_treble[] =;
static const char *wm8971_alc_func[] =;
static const char *wm8971_ng_type[] =;
static const char *wm8971_deemp[] =;
static const char *wm8971_mono_mux[] =;
static const char *wm8971_dac_phase[] =;
static const char *wm8971_lline_mux[] =;
static const char *wm8971_rline_mux[] =;
static const char *wm8971_lpga_sel[] =;
static const char *wm8971_rpga_sel[] =;
static const char *wm8971_adcpol[] =;

static const struct soc_enum wm8971_enum[] =;

static const struct snd_kcontrol_new wm8971_snd_controls[] =;

/*
 * DAPM Controls
 */

/* Left Mixer */
static const struct snd_kcontrol_new wm8971_left_mixer_controls[] =;

/* Right Mixer */
static const struct snd_kcontrol_new wm8971_right_mixer_controls[] =;

/* Mono Mixer */
static const struct snd_kcontrol_new wm8971_mono_mixer_controls[] =;

/* Left Line Mux */
static const struct snd_kcontrol_new wm8971_left_line_controls =;

/* Right Line Mux */
static const struct snd_kcontrol_new wm8971_right_line_controls =;

/* Left PGA Mux */
static const struct snd_kcontrol_new wm8971_left_pga_controls =;

/* Right PGA Mux */
static const struct snd_kcontrol_new wm8971_right_pga_controls =;

/* Mono ADC Mux */
static const struct snd_kcontrol_new wm8971_monomux_controls =;

static const struct snd_soc_dapm_widget wm8971_dapm_widgets[] =;

static const struct snd_soc_dapm_route wm8971_dapm_routes[] =;

struct _coeff_div {};

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

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

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

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

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

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

static void wm8971_charge_work(struct work_struct *work)
{}

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

#define WM8971_RATES

#define WM8971_FORMATS

static const struct snd_soc_dai_ops wm8971_dai_ops =;

static struct snd_soc_dai_driver wm8971_dai =;

static int wm8971_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_wm8971 =;

static const struct regmap_config wm8971_regmap =;

static int wm8971_i2c_probe(struct i2c_client *i2c)
{}

static const struct i2c_device_id wm8971_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, wm8971_i2c_id);

static struct i2c_driver wm8971_i2c_driver =;

module_i2c_driver();

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