SIGN IN SIGN UP

ports/stm: ramp into first sample on audioio play start

play() previously stopped the single-mode quiescent DAC output and
went straight into DMA-driven mode. If dma_buffer[0] sat far from the
quiescent value, the resulting jump produced an audible click at the
start of every clip.

Generalise dac_ramp() to either DAC channel and ramp from quiescent
into dma_buffer[0] (and from 0 into dma_buffer_r[0] for the right
channel) before reconfiguring for T6_TRGO. The pin already sits at
the first DMA sample by the time the timer is started, so the
transition into DMA output is seamless.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
C
Chris Nourse committed
53fef38ae39707b6ae72a9b8519be172889b075e
Parent: d112d01