Allow laptop users to use select mic

Bug #418617 reported by Jerone Young on 2009-08-25
60
This bug affects 9 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Medium
Unassigned
linux (Ubuntu)
Undecided
Unassigned
linux-backports-modules-2.6.31 (Ubuntu)
Medium
Unassigned
pulseaudio (Ubuntu)
Wishlist
Unassigned

Bug Description

Sound Preferences is currently only allowing the use of the internal microphone of a laptop. But it will not allow you to switch to a microphone attached to the Mic jack of the laptop.

This is a common use case for users as the internal microphone of the laptop records all ambient noise around the laptop.

This relates to LP #322909

Changed in oem-priority:
assignee: nobody → Canonical Ubuntu QA Team (canonical-qa)
Brian Murray (brian-murray) wrote :

The switching from internal microphone to one attached to the microphone jack should happen automatically. But I think what you are saying is that there should be a way change inputs as a fallback method in the event that this fails. Is that correct?

Changed in oem-priority:
status: New → Incomplete
Jerone Young (jerone) wrote :

It's not automatic. If it's supposed to be it doesn't work.

Jerone Young (jerone) wrote :

Yes. There should also be a way for me to switch it manually. I may have something plugged in but not want to use it.

Jerone Young (jerone) on 2009-08-28
Changed in oem-priority:
status: Incomplete → Confirmed
status: Confirmed → New
Jerone Young (jerone) wrote :

To follow up on this more I bring the example of the Lenovo Thinkpad.

It has 3 ways of recording audio:

1) internal mic

2) mic jack

3) dock mic
   * if your on a docking station you can have a microphone attached. This is a seperate codec (mixer) from the mic jack.

Exactly how does a user use the doc mic ? This is why you cannot have everything be automatic as you make assumtions that may not be true for all users.

In this case a user could have a mic plugged into the dock, but wants to use their headset to record. Maybe both just happened to be plugged in and they want to use the internal mic as they have many friends who want to chat who are with them.

