fix(el18): Audio output should be OFF if no audio playing (#3670)

* Added audio on/off depends whether audio content is present.

* Aligned the mute control with the implementation in the DAC driver.

* Mute Pin should be inverted.

* Removed PCB specific dependencies.

* chore: Formatting and cleanup
This commit is contained in:
richardclli
2023-06-15 10:07:30 +10:00
committed by GitHub
parent 285de8a08e
commit 5288441a82
4 changed files with 74 additions and 28 deletions
-10
View File
@@ -262,16 +262,6 @@ void boardOff()
SysTick->CTRL = 0; // turn off systick
// Shutdown the Audio amp
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = AUDIO_SHUTDOWN_GPIO_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_25MHz;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(AUDIO_SHUTDOWN_GPIO, &GPIO_InitStructure);
GPIO_ResetBits(AUDIO_SHUTDOWN_GPIO, AUDIO_SHUTDOWN_GPIO_PIN);
// Shutdown the Haptic
hapticDone();