#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_amx.h"
#include "tegra_cif.h"
#define TEGRA194_MAX_FRAME_IDLE_COUNT …
#define AMX_CH_REG(id, reg) …
static const struct reg_default tegra210_amx_reg_defaults[] = …;
static void tegra210_amx_write_map_ram(struct tegra210_amx *amx)
{ … }
static int tegra210_amx_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int __maybe_unused tegra210_amx_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused tegra210_amx_runtime_resume(struct device *dev)
{ … }
static int tegra210_amx_set_audio_cif(struct snd_soc_dai *dai,
struct snd_pcm_hw_params *params,
unsigned int reg)
{ … }
static int tegra210_amx_in_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int tegra210_amx_out_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int tegra210_amx_get_byte_map(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int tegra210_amx_put_byte_map(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_soc_dai_ops tegra210_amx_out_dai_ops = …;
static const struct snd_soc_dai_ops tegra210_amx_in_dai_ops = …;
#define IN_DAI(id) …
#define OUT_DAI …
static struct snd_soc_dai_driver tegra210_amx_dais[] = …;
static const struct snd_soc_dapm_widget tegra210_amx_widgets[] = …;
#define STREAM_ROUTES(id, sname) …
#define AMX_ROUTES(id) …
static const struct snd_soc_dapm_route tegra210_amx_routes[] = …;
#define TEGRA210_AMX_BYTE_MAP_CTRL(reg) …
static struct snd_kcontrol_new tegra210_amx_controls[] = …;
static const struct snd_soc_component_driver tegra210_amx_cmpnt = …;
static bool tegra210_amx_wr_reg(struct device *dev, unsigned int reg)
{ … }
static bool tegra194_amx_wr_reg(struct device *dev, unsigned int reg)
{ … }
static bool tegra210_amx_rd_reg(struct device *dev, unsigned int reg)
{ … }
static bool tegra194_amx_rd_reg(struct device *dev, unsigned int reg)
{ … }
static bool tegra210_amx_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config tegra210_amx_regmap_config = …;
static const struct regmap_config tegra194_amx_regmap_config = …;
static const struct tegra210_amx_soc_data soc_data_tegra210 = …;
static const struct tegra210_amx_soc_data soc_data_tegra194 = …;
static const struct of_device_id tegra210_amx_of_match[] = …;
MODULE_DEVICE_TABLE(of, tegra210_amx_of_match);
static int tegra210_amx_platform_probe(struct platform_device *pdev)
{ … }
static void tegra210_amx_platform_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops tegra210_amx_pm_ops = …;
static struct platform_driver tegra210_amx_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;