Skip to content

Commit 089f3cb

Browse files
authored
Merge pull request #2085 from octalthorpe/fix/2083
Issue #2083 - Fix scraping for mixer devices.
2 parents cb8d079 + aa29d4d commit 089f3cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/boot/FPPINIT.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,13 +1112,13 @@ static void setupAudio() {
11121112
break;
11131113
}
11141114
PutFileContents("/root/.asoundrc", asoundrc);
1115-
std::string mixers = execAndReturn("/usr/bin/amixer -c " + std::to_string(card) + " scontrols | head -1 | cut -f2 -d\"'\"");
1115+
std::string mixers = execAndReturn("/usr/bin/amixer -c " + std::to_string(card) + " scontrols | cut -f2 -d\"'\"");
11161116
if (mixers.empty()) {
11171117
// for some sound cards, the mixer devices won't show up
11181118
// until something is played. Play one second of silence
11191119
exec("/usr/bin/aplay -d 1 /opt/fpp/media/silence_5sec.wav >> /dev/null 2>&1 &");
11201120
std::this_thread::sleep_for(std::chrono::milliseconds(200));
1121-
mixers = execAndReturn("/usr/bin/amixer -c " + std::to_string(card) + " scontrols | head -1 | cut -f2 -d\"'\"");
1121+
mixers = execAndReturn("/usr/bin/amixer -c " + std::to_string(card) + " scontrols | cut -f2 -d\"'\"");
11221122
}
11231123
TrimWhiteSpace(mixers);
11241124
std::string mixer;

0 commit comments

Comments
 (0)