STRUCT MADERA_CODEC_PDATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of 0 means MICVDD, and that's the default, periodt. the other values are:
    • for CS47L35, one of the CS47L35_DMIC_REF_xxx values
    • for all other codecs, one of the MADERA_DMIC_REF_xxx

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 the MADERA_INMODE_xxx values. 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 to TRUE to 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 the PDM_SPKn_FMT field in the datasheet for a description of this value πŸ‘‘
  • pdm_mute β€” the PDM mute format. see the PDM_SPKn_CTRL_1 register 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