#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_gpio.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/tas2781-tlv.h>
#include <asm/unaligned.h>
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 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 tas2781_snd_controls[] = …;
static const struct snd_kcontrol_new tas2563_snd_controls[] = …;
static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
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_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_dsp_create_ctrls(
struct tasdevice_priv *tas_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(…);