Discussion:
Bug#771391: libqt5multimedia5: QAudioDeviceInfo provides no audio devices on an alsa-only system without pulseaudio
Chris Ruvolo
2014-11-29 06:20:30 UTC
Permalink
Package: libqt5multimedia5
Version: 5.3.2-2~bpo70+2
Severity: important

Dear Maintainers,

Thank you for the recent backport of QT5 to wheezy-backports. I am
using this version, and running into a problem with multimedia audio.
My system has alsa devices; pulseaudio is not installed.

QT5 audio programs see no devices. Including tools in
/usr/lib/x86_64-linux-gnu/qt5/examples/multimedia/.

To verify, I modified the main.cpp for the audioinput example to output
audio device info. Diff follows.

I was expecting to see alsa devices, but instead
QAudioDeviceInfo::defaultInputDevice() returns a null device, and
QAudioDeviceInfo::availableDevices() returns an empty list.

libqt5multimedia5-plugins, libqt5multimediaquick-p5 and
libqt5multimediawidgets5 are also installed.

Any advice you have to debug this would be welcomed.

Thank you.
-Chris


--- /usr/lib/x86_64-linux-gnu/qt5/examples/multimedia/audioinput/main.cpp 2014-09-11 06:48:26.000000000 -0400
+++ main.cpp 2014-11-29 00:54:46.367809159 -0500
@@ -39,6 +39,9 @@
****************************************************************************/

#include <QtWidgets>
+#include <QAudioDeviceInfo>
+#include <QAudioInput>
+#include <QTextStream>

#include "audioinput.h"

@@ -47,6 +50,15 @@
QApplication app(argv, args);
app.setApplicationName("Audio Input Test");

+ const QAudioDeviceInfo &defaultDeviceInfo = QAudioDeviceInfo::defaultInputDevice();
+ QTextStream(stdout) << "default: " << defaultDeviceInfo.deviceName() << " isNull? " << defaultDeviceInfo.isNull() << endl;
+ foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput)) {
+ if (deviceInfo != defaultDeviceInfo)
+ QTextStream(stdout) << "device: " << deviceInfo.deviceName() << " isNull? " << defaultDeviceInfo.isNull() << endl;
+ }
+ return 0;
+
+
InputTest input;
input.show();


Output:


$ ./audioinput
PulseAudioService: pa_context_connect() failed
default: isNull? 1


-- System Information:
Debian Release: 7.7
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-0.bpo.3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libqt5multimedia5 depends on:
ii libc6 2.19-7
ii libpulse0 4.0-6~bpo7+1
ii libqt5core5a [qtbase-abi-5-3-2] 5.3.2+dfsg-4~bpo70+1
ii libqt5gui5 5.3.2+dfsg-4~bpo70+1
ii libqt5network5 5.3.2+dfsg-4~bpo70+1
ii libstdc++6 4.9.1-19
ii multiarch-support 2.13-38+deb7u6

libqt5multimedia5 recommends no packages.

libqt5multimedia5 suggests no packages.

-- no debconf information
--
To UNSUBSCRIBE, email to debian-qt-kde-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: https://lists.debian.org/***@hork.lan
Chris Ruvolo
2014-12-03 02:23:01 UTC
Permalink
tags 771391 + patch
thanks

I was able to track down the source of the problem and get alsa working.
The problem is that the plugins/alsa directory is not descended into and
built. This is an upstream problem as well.

I'm not sure if there is any negative consequence for pulseaudio users when
the alsa plugin is present, but after building and installing the alsa
plugin, audio now works when pulseaudio is not present. If there ends up
being a negative consequence for pulseaudio users, there might be a need to
have separate pulseaudio and alsa plugin packages.

I had previously read that alsa is handled as "internal" and not a plugin.
That is not true for 5.3.2 at least. There is no fallback in the code.
Every audio driver is loaded as a plugin.

Please see the attached patch and let me know if you have any questions.

Cheers.
-Chris
Debian Bug Tracking System
2014-12-03 02:27:10 UTC
Permalink
Post by Chris Ruvolo
tags 771391 + patch
Bug #771391 [libqt5multimedia5] libqt5multimedia5: QAudioDeviceInfo provides no audio devices on an alsa-only system without pulseaudio
Added tag(s) patch.
Post by Chris Ruvolo
thanks
Stopping processing here.

Please contact me if you need assistance.
--
771391: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771391
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
--
To UNSUBSCRIBE, email to debian-qt-kde-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: https://lists.debian.org/***@bugs.debian.org
Debian Bug Tracking System
2014-12-03 15:27:06 UTC
Permalink
Your message dated Wed, 03 Dec 2014 15:24:59 +0000
with message-id <E1XwBnX-0006To-***@franck.debian.org>
and subject line Bug#771391: fixed in qtmultimedia-opensource-src 5.3.2-4
has caused the Debian Bug report #771391,
regarding libqt5multimedia5: QAudioDeviceInfo provides no audio devices on an alsa-only system without pulseaudio
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
771391: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771391
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...