linux/sound/soc/codecs/rt711.c

// SPDX-License-Identifier: GPL-2.0
//
// rt711.c -- rt711 ALSA SoC audio driver
//
// Copyright(c) 2019 Realtek Semiconductor Corp.
//
//

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm_runtime.h>
#include <linux/pm.h>
#include <linux/soundwire/sdw.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/sdw.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <sound/hda_verbs.h>
#include <sound/jack.h>

#include "rt711.h"

static int rt711_index_write(struct regmap *regmap,
		unsigned int nid, unsigned int reg, unsigned int value)
{}

static int rt711_index_read(struct regmap *regmap,
		unsigned int nid, unsigned int reg, unsigned int *value)
{}

static int rt711_index_update_bits(struct regmap *regmap, unsigned int nid,
			unsigned int reg, unsigned int mask, unsigned int val)
{}

static void rt711_reset(struct regmap *regmap)
{}

static int rt711_calibration(struct rt711_priv *rt711)
{}

static unsigned int rt711_button_detect(struct rt711_priv *rt711)
{}

static int rt711_headset_detect(struct rt711_priv *rt711)
{}

static void rt711_jack_detect_handler(struct work_struct *work)
{}

static void rt711_btn_check_handler(struct work_struct *work)
{}

static void rt711_jack_init(struct rt711_priv *rt711)
{}

static int rt711_set_jack_detect(struct snd_soc_component *component,
	struct snd_soc_jack *hs_jack, void *data)
{}

static void rt711_get_gain(struct rt711_priv *rt711, unsigned int addr_h,
				unsigned int addr_l, unsigned int val_h,
				unsigned int *r_val, unsigned int *l_val)
{}

/* For Verb-Set Amplifier Gain (Verb ID = 3h) */
static int rt711_set_amp_gain_put(struct snd_kcontrol *kcontrol,
		struct snd_ctl_elem_value *ucontrol)
{}

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

static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -6525, 75, 0);
static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -1725, 75, 0);
static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, 0, 1000, 0);

static const struct snd_kcontrol_new rt711_snd_controls[] =;

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

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

static const char * const adc_mux_text[] =;

static SOC_ENUM_SINGLE_DECL(
	rt711_adc22_enum, SND_SOC_NOPM, 0, adc_mux_text);

static SOC_ENUM_SINGLE_DECL(
	rt711_adc23_enum, SND_SOC_NOPM, 0, adc_mux_text);

static const struct snd_kcontrol_new rt711_adc22_mux =;

static const struct snd_kcontrol_new rt711_adc23_mux =;

static int rt711_dac_surround_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int rt711_adc_09_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int rt711_adc_08_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static const struct snd_soc_dapm_widget rt711_dapm_widgets[] =;

static const struct snd_soc_dapm_route rt711_audio_map[] =;

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

static int rt711_parse_dt(struct rt711_priv *rt711, struct device *dev)
{}

static int rt711_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_codec_dev_rt711 =;

static int rt711_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
				int direction)
{}

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

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

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

#define RT711_STEREO_RATES
#define RT711_FORMATS

static const struct snd_soc_dai_ops rt711_ops =;

static struct snd_soc_dai_driver rt711_dai[] =;

/* Bus clock frequency */
#define RT711_CLK_FREQ_9600000HZ
#define RT711_CLK_FREQ_12000000HZ
#define RT711_CLK_FREQ_6000000HZ
#define RT711_CLK_FREQ_4800000HZ
#define RT711_CLK_FREQ_2400000HZ
#define RT711_CLK_FREQ_12288000HZ

int rt711_clock_config(struct device *dev)
{}

static void rt711_calibration_work(struct work_struct *work)
{}

int rt711_init(struct device *dev, struct regmap *sdw_regmap,
			struct regmap *regmap, struct sdw_slave *slave)
{}

int rt711_io_init(struct device *dev, struct sdw_slave *slave)
{}

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