[notification] No warning of high volume level

Bug #1373404 reported by Matthew Paul Thomas
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu UX
Fix Released
Critical
Paty Davila
indicator-sound (Ubuntu)
Fix Released
High
Ted Gould
indicator-sound (Ubuntu RTM)
Fix Released
Critical
Ted Gould
pulseaudio (Ubuntu)
Invalid
Critical
Unassigned
ubuntu-system-settings (Ubuntu)
Fix Released
High
Ted Gould
unity-notifications (Ubuntu)
Fix Released
Undecided
Mirco Müller
unity-notifications (Ubuntu RTM)
Fix Released
Undecided
Mirco Müller
unity8 (Ubuntu)
Fix Released
High
Mirco Müller
unity8 (Ubuntu RTM)
Fix Released
Undecided
Mirco Müller

Bug Description

The EU has a legal requirement for personal music players to prevent hearing damage.
http://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32009D0490&rid=1
____________

Desired resolution:

- For RTM the design spec'ed in the following section of the Sound wiki page should be implemented https://wiki.ubuntu.com/Sound#Warnings_.28note:_This_section_should_be_implemented_for_RTM.29

Related branches

Changed in ubuntu-ux:
assignee: nobody → Matthew Paul Thomas (mpt)
kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
assignee: nobody → Mirco Müller (macslow)
tags: added: rtm14
Changed in unity8 (Ubuntu):
importance: Undecided → Critical
status: New → Confirmed
Changed in ubuntu-ux:
status: New → Triaged
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

This topic is also being discussed in bug 1232633 so may want to dupe, for now will tag for same date

tags: added: touch-2014-10-02
Revision history for this message
kevin gunn (kgunn72) wrote :

Mirco from other bug

This warning is only shown to the user (on Android) if headphones are plugged it.

We too could display such a warning by triggering a corresponding snap-decision from indicator-sound. With our current notification-system we have all needed means for this in place. But what icon, summary- and body-text should it display? What labels should be used on the buttons. How should the phone (indicator-sound) behave if the user selects "Cancel"? How long should it (indicator-sound) remember that user-choice? Until headphones are unplugged and plugged in again? This needs some good thought and "user-journey" from Design.

What we need on the side of indicator-sound is a way to determine, if a headphone is currently plugged into the phone or not. I don't know the audio-stack well enough to answer this.

no longer affects: indicator-sound
Revision history for this message
kevin gunn (kgunn72) wrote :

yeah, please keep 'em seperate. this one is about the max vol notification not the generic volume changer grahpic feedback

John Lea (johnlea)
Changed in ubuntu-ux:
importance: Undecided → Critical
kevin gunn (kgunn72)
tags: added: touch-2014-10-16
removed: touch-2014-10-02
Changed in ubuntu-ux:
status: Triaged → In Progress
description: updated
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Just as well I looked up the actual regulation ... It turns out that we don't just need to warn about high volume, but limit high volume by time as well.

description: updated
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

"At 80 dB(A) exposure time shall be limited to 40 hours/week, whereas at 89 dB(A) exposure time shall be limited to 5 hours/week. For other exposure levels a linear intra- and extrapolation applies."

I'll put this here for others to check while I do the rest of the design:

maximum time per week = a function of volume
40 h = f(80 dB(A))
5 h = f(89 dB(A))
linear intra- and extrapolation ∴ maximum time per week = m × volume + c
m = (40h – 5h) ÷ (80 dB(A) – 89 dB(A)) = 35 h ÷ –9 dB(A) = –3.889 h/dB(A)

40h = –3.889 h/dB(A) × 80 dB(A) + c
c = 40h – (–3.889 h/dB(A) × 80 dB(A)) = 351.111 h

∴ maximum time per week = –3.889 h/dB(A) × volume + 351.111 h.

A quick graph of this formula looks right, at least.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

A corollary is that it's fine to listen 24×7 if the volume is 47 dB(A) or less. So I guess that's the volume we should reduce to if you hit the limit.

Six cases to consider: (turn up too loud, listening loud too long) × (OSD, System Settings, indicator menu). We'll probably use the same text across each of those three UI points.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :
Changed in ubuntu-ux:
status: In Progress → Fix Committed
description: updated
description: updated
Revision history for this message
kevin gunn (kgunn72) wrote :

based on the specification that's been provided it would seem that the audio subsystem would need to be involved for
"measuring dB output" as this will always be a potential driven by a combination of sw & hw (e.g. sound subsystem needs to provide a means of reporting dB per volume setting)

