mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
erosqnative: Repurpose stereosw_select setting for output select
Turns out they did not swap the stereo switch lines on us, so this setting isn't really useful. Repurpose it to allow the user to force the device into headphone or line output mode. Note that settings other than "Automatic" will cause jack detection to not work. Default Automatic. Change-Id: If94499fbb8f0d92111811fe51f6107ce213b66ad
This commit is contained in:
parent
a29b570ac4
commit
5ed0db6e90
7 changed files with 98 additions and 82 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include "devicedata.h"
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
# include "settings.h"
|
||||
# include "lcd.h"
|
||||
# include "font.h"
|
||||
#endif
|
||||
|
|
@ -166,7 +167,20 @@ bool headphones_inserted(void)
|
|||
eros_qn_set_outputs();
|
||||
#endif
|
||||
}
|
||||
return hp_detect_reg & 0x10 ? false : true;
|
||||
#if !defined(BOOTLOADER)
|
||||
if (global_settings.hp_lo_select == 1) // force headphones
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (global_settings.hp_lo_select == 2) // force lineout
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else // automatic
|
||||
#endif
|
||||
{
|
||||
return hp_detect_reg & 0x10 ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
bool lineout_inserted(void)
|
||||
|
|
@ -182,7 +196,20 @@ bool lineout_inserted(void)
|
|||
eros_qn_set_outputs();
|
||||
#endif
|
||||
}
|
||||
return hp_detect_reg & 0x20 ? false : true;
|
||||
#if !defined(BOOTLOADER)
|
||||
if (global_settings.hp_lo_select == 1) // force headphones
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (global_settings.hp_lo_select == 2) // force lineout
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else // automatic
|
||||
#endif
|
||||
{
|
||||
return hp_detect_reg & 0x20 ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Rockbox interface */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue