linux/sound/soc/codecs/wm8711.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * wm8711.c  --  WM8711 ALSA SoC Audio driver
 *
 * Copyright 2006 Wolfson Microelectronics
 *
 * Author: Mike Arthur <[email protected]>
 *
 * Based on wm8731.c by Richard Purdie
 */

#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/i2c.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <sound/initval.h>

#include "wm8711.h"

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

/*
 * wm8711 register cache
 * We can't read the WM8711 register space when we are
 * using 2 wire for device control, so we cache them instead.
 * There is no point in caching the reset register
 */
static const struct reg_default wm8711_reg_defaults[] =;

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

#define wm8711_reset(c)

static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);

static const struct snd_kcontrol_new wm8711_snd_controls[] =;

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

static const struct snd_soc_dapm_widget wm8711_dapm_widgets[] =;

static const struct snd_soc_dapm_route wm8711_intercon[] =;

struct _coeff_div {};

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

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

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

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

static void wm8711_shutdown(struct snd_pcm_substream *substream,
			    struct snd_soc_dai *dai)
{}

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

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

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

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

#define WM8711_RATES

#define WM8711_FORMATS

static const struct snd_soc_dai_ops wm8711_ops =;

static struct snd_soc_dai_driver wm8711_dai =;

static int wm8711_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_wm8711 =;

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

static const struct regmap_config wm8711_regmap =;

#if defined(CONFIG_SPI_MASTER)
static int wm8711_spi_probe(struct spi_device *spi)
{}

static struct spi_driver wm8711_spi_driver =;
#endif /* CONFIG_SPI_MASTER */

#if IS_ENABLED(CONFIG_I2C)
static int wm8711_i2c_probe(struct i2c_client *client)
{}

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

static struct i2c_driver wm8711_i2c_driver =;
#endif

static int __init wm8711_modinit(void)
{}
module_init();

static void __exit wm8711_exit(void)
{}
module_exit(wm8711_exit);

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