Eros Q Native: Add Stereo SW behavior setting

Hopefully this should cover our bases so we can change
the behavior of the stereo switch to keep line out working
when they change the hardware on us!

Change-Id: Ic36bcb3778d5681a5f3f158c689df9c1420c1d7e
This commit is contained in:
Dana Conrad 2024-04-29 20:33:26 -05:00 committed by Aidan MacDonald
parent d0758c5330
commit 5f377c2613
6 changed files with 94 additions and 1 deletions

View file

@ -51,10 +51,14 @@ int eros_qn_get_volume_limit(void)
void eros_qn_switch_output(int select)
{
if (select == 0)
/* normal operation 0, reverse operation 1, or always 0 */
if ((select == 0 && global_settings.stereosw_mode == 0) \
|| (select == 1 && global_settings.stereosw_mode == 1) \
|| global_settings.stereosw_mode == 2)
{
gpio_set_level(GPIO_STEREOSW_SEL, 0);
}
/* normal operation 1, reverse operation 0, or always 1 */
else
{
gpio_set_level(GPIO_STEREOSW_SEL, 1);