Bug 1641151 - QAudio ignores default system audio devices, it always uses hw:0,0
Summary: QAudio ignores default system audio devices, it always uses hw:0,0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qt
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Kofler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-19 18:06 UTC by Jaroslav Škarvada
Modified: 2018-10-30 17:30 UTC (History)
10 users (show)

Fixed In Version: qt-4.8.7-44.fc28
Clone Of:
Environment:
Last Closed: 2018-10-27 16:15:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed fix (5.50 KB, patch)
2018-10-19 18:06 UTC, Jaroslav Škarvada
no flags Details | Diff

Description Jaroslav Škarvada 2018-10-19 18:06:50 UTC
Created attachment 1495717 [details]
Proposed fix

Description of problem:
It hardcodes hw:0,0 which is really bad. If your system default sound card is e.g. hw:1,0 you have no way how to get audio from the QAudio (not counting unloading all sound modules and loading them in different order),

Version-Release number of selected component (if applicable):
qt-x11-4.8.7-31.fc27

How reproducible:
Always

Steps to Reproduce:
1. Set default system audio to device 2
2. Start QT app, e.g. cutecw

Actual results:
No sound from the system default device

Expected results:
Sound from the system default device

Additional info:
It happens because the ifdef condition in the QT code doesn't count with the ALSA 1.1.X and wrongly uses code for ancient ALSA release with the hardcoded hw:0,0. With ALSA 1.0.X it works as expected.

Comment 1 Jaroslav Škarvada 2018-10-19 18:13:29 UTC
It's even worse if you have e.g. HDMI device on hw:0,0, which is disconnected (e.g. no HDMI cable connected), and you have connected analog speaker phones through the stereo jack. In such case you will get no sound, even if you set the analog output device explicitly in the QAudioOutput constructor, because the QT code still hardcodes hw:0,0 and the explicit AudioDevice from the constructor is ignored.

Comment 2 Kevin Kofler 2018-10-19 21:03:43 UTC
hw:ANYTHING is wrong to begin with. It should be using the pulse device, or preferably libpulse directly.

But Qt 4 is no longer maintained upstream. I don't think this kind of bugs will ever be fixed in it. The application needs to be ported to Qt 5.

Comment 3 Kevin Kofler 2018-10-19 21:07:30 UTC
Actually, the patch you submitted looks simple enough to apply, I can do that. I'm still not convinced it will do the right thing in a modern PulseAudio setup, but it can't be worse than hardcoding hw:0,0.

Comment 4 Kevin Kofler 2018-10-19 21:41:10 UTC
Building for Rawhide now, then I'll build F29, F28 and F27.

Comment 5 Kevin Kofler 2018-10-20 00:10:54 UTC
Unfortunately, the F29 build failed due to the F29 buildroot being broken:

DEBUG util.py:439:   Problem: package cups-devel-1:2.2.8-5.fc29.x86_64 requires gnutls-devel, but none of the providers can be installed
DEBUG util.py:439:    - package gnutls-devel-3.6.4-1.fc29.x86_64 requires libgnutls-dane.so.0()(64bit), but none of the providers can be installed
DEBUG util.py:439:    - conflicting requests
DEBUG util.py:439:    - nothing provides libunbound.so.2()(64bit) needed by gnutls-dane-3.6.4-1.fc29.x86_64

Comment 6 Kevin Kofler 2018-10-20 02:12:43 UTC
Rawhide, F28 and F27 built, but getting an update out is blocked on somebody unbreaking the F29 buildroot. Sorry.

Comment 7 Kevin Kofler 2018-10-20 02:17:05 UTC
New attempt:
https://koji.fedoraproject.org/koji/taskinfo?taskID=30337730
now that the offending unbound buildroot override apparently expired:
https://bodhi.fedoraproject.org/overrides/unbound-1.8.1-1.fc29

Comment 8 Fedora Update System 2018-10-20 17:30:36 UTC
qt-4.8.7-44.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-fef9d9176e

Comment 9 Fedora Update System 2018-10-20 17:31:08 UTC
qt-4.8.7-44.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f2829fc1e6

Comment 10 Fedora Update System 2018-10-20 17:33:57 UTC
qt-4.8.7-44.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5f573e7590

Comment 11 Kevin Kofler 2018-10-20 17:35:27 UTC
Use:
sudo dnf --enablerepo=updates-testing --advisory=FEDORA-2018-5f573e7590 update
to test this update on F27. (Users of F28 or F29 will want to substitute the relevant update ID.)

Comment 12 Fedora Update System 2018-10-21 00:05:30 UTC
qt-4.8.7-44.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5f573e7590

Comment 13 Fedora Update System 2018-10-21 01:40:52 UTC
qt-4.8.7-44.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-f2829fc1e6

Comment 14 Fedora Update System 2018-10-21 22:36:05 UTC
qt-4.8.7-44.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-fef9d9176e

Comment 15 Jaroslav Škarvada 2018-10-23 23:54:25 UTC
*** Bug 1509677 has been marked as a duplicate of this bug. ***

Comment 16 Fedora Update System 2018-10-27 16:15:24 UTC
qt-4.8.7-44.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2018-10-27 17:16:28 UTC
qt-4.8.7-44.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2018-10-30 17:30:27 UTC
qt-4.8.7-44.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.