fix(tx15): headphone detection (#6686)
This commit is contained in:
@@ -139,9 +139,14 @@ static void audio_update_dma_buffer(uint8_t tc)
|
||||
}
|
||||
}
|
||||
|
||||
bool audioHeadphoneDetect()
|
||||
{
|
||||
return gpio_read(AUDIO_HP_DETECT_PIN);
|
||||
}
|
||||
|
||||
void audioSetVolume(uint8_t volume)
|
||||
{
|
||||
tas2505_set_volume(&_tas2505, volume * 9 / 10); // TX15 HP cannot handle the full power of TAS2505
|
||||
tas2505_set_volume(&_tas2505, volume * 9 / 10, audioHeadphoneDetect()); // TX15 HP cannot handle the full power of TAS2505
|
||||
}
|
||||
|
||||
extern "C" void DMA1_Stream4_IRQHandler(void)
|
||||
|
||||
Reference in New Issue
Block a user