sound/pci/au88x0/au88x0_eq.c
Source file repositories/reference/linux-study-clean/sound/pci/au88x0/au88x0_eq.c
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/au88x0/au88x0_eq.c- Extension
.c- Size
- 22447 bytes
- Lines
- 923
- Domain
- Driver Families
- Bucket
- sound/pci
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
au88x0.hau88x0_eq.hau88x0_eqdata.c
Detected Declarations
function Janderfunction sign_invertfunction vortex_EqHw_SetLeftCoefsfunction vortex_EqHw_SetRightCoefsfunction vortex_EqHw_SetLeftStatesfunction vortex_EqHw_SetRightStatesfunction vortex_EqHw_GetTimeConstsfunction vortex_EqHw_GetLeftCoefsfunction vortex_EqHw_SetA3DBypassGainfunction vortex_EqHw_SetCurrBypassGainfunction vortex_EqHw_SetCurrA3DBypassGainfunction vortex_EqHw_SetLeftGainsSingleTargetfunction vortex_EqHw_SetRightGainsSingleTargetfunction vortex_EqHw_SetLeftGainsTargetfunction vortex_EqHw_SetRightGainsTargetfunction vortex_EqHw_SetLeftGainsCurrentfunction vortex_EqHw_SetRightGainsCurrentfunction vortex_EqHw_GetLeftGainsTargetfunction vortex_EqHw_GetRightGainsTargetfunction vortex_EqHw_GetLeftGainsCurrentfunction vortex_EqHw_GetRightGainsCurrentfunction vortex_EqHw_SetLevelsfunction vortex_EqHw_GetLevelsfunction vortex_EqHw_SetControlRegfunction vortex_EqHw_SetSampleRatefunction vortex_EqHw_GetControlRegfunction vortex_EqHw_GetSampleRatefunction vortex_EqHw_Enablefunction vortex_EqHw_Disablefunction vortex_EqHw_ZeroIOfunction vortex_EqHw_ZeroA3DIOfunction vortex_EqHw_ZeroStatefunction vortex_EqHw_ProgramPipefunction vortex_EqHw_Program10Bandfunction vortex_EqHw_GetTenBandLevelsfunction vortex_Eqlzr_GetLeftGainfunction vortex_Eqlzr_SetLeftGainfunction vortex_Eqlzr_GetRightGainfunction vortex_Eqlzr_SetRightGainfunction vortex_Eqlzr_GetAllBandsfunction vortex_Eqlzr_SetAllBandsFromActiveCoeffSetfunction vortex_Eqlzr_SetAllBandsfunction vortex_Eqlzr_SetA3dBypassGainfunction vortex_Eqlzr_ProgramA3dBypassGainfunction vortex_Eqlzr_ShutDownA3dfunction vortex_Eqlzr_SetBypassfunction vortex_Eqlzr_ReadAndSetActiveCoefSetfunction vortex_Eqlzr_GetAllPeaks
Annotated Snippet
if (eqhw->this08 == 0) {
hwwrite(vortex->mmio, 0x2b008 + n * 0x30, coefs[i + 2]);
hwwrite(vortex->mmio, 0x2b00c + n * 0x30, coefs[i + 3]);
hwwrite(vortex->mmio, 0x2b010 + n * 0x30, coefs[i + 4]);
} else {
hwwrite(vortex->mmio, 0x2b008 + n * 0x30, sign_invert(coefs[2 + i]));
hwwrite(vortex->mmio, 0x2b00c + n * 0x30, sign_invert(coefs[3 + i]));
hwwrite(vortex->mmio, 0x2b010 + n * 0x30, sign_invert(coefs[4 + i]));
}
i += 5;
}
}
static void vortex_EqHw_SetRightCoefs(vortex_t *vortex, const u16 coefs[])
{
eqhw_t *eqhw = &(vortex->eq.this04);
int i = 0, n /*esp2c */;
for (n = 0; n < eqhw->this04; n++) {
hwwrite(vortex->mmio, 0x2b1e0 + n * 0x30, coefs[0 + i]);
hwwrite(vortex->mmio, 0x2b1e4 + n * 0x30, coefs[1 + i]);
if (eqhw->this08 == 0) {
hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, coefs[2 + i]);
hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, coefs[3 + i]);
hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, coefs[4 + i]);
} else {
hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, sign_invert(coefs[2 + i]));
hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, sign_invert(coefs[3 + i]));
hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, sign_invert(coefs[4 + i]));
}
i += 5;
}
}
static void vortex_EqHw_SetLeftStates(vortex_t *vortex, const u16 a[], const u16 b[])
{
eqhw_t *eqhw = &(vortex->eq.this04);
int i = 0, ebx;
hwwrite(vortex->mmio, 0x2b3fc, a[0]);
hwwrite(vortex->mmio, 0x2b400, a[1]);
for (ebx = 0; ebx < eqhw->this04; ebx++) {
hwwrite(vortex->mmio, 0x2b014 + (i * 0xc), b[i]);
hwwrite(vortex->mmio, 0x2b018 + (i * 0xc), b[1 + i]);
hwwrite(vortex->mmio, 0x2b01c + (i * 0xc), b[2 + i]);
hwwrite(vortex->mmio, 0x2b020 + (i * 0xc), b[3 + i]);
i += 4;
}
}
static void vortex_EqHw_SetRightStates(vortex_t *vortex, const u16 a[], const u16 b[])
{
eqhw_t *eqhw = &(vortex->eq.this04);
int i = 0, ebx;
hwwrite(vortex->mmio, 0x2b404, a[0]);
hwwrite(vortex->mmio, 0x2b408, a[1]);
for (ebx = 0; ebx < eqhw->this04; ebx++) {
hwwrite(vortex->mmio, 0x2b1f4 + (i * 0xc), b[i]);
hwwrite(vortex->mmio, 0x2b1f8 + (i * 0xc), b[1 + i]);
hwwrite(vortex->mmio, 0x2b1fc + (i * 0xc), b[2 + i]);
hwwrite(vortex->mmio, 0x2b200 + (i * 0xc), b[3 + i]);
i += 4;
}
}
#if 0
static void vortex_EqHw_GetTimeConsts(vortex_t * vortex, u16 * a, u16 * b)
{
*a = hwread(vortex->mmio, 0x2b3c4);
*b = hwread(vortex->mmio, 0x2b3c8);
}
static void vortex_EqHw_GetLeftCoefs(vortex_t * vortex, u16 a[])
{
}
static void vortex_EqHw_GetRightCoefs(vortex_t * vortex, u16 a[])
{
}
static void vortex_EqHw_GetLeftStates(vortex_t * vortex, u16 * a, u16 b[])
{
Annotation
- Immediate include surface: `au88x0.h`, `au88x0_eq.h`, `au88x0_eqdata.c`.
- Detected declarations: `function Jander`, `function sign_invert`, `function vortex_EqHw_SetLeftCoefs`, `function vortex_EqHw_SetRightCoefs`, `function vortex_EqHw_SetLeftStates`, `function vortex_EqHw_SetRightStates`, `function vortex_EqHw_GetTimeConsts`, `function vortex_EqHw_GetLeftCoefs`, `function vortex_EqHw_SetA3DBypassGain`, `function vortex_EqHw_SetCurrBypassGain`.
- Atlas domain: Driver Families / sound/pci.
- 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.