also, for the warning notifications u-s-s would need to be involved.

kevin gunn (kgunn72)
no longer affects: pulseaudio
kevin gunn (kgunn72)
Changed in pulseaudio (Ubuntu):
importance: Undecided → Critical
Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → Critical
tags: added: touch-2014-10-23
removed: touch-2014-10-16
Revision history for this message
Albert Astals Cid (aacid) wrote :

As spaniard and thus still someone in the EU here is the behaviour of the phones i have around me with headset attached:

Shows a notification at 70/80% that doesn't let you increase the volume unless you say "ok, sure"
 * Blackberry Z10
 * Nexus 4 with Android 4.4
 * Unknown manufacturer with Android 4.2

Shows a notification at 70/80% that says "your volume is high, don't listen to it during a long time"
 * Some old Samsung with Android 2.x

Shows nothing:
 * Some old Samsung with Android 2.x
 * HUAWEI U8815N with Android 4.0.x
 * HTC One S with Android 4.0.x

Some of those that show nothing may have been rooted with non european version of firmware or are "too old"

Revision history for this message
Albert Astals Cid (aacid) wrote :

Shows nothing:
 * iPhone 5S bought in the USA (so may have not the EU law applied)

Revision history for this message
Albert Astals Cid (aacid) wrote :

Shows a notification at 70/80% that doesn't let you increase the volume unless you say "ok, sure"
 * MWG509 Wings GII with Android 4.2

And that's all the phones i could find in the house :D

Revision history for this message
kevin gunn (kgunn72) wrote :

after some discussion with LT wrt timeline & requirement for this bug:
1) we'll rely on device hardware/drivers for the hard limits for
2) we provide a warning at 75% of slider

with this, makes pulse opinion.

Changed in pulseaudio (Ubuntu):
status: New → Opinion
Changed in ubuntu-ux:
status: Fix Committed → New
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Albert, thanks for that survey of how various systems meet Requirement 2.2. I'm fairly confident in my design for that, though, so I'm much more interested in how they meet Requirement 2.1. :-)

