Commit 4168b3e
fw/drivers/sf32lb52/audio: fix audio playback failure after first use
Audio playback in manufacturing tests (and other apps) would fail on
subsequent attempts - first playback worked fine, but after that only
silence followed by a click when the speaker powered off.
The issue was that audec_stop() clears all channel configurations via
HAL_AUDCODEC_Clear_All_Channel(), but audec_start() never restored the
transmit channel configuration. Since audec_init() is only called once
during board initialization, the channel config was only set up once.
After the first stop, it was gone.
Fix by adding HAL_AUDCODEC_Config_TChanel() call in audec_start() to
reconfigure the transmit channel before starting DMA, ensuring the
channel is properly configured on every playback session.
Signed-off-by: Joshua Jun <joshuajun@proton.me>1 parent eb8fcf0 commit 4168b3e
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| |||
0 commit comments