Skip to content

Commit

Permalink
Add test for card0 == Headphones
Browse files Browse the repository at this point in the history
This new name is part of Raspberry Pi OS / 5.4.y kernel
  • Loading branch information
moodeaudio committed Jun 29, 2020
1 parent 30abdf8 commit 4289f57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/inc/playerlib.php
Expand Up @@ -1781,7 +1781,7 @@ function getDeviceNames () {
$card1 = file_get_contents('/proc/asound/card1/id');

// Device 0
if ($card0 == "ALSA\n") {
if ($card0 == "ALSA\n" || $card0 == "Headphones\n") {
$dev[0] = 'On-board audio device';
}
else if ($_SESSION['i2sdevice'] != 'none') {
Expand All @@ -1792,7 +1792,7 @@ function getDeviceNames () {
}

// Device 1
if ($card1 != '' && $card0 == "ALSA\n") {
if ($card1 != '' && ($card0 == "ALSA\n" || $card0 == "Headphones\n")) {
$dev[1] = 'USB audio device';
}
else {
Expand Down

0 comments on commit 4289f57

Please sign in to comment.