[Feature] support the external headphone/microphone jack sensing

Bug #771150 reported by Shang Wu
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Medium
James M. Leddy
Precise
Fix Released
Medium
James M. Leddy
Quantal
Fix Released
Medium
James M. Leddy
PulseAudio
New
Undecided
Unassigned
alsa-driver (Ubuntu)
Fix Released
Medium
David Henningsson

Bug Description

The eeepc has a combined hole shared by the external microphone and headphone. Currently the default behaviour in Ubuntu is for headphone. (The music comes from headphone and the internal speaker is muted when plugging the headphone).

This bug is intended for discussing and tracking the possibility and practicability of the support both headphone/microphone jack sensing in Linux driver or it is only achievable to support either one.

Revision history for this message
Shang Wu (shangwu) wrote :
affects: alsa-driver → oem-priority
Changed in oem-priority:
importance: Undecided → Medium
importance: Medium → Wishlist
Revision history for this message
David Henningsson (diwic) wrote :
Chris Van Hoof (vanhoof)
Changed in oem-priority:
assignee: nobody → Chris Van Hoof (vanhoof)
status: New → In Progress
Chris Van Hoof (vanhoof)
Changed in alsa-driver (Ubuntu):
assignee: nobody → David Henningsson (diwic)
importance: Undecided → Medium
status: New → Confirmed
Changed in oem-priority:
importance: Wishlist → Medium
status: In Progress → Confirmed
Chris Van Hoof (vanhoof)
Changed in oem-priority:
status: Confirmed → In Progress
Changed in alsa-driver (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Chris Van Hoof (vanhoof) wrote :

Heya David -- Is this something we can look at for 12.04 (or perhaps just works already :)) given the jack detection additions?

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

Well, I haven't tested it on the real hardware, but I believe that the hda-jack-retask program (or parts of it) could be used as a backend. That is a somewhat crude solution as PulseAudio will be restarted during jack retasking (and thus all applications using the audio system will have to be restarted, unless they autoconnect).

If we want something more elegant, we could write a kernel patch to set the jack to different functions given an alsa mixer control. I don't think that would be too difficult, but for 12.04, time is about to run out for kernel patches.

Regardless of strategy, we're going to need a custom GUI for it to be user friendly enough. Designing that GUI and making it show up when you plug it in (or whatever) might be the biggest work item.

Revision history for this message
João Miguel Lopes Moreira (jmlm-1970) wrote :

The only solution to make microphone work is to install linux-backports-modules-alsa-generic...

Just go to:

Menu / System / Administration / Synaptic Package Manager

And search and mark for installation:

linux-backports-modules-alsa-generic

tip: if you have multiple versions click on the first and read the description which should inform what name to install...

If after the reboot and mic mute is off, still does not work, just go to terminal and type:

sudo nano /etc/modprobe.d/alsa-base.conf

and add or change the following:

options snd-hda-intel model=auto enable=yes

Then Ctrl+X, type Y to write and exit, reboot and mic will work.

Bye and have lots of fun with Ubuntu (the best).

Revision history for this message
lunaticare (lunaticare) wrote :

I've got an HP Pavilion dv7 notebook with Intel HDA sound card. After an upgrade to 12.04 headphone detection stopped working. I tried 'amixer -c0 contents' and it sees headphone state change and 'pacmd list-cards' says the status is unknown.

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

Linux 3.3 has an upstream patch for at least one device where the jack is retasked depending on a kcontrol switch, if there is only one jack (and the codec of a specific model).

Also see bug 1018262 for tracking of infrastructure patches in kernel and pulseaudio to support this better.

Changed in alsa-driver (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Florian Stoll (flostoll) wrote :

Command 'amixer -c0 contents' shows on/off-states correctly for mic and headphone but 'pacmd list-cards' says unknown in case of analog-output-headphones.
However the microphone shows correct states for 'analog-input-microphone' and therefore the volume application switches automatically between external and internal microphone volume.
But I have to open the volume application every time I connect my headset and change to correct output device manually to get some sound therefore please backport to precise.
Lenovo T500, Ubuntu 12.04

Changed in alsa-driver (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
David Henningsson (diwic) wrote :

I need somebody with the hardware who can help me test this

Changed in oem-priority:
status: Fix Released → Incomplete
Revision history for this message
James M. Leddy (jm-leddy) wrote :

This is very closely related to bug 1132769.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Info from Tim Chen

I have tested the mic/headphone jack on Asus x401u.
When I plug a headphone, the interface, Microphone and Headphones are shown, and headphone works.
When I plug a microphone,the interface, Microphone and Headphones are shown, but the active microphone is the built-in one.
If I plug a 4 ring jack into the hole, the interface, Microphone and Headphones are shown, but only headphone is active, the active microphone is still the built-in one.

Changed in oem-priority:
status: Incomplete → In Progress
Changed in oem-priority:
assignee: Chris Van Hoof (vanhoof) → James M. Leddy (jm-leddy)
Revision history for this message
James M. Leddy (jm-leddy) wrote :

Hi,

To anyone experiencing this issue, you're supposed to actively go into the sound settings and telling the system you plugged a microphone in - on the input tab, there should now be a "Microphone" or "Headset Microphone" option that must be selected to activate the mic. Also make sure "Headphones" are not selected.

If you do that, and it still does not work, can you attach alsa-info and "pacmd list" output?

Changed in oem-priority:
status: In Progress → Incomplete
Revision history for this message
Yung Shen (kaxing) wrote :

@James

tried this by actively selected built-in speaker and external microphone combination with a 4 ring jack(headset),

however the results are identical to tim's , unable to record anything from external microphone but some noise.

rbut external headphone and built-in microphone combination work properly.

please check detailed in attached pacmd_list.log

alsa-info here:
http://www.alsa-project.org/db/?f=d807106236359d054a72ca0edeceead79564259e

Revision history for this message
Yung Shen (kaxing) wrote :
Revision history for this message
David Henningsson (diwic) wrote :

@Yung Shen, you're *not* supposed to plug in a headset, because the hardware does not support that.

You're supposed to
1) Plug in a microphone only, not a headset
2) Select "speaker" in the output tab
3) Select "Microphone" in the input tab

Now try to record. Thanks.

Revision history for this message
Yung Shen (kaxing) wrote :

@David

by following your steps,

the combination of Built-in Speaker and External Microphone, can record and play correctly,

although the external headphone and microphone will both show up in sound settings.

this is verified with alsa-base 1.0.25+dfsg-0ubuntu4

thank you.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Marking released in accordance with comment #16.

Changed in oem-priority:
status: Incomplete → Fix Released
Revision history for this message
David Henningsson (diwic) wrote :

@jmleddy, I don't think this is backported to Precise/Quantal.

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

Other bug subscribers

Related blueprints

Remote bug watches

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