sound/soc/tegra/tegra30_ahub.h

Source file repositories/reference/linux-study-clean/sound/soc/tegra/tegra30_ahub.h

File Facts

System
Linux kernel
Corpus path
sound/soc/tegra/tegra30_ahub.h
Extension
.h
Size
24551 bytes
Lines
526
Domain
Driver Families
Bucket
sound/soc
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct tegra30_ahub_cif_conf {
	unsigned int threshold;
	unsigned int audio_channels;
	unsigned int client_channels;
	unsigned int audio_bits;
	unsigned int client_bits;
	unsigned int expand;
	unsigned int stereo_conv;
	unsigned int replicate;
	unsigned int direction;
	unsigned int truncate;
	unsigned int mono_conv;
};

void tegra30_ahub_set_cif(struct regmap *regmap, unsigned int reg,
			  struct tegra30_ahub_cif_conf *conf);
void tegra124_ahub_set_cif(struct regmap *regmap, unsigned int reg,
			   struct tegra30_ahub_cif_conf *conf);

struct tegra30_ahub_soc_data {
	unsigned int num_resets;
	void (*set_audio_cif)(struct regmap *regmap,
			      unsigned int reg,
			      struct tegra30_ahub_cif_conf *conf);
	/*
	 * FIXME: There are many more differences in HW, such as:
	 * - More APBIF channels.
	 * - Extra separate chunks of register address space to represent
	 *   the extra APBIF channels.
	 * - More units connected to the AHUB, so that tegra30_ahub_[rt]xcif
	 *   need expansion, coupled with there being more defined bits in
	 *   the AHUB routing registers.
	 * However, the driver doesn't support those new features yet, so we
	 * don't represent them here yet.
	 */
};

struct tegra30_ahub {
	const struct tegra30_ahub_soc_data *soc_data;
	struct device *dev;
	struct reset_control_bulk_data resets[21];
	unsigned int nresets;
	struct clk_bulk_data clocks[2];
	unsigned int nclocks;
	resource_size_t apbif_addr;
	struct regmap *regmap_apbif;
	struct regmap *regmap_ahub;
	DECLARE_BITMAP(rx_usage, TEGRA30_AHUB_CHANNEL_CTRL_COUNT);
	DECLARE_BITMAP(tx_usage, TEGRA30_AHUB_CHANNEL_CTRL_COUNT);
};

#endif

Annotation

Implementation Notes