sound/hda/codecs/ca0132.c
Source file repositories/reference/linux-study-clean/sound/hda/codecs/ca0132.c
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/codecs/ca0132.c- Extension
.c- Size
- 286880 bytes
- Lines
- 10179
- Domain
- Driver Families
- Bucket
- sound/hda
- 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/init.hlinux/delay.hlinux/slab.hlinux/mutex.hlinux/module.hlinux/firmware.hlinux/kernel.hlinux/types.hlinux/io.hlinux/pci.hasm/io.hsound/core.hsound/hda_codec.hhda_local.hhda_auto_parser.hhda_jack.hgeneric.hca0132_regs.hsound/tlv.h
Detected Declarations
struct ct_effectstruct ct_tuning_ctlstruct ct_voicefxstruct ct_voicefx_presetstruct ct_eqstruct ct_eq_presetstruct ca0132_alt_speaker_channel_cfgstruct ct_dsp_volume_ctlstruct ae_ca0113_output_setstruct ae5_headphone_gain_setstruct ae5_filter_setstruct chipio_stream_remap_datastruct ca0132_specstruct ca0132_alt_out_set_infostruct ca0132_alt_out_set_quirk_datastruct scp_msgstruct dma_enginestruct dsp_image_segenum speaker_range_reqsenum speaker_tuning_reqsenum hda_cmd_vendor_ioenum control_flag_idenum control_param_idenum hda_vendor_status_dspioenum hda_vendor_status_chipioenum ca0132_sample_rateenum dsp_download_stateenum dma_stateenum r3di_gpio_bitenum r3di_mic_selectenum r3di_out_selectenum r3di_dsp_statusfunction codec_send_commandfunction codec_set_converter_formatfunction codec_set_converter_stream_channelfunction chipio_sendfunction chipio_write_addressfunction chipio_write_datafunction chipio_write_data_multiplefunction chipio_read_datafunction chipio_writefunction chipio_write_no_mutexfunction chipio_write_multiplefunction chipio_readfunction chipio_set_control_flagfunction chipio_set_control_paramfunction chipio_set_control_param_no_mutexfunction chipio_set_stream_source_dest
Annotated Snippet
struct ct_effect {
const char *name;
hda_nid_t nid;
int mid; /*effect module ID*/
int reqs[EFFECT_VALS_MAX_COUNT]; /*effect module request*/
int direct; /* 0:output; 1:input*/
int params; /* number of default non-on/off params */
/*effect default values, 1st is on/off. */
unsigned int def_vals[EFFECT_VALS_MAX_COUNT];
};
#define EFX_DIR_OUT 0
#define EFX_DIR_IN 1
static const struct ct_effect ca0132_effects[EFFECTS_COUNT] = {
{ .name = "Surround",
.nid = SURROUND,
.mid = 0x96,
.reqs = {0, 1},
.direct = EFX_DIR_OUT,
.params = 1,
.def_vals = {0x3F800000, 0x3F2B851F}
},
{ .name = "Crystalizer",
.nid = CRYSTALIZER,
.mid = 0x96,
.reqs = {7, 8},
.direct = EFX_DIR_OUT,
.params = 1,
.def_vals = {0x3F800000, 0x3F266666}
},
{ .name = "Dialog Plus",
.nid = DIALOG_PLUS,
.mid = 0x96,
.reqs = {2, 3},
.direct = EFX_DIR_OUT,
.params = 1,
.def_vals = {0x00000000, 0x3F000000}
},
{ .name = "Smart Volume",
.nid = SMART_VOLUME,
.mid = 0x96,
.reqs = {4, 5, 6},
.direct = EFX_DIR_OUT,
.params = 2,
.def_vals = {0x3F800000, 0x3F3D70A4, 0x00000000}
},
{ .name = "X-Bass",
.nid = X_BASS,
.mid = 0x96,
.reqs = {24, 23, 25},
.direct = EFX_DIR_OUT,
.params = 2,
.def_vals = {0x3F800000, 0x42A00000, 0x3F000000}
},
{ .name = "Equalizer",
.nid = EQUALIZER,
.mid = 0x96,
.reqs = {9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20},
.direct = EFX_DIR_OUT,
.params = 11,
.def_vals = {0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000}
},
{ .name = "Echo Cancellation",
.nid = ECHO_CANCELLATION,
.mid = 0x95,
.reqs = {0, 1, 2, 3},
.direct = EFX_DIR_IN,
.params = 3,
.def_vals = {0x00000000, 0x3F3A9692, 0x00000000, 0x00000000}
},
{ .name = "Voice Focus",
.nid = VOICE_FOCUS,
.mid = 0x95,
.reqs = {6, 7, 8, 9},
.direct = EFX_DIR_IN,
.params = 3,
.def_vals = {0x3F800000, 0x3D7DF3B6, 0x41F00000, 0x41F00000}
},
{ .name = "Mic SVM",
.nid = MIC_SVM,
.mid = 0x95,
.reqs = {44, 45},
.direct = EFX_DIR_IN,
.params = 1,
.def_vals = {0x00000000, 0x3F3D70A4}
},
Annotation
- Immediate include surface: `linux/init.h`, `linux/delay.h`, `linux/slab.h`, `linux/mutex.h`, `linux/module.h`, `linux/firmware.h`, `linux/kernel.h`, `linux/types.h`.
- Detected declarations: `struct ct_effect`, `struct ct_tuning_ctl`, `struct ct_voicefx`, `struct ct_voicefx_preset`, `struct ct_eq`, `struct ct_eq_preset`, `struct ca0132_alt_speaker_channel_cfg`, `struct ct_dsp_volume_ctl`, `struct ae_ca0113_output_set`, `struct ae5_headphone_gain_set`.
- Atlas domain: Driver Families / sound/hda.
- 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.