#include <linux/crc8.h>
#include <linux/firmware.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tas2781.h>
#include <sound/tlv.h>
#include <sound/tas2563-tlv.h>
#include <sound/tas2781-tlv.h>
#include <linux/unaligned.h>
#define X2563_CL_STT_VAL(xreg, xval) …
#define X2563_CL_STT_4BYTS(xreg, byte0, byte1, byte2, byte3) …
static const struct bulk_reg_val tas2563_cali_start_reg[] = …;
#define X2781_CL_STT_VAL(xreg, xval, xlocked) …
#define X2781_CL_STT_4BYTS_UNLOCKED(xreg, byte0, byte1, byte2, byte3) …
#define X2781_CL_STT_LEN_UNLOCKED(xreg) …
static const struct bulk_reg_val tas2781_cali_start_reg[] = …;
static const struct i2c_device_id tasdevice_id[] = …;
MODULE_DEVICE_TABLE(i2c, tasdevice_id);
#ifdef CONFIG_OF
static const struct of_device_id tasdevice_of_match[] = …;
MODULE_DEVICE_TABLE(of, tasdevice_of_match);
#endif
static int tas2781_digital_getvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tas2781_digital_putvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tas2781_amp_putvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_force_fwload_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_force_fwload_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_cali_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int calib_data_get(struct tasdevice_priv *tas_priv, int reg,
unsigned char *dst)
{ … }
static void sngl_calib_start(struct tasdevice_priv *tas_priv, int i,
int *reg, unsigned char *dat)
{ … }
static int tas2781_calib_start_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static void tas2781_calib_stop_put(struct tasdevice_priv *tas_priv)
{ … }
static int tas2563_calib_start_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static void tas2563_calib_stop_put(struct tasdevice_priv *tas_priv)
{ … }
static int tasdev_calib_stop_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_cali_data_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tas2781_latch_reg_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_tf_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_re_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_r0_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_XMA1_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_XMA2_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdev_nop_get(
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tas2563_digital_gain_get(
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tas2563_digital_gain_put(
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new tasdevice_snd_controls[] = …;
static const struct snd_kcontrol_new tasdevice_cali_controls[] = …;
static const struct snd_kcontrol_new tas2781_snd_controls[] = …;
static const struct snd_kcontrol_new tas2781_cali_controls[] = …;
static const struct snd_kcontrol_new tas2563_snd_controls[] = …;
static const struct snd_kcontrol_new tas2563_cali_controls[] = …;
static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_info_active_num(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int tasdevice_info_chip_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int tasdevice_info_programs(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int tasdevice_info_configurations(
struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int tasdevice_info_profile(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int tasdevice_get_profile_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_get_chip_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_create_control(struct tasdevice_priv *tas_priv)
{ … }
static int tasdevice_program_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_program_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_configuration_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_configuration_put(
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_active_num_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_active_num_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tasdevice_dsp_create_ctrls(struct tasdevice_priv *tas_priv)
{ … }
static int tasdevice_create_cali_ctrls(struct tasdevice_priv *priv)
{ … }
static void tasdevice_fw_ready(const struct firmware *fmw,
void *context)
{ … }
static int tasdevice_dapm_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget tasdevice_dapm_widgets[] = …;
static const struct snd_soc_dapm_route tasdevice_audio_map[] = …;
static int tasdevice_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int tasdevice_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int tasdevice_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static const struct snd_soc_dai_ops tasdevice_dai_ops = …;
static struct snd_soc_dai_driver tasdevice_dai_driver[] = …;
static int tasdevice_codec_probe(struct snd_soc_component *codec)
{ … }
static void tasdevice_deinit(void *context)
{ … }
static void tasdevice_codec_remove(struct snd_soc_component *codec)
{ … }
static const struct snd_soc_component_driver
soc_codec_driver_tasdevice = …;
static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
{ … }
static int tasdevice_i2c_probe(struct i2c_client *i2c)
{ … }
static void tasdevice_i2c_remove(struct i2c_client *client)
{ … }
#ifdef CONFIG_ACPI
static const struct acpi_device_id tasdevice_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, tasdevice_acpi_match);
#endif
static struct i2c_driver tasdevice_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);