Combo audio jack support ("what did you plug in?"-dialog)

Bug #1239605 reported by Yang Kun (YK)
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
High
Ara Pulido
Precise
Won't Fix
High
Unassigned
unity-settings-daemon (Ubuntu)
Fix Released
High
David Henningsson
Precise
Won't Fix
Undecided
Unassigned

Bug Description

This is about a specific set of new laptops, which has only one 3.5 mm
jack for analog audio, and where that jack can be used to plug in a
headphone, headset, and in some cases, a microphone.

Previously, these jacks have been able to distinguish - in hardware -
between a headphone and a headset (i e headphone with mic), but it seems
to be increasingly common that they don't have this ability.

Our current solution, as it works in 13.10, is that for these machines
one has to manually select the right input and output in sound settings.

Here's an example on how the dialog looks in Windows: https://launchpadlibrarian.net/70431415/2011-03-08%2017.08.26.jpg - probably provided by Realtek 3rd party drivers.

We can either choose to implement a similar dialog, or just to provide notify-OSD on plug of audio jack for user to choose between microphone, headphone/speakers, or headset if it is a four ring jack. Choosing the notify-OSD instead of an OSD is a compromise between "making it easy for users to reconfigure jack" and "avoiding annoying distractions".

Timeline wise it would be nice to merge this in the early 14.04 cycle.
We also need to ship it in OSP2 (OEM Service Pack 2, shipped on pre-installs). Hence it would be good if we could have input/ack from design team ASAP, or at least by the end of October.

<https://wiki.ubuntu.com/Sound#unknown-device>: "When a device is plugged into an audio jack that can’t distinguish between headphones/speakers, headsets, or microphones, Ubuntu should display an “Unknown Audio Device” dialog..."

Tags: patch
Changed in ubuntu:
assignee: nobody → Matthew Paul Thomas (mpt)
Changed in ubuntu:
importance: Undecided → High
Revision history for this message
David Henningsson (diwic) wrote :

Attaching example screenshot of a notify-OSD.

description: updated
description: updated
Revision history for this message
David Henningsson (diwic) wrote :

Note: If the OSD (notify or not) should show an icon depending on the current mode (as suggested in the screenshot), the following icon strings will be used:

audio-input-microphone (working in 12.04 - in humanity theme)
audio-headset (working in 12.04 - coming from gnome theme)
audio-headphones (NOT working in 12.04 - working in 13.10 - coming from gnome theme)

Should we SRU gnome's audio-headphones icon back to 12.04?

Changed in ubuntu:
status: New → In Progress
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

A notification bubble would be unpleasant for this situation, because it invites an input response but doesn't allow it, as recommended against in our own notification design guidelines. <https://wiki.ubuntu.com/NotificationDesignGuidelines>

The combination of dialog-and-checkbox (for example, "Are you sure..." confirmation alerts) is usually bad, because it attempts to tackle situations where everybody needs the dialog occasionally with a dialog that appears always for some people and never for others. And it's seldom clear where (or if it's even possible) to change your mind about the checkbox later.

In this case, though, I think a dialog-and-checkbox combo would be reasonable. In this case, people really do differ widely in their use: some will use headphones almost all the time, some a microphone almost all the time, some a headset almost all the time, and a few a constant variety of devices. And in this case, there is an obvious home for reversing the checkbox -- the Sound panel of System Settings.

I'm now working on the design of the dialog. We can make it much quicker to use than the attached screenshot from Windows by using a large button for each device type (one easy click), rather than a checkbox then an "OK" button (two fiddly clicks).

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

Specification updated. <https://wiki.ubuntu.com/Sound?action=diff&rev2=93&rev1=92> Please let me know if you have any questions.

Changed in ubuntu:
assignee: Matthew Paul Thomas (mpt) → nobody
status: In Progress → Triaged
description: updated
Revision history for this message
David Henningsson (diwic) wrote :

Thanks for the design update. I have a few questions/comments:

1) About "headphones/speakers" - I'd prefer if we left "speakers" out of it for now. The reason is that external powered speakers would assume a line level output, where as a headphone would require the headphone amplifier (integrated into the codec) to be activated instead. Putting external speakers on a headphone output works, but the sound quality is not optimal.
There is a use case where we would want to switch between headphones and speaker output to get the best sound quality, but I don't want to add support for that now. Ok to change "headphones/speakers" to "headphones"?

2) The dialog as designed includes some icons. Should we try to use the icons supplied by the current theme (audio-input-microphone, audio-headset, audio-headphones), or should I request somebody draw them for me?

3) I'm not sure exactly where you want me to add the "When an unknown audio device is plugged in" line. I can't find any place in the current design where we have a "Show sound volume in the menu bar either", btw.

4) The drawing shows a text "unknown devices in future". Should this be "in the future" (missing a "the")? I'm not a native English speaker, but the latter wording sounded more natural to me.

Tim Chen (timchen119)
Changed in oem-priority:
importance: Undecided → High
Revision history for this message
Jouni Helminen (jounihelminen) wrote :

I've put together a visual for this - I've used gnome icons.

I've attached a zip containing the visual design .png and the icon .svg's

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "visual_and_icons.zip" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
David Henningsson (diwic) wrote :

Thanks Jouni,

I notice two differences in the visual, compared to mpt's wireframe:

 - that it says headphones instead of headphones/speakers, which answers question 1 in comment #5, and

 - it has no "Use this device for unknown devices in future" checkbox. If we skip this functionality - at least for the time being - then that would make less work for me, and would answer the remaining questions I had in comment #5.

