fix(tx15): headphone detection (#6686)

This commit is contained in:
3djc
2025-10-18 20:39:13 +10:00
committed by GitHub
parent e904da89e7
commit f4ecf03a9e
6 changed files with 33 additions and 6 deletions
+6 -1
View File
@@ -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)