#include <linux/clk.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "tegra210_mixer.h"
#include "tegra_cif.h"
#define MIXER_REG(reg, id) …
#define MIXER_REG_BASE(reg) …
#define MIXER_GAIN_CFG_RAM_ADDR(id) …
#define MIXER_RX_REG_DEFAULTS(id) …
#define MIXER_TX_REG_DEFAULTS(id) …
#define REG_DURATION_PARAM(reg, i) …
static const struct reg_default tegra210_mixer_reg_defaults[] = …;
static const struct tegra210_mixer_gain_params gain_params = …;
static int __maybe_unused tegra210_mixer_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused tegra210_mixer_runtime_resume(struct device *dev)
{ … }
static int tegra210_mixer_write_ram(struct tegra210_mixer *mixer,
unsigned int addr,
unsigned int coef)
{ … }
static int tegra210_mixer_configure_gain(struct snd_soc_component *cmpnt,
unsigned int id, bool instant_gain)
{ … }
static int tegra210_mixer_get_gain(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_mixer_apply_gain(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol,
bool instant_gain)
{ … }
static int tegra210_mixer_put_gain(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_mixer_put_instant_gain(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_mixer_set_audio_cif(struct tegra210_mixer *mixer,
struct snd_pcm_hw_params *params,
unsigned int reg,
unsigned int id)
{ … }
static int tegra210_mixer_in_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int tegra210_mixer_out_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops tegra210_mixer_out_dai_ops = …;
static const struct snd_soc_dai_ops tegra210_mixer_in_dai_ops = …;
#define IN_DAI(id) …
#define OUT_DAI(id) …
static struct snd_soc_dai_driver tegra210_mixer_dais[] = …;
#define ADDER_CTRL_DECL(name, reg) …
ADDER_CTRL_DECL(adder1, TEGRA210_MIXER_TX1_ADDER_CONFIG);
ADDER_CTRL_DECL(adder2, TEGRA210_MIXER_TX2_ADDER_CONFIG);
ADDER_CTRL_DECL(adder3, TEGRA210_MIXER_TX3_ADDER_CONFIG);
ADDER_CTRL_DECL(adder4, TEGRA210_MIXER_TX4_ADDER_CONFIG);
ADDER_CTRL_DECL(adder5, TEGRA210_MIXER_TX5_ADDER_CONFIG);
#define GAIN_CTRL(id) …
static const struct snd_kcontrol_new tegra210_mixer_gain_ctls[] = …;
static const struct snd_soc_dapm_widget tegra210_mixer_widgets[] = …;
#define RX_ROUTES(id, sname) …
#define MIXER_RX_ROUTES(id) …
#define ADDER_ROUTES(id, sname) … \
#define TX_ROUTES(id, sname) …
#define MIXER_TX_ROUTES(id) …
static const struct snd_soc_dapm_route tegra210_mixer_routes[] = …;
static const struct snd_soc_component_driver tegra210_mixer_cmpnt = …;
static bool tegra210_mixer_wr_reg(struct device *dev,
unsigned int reg)
{ … }
static bool tegra210_mixer_rd_reg(struct device *dev,
unsigned int reg)
{ … }
static bool tegra210_mixer_volatile_reg(struct device *dev,
unsigned int reg)
{ … }
static bool tegra210_mixer_precious_reg(struct device *dev,
unsigned int reg)
{ … }
static const struct regmap_config tegra210_mixer_regmap_config = …;
static const struct of_device_id tegra210_mixer_of_match[] = …;
MODULE_DEVICE_TABLE(of, tegra210_mixer_of_match);
static int tegra210_mixer_platform_probe(struct platform_device *pdev)
{ … }
static void tegra210_mixer_platform_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops tegra210_mixer_pm_ops = …;
static struct platform_driver tegra210_mixer_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;