cdns_find_pdi(9)
π« cdns_find_pdi β bestie's guide to finding a free PDI π«
okay so this is a page from the Kernel API Manual, and honestly? it's short, it's sweet, and it's giving "tiny function, big responsibilities." let's get into it π«Ά
πΈ NAME πΈ
cdns_find_pdi β Find a free PDI β¨
like, that's literally the whole job. it finds you a free PDI. iconic behavior.
π¦ SYNOPSIS π¦
struct sdw_cdns_pdi * cdns_find_pdi (struct sdw_cdns *cdns , unsigned
int num , struct sdw_cdns_pdi *pdi , int dai_id );
she takes four arguments and returns a pointer to a struct sdw_cdns_pdi β and yes, she can absolutely hand you NULL back, we'll get to that π
π ARGUMENTS π
cdnsβ the Cadence instance π like, the whole vibe you're working insidenumβ Number of PDIs π’pdiβ the PDI instances themselves π§ your little array of candidatesdai_idβ DAI id π« the identifier you're matching against
β DESCRIPTION β
so here's the tea β β cdns_find_pdi finds a PDI for a given PDI array. that's the whole mission.
but here's the important bit, and i need you to hear me on this one: the PDI num and dai_id are expected to match. if they don't match? it returns NULL. no PDI for you, bestie. π
lowkey a vibe check for your arguments β mismatch and you get nothing back. keepnumanddai_idin agreement or don't come crying to me π
π SEE ALSO π
the kernel file lives right here, no cap:
./drivers/soundwire/cadence_master.c
and here's the whole friend group, every single one of them, not skipping a single bestie π
sdw_cdns_config_update(9)sdw_cdns_config_update_set_wait(9)sdw_cdns_debugfs_init(9)sdw_cdns_irq(9)cdns_update_slave_status_work(9)sdw_cdns_exit_reset(9)cdns_enable_slave_interrupts(9)sdw_cdns_enable_interrupt(9)sdw_cdns_pdi_init(9)sdw_cdns_soft_reset(9)sdw_cdns_init(9)sdw_cdns_is_clock_stop(9)sdw_cdns_clock_stop(9)sdw_cdns_clock_restart(9)sdw_cdns_probe(9)sdw_cdns_config_stream(9)sdw_cdns_alloc_pdi(9)
and that's the whole page, bestie!! πβ¨ππ¦πΈ
this lil masterpiece comes from ./drivers/soundwire and it's dated October 2026 β so yeah, mark your calendars, she's timeless 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