summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c')
-rw-r--r--firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c b/firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c
index df97aba0c8..4bd3316889 100644
--- a/firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c
+++ b/firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c
@@ -139,17 +139,19 @@ void audiohw_set_volume(int vol_l, int vol_r)
139 r = vol_r; 139 r = vol_r;
140 140
141#if (defined(HAVE_HEADPHONE_DETECTION) && defined(HAVE_LINEOUT_DETECTION)) 141#if (defined(HAVE_HEADPHONE_DETECTION) && defined(HAVE_LINEOUT_DETECTION))
142 /* make sure headphones aren't present - don't want to 142 /* Due to the hardware's detection method, make the Line-Out
143 * blow out our eardrums cranking it to full */ 143 * the default. The LO can only be detected if it is active
144 if (lineout_inserted() && !headphones_inserted()) 144 * (assuming a high-impedance device is attached). HP takes priority
145 * if both are present. */
146 if (headphones_inserted())
145 { 147 {
146 eros_qn_switch_output(1); 148 eros_qn_switch_output(0);
147
148 l = r = eros_qn_get_volume_limit();
149 } 149 }
150 else 150 else
151 { 151 {
152 eros_qn_switch_output(0); 152 eros_qn_switch_output(1);
153
154 l = r = eros_qn_get_volume_limit();
153 } 155 }
154#endif 156#endif
155 157