linux/sound/soc/codecs/wm8510.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * wm8510.c  --  WM8510 ALSA Soc Audio driver
 *
 * Copyright 2006 Wolfson Microelectronics PLC.
 *
 * Author: Liam Girdwood <[email protected]>
 */

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

#include "wm8510.h"

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

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

#define WM8510_POWER1_BIASEN
#define WM8510_POWER1_BUFIOEN

#define wm8510_reset(c)

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

static const char *wm8510_companding[] =;
static const char *wm8510_deemp[] =;
static const char *wm8510_alc[] =;

static const struct soc_enum wm8510_enum[] =;

static const struct snd_kcontrol_new wm8510_snd_controls[] =;

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

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

static const struct snd_kcontrol_new wm8510_boost_controls[] =;

static const struct snd_kcontrol_new wm8510_micpga_controls[] =;

static const struct snd_soc_dapm_widget wm8510_dapm_widgets[] =;

static const struct snd_soc_dapm_route wm8510_dapm_routes[] =;

struct pll_ {};

static struct pll_ pll_div;

/* The size in bits of the pll divide multiplied by 10
 * to allow rounding later */
#define FIXED_PLL_SIZE

static void pll_factors(unsigned int target, unsigned int source)
{}

static int wm8510_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
		int source, unsigned int freq_in, unsigned int freq_out)
{}

/*
 * Configure WM8510 clock dividers.
 */
static int wm8510_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
		int div_id, int div)
{}

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

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

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

/* liam need to make this lower power with dapm */
static int wm8510_set_bias_level(struct snd_soc_component *component,
	enum snd_soc_bias_level level)
{}

#define WM8510_RATES

#define WM8510_FORMATS

static const struct snd_soc_dai_ops wm8510_dai_ops =;

static struct snd_soc_dai_driver wm8510_dai =;

static int wm8510_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_wm8510 =;

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

static const struct regmap_config wm8510_regmap =;

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

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

#if IS_ENABLED(CONFIG_I2C)
static int wm8510_i2c_probe(struct i2c_client *i2c)
{}

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

static struct i2c_driver wm8510_i2c_driver =;
#endif

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

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

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