linux/sound/soc/codecs/wm8728.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * wm8728.c  --  WM8728 ALSA SoC Audio driver
 *
 * Copyright 2008 Wolfson Microelectronics plc
 *
 * Author: Mark Brown <[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/i2c.h>
#include <linux/platform_device.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/initval.h>
#include <sound/tlv.h>

#include "wm8728.h"

/*
 * We can't read the WM8728 register space so we cache them instead.
 * Note that the defaults here aren't the physical defaults, we latch
 * the volume update bits, mute the output and enable infinite zero
 * detect.
 */
static const struct reg_default wm8728_reg_defaults[] =;

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

static const DECLARE_TLV_DB_SCALE(wm8728_tlv, -12750, 50, 1);

static const struct snd_kcontrol_new wm8728_snd_controls[] =;

/*
 * DAPM controls.
 */
static const struct snd_soc_dapm_widget wm8728_dapm_widgets[] =;

static const struct snd_soc_dapm_route wm8728_intercon[] =;

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

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

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

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

#define WM8728_RATES

#define WM8728_FORMATS

static const struct snd_soc_dai_ops wm8728_dai_ops =;

static struct snd_soc_dai_driver wm8728_dai =;

static const struct snd_soc_component_driver soc_component_dev_wm8728 =;

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

static const struct regmap_config wm8728_regmap =;

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

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

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

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

static struct i2c_driver wm8728_i2c_driver =;
#endif

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

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

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