I understand that 2.1 is much more difficult to implement (regardless of whether it's done in the driver or in pulseaudio), so it may make sense to split this into two bug reports.

Changed in ubuntu-ux:
status: New → Fix Committed
Revision history for this message
Charles Kerr (charlesk) wrote :

For RTM, I agree with Kevin in comment #12 about using 75% of the slider.

Setting aside that it's probably literally impossible to get the actual dB coming out of a pair of headphones due to differing impedance ratings, mpt's wiki design looks well-thought-out but is not something that is implementable in an RTM timeframe.

Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Charles Kerr (charlesk)
status: New → Triaged
Changed in pulseaudio (Ubuntu):
assignee: nobody → Charles Kerr (charlesk)
status: Opinion → Triaged
kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Mirco Müller (macslow) wrote :

I agree with Charles. As all-embracing as mpt's solution for the convoluted EU-regulations is, that will not be doable in the RTM-timeframe.

Still for the warning-at-75% stop-gap suggestion, I need a design-sanctioned mockup.

John Lea (johnlea)
description: updated
Revision history for this message
Mirco Müller (macslow) wrote :

Current implementation in action... https://www.youtube.com/watch?v=J_tvCQ5hHxI

Revision history for this message
Vish (vish) wrote :

mpt,
the "High Volume" text notification should probably be below the volume bar; that way the volume bar does not drop down/jump around while it changes color...

Revision history for this message
Vish (vish) wrote :

Or the text section could be allocated, and the volume bar would not move when text is displayed.

Revision history for this message
Vish (vish) wrote :

Bleh.. I should have read the wiki fully..

Mirco,
the specs read "...instead of saying “Headphones” should say “High volume”, and the bar should be colored. " But there is no 'headphones' label above the icon, hence the jumping bar.

Changed in ubuntu-ux:
assignee: Matthew Paul Thomas (mpt) → nobody
Olli Ries (ories)
tags: added: touch-2014-10-16
removed: touch-2014-10-23
Charles Kerr (charlesk)
Changed in pulseaudio (Ubuntu):
assignee: Charles Kerr (charlesk) → nobody
Changed in ubuntu-system-settings (Ubuntu):
assignee: Charles Kerr (charlesk) → nobody
Ted Gould (ted)
Changed in indicator-sound (Ubuntu):
status: New → Triaged
Changed in indicator-sound:
status: New → Triaged
importance: Undecided → Critical
Changed in indicator-sound (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Ted Gould (ted)
Changed in indicator-sound:
assignee: nobody → Ted Gould (ted)
Changed in pulseaudio (Ubuntu):
status: Triaged → Invalid
Changed in ubuntu-system-settings (Ubuntu):
status: Triaged → Invalid
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu RTM):
status: New → In Progress
assignee: nobody → Mirco Müller (macslow)
Changed in unity-notifications (Ubuntu):
status: New → In Progress
assignee: nobody → Mirco Müller (macslow)
Changed in unity-notifications (Ubuntu RTM):
status: New → In Progress
assignee: nobody → Mirco Müller (macslow)
Ted Gould (ted)
Changed in indicator-sound (Ubuntu):
status: Triaged → In Progress
Changed in indicator-sound:
status: Triaged → In Progress
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

One easy way in the indicator to know if the active port a headphone/headset: http://paste.ubuntu.com/8556022/

I think we should do the following:
1 - Check if the active port is headset;
2 - If headset, see if the volume for the multimedia role is higher than 75%. If higher, change it to 75% (this is basically what is done on Android). This check can be done once at every reboot (or every time someone plugs a headphone/headset).
3 - When changing volume for the multimedia role, warn the user if higher than 75%.

You can also do the same for the other roles, but generally we are only concerned with multimedia.

Michał Sawicz (saviq)
Changed in indicator-sound (Ubuntu RTM):
assignee: nobody → Ted Gould (ted)
status: New → In Progress
importance: Undecided → Critical
Ted Gould (ted)
Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Ted Gould (ted)
status: Invalid → In Progress
summary: - No warning of high volume level
+ [notification] No warning of high volume level
Michał Sawicz (saviq)
Changed in indicator-sound (Ubuntu RTM):
status: In Progress → Fix Released
Changed in unity8 (Ubuntu RTM):
status: In Progress → Fix Released
Changed in unity-notifications (Ubuntu RTM):
status: In Progress → Fix Released
kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Changed in unity-notifications (Ubuntu):
status: In Progress → Fix Released
kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
status: Fix Released → In Progress
Michał Sawicz (saviq)
Changed in unity-notifications (Ubuntu):
status: Fix Released → In Progress
Olli Ries (ories)
Changed in indicator-sound (Ubuntu):
importance: Critical → High
Changed in indicator-sound:
importance: Critical → High
Changed in ubuntu-system-settings (Ubuntu):
importance: Critical → High
Changed in unity8 (Ubuntu):
importance: Critical → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-sound - 12.10.2+15.04.20141105-0ubuntu1

---------------
indicator-sound (12.10.2+15.04.20141105-0ubuntu1) vivid; urgency=medium

  [ Ted Gould ]
  * Remove various Vala warnings
  * Show notifications on volume change (LP: #1378564, #1378961)
  * Warn on high audio levels when using headphones (LP: #1232633, #1373404)
  * service.vala: don't call set_volume unnecessarily (LP: #1381871)
  * Integration test for audio roles
  * Integration test for silent mode
  * Ensure the greeter menu matches whether song metadata should be shown,
    and update the metadata based on the new setting. (LP: #1358340)
 -- Ubuntu daily release <email address hidden> Wed, 05 Nov 2014 17:56:29 +0000

Changed in indicator-sound (Ubuntu):
status: In Progress → Fix Released
Ted Gould (ted)
no longer affects: indicator-sound
Mirco Müller (macslow)
Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Changed in unity-notifications (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-system-settings (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-ux:
assignee: nobody → John Lea (johnlea)
Changed in ubuntu-ux:
assignee: John Lea (johnlea) → Paty Davila (dizzypaty)
Paty Davila (dizzypaty)
Changed in ubuntu-ux:
status: Fix Committed → Fix Released
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Unfortunately, it turns out that the document I found which appeared to be the EU regulation was not the actual regulation. It was a preparatory document for producing the regulation. (The original document I was pointed to in bug 1370591 was a press release, even further off the mark.)

As a result, the design did not comply with the regulation. This explains Albert's observation here that some handsets show "a notification at 70/80% that doesn't let you increase the volume unless you say 'ok, sure'": that requirement is part of the actual regulation.

Complying with the regulation is now tracked in bug 1480912, which has to be private for now because it includes copyrighted attachments.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.