linux/sound/soc/codecs/rt1015.c

// SPDX-License-Identifier: GPL-2.0
//
// rt1015.c  --  RT1015 ALSA SoC audio amplifier driver
//
// Copyright 2019 Realtek Semiconductor Corp.
//
// Author: Jack Yu <[email protected]>
//
//

#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/fs.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/rt1015.h>
#include <sound/soc-dapm.h>
#include <sound/soc.h>
#include <sound/tlv.h>

#include "rl6231.h"
#include "rt1015.h"

static const struct rt1015_platform_data i2s_default_platform_data =;

static const struct reg_default rt1015_reg[] =;

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

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

static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -9525, 75, 0);

static const char * const rt1015_din_source_select[] =;

static SOC_ENUM_SINGLE_DECL(rt1015_mono_lr_sel, RT1015_PAD_DRV2, 4,
	rt1015_din_source_select);

static const char * const rt1015_boost_mode[] =;

static SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
	rt1015_boost_mode);

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

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

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

static void rt1015_calibrate(struct rt1015_priv *rt1015)
{}

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

static const char * const rt1015_dac_output_vol_select[] =;

static SOC_ENUM_SINGLE_DECL(rt1015_dac_vol_ctl_enum,
	RT1015_DAC3, 2, rt1015_dac_output_vol_select);

static const struct snd_kcontrol_new rt1015_snd_controls[] =;

static int rt1015_is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
			 struct snd_soc_dapm_widget *sink)
{}

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

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

static const struct snd_soc_dapm_widget rt1015_dapm_widgets[] =;

static const struct snd_soc_dapm_route rt1015_dapm_routes[] =;

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

static int rt1015_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{}

static int rt1015_set_component_sysclk(struct snd_soc_component *component,
		int clk_id, int source, unsigned int freq, int dir)
{}

static int rt1015_set_component_pll(struct snd_soc_component *component,
		int pll_id, int source, unsigned int freq_in,
		unsigned int freq_out)
{}

static int rt1015_set_tdm_slot(struct snd_soc_dai *dai,
	unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width)
{}

static int rt1015_probe(struct snd_soc_component *component)
{}

static void rt1015_remove(struct snd_soc_component *component)
{}

#define RT1015_STEREO_RATES
#define RT1015_FORMATS

static const struct snd_soc_dai_ops rt1015_aif_dai_ops =;

static struct snd_soc_dai_driver rt1015_dai[] =;

#ifdef CONFIG_PM
static int rt1015_suspend(struct snd_soc_component *component)
{}

static int rt1015_resume(struct snd_soc_component *component)
{}
#else
#define rt1015_suspend
#define rt1015_resume
#endif

static const struct snd_soc_component_driver soc_component_dev_rt1015 =;

static const struct regmap_config rt1015_regmap =;

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

#if defined(CONFIG_OF)
static const struct of_device_id rt1015_of_match[] =;
MODULE_DEVICE_TABLE(of, rt1015_of_match);
#endif

#ifdef CONFIG_ACPI
static const struct acpi_device_id rt1015_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, rt1015_acpi_match);
#endif

static void rt1015_parse_dt(struct rt1015_priv *rt1015, struct device *dev)
{}

static int rt1015_i2c_probe(struct i2c_client *i2c)
{}

static void rt1015_i2c_shutdown(struct i2c_client *client)
{}

static struct i2c_driver rt1015_i2c_driver =;
module_i2c_driver();

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