drivers: audio: Only start amp for HS in cxd56

Only enable the amplifier during playback to avoid clicks.

Signed-off-by: Tobias Johansson <tobias.johansson@sony.com>
This commit is contained in:
Tobias Johansson 2021-11-17 13:38:28 +01:00 committed by Xiang Xiao
parent b36d08ef45
commit 3828dd2b11
1 changed files with 7 additions and 4 deletions

View File

@ -3267,11 +3267,14 @@ static int cxd56_start_dma(FAR struct cxd56_dev_s *dev)
if (dev->state != CXD56_DEV_STATE_STARTED)
{
/* Turn on amplifier */
if (dev->dma_handle == CXD56_AUDIO_DMA_I2S0_DOWN)
{
/* Turn on amplifier */
spin_unlock_irqrestore(&dev->lock, flags);
board_external_amp_mute_control(false);
flags = spin_lock_irqsave(&dev->lock);
spin_unlock_irqrestore(&dev->lock, flags);
board_external_amp_mute_control(false);
flags = spin_lock_irqsave(&dev->lock);
}
/* Mask interrupts */