STRUCT STM32_SAI_SUB_DATA(9)
π NAME π
okay so bestie, welcome to the Kernel API Manual page for struct stm32_sai_sub_data β literally the private data of the SAI sub block, aka block A or block B π
β¨. no cap, that's the whole name vibe.
β¨ SYNOPSIS β¨
here's the struct in all its glory β every field exactly as written, bestie. don't let the wrap on set_sai_ck_rate jump-scare you π:
struct stm32_sai_sub_data {
struct platform_device *pdev;
struct regmap *regmap;
const struct regmap_config *regmap_config;
struct snd_dmaengine_dai_dma_data dma_params;
struct snd_soc_dai_driver cpu_dai_drv;
struct snd_soc_dai *cpu_dai;
struct snd_pcm_substream *substream;
struct stm32_sai_data *pdata;
struct device_node *np_sync_provider;
struct clk *sai_ck;
struct clk *sai_mclk;
dma_addr_t phys_addr;
unsigned int mclk_rate;
unsigned int id;
int dir;
bool master;
bool spdif;
bool sai_ck_used;
int fmt;
int sync;
int synco;
int synci;
int fs_length;
int slots;
int slot_width;
int slot_mask;
int data_size;
unsigned int spdif_frm_cnt;
struct snd_aes_iec958 iec958;
struct mutex ctrl_lock;
spinlock_t irq_lock;
int (*set_sai_ck_rate)(struct stm32_sai_sub_data *sai, unsigned int
rate);
void (*put_sai_ck_rate)(struct stm32_sai_sub_data *sai);
};
πΈ Members πΈ
field-by-field, no skipping, because we respect the kernel tea β:
pdevβ device data pointer. the device situation, iconic.regmapβ SAI register map pointer.regmap_configβ SAI sub block register map configuration pointer.dma_paramsβ dma configuration data for rx or tx channel.cpu_dai_drvβ DAI driver data pointer.cpu_daiβ DAI runtime data pointer.substreamβ PCM substream data pointer.pdataβ SAI block parent data pointer.np_sync_providerβ synchronization provider node.sai_ckβ kernel clock feeding the SAI clock generator.sai_mclkβ master clock from SAI mclk provider.phys_addrβ SAI registers physical base address.mclk_rateβ SAI block master clock frequency (Hz). set at init.idβ SAI sub block id corresponding to sub-block A or B.dirβ SAI block direction (playback or capture). set at init.masterβ SAI block mode flag. (true=master,false=slave) set at init.spdifβ SAI S/PDIF iec60958 mode flag. set at init.sai_ck_usedβ flag set while exclusivity on SAI kernel clock is active.fmtβ SAI block format. relevant only for custom protocols. set at init.syncβ SAI block synchronization mode. (none, internal or external).syncoβ SAI block ext sync source (provider setting). (none, sub-block A/B).synciβ SAI block ext sync source (client setting). (SAI sync provider index).fs_lengthβ frame synchronization length. depends on protocol settings.slotsβ rx or tx slot number.slot_widthβ rx or tx slot width in bits.slot_maskβ rx or tx active slots mask. set at init or at runtime.data_sizeβ PCM data width. corresponds to PCM substream width.spdif_frm_cntβ S/PDIF playback frame counter.iec958β iec958 data.ctrl_lockβ control lock.irq_lockβ prevent race condition with IRQ.set_sai_ck_rateβ set SAI kernel clock rate.put_sai_ck_rateβ put SAI kernel clock rate.
π SEE ALSO π
- Kernel file
./sound/soc/stm/stm32_sai_sub.cβ go read the source, bestie, it's giving main character energy π₯.
okay that's the whole struct stm32_sai_sub_data(9) situation, bestie π«Ά. this page came from source/version ./sound/soc/stm and is dated October 2026 β mwah, byeee πβ¨.
π¦ 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