mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
hiby: r1: fix headphone detection
Change-Id: I4fdf47fb3585754428f6be804e65993e965c3914
This commit is contained in:
parent
078a506dfd
commit
0c29c97f1a
1 changed files with 4 additions and 4 deletions
|
|
@ -65,11 +65,11 @@ int hiby_has_valid_output(void) {
|
|||
const char * const sysfs_hs_switch = "/sys/class/switch/headset/state";
|
||||
const char * const sysfs_bal_switch = "/sys/class/switch/balance/state";
|
||||
|
||||
sysfs_get_int(sysfs_hs_switch, &status);
|
||||
if (status) ps = 2; // headset
|
||||
if (sysfs_get_int(sysfs_hs_switch, &status) && status)
|
||||
ps = 2; // headset
|
||||
|
||||
sysfs_get_int(sysfs_bal_switch, &status);
|
||||
if (status) ps = 3; // balanced output
|
||||
if (sysfs_get_int(sysfs_bal_switch, &status) && status)
|
||||
ps = 3; // balanced output
|
||||
|
||||
return ps;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue