#include <linux/clk.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "tegra210_admaif.h"
#include "tegra_cif.h"
#include "tegra_pcm.h"
#define CH_REG(offset, reg, id) …
#define CH_TX_REG(reg, id) …
#define CH_RX_REG(reg, id) …
#define REG_DEFAULTS(id, rx_ctrl, tx_ctrl, tx_base, rx_base) …
#define ADMAIF_REG_DEFAULTS(id, chip) …
static const struct reg_default tegra186_admaif_reg_defaults[] = …;
static const struct reg_default tegra210_admaif_reg_defaults[] = …;
static bool tegra_admaif_wr_reg(struct device *dev, unsigned int reg)
{ … }
static bool tegra_admaif_rd_reg(struct device *dev, unsigned int reg)
{ … }
static bool tegra_admaif_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config tegra210_admaif_regmap_config = …;
static const struct regmap_config tegra186_admaif_regmap_config = …;
static int __maybe_unused tegra_admaif_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused tegra_admaif_runtime_resume(struct device *dev)
{ … }
static int tegra_admaif_set_pack_mode(struct regmap *map, unsigned int reg,
int valid_bit)
{ … }
static int tegra_admaif_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int tegra_admaif_start(struct snd_soc_dai *dai, int direction)
{ … }
static int tegra_admaif_stop(struct snd_soc_dai *dai, int direction)
{ … }
static int tegra_admaif_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int tegra210_admaif_pget_mono_to_stereo(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_admaif_pput_mono_to_stereo(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_admaif_cget_mono_to_stereo(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_admaif_cput_mono_to_stereo(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_admaif_pget_stereo_to_mono(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_admaif_pput_stereo_to_mono(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_admaif_cget_stereo_to_mono(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_admaif_cput_stereo_to_mono(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra_admaif_dai_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops tegra_admaif_dai_ops = …;
#define DAI(dai_name) …
static struct snd_soc_dai_driver tegra210_admaif_cmpnt_dais[] = …;
static struct snd_soc_dai_driver tegra186_admaif_cmpnt_dais[] = …;
static const char * const tegra_admaif_stereo_conv_text[] = …;
static const char * const tegra_admaif_mono_conv_text[] = …;
#define NV_SOC_ENUM_EXT(xname, xreg, xhandler_get, xhandler_put, xenum_text) …
#define TEGRA_ADMAIF_CIF_CTRL(reg) …
static struct snd_kcontrol_new tegra210_admaif_controls[] = …;
static struct snd_kcontrol_new tegra186_admaif_controls[] = …;
static const struct snd_soc_component_driver tegra210_admaif_cmpnt = …;
static const struct snd_soc_component_driver tegra186_admaif_cmpnt = …;
static const struct tegra_admaif_soc_data soc_data_tegra210 = …;
static const struct tegra_admaif_soc_data soc_data_tegra186 = …;
static const struct of_device_id tegra_admaif_of_match[] = …;
MODULE_DEVICE_TABLE(of, tegra_admaif_of_match);
static int tegra_admaif_probe(struct platform_device *pdev)
{ … }
static void tegra_admaif_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops tegra_admaif_pm_ops = …;
static struct platform_driver tegra_admaif_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;