Revision history for this message
Jouni Helminen (jounihelminen) wrote :

Hi David,

We wen't through the wireframe with John Lea and decided to skip speakers for now, and also skip "Use this device for unknown devices in the future" since there's currently no way to change that setting once set

Ara Pulido (ara)
affects: ubuntu → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
status: Triaged → In Progress
assignee: nobody → David Henningsson (diwic)
Revision history for this message
David Henningsson (diwic) wrote :

Frontend.

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

> 1) About "headphones/speakers" - I'd prefer if we left "speakers" out of it for now.

I didn't know that a jack could tell the difference between headphones and speakers. And I'm surprised that a jack could tell the difference between those, but not between headphones and a microphone! But sure, leaving out speakers is fine.

> 3) I'm not sure exactly where you want me to add the "When an unknown audio device is plugged in" line.

At the bottom of the "Sound" panel, as described. Greyed-out items are greyed out because they're not part of the feature under discussion.

> 4) The drawing shows a text "unknown devices in future". Should this be "in the future" (missing a "the")?

Huh, today I learned that "in future" is specific to British English. Thanks, fixed. <https://wiki.ubuntu.com/Sound?action=diff&rev2=94&rev1=93>

Revision history for this message
David Henningsson (diwic) wrote : Re: [Bug 1239605] Re: Combo audio jack support ("what did you plug in?"-dialog)

2013-11-27 19:15, Matthew Paul Thomas skrev:
>
> I didn't know that a jack could tell the difference between headphones
> and speakers. And I'm surprised that a jack could tell the difference
> between those, but not between headphones and a microphone! But sure,
> leaving out speakers is fine.

Sorry, let me clarify. The jack cannot tell the difference between
headphones and speakers. I'm just saying that they should not be treated
the same, because headphones and externally powered speakers should have
different output levels, impedance etc, for optimal quality.

So, in theory we should have one button for headphones and one button
for speakers, but because we currently do not support the line out mode
at driver level (which is the optimal one for externally powered
devices), I think it's better to leave speakers completely for now.

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

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

Understood. I've updated the wireframe to remove the speakers.

Some comments on the patch:

> Gtk.Dialog.__init__(self, "Unknown audio device", None, 0)

Thanks to Jouni for the mockup, but Ubuntu for PC uses Title Capitalization for window titles, e.g. "Unknown Audio Device" as in the wireframe.

> hp_btn = IconButton("audio-output-headphones", "Headphones", "audio-headphones.svg", self)
> icon_box.pack_start(hp_btn, False, True, 0)
> mic_btn = IconButton("audio-input-microphone", "Microphone", "audio-microphone.svg", self)
> icon_box.pack_start(mic_btn, False, True, 0)
> hs_btn = IconButton("audio-input-headset-mic", "Headset", "audio-headset.svg", self)
> icon_box.pack_start(hs_btn, False, True, 0)

I would prefer the Headphones and Headset buttons to be adjacent, as in the wireframe, because that makes them easier to tell apart.

> btn_box.pack_start(cancel_btn, False, False, 0)

Contra the mockup, Ubuntu standard dialog layout is for "Cancel" to go second from the right, not in the left corner.

Ara Pulido (ara)
Changed in oem-priority:
status: New → In Progress
Jason Yen (jasonyen)
Changed in oem-priority:
assignee: nobody → Ara Pulido (apulido)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
David Henningsson (diwic) wrote :
Changed in pulseaudio (Ubuntu Precise):
status: Confirmed → Won't Fix
Revision history for this message
David Henningsson (diwic) wrote :

Note that for 12.04 based preinstalls, the functionality is shipped in the separate what-did-you-plug-in package instead of together with unity-settings-daemon.

Support for stock 12.04 is not planned. Source for OSP2 is here: https://code.launchpad.net/~diwic/+junk/what-did-you-plug-in

affects: pulseaudio (Ubuntu) → unity-settings-daemon (Ubuntu)
Revision history for this message
David Henningsson (diwic) wrote :

The functionality has been merged now, although I'm not sure when 14.04 will switch from gnome-settings-daemon to unity-settings-daemon.

Changed in unity-settings-daemon (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
David Henningsson (diwic) wrote :

Actually, as of today ( version 14.04.0+14.04.20140219-0ubuntu1 of unity-settings-daemon ) this functionality is released into 14.04 (ubuntu-desktop depends on unity-settings-daemon ).

Changed in unity-settings-daemon (Ubuntu):
status: Fix Committed → Fix Released
Ara Pulido (ara)
Changed in oem-priority:
status: In Progress → Fix Released
Revision history for this message
Jerry Kao (jerry.kao) wrote :

While plug in an audio device and the dialog prompt, there are one additional option 'Headphones' appearing in Output settings and two options 'Headset Microphone', 'Microphone' in Input settings. The selected options will be changed after plugged in device is clicked.

Headphones clicked
Output --> Headphones
Input --> Internal Microphone

Headset clicked
Output --> Headphones
Input --> Headset Microphone

Microphone clicked
Output --> Speakers
Input --> Microphone

The rest options are still selectable but not functional. It would be less confused to remove extra options. For example, when a microphone is plugged in and clicked, there are only 'internal speakers' in output settings and 'internal microphone', 'external microphone' in output settings. Extra headphone and headset microphone should be removed from output/input settings. (wishlist)

Revision history for this message
Prahlad Yeri (prahladyeri) wrote :

It is 2017 and this old and high-priority bug is yet to be fixed even on the latest LTS version. Any progress on this?

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

Other bug subscribers