Skip to content

Conversation

@mariopaja
Copy link
Contributor

@mariopaja mariopaja commented Jul 9, 2025

Define SAI1 node for STM32H7xx series.
Add STM32H7xx related DMA configs.
Enable samples/drivers/i2s/output for nucleo_h745zi_q/m7

stm32h7xx_sai

STM32H7 Audio Sample: 44.1KHz, 16bit, 2CH, PCM5102A DAC

stm32h7xx.mp4

@mariopaja mariopaja mentioned this pull request Jul 9, 2025
21 tasks
@mariopaja mariopaja force-pushed the stm32h7xx_sai branch 2 times, most recently from 5c7d884 to 87a38ee Compare July 10, 2025 12:30
@mariopaja mariopaja marked this pull request as ready for review July 24, 2025 08:54
@mariopaja mariopaja marked this pull request as draft July 24, 2025 08:56
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>
@mariopaja mariopaja marked this pull request as ready for review July 25, 2025 09:01
@sonarqubecloud
Copy link

Comment on lines 309 to 310
if (stream->dma_cfg.channel_direction == (enum dma_channel_direction)MEMORY_TO_PERIPHERAL) {
hdma->Init.Direction = DMA_MEMORY_TO_PERIPH;
Copy link
Contributor

@evgeniy-paltsev evgeniy-paltsev Jul 30, 2025

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.

Copy link
Contributor Author

@mariopaja mariopaja Jul 31, 2025

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 :)

Copy link
Contributor

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>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick: Indentation

@anangl anangl assigned erwango and unassigned anangl Aug 18, 2025
@kartben kartben merged commit 85b408e into zephyrproject-rtos:main Aug 18, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants