Volume obtained is 100% in multimedia sink for sounds from app
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Canonical System Image |
Critical
|
Pat McGowan | ||
| pulseaudio (Ubuntu) |
Undecided
|
Unassigned | ||
| qtmultimedia-opensource-src (Ubuntu) |
Undecided
|
Timo Jyrinki | ||
| qtmultimedia-opensource-src (Ubuntu RTM) |
Undecided
|
Timo Jyrinki | ||
| qtubuntu-media (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
I'm not sure 100% this is a bug but it is related to https:/
When the "Marron in trouble" games launches a sound the multimedia sink it's updated and when reading the volume it's always 100%.
I'ts not 100% for other applications using the multimedia role, like the music app or other games/apps. The volume in that case is in sync with the volume that was previously set for it.
This is the code from the indicator-sound where we get the 100% volume.
var props_variant = yield _pconn.call ("org.PulseAudi
sink_
new Variant ("(ss)", "org.PulseAudio
null, DBusCallFlags.NONE, -1);
Variant tmp;
props_
uint32 type = 0, volume = 0;
VariantIter iter = tmp.iterator ();
iter.next ("(uu)", &type, &volume);
I did a workaround branch in the indicator-sound that reads the volume at initilaization for every role and stores any change When the sink is updated I read the volume in it that is already stored instead of reading the volume from pulse.
I'm not convinced of that, and would like to know why I get 100% volume only for this particular game.
Xavi Garcia (xavi-garcia-mena) wrote : | #1 |
Matthew Paul Thomas (mpt) wrote : | #2 |
In bug 1478506 I had already identified this problem as bug 1418210. This looks like a duplicate to me.
Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in pulseaudio (Ubuntu): | |
status: | New → Confirmed |
Changed in canonical-devices-system-image: | |
assignee: | nobody → John McAleely (john.mcaleely) |
David Henningsson (diwic) wrote : | #4 |
I've researched why the "Dinosaur" game always have sound effects at 100% volume.
Starting with the pa_stream_
"It is strongly recommended to pass NULL in both dev and volume and to set neither PA_STREAM_
Yet, in QPulseAudioOutp
I think the QPulseAudioOutput component should default to not set the volume at all, i e, leaving "NULL" as the volume in the call to pa_stream_
David Henningsson (diwic) wrote : | #5 |
Actually, this seems to already be fixed... https:/
David Henningsson (diwic) wrote : | #6 |
Hmm, in src/multimedia/
m_audioOutput-
David Henningsson (diwic) wrote : | #7 |
Okay, some more research done today, and I also talked to Juho @ Jolla/Sailfish about it, because they would probably suffer from the same problem.
It's somewhat of a misdesign or broken thinking, I believe. In short, Qt allows the app to set the volume of its sounds. This is an important feature; it allows e g, if you have two sound effects, for them to be at different volumes. Then it opens two streams and set the stream volume accordingly.
Ubuntu phone / PulseAudio however comes from the other direction and sets stream volume based on role. The problem comes when the app then overrides this volume.
I believe we need to multiply both volumes somehow instead of just letting the app override it.
Changed in canonical-devices-system-image: | |
importance: | Undecided → High |
status: | New → Confirmed |
milestone: | none → backlog |
John McAleely (john.mcaleely) wrote : | #8 |
@pmcgowan I've added qtubuntu as a task, but maybe there is a better proxy for QT?
Launchpad Janitor (janitor) wrote : | #9 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in qtubuntu (Ubuntu): | |
status: | New → Confirmed |
Pat McGowan (pat-mcgowan) wrote : | #10 |
This is blocking silo 51 and several fixes including for bug #1382548, can it get additional attention near term?
Pat McGowan (pat-mcgowan) wrote : | #11 |
@timo think we can pass this by the folks at Qt?
Changed in canonical-devices-system-image: | |
assignee: | John McAleely (john.mcaleely) → Pat McGowan (pat-mcgowan) |
Changed in qtbase-opensource-src (Ubuntu): | |
assignee: | nobody → Timo Jyrinki (timo-jyrinki) |
Launchpad Janitor (janitor) wrote : | #12 |
Status changed to 'Confirmed' because the bug affects multiple users.
affects: | qtbase-opensource-src (Ubuntu) → qtmultimedia-opensource-src (Ubuntu) |
Changed in qtmultimedia-opensource-src (Ubuntu): | |
status: | New → Confirmed |
affects: | qtubuntu (Ubuntu) → qtubuntu-media (Ubuntu) |
Timo Jyrinki (timo-jyrinki) wrote : | #13 |
I've contacted upstream if they have anything to possibly improve on their side. Xenial now has Qt 5.5, but I don't see any pulseaudio changes in 5.6 or dev either so I doubt the behavior is different there.
On our side, the likely components are qtubuntu-media and media-hub.
Launchpad Janitor (janitor) wrote : | #14 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in qtmultimedia-opensource-src (Ubuntu): | |
status: | New → Confirmed |
Changed in canonical-devices-system-image: | |
importance: | High → Critical |
milestone: | backlog → ww08-2016 |
tags: | added: volume |
Timo Jyrinki (timo-jyrinki) wrote : | #15 |
No reply from our upstream contact, e-mail was sent on Dec 16th.
Yoann Lopes (yoann-lopes) wrote : | #16 |
You can find more information about this problem in Qt at https:/
This was about QMediaPlayer, but the problem still exists for QAudioOutput and QSoundEffect.
A possible fix in Qt would be to check if the sink has flat volumes enabled and if it does, do software-based attenuation (in Qt).
That way, QSoundEffect and QAudioOutput volumes would always be relative to the stream role's volume.
Yoann Lopes (yoann-lopes) wrote : | #17 |
Pending patch in Qt: https:/
Pat McGowan (pat-mcgowan) wrote : | #18 |
@timo seems the patch was recently merged upstream at least to staging
Changed in canonical-devices-system-image: | |
status: | Confirmed → In Progress |
Changed in canonical-devices-system-image: | |
milestone: | ww08-2016 → 11 |
Timo Jyrinki (timo-jyrinki) wrote : | #19 |
Silo 010 has now the fix from upstream included. It needed some rebasing to apply to 5.4 and 5.5, but nothing seemed worrying.
Could you test the silo on vivid+overlay? (also xenial is included in the PPA)
Xavi Garcia (xavi-garcia-mena) wrote : | #20 |
I've tested this adding some debug statements to the sound indicator to see if the incoming volumes are changing from Pulse.
Now the Qml game (I've tested with Maroon in trouble) is not changing the volume, so the issue seems to be fixed! :)
Timo Jyrinki (timo-jyrinki) wrote : | #21 |
I tested eg Machines vs Machines successfully.
Timo Jyrinki (timo-jyrinki) wrote : | #22 |
It seems both the duplicate bug #1478506 (volume control increasing from 0) and this (volume always at 100) go away with the bug fix.
There is a remaining perceived bug of any sound playing app's volume being controlled only if the app is playing something at the time of volume control. If that's not the case, ringtone volume is controlled instead.
Timo Jyrinki (timo-jyrinki) wrote : | #23 |
(the remaining problem being documented in bug #1498466)
Łukasz Zemczak (sil2100) wrote : | #24 |
This bug was fixed in the package qtmultimedia-
---------------
qtmultimedia-
* debian/
- Backport from 5.6, change Pulseaudio volume control (LP: #1485522)
-- Timo Jyrinki <email address hidden> Wed, 13 Apr 2016 10:43:58 +0000
Changed in qtmultimedia-opensource-src (Ubuntu RTM): | |
status: | New → Fix Released |
Timo Jyrinki (timo-jyrinki) wrote : | #25 |
I believe there is nothing to fix in pulseaudio or qtubuntu-media for now, but please correct if I'm wrong.
Changed in qtubuntu-media (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in pulseaudio (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in qtmultimedia-opensource-src (Ubuntu RTM): | |
assignee: | nobody → Timo Jyrinki (timo-jyrinki) |
Changed in qtmultimedia-opensource-src (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Launchpad Janitor (janitor) wrote : | #26 |
This bug was fixed in the package qtmultimedia-
---------------
qtmultimedia-
* debian/
- Backport from 5.6, change Pulseaudio volume control (LP: #1485522)
-- Timo Jyrinki <email address hidden> Wed, 13 Apr 2016 10:41:46 +0000
Changed in qtmultimedia-opensource-src (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
Note: /bugs.launchpad .net/canonical- devices- system- image/+ bug/1478506/ comments/ 11 and I've observed in other apps the problem seems to be in the QML component for playing sounds.
As commented here: https:/