Permalink
Browse files

Log and check output from 'pasuspender alsactl' just as when not usin…

…g pulse
  • Loading branch information...
neiljerram committed Nov 25, 2012
1 parent 6577b16 commit 18404194e37b85a315a64ae23b3ac97e7dab3256
Showing with 12 additions and 8 deletions.
  1. +12 −8 devices/gta04/src/plugins/audiohardware/neo/neoaudioplugin.cpp
@@ -79,18 +79,19 @@ static bool alsactl(QStringList & args)
{
qLog(AudioState) << "alsactl " << args;
+ QString cmd = "alsactl";
+ if (usePulse) {
+ args.insert(0, cmd);
+ args.insert(0, "--");
+ cmd = "pasuspender";
+ }
+
for(int i = 0; i < 8; i++) {
QProcess p;
- if(usePulse) {
- args.insert(0, "alsactl");
- args.insert(0, "--");
- qLog(AudioState) << "pasuspender " << args;
- p.start("pasuspender", args);
- } else {
- p.start("alsactl", args);
- }
+ qLog(AudioState) << cmd << args;
+ p.start(cmd, args);
p.waitForFinished(-1);
// We need to determine if we're happy with alsactl's output,
@@ -118,6 +119,9 @@ static bool alsactl(QStringList & args)
" '2:0:0:Codec Operation Mode:0'"
" : Device or resource busy")) {
qLog() << "alsactl stderr (ok): " << stderr_lines.at(i);
+ } else if (usePulse &&
+ stderr_lines.at(i).contains("XOpenDisplay() failed")) {
+ qLog() << "alsactl stderr (ok): " << stderr_lines.at(i);
} else {
qWarning() << "alsactl stderr (not expected): " <<
stderr_lines.at(i);

0 comments on commit 1840419

Please sign in to comment.