Skip to content

Commit 6853be5

Browse files
committed
[autocfg.php] Fix 'i2sdevice' handler
Should be $_SESSION['i2soverlay'] and not $values['i2soverlay'] because that var doesn't exist in this handler. This causes $arg to be empty instead if 'autocfg' in the call to cfgI2SDevice($arg) which if the configured audio device is a USB device results in Pi HDMI 1 being configured instead.
1 parent f43afd0 commit 6853be5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

www/inc/autocfg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ function getCfgTableParams($table, $values, $prefix = '') {
311311
['requires' => ['i2sdevice'], 'handler' => function($values) {
312312
phpSession('write', 'i2sdevice', $values['i2sdevice']);
313313
// NOTE: Passing arg = 'autocfg' prevents reset to PI_HDMI1 in cfgI2SDevice()
314-
$arg = ($values['i2soverlay'] == 'None' && $values['i2sdevice'] == 'None') ? 'autocfg' : '';
314+
$arg = ($values['i2sdevice'] == 'None' && $_SESSION['i2soverlay'] == 'None') ? 'autocfg' : '';
315315
cfgI2SDevice($arg);
316316
}],
317317
'ALSA',

0 commit comments

Comments
 (0)