Changed in gnome-media (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Sebastien Bacher (seb128) wrote :

What ubuntu version do you use? Not sure if that's a pulseaudio issue or a capplet one, I don't have several mic to try but devices should be listed in the sound capplet

Martin Pitt (pitti) wrote :

FWIW, I never had two different ALSA devices on my machine here; the external jack just supersedes the internal mike if I plug in an external microphone. So if at all, this is an alsa/kernel issue. (I don't know whether it's actually physically possible to treat them as two devices).

Jerone, is that a karmic regression, or has it always been that way?

Luke, can you please add some wisdom about where this bug belongs, and whether it's possible to do something here? Thanks!

Changed in gnome-media (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → Luke Yelavich (themuso)

It firstly depends on the hardware as to whether the microphones can both be controlled separately. Secondly, I think that the gnome-media volume control does not yet allow the user to switch between input/output devices to control, whereas pavucontrol does.

So to fix this properly, we would need someone to add a new UI control to the gnome-media volume control applet, based on how pavucontrol does things. Being no UI designer, I don't feel I am in a position to help make this happen.

> FWIW, I never had two different ALSA devices on my machine here; the external jack just supersedes the internal mike if I plug in an external microphone.

To clarify this: I actually _do_ have two alsa input devices, one for the builtin mike/jack, and one for my USB headset. I specifically meant that I do not have two separate alsa input devices for the internal mic and the mic jack.

> I think that the gnome-media volume control does not yet allow the user to switch between input/output devices to control, whereas pavucontrol does.

I can properly switch between them using the pulse mixer applet (well, the one that we have by default now, I'm not actually sure whether this is considered a part of pulse or gnome-media now), so from alsa upwards everything seems to be just fine.

The question here is whether linux/alsa could expose the mic jack as a separate input device.

Reassigning to alsa now. Luke, Daniel, do you know how to find out whether Jerone's laptop is actually physically able to control the mic jack separately? Or Jerone, does that actually work in e. g. Windows?

affects: gnome-media (Ubuntu) → alsa-driver (Ubuntu)
Jerone Young (jerone) wrote :

@Martin
       No I am not using Windows. All the mic mixers are exposed at the ALSA layer. This is something very much working in 9.04 & below and now completely regressed in the new pulseaudio system in 9.10.

       It is no just my system but Dell laptops as well.

Jerone Young (jerone) wrote :

@Martin
          Ah. to add all of these mic mixers are apart of the same card (codec). So the problem is pulseaudio is not exposing multiple inputs on the same card.

         Since you have a USB headset that shows up as a 2nd sound input. But if that USB headset had 2 inputs .. pulseaudio would only expose one.

         So you can easily switch between cards (codecs). But if that card has more then one input it is not exposed.

Martin Pitt (pitti) wrote :

> all of these mic mixers are apart of the same card (codec). So the problem is pulseaudio is not exposing multiple inputs on the same card.

Ah, thanks for clarifying.

affects: alsa-driver (Ubuntu) → pulseaudio (Ubuntu)
Jerone Young (jerone) on 2009-09-28
Changed in oem-priority:
importance: Undecided → Medium
Brian Murray (brian-murray) wrote :

My soundcard has multiple inputs and they are exposed through gnome-volume control.

Jerone Young (jerone) wrote :

@Brian

    Yes. Actually I am gathering info now. Some soundcards don't seem to show it though. So i'm gathering info on those that don't show it. Can you add /proc/asound/card0/codec#0 to the bug. Trying to nail down which cards are ok and which are not.

Brian Murray (brian-murray) wrote :

That file does not exist instead I have a codec97#0 directory.

Jerone Young (jerone) wrote :

I have a list of machines not showing the microphone.

My guess is it may be how the driver on these cards is labeling the capture inputs? These are using Karmic beta 1 build as of (9/22).

Dell
-----
(both on dell.com/ubuntu)
Mini 10v
Studio XPS 13

Also found the issue on two unreleased Dell machines. That are coming out soon.

Lenovo
-----------
X301

This issue appaears on some machines, but not on others.

Will pos alsa codec data and lspci data for these machines.

I'll also need amixer data.

On Oct 1, 2009 6:40 PM, "Jerone Young" <email address hidden> wrote:

I have a list of machines not showing the microphone.

My guess is it may be how the driver on these cards is labeling the
capture inputs? These are using Karmic beta 1 build as of (9/22).

Dell
-----
(both on dell.com/ubuntu)
Mini 10v
Studio XPS 13

Also found the issue on two unreleased Dell machines. That are coming
out soon.

Lenovo
-----------
X301

This issue appaears on some machines, but not on others.

Will pos alsa codec data and lspci data for these machines.

-- Sound Prefrences applet does not offer a way for laptop users to use mic
jack attached mic http...

Jerone, I don't think this is a generic bug. PulseAudio is trying to do the right thing, but as I mentioned in a previous bug, the auto-generated HW profiles only work as well as the information Pulse is fed.

On my 13" Macbook running Karmic Beta, my default Hardware Profile as displayed by gnome-volume-control preferences, is "Analog Stereo Duplux". The displayed soundcard icon includes the following text:

Internal Audio
1 Output / 1 Input
Analog Stereo Duplex

If I click the "Input" tab, I see single device listed "Internal Audio Analog Stereo". I also see a combo box for "Connector" which allows me to switch between "Line-In" ( the usual external mic connector ) and "Microphone".

So, in theory, if ALSA reports things correctly *and* your kernel version of your ALSA codec fully supports your system, it should be possible to switch inputs via the gnome-volume-control preferences.

That said, this *almost* works on my machine. I'm able to capture sound via the microphone, but when I re-configure to capture from the Line-In, I had problems.

Jerone Young (jerone) wrote :

Here is data from my X301:

jerone@ubuntu:~$ amixer scontrols
Simple mixer control 'Master',0
Simple mixer control 'PCM',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Default PCM',0
Simple mixer control 'Docking Mic',0
Simple mixer control 'External Mic',0
Simple mixer control 'Internal Mic',0

Jerone Young (jerone) wrote :

Here is data a Studio XPS 13:

amixer scontrols:
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Headphone',1
Simple mixer control 'PCM',0
Simple mixer control 'Mic Jack Mode',0
Simple mixer control 'Mic Mixer',0
Simple mixer control 'IEC958',0
Simple mixer control 'Capture',0
Simple mixer control 'Capture',1
Simple mixer control 'Amp',0
Simple mixer control 'DAC Mixer',0
Simple mixer control 'Digital Input Source',0
Simple mixer control 'Digital Input Source',1
Simple mixer control 'PC Beep',0
Simple mixer control 'Speaker',0

On Thu, Oct 1, 2009 at 7:20 PM, Tony Espy <email address hidden> wrote:
> So, in theory, if ALSA reports things correctly *and* your kernel
> version of your ALSA codec fully supports your system, it should be
> possible to switch inputs via the gnome-volume-control preferences.

Well, it's also dependent on using the very newest alsa-driver/linux.
Unfortunately all the mic autoselect code was committed long after the
last freeze, and somehow I doubt Tim/Andy will smile upon my proposal
to chuck all that code into sound/pci/hda/* at this stage...

@Daniel
     You should bring it their way as this is a major functional bug. Basic use case is users have no way to user their headsets to use voip applications.

@Tony
  In these cases the Connector tab isn't even shown to allow you to switch the input. Though on others it is.

Jerone Young (jerone) wrote :

Here is a picture of what input tab in sound prefrences looks like on my X301. Regardless of the profile I choose I get no Connetors box.

Tony Espy (awe) wrote :

Jerone, again it's not really a PulseAudio bug it's more a ALSA driver bug.

This part of the problem with the way we lock down our kernel for releases... we're stuck with what's in the stable kernel release that was chosen, and in general, do very little back-porting of ALSA code unless it's an OEM deal ( usually post-release ).

Ouch. So from a Canonical prospective this is bad. For the Dell XPS 13
we are actually under contract to enable it in the standard
distribution. One of those is microphone. So we have an issue for this
it even being certified for Karmic.

This going be fun ;-)

   Jerone

On Fri, 2009-10-02 at 00:04 +0000, Tony Espy wrote:
> Jerone, again it's not really a PulseAudio bug it's more a ALSA driver
> bug.
>
> This part of the problem with the way we lock down our kernel for
> releases... we're stuck with what's in the stable kernel release that
> was chosen, and in general, do very little back-porting of ALSA code
> unless it's an OEM deal ( usually post-release ).
>

Changed in linux (Ubuntu):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Critical
status: New → Triaged

I asked dtchen to provide a test kernel with the bits in it. Once that happens we will need @Jerone to test on as many Dell models that he has access to.

@dtchen when the kernel is ready please post the link in the bug

On Sat, Oct 3, 2009 at 1:10 PM, Pete Graner <email address hidden> wrote:
> I asked dtchen to provide a test kernel with the bits in it. Once that
> happens we will need @Jerone to test on as many Dell models that he has
> access to.
>
> @dtchen when the kernel is ready please post the link in the bug

Jerone, are there any codecs besides IDT/Sigmatel that I need to be aware of?

@Daniel
          Yes. I'll list what I found so far though from. Also it's not all IDT codecs, as I found some work.

Some codecs not showing connectors
--------------------------------------------------
Realtek ID 665
IDT 92HD73C1X5
Realtek ALC272
Conexant CX20561

        Monday will try and get more. Though these where the ones I found last week not working. Maybe something to also prompt the community about to try and get wider hardware testing.

Pete Graner (pgraner) wrote :

I can have @leannogasawara put out a wide CFT with instructions on how to test, if there are any special test instructions I'd appreciate if @Jerone or @dtchen would post them here.

Jerone Young (jerone) wrote :

@Pete

Instructions to test & gather info.

1) Check sound preferences "Input" tab shows a "Connector" drop down box to allow you to switch the input for the card. If it does your working. If it does not move to step 2 to gather info on your card.

2) Grab info on sound codec from /proc/asound/card0/codec#0
      If that isn't their then /proc/asound/card0/codec97#0

3) Grab info from command "amixer scontrols"

Jerone Young (jerone) wrote :

Also to add here is an example of what you should see if things are working

Jerone Young (jerone) wrote :

Here is an example of things not working

David Chen (david.chen) wrote :
Download full text (8.5 KiB)

I see the same issue on one of the engineering sample systems:
==========================
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'PCM',0
Simple mixer control 'Front',0
Simple mixer control 'Front Mic',0
Simple mixer control 'Front Mic Boost',0
Simple mixer control 'Capture',0
Simple mixer control 'Beep',0
Simple mixer control 'Input Source',0
===========================
Codec: Realtek ALC269
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0269
Subsystem Id: 0x1028042b
Revision Id: 0x100004
No Modem Function Group found
Default PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Amp-Out caps: ofs=0x3f, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals: [0x39 0x39]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Amp-Out caps: ofs=0x3f, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals: [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x04 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x11, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals: [0x00 0x00]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x11, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals: [0x2e 0x2e]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x23
Node 0x09 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals: [0x92 0x92] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 5
     0x18 0x19 0x1a 0x1b 0x1d
Node 0x0c [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals: [0x00 0x00] [0x00 0x00]
  Connection: 2
     0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals: [0x00 0x00] [0x00 0x00]
  Connection: 2
     0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010a: Mono Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals: [0x00] [0x00]
  Connection: 2
     0x0c 0x0d
Node 0x0f [Vendor De...

Read more...

David Chen (david.chen) wrote :

Some updates on #27
I have found ALC272 shows the connector options.

David Chen (david.chen) wrote :

Tested Dell mini 9, using ALC268, Karmic 10/4/2009 daily build, connector option shows.

David Chen (david.chen) wrote :

CX20551 shows the connector option

Tried booting karmic live on Toshiba NB205, also using ALC272, but connector option does not show, please refer to the information below:
=====================
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'PCM',0
Simple mixer control 'Mic',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Default PCM',0
Simple mixer control 'Capture',0
Simple mixer control 'Beep',0
========================
Note: my another Dell engineering sample is also using ALC272, but connector option shows in that system.

Tim Gardner (timg-tpi) wrote :

I'm working on adding alsa-driver snapshots to Karmic LBM. This issue isn't gonna get fixed in the Karmic kernel because the regression potential is too high according tohttps://bugs.edge.launchpad.net/ubuntu/+source/pulseaudio/+bug/418617/comments/20.

Changed in linux (Ubuntu):
importance: Critical → Undecided
status: Triaged → Won't Fix
Changed in linux-backports-modules-2.6.31 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Jerone Young (jerone) wrote :

Trying out the latest alsa doesn't exactly fix the issue. Though I have been looking and it looks like the issue is with pulse audio. Reading this email:

https://tango.0pointer.de/pipermail/pulseaudio-discuss/2009-June/004229.html

Have a lot more understanding now. Looks like the issue is the pulse audio configuration. Some of the captures at the alsa level do not have the same name as those expected.

Seems the solution is to add the proper stanzas to the files. Though have not tried this just yet.

Changed in oem-priority:
assignee: Canonical Ubuntu QA Team (canonical-qa) → nobody
Brent Fox (brent-s-fox) wrote :

This may be a duplicate of LP #449781...

Jerone Young (jerone) wrote :

This issue is partically resolved by linux-backports-modules-alsa-karmic-generic or linux-backports-modules-alsa-karmic-generic-pae (depends on the kernel your using).

autosensing now work for the XPS 13, though still no way for you to manually choose. So once you plug in the headset. You can't manually choose to take input from the internal mic. You have to unplug the headset.

Jerone Young (jerone) on 2009-11-23
Changed in oem-priority:
status: New → Fix Released
Daniel T Chen (crimsun) wrote :

Just to note: the automic sensing is in the driver (jack event) layer, and PA can't easily override it if mixer controls aren't available. This is a somewhat intractable problem, because PA would need a more complete jack event system to override it /and/ mixer support from the driver. I don't see this being fixed before M+1 (11.04) at the earliest.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
summary: - Sound Prefrences applet does not offer a way for laptop users to use mic
- jack attached mic
+ Allow laptop users to use select mic
DavidYerger (dyerger) wrote :

I installed the backports package, now I can record (on my Dell Studio 1557, uses the IDT 92HD73C1X5 codec), but now I can't play back anything. Aarrgh.

DavidYerger (dyerger) wrote :

Disregard #41, apparently when I switched drivers the HDMI output got selected as the output device, I switched it back.

Now, for recording, there doesn't seem to be a manual way to control which mic is used, but automatic detection seems to work. If a mic is plugged in, the Digital Mic slider doesn't do anything, the Mic slider does. With the external mic unplugged, the Digital [mic] slider does something, the Mic slider doesn't. Which makes sense.

KAMI (kami911) wrote :

Is it impossible to select to right microphone source from GUI. This is not so user friendly.

Luke Yelavich (themuso) on 2016-09-20
Changed in pulseaudio (Ubuntu):
assignee: Luke Yelavich (themuso) → nobody
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 9.10 (karmic) reached end-of-life on April 30, 2011.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Please upgrade to the latest version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Changed in linux-backports-modules-2.6.31 (Ubuntu):
status: Triaged → Incomplete
Changed in linux (Ubuntu):
assignee: Tim Gardner (timg-tpi) → nobody
Daniel van Vugt (vanvugt) wrote :

Closed due to no response.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers