diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-09 20:51:55 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-09 20:52:43 -0400 |
commit | 4b10aacbc2a8736dc7b2e24c1926dbca323741c9 (patch) | |
tree | 884be01f51b494b75d4a337b3344cacea78c1423 /firmware/drivers | |
parent | 6c6642e8d5b2bed012dd2db8805f6acabfc725dd (diff) | |
download | rockbox-4b10aacbc2a8736dc7b2e24c1926dbca323741c9.tar.gz rockbox-4b10aacbc2a8736dc7b2e24c1926dbca323741c9.zip |
xduoox3ii/x20: headphones take precedence over line out
so if both are plugged in, assume headphones (and respect volume)
Change-Id: Ia77ae6d484ac61f6a2b4cd51a991f59de239cfa6
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/audio/xduoolinux_codec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/audio/xduoolinux_codec.c b/firmware/drivers/audio/xduoolinux_codec.c index 2151d1c2e5..b114b1bbc9 100644 --- a/firmware/drivers/audio/xduoolinux_codec.c +++ b/firmware/drivers/audio/xduoolinux_codec.c | |||
@@ -84,12 +84,12 @@ int xduoo_get_outputs(void){ | |||
84 | const char * const sysfs_bal_switch = "/sys/class/switch/balance/state"; | 84 | const char * const sysfs_bal_switch = "/sys/class/switch/balance/state"; |
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | sysfs_get_int(sysfs_hs_switch, &status); | ||
88 | if (status) ps = 2; // headset | ||
89 | |||
90 | sysfs_get_int(sysfs_lo_switch, &status); | 87 | sysfs_get_int(sysfs_lo_switch, &status); |
91 | if (status) ps = 1; // lineout | 88 | if (status) ps = 1; // lineout |
92 | 89 | ||
90 | sysfs_get_int(sysfs_hs_switch, &status); | ||
91 | if (status) ps = 2; // headset | ||
92 | |||
93 | #if defined(XDUOO_X20) | 93 | #if defined(XDUOO_X20) |
94 | sysfs_get_int(sysfs_bal_switch, &status); | 94 | sysfs_get_int(sysfs_bal_switch, &status); |
95 | if (status) ps = 3; // balance | 95 | if (status) ps = 3; // balance |