sound/soc/codecs/rt274.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/rt274.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/rt274.c- Extension
.c- Size
- 33391 bytes
- Lines
- 1225
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/module.hlinux/moduleparam.hlinux/init.hlinux/delay.hlinux/pm.hlinux/i2c.hlinux/platform_device.hlinux/spi/spi.hlinux/dmi.hlinux/acpi.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/soc-dapm.hsound/initval.hsound/tlv.hsound/jack.hlinux/workqueue.hrl6347a.hrt274.h
Detected Declarations
struct rt274_privfunction rt274_volatile_registerfunction rt274_readable_registerfunction rt274_index_syncfunction rt274_jack_detectfunction rt274_jack_detect_workfunction rt274_mic_detectfunction rt274_hw_paramsfunction rt274_set_dai_fmtfunction rt274_set_dai_pllfunction rt274_set_dai_sysclkfunction rt274_set_bclk_ratiofunction rt274_set_tdm_slotfunction rt274_set_bias_levelfunction rt274_irqfunction rt274_probefunction rt274_removefunction rt274_suspendfunction rt274_resumefunction rt274_i2c_probe
Annotated Snippet
struct rt274_priv {
struct reg_default *index_cache;
int index_cache_size;
struct regmap *regmap;
struct snd_soc_component *component;
struct i2c_client *i2c;
struct snd_soc_jack *jack;
struct delayed_work jack_detect_work;
int sys_clk;
int clk_id;
int fs;
bool master;
};
static const struct reg_default rt274_index_def[] = {
{ 0x00, 0x1004 },
{ 0x01, 0xaaaa },
{ 0x02, 0x88aa },
{ 0x03, 0x0002 },
{ 0x04, 0xaa09 },
{ 0x05, 0x0700 },
{ 0x06, 0x6110 },
{ 0x07, 0x0200 },
{ 0x08, 0xa807 },
{ 0x09, 0x0021 },
{ 0x0a, 0x7770 },
{ 0x0b, 0x7770 },
{ 0x0c, 0x002b },
{ 0x0d, 0x2420 },
{ 0x0e, 0x65c0 },
{ 0x0f, 0x7770 },
{ 0x10, 0x0420 },
{ 0x11, 0x7418 },
{ 0x12, 0x6bd0 },
{ 0x13, 0x645f },
{ 0x14, 0x0400 },
{ 0x15, 0x8ccc },
{ 0x16, 0x4c50 },
{ 0x17, 0xff00 },
{ 0x18, 0x0003 },
{ 0x19, 0x2c11 },
{ 0x1a, 0x830b },
{ 0x1b, 0x4e4b },
{ 0x1c, 0x0000 },
{ 0x1d, 0x0000 },
{ 0x1e, 0x0000 },
{ 0x1f, 0x0000 },
{ 0x20, 0x51ff },
{ 0x21, 0x8000 },
{ 0x22, 0x8f00 },
{ 0x23, 0x88f4 },
{ 0x24, 0x0000 },
{ 0x25, 0x0000 },
{ 0x26, 0x0000 },
{ 0x27, 0x0000 },
{ 0x28, 0x0000 },
{ 0x29, 0x3000 },
{ 0x2a, 0x0000 },
{ 0x2b, 0x0000 },
{ 0x2c, 0x0f00 },
{ 0x2d, 0x100f },
{ 0x2e, 0x2902 },
{ 0x2f, 0xe280 },
{ 0x30, 0x1000 },
{ 0x31, 0x8400 },
{ 0x32, 0x5aaa },
{ 0x33, 0x8420 },
{ 0x34, 0xa20c },
{ 0x35, 0x096a },
{ 0x36, 0x5757 },
{ 0x37, 0xfe05 },
{ 0x38, 0x4901 },
{ 0x39, 0x110a },
{ 0x3a, 0x0010 },
{ 0x3b, 0x60d9 },
{ 0x3c, 0xf214 },
{ 0x3d, 0xc2ba },
{ 0x3e, 0xa928 },
{ 0x3f, 0x0000 },
{ 0x40, 0x9800 },
{ 0x41, 0x0000 },
{ 0x42, 0x2000 },
{ 0x43, 0x3d90 },
{ 0x44, 0x4900 },
{ 0x45, 0x5289 },
{ 0x46, 0x0004 },
{ 0x47, 0xa47a },
{ 0x48, 0xd049 },
{ 0x49, 0x0049 },
{ 0x4a, 0xa83b },
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/init.h`, `linux/delay.h`, `linux/pm.h`, `linux/i2c.h`, `linux/platform_device.h`, `linux/spi/spi.h`.
- Detected declarations: `struct rt274_priv`, `function rt274_volatile_register`, `function rt274_readable_register`, `function rt274_index_sync`, `function rt274_jack_detect`, `function rt274_jack_detect_work`, `function rt274_mic_detect`, `function rt274_hw_params`, `function rt274_set_dai_fmt`, `function rt274_set_dai_pll`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.