sound/soc/codecs/wm5102.c

Source file repositories/reference/linux-study-clean/sound/soc/codecs/wm5102.c

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/wm5102.c
Extension
.c
Size
68005 bytes
Lines
2186
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct wm5102_priv {
	struct arizona_priv core;
	struct arizona_fll fll[2];
};

static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0);
static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
static DECLARE_TLV_DB_SCALE(noise_tlv, -13200, 600, 0);
static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);

static const struct cs_dsp_region wm5102_dsp1_regions[] = {
	{ .type = WMFW_ADSP2_PM, .base = 0x100000 },
	{ .type = WMFW_ADSP2_ZM, .base = 0x180000 },
	{ .type = WMFW_ADSP2_XM, .base = 0x190000 },
	{ .type = WMFW_ADSP2_YM, .base = 0x1a8000 },
};

static const struct reg_default wm5102_sysclk_reva_patch[] = {
	{ 0x3000, 0x2225 },
	{ 0x3001, 0x3a03 },
	{ 0x3002, 0x0225 },
	{ 0x3003, 0x0801 },
	{ 0x3004, 0x6249 },
	{ 0x3005, 0x0c04 },
	{ 0x3006, 0x0225 },
	{ 0x3007, 0x5901 },
	{ 0x3008, 0xe249 },
	{ 0x3009, 0x030d },
	{ 0x300a, 0x0249 },
	{ 0x300b, 0x2c01 },
	{ 0x300c, 0xe249 },
	{ 0x300d, 0x4342 },
	{ 0x300e, 0xe249 },
	{ 0x300f, 0x73c0 },
	{ 0x3010, 0x4249 },
	{ 0x3011, 0x0c00 },
	{ 0x3012, 0x0225 },
	{ 0x3013, 0x1f01 },
	{ 0x3014, 0x0225 },
	{ 0x3015, 0x1e01 },
	{ 0x3016, 0x0225 },
	{ 0x3017, 0xfa00 },
	{ 0x3018, 0x0000 },
	{ 0x3019, 0xf000 },
	{ 0x301a, 0x0000 },
	{ 0x301b, 0xf000 },
	{ 0x301c, 0x0000 },
	{ 0x301d, 0xf000 },
	{ 0x301e, 0x0000 },
	{ 0x301f, 0xf000 },
	{ 0x3020, 0x0000 },
	{ 0x3021, 0xf000 },
	{ 0x3022, 0x0000 },
	{ 0x3023, 0xf000 },
	{ 0x3024, 0x0000 },
	{ 0x3025, 0xf000 },
	{ 0x3026, 0x0000 },
	{ 0x3027, 0xf000 },
	{ 0x3028, 0x0000 },
	{ 0x3029, 0xf000 },
	{ 0x302a, 0x0000 },
	{ 0x302b, 0xf000 },
	{ 0x302c, 0x0000 },
	{ 0x302d, 0xf000 },
	{ 0x302e, 0x0000 },
	{ 0x302f, 0xf000 },
	{ 0x3030, 0x0225 },
	{ 0x3031, 0x1a01 },
	{ 0x3032, 0x0225 },
	{ 0x3033, 0x1e00 },
	{ 0x3034, 0x0225 },
	{ 0x3035, 0x1f00 },
	{ 0x3036, 0x6225 },
	{ 0x3037, 0xf800 },
	{ 0x3038, 0x0000 },
	{ 0x3039, 0xf000 },
	{ 0x303a, 0x0000 },
	{ 0x303b, 0xf000 },
	{ 0x303c, 0x0000 },
	{ 0x303d, 0xf000 },
	{ 0x303e, 0x0000 },
	{ 0x303f, 0xf000 },
	{ 0x3040, 0x2226 },
	{ 0x3041, 0x3a03 },
	{ 0x3042, 0x0226 },
	{ 0x3043, 0x0801 },
	{ 0x3044, 0x6249 },
	{ 0x3045, 0x0c06 },
	{ 0x3046, 0x0226 },

Annotation

Implementation Notes