drivers/media/dvb-frontends/af9033_priv.h
Source file repositories/reference/linux-study-clean/drivers/media/dvb-frontends/af9033_priv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/dvb-frontends/af9033_priv.h- Extension
.h- Size
- 41796 bytes
- Lines
- 1992
- Domain
- Driver Families
- Bucket
- drivers/media
- 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
media/dvb_frontend.haf9033.hlinux/math64.hlinux/regmap.hlinux/kernel.hlinux/int_log.h
Detected Declarations
struct reg_valstruct reg_val_maskstruct coeffstruct clock_adcstruct val_snr
Annotated Snippet
struct reg_val {
u32 reg;
u8 val;
};
struct reg_val_mask {
u32 reg;
u8 val;
u8 mask;
};
struct coeff {
u32 clock;
u32 bandwidth_hz;
u8 val[36];
};
struct clock_adc {
u32 clock;
u32 adc;
};
struct val_snr {
u32 val;
u8 snr;
};
/* Xtal clock vs. ADC clock lookup table */
static const struct clock_adc clock_adc_lut[] = {
{ 16384000, 20480000 },
{ 20480000, 20480000 },
{ 36000000, 20250000 },
{ 30000000, 20156250 },
{ 26000000, 20583333 },
{ 28000000, 20416667 },
{ 32000000, 20500000 },
{ 34000000, 20187500 },
{ 24000000, 20500000 },
{ 22000000, 20625000 },
{ 12000000, 20250000 },
};
/* Pre-calculated coeff lookup table */
static const struct coeff coeff_lut[] = {
/* 12.000 MHz */
{ 12000000, 8000000, {
0x01, 0xce, 0x55, 0xc9, 0x00, 0xe7, 0x2a, 0xe4, 0x00, 0x73,
0x99, 0x0f, 0x00, 0x73, 0x95, 0x72, 0x00, 0x73, 0x91, 0xd5,
0x00, 0x39, 0xca, 0xb9, 0x00, 0xe7, 0x2a, 0xe4, 0x00, 0x73,
0x95, 0x72, 0x37, 0x02, 0xce, 0x01 }
},
{ 12000000, 7000000, {
0x01, 0x94, 0x8b, 0x10, 0x00, 0xca, 0x45, 0x88, 0x00, 0x65,
0x25, 0xed, 0x00, 0x65, 0x22, 0xc4, 0x00, 0x65, 0x1f, 0x9b,
0x00, 0x32, 0x91, 0x62, 0x00, 0xca, 0x45, 0x88, 0x00, 0x65,
0x22, 0xc4, 0x88, 0x02, 0x95, 0x01 }
},
{ 12000000, 6000000, {
0x01, 0x5a, 0xc0, 0x56, 0x00, 0xad, 0x60, 0x2b, 0x00, 0x56,
0xb2, 0xcb, 0x00, 0x56, 0xb0, 0x15, 0x00, 0x56, 0xad, 0x60,
0x00, 0x2b, 0x58, 0x0b, 0x00, 0xad, 0x60, 0x2b, 0x00, 0x56,
0xb0, 0x15, 0xf4, 0x02, 0x5b, 0x01 }
},
};
/*
* Afatech AF9033 demod init
*/
static const struct reg_val ofsm_init[] = {
{ 0x800051, 0x01 },
{ 0x800070, 0x0a },
{ 0x80007e, 0x04 },
{ 0x800081, 0x0a },
{ 0x80008a, 0x01 },
{ 0x80008e, 0x01 },
{ 0x800092, 0x06 },
{ 0x800099, 0x01 },
{ 0x80009f, 0xe1 },
{ 0x8000a0, 0xcf },
{ 0x8000a3, 0x01 },
{ 0x8000a5, 0x01 },
{ 0x8000a6, 0x01 },
{ 0x8000a9, 0x00 },
{ 0x8000aa, 0x01 },
{ 0x8000b0, 0x01 },
{ 0x8000c4, 0x05 },
{ 0x8000c8, 0x19 },
{ 0x80f000, 0x0f },
{ 0x80f016, 0x10 },
{ 0x80f017, 0x04 },
Annotation
- Immediate include surface: `media/dvb_frontend.h`, `af9033.h`, `linux/math64.h`, `linux/regmap.h`, `linux/kernel.h`, `linux/int_log.h`.
- Detected declarations: `struct reg_val`, `struct reg_val_mask`, `struct coeff`, `struct clock_adc`, `struct val_snr`.
- Atlas domain: Driver Families / drivers/media.
- 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.