-
Couldn't load subscription status.
- Fork 8.1k
drivers: i2s: add sai support for stm32h7xx #92887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5c7d884 to
87a38ee
Compare
Define SAI1 node for STM32H7xx series. Add STM32H7xx related DMA configs. Enable samples/drivers/i2s/output for nucleo_h745zi_q/m7 Signed-off-by: Mario Paja <mariopaja@hotmail.com>
|
| if (stream->dma_cfg.channel_direction == (enum dma_channel_direction)MEMORY_TO_PERIPHERAL) { | ||
| hdma->Init.Direction = DMA_MEMORY_TO_PERIPH; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't clear initially how we determine channel direction (as we don't use channel-config flags for that). But after digging a little deeper, I see that it just depends on dma-names value. I guess that is OK.
In rest - looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evgeniy-paltsev It was difficult to decide what was the best way to implement the DMA TX/RX configuration, since all configs are fixed except the direction.
Making it dependant on dma-names seemed like the best choise at the moment to keep the driver as simple as possible, but I am always open to discuss this topic and make changes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked other (stm32) dma-capable drivers and they use same approach, so I think it should be also OK for I2S implementation.
At least it is aligned with other drivers :)
|
|
||
| &sai1_b { | ||
| pinctrl-0 = <&sai1_mclk_b_pf7 &sai1_sd_b_pe3 | ||
| &sai1_fs_b_pf9 &sai1_sck_b_pf8>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit pick: Indentation



Define SAI1 node for STM32H7xx series.
Add STM32H7xx related DMA configs.
Enable samples/drivers/i2s/output for nucleo_h745zi_q/m7
STM32H7 Audio Sample: 44.1KHz, 16bit, 2CH, PCM5102A DAC
stm32h7xx.mp4