STRUCT MADERA_CODEC_PDATA(9)
π struct madera_codec_pdata(9) π
ok so bestie, welcome to the Kernel API Manual β¨ β this is the page for struct madera_codec_pdata, and yeah the NAME section is lowkey empty (the original literally gives you nothing after the dash π), so we're just gonna get straight into the good stuff. no cap.
β¨ SYNOPSIS β¨
like, here's the whole shape of it, copied exactly because we do not mess with code π«Ά:
struct madera_codec_pdata {
u32 max_channels_clocked[MADERA_MAX_AIF];
u32 dmic_ref[MADERA_MAX_INPUT];
u32 inmode[MADERA_MAX_INPUT][MADERA_MAX_MUXED_CHANNELS];
bool out_mono[MADERA_MAX_OUTPUT];
u32 pdm_fmt[MADERA_MAX_PDM_SPK];
u32 pdm_mute[MADERA_MAX_PDM_SPK];
};
π Members π
okay these are the fields, and honestly each one has main character energy in its own way:
max_channels_clockedβ this is literally "how many channels are we clocking, bestie." it's the maximum number of channels that I2S clocks will be generated for. super useful when you're the clock master in systems where the I2S bus has multiple data lines. multi-lane slay πdmic_refβ this one tells you how the MICBIAS pins have been externally connected to DMICs on each input. a value of0means MICVDD, and that's the default, periodt. the other values are:- for CS47L35, one of the
CS47L35_DMIC_REF_xxxvalues - for all other codecs, one of the
MADERA_DMIC_REF_xxx
- for CS47L35, one of the
also go peek at the datasheet for a description of the INn_DMIC_SUP field, iykyk π
inmodeβ the mode for the ADC inputs. one of theMADERA_INMODE_xxxvalues. it's a two-dimensional array like[input_number][channel number], with four slots per input, in this order:[n][0]=INnAL[n][1]=INnAR[n][2]=INnBL[n][3]=INnBR
four slots, no crumbs πΈ
out_monoβ for each output, set the value toTRUEto say "yeah this output is mono." the mapping goes[0]=OUT1,[1]=OUT2, ... and so on down the line π¦pdm_fmtβ the PDM speaker data format. see thePDM_SPKn_FMTfield in the datasheet for a description of this value πpdm_muteβ the PDM mute format. see thePDM_SPKn_CTRL_1register in the datasheet for a description of this value π₯
π SEE ALSO π
go look at the kernel file, it's right here bestie:
./include/sound/madera-pdata.h
ngl, if you're touching any of these fields, the datasheet is your bestie too. the manpage keeps pointing at it for a reason π
and that's the whole page! cute little sign-off for you: this one lives in ./include/sound and it's dated October 2026 β so like, future vibes fr fr βπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms