sound/soc/ti/j721e-evm.c
Source file repositories/reference/linux-study-clean/sound/soc/ti/j721e-evm.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/ti/j721e-evm.c- Extension
.c- Size
- 26654 bytes
- Lines
- 922
- 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.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/module.hlinux/of.hlinux/platform_device.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hdavinci-mcasp.h
Detected Declarations
struct j721e_audio_match_datastruct j721e_audio_clocksstruct j721e_audio_domainstruct j721e_privenum j721e_audio_domain_idenum j721e_board_typefunction j721e_configure_refclkfunction j721e_rule_ratefunction j721e_audio_startupfunction for_each_rtd_codec_daisfunction j721e_audio_hw_paramsfunction for_each_rtd_codec_daisfunction j721e_audio_shutdownfunction j721e_audio_initfunction for_each_rtd_codec_daisfunction j721e_audio_init_ivifunction j721e_get_clocksfunction j721e_calculate_rate_rangefunction j721e_soc_probe_cpbfunction j721e_soc_probe_ivifunction j721e_soc_probe
Annotated Snippet
struct j721e_audio_match_data {
enum j721e_board_type board_type;
int num_links;
unsigned int pll_rates[2];
};
static unsigned int ratios_for_pcm3168a[] = {
256,
512,
768,
};
struct j721e_audio_clocks {
struct clk *target;
struct clk *parent[2];
};
struct j721e_audio_domain {
struct j721e_audio_clocks codec;
struct j721e_audio_clocks mcasp;
int parent_clk_id;
int active;
unsigned int active_link;
unsigned int rate;
};
struct j721e_priv {
struct device *dev;
struct snd_soc_card card;
struct snd_soc_codec_conf codec_conf[J721E_CODEC_CONF_COUNT];
struct snd_interval rate_range;
const struct j721e_audio_match_data *match_data;
u32 pll_rates[2];
unsigned int hsdiv_rates[2];
struct j721e_audio_domain audio_domains[J721E_AUDIO_DOMAIN_LAST];
struct mutex mutex;
struct snd_soc_dai_link dai_links[];
};
static const struct snd_soc_dapm_widget j721e_cpb_dapm_widgets[] = {
SND_SOC_DAPM_HP("CPB Stereo HP 1", NULL),
SND_SOC_DAPM_HP("CPB Stereo HP 2", NULL),
SND_SOC_DAPM_HP("CPB Stereo HP 3", NULL),
SND_SOC_DAPM_LINE("CPB Line Out", NULL),
SND_SOC_DAPM_MIC("CPB Stereo Mic 1", NULL),
SND_SOC_DAPM_MIC("CPB Stereo Mic 2", NULL),
SND_SOC_DAPM_LINE("CPB Line In", NULL),
};
static const struct snd_soc_dapm_route j721e_cpb_dapm_routes[] = {
{"CPB Stereo HP 1", NULL, "codec-1 AOUT1L"},
{"CPB Stereo HP 1", NULL, "codec-1 AOUT1R"},
{"CPB Stereo HP 2", NULL, "codec-1 AOUT2L"},
{"CPB Stereo HP 2", NULL, "codec-1 AOUT2R"},
{"CPB Stereo HP 3", NULL, "codec-1 AOUT3L"},
{"CPB Stereo HP 3", NULL, "codec-1 AOUT3R"},
{"CPB Line Out", NULL, "codec-1 AOUT4L"},
{"CPB Line Out", NULL, "codec-1 AOUT4R"},
{"codec-1 AIN1L", NULL, "CPB Stereo Mic 1"},
{"codec-1 AIN1R", NULL, "CPB Stereo Mic 1"},
{"codec-1 AIN2L", NULL, "CPB Stereo Mic 2"},
{"codec-1 AIN2R", NULL, "CPB Stereo Mic 2"},
{"codec-1 AIN3L", NULL, "CPB Line In"},
{"codec-1 AIN3R", NULL, "CPB Line In"},
};
static const struct snd_soc_dapm_widget j721e_ivi_codec_a_dapm_widgets[] = {
SND_SOC_DAPM_LINE("IVI A Line Out 1", NULL),
SND_SOC_DAPM_LINE("IVI A Line Out 2", NULL),
SND_SOC_DAPM_LINE("IVI A Line Out 3", NULL),
SND_SOC_DAPM_LINE("IVI A Line Out 4", NULL),
SND_SOC_DAPM_MIC("IVI A Stereo Mic 1", NULL),
SND_SOC_DAPM_MIC("IVI A Stereo Mic 2", NULL),
SND_SOC_DAPM_LINE("IVI A Line In", NULL),
};
static const struct snd_soc_dapm_route j721e_codec_a_dapm_routes[] = {
{"IVI A Line Out 1", NULL, "codec-a AOUT1L"},
{"IVI A Line Out 1", NULL, "codec-a AOUT1R"},
{"IVI A Line Out 2", NULL, "codec-a AOUT2L"},
{"IVI A Line Out 2", NULL, "codec-a AOUT2R"},
{"IVI A Line Out 3", NULL, "codec-a AOUT3L"},
{"IVI A Line Out 3", NULL, "codec-a AOUT3R"},
{"IVI A Line Out 4", NULL, "codec-a AOUT4L"},
{"IVI A Line Out 4", NULL, "codec-a AOUT4R"},
Annotation
- Immediate include surface: `linux/clk.h`, `linux/module.h`, `linux/of.h`, `linux/platform_device.h`, `sound/core.h`, `sound/pcm.h`, `sound/pcm_params.h`, `sound/soc.h`.
- Detected declarations: `struct j721e_audio_match_data`, `struct j721e_audio_clocks`, `struct j721e_audio_domain`, `struct j721e_priv`, `enum j721e_audio_domain_id`, `enum j721e_board_type`, `function j721e_configure_refclk`, `function j721e_rule_rate`, `function j721e_audio_startup`, `function for_each_rtd_codec_dais`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.