[pulseaudio-discuss] [alsa-devel] Internal Mics and Speakers not visible in PulseAudio

Raymond Yau superquad.vortex2 at gmail.com
Wed Jun 6 19:59:42 PDT 2012

David Henningsson <david.henningsson at canonical.com> 於 2012年6月1日星期五寫道:
> On 06/01/2012 04:54 AM, Raymond Yau wrote:
>> 2012/5/30 David Henningsson<david.henningsson at canonical.com>:
>>> On 05/30/2012 03:04 PM, Raymond Yau wrote:
>>>> I am afraid this does not work with desktop computer which has front
>>>> mic , internal mic, Line in ,CD (or stereo mix with those via hda
>>>> codecs)
>>>> With ubuntu 12.04 and unity ,  if I enable hda jack detect with my
>>>> ad198x on my desktop, sound  preference does not allow me to select
>>>> front mic since I am still using ac97 front panel (with no jack detect
>>>> circuit)
For those user with hda front audio panel, When the rear mic is unplugged,
pulse audio change the input to another sound card if there is no plugged
input jacks as pa don't regard cd or stereo mic as valid port of the input

When the rear mic is plugged before pulaseaudio start and it is the first
port of the input in the sound setting ,it change to the webcam mic(second
port) after the rear mic is unplugged.

So it won't autoselect when The user plugged the rear mic again. He have to
select the rear mic in sound setting, the rear mic is the last port in
sound setting.it will change to the mic1of another sound card(last port)

>> There are difference for the system settings/sound in unity and gnome
>> In gnome session, the system settings/sound list the three hardcoded
>> ports (front mic, line and rear mic) instead of all the items in the
>> "Input source" / "Capture Source" controls ( There is no CD in HDA,
>> and no CD , stereo mix, aux, phone for my other sound cards with ac97
>> codec)
>> Is there any way to add back "Stereo Mix" to pulseaudio 's port ?
> Yes. See:
> http://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles
> However if you have additional questions about how to write PulseAudio
profiles and paths I might not have the time to help you out with that,
hopefully you will be able to sort that out by yourself.

I have follows colin's tutorial compiling and running pulse audio from git.
Do i need to build the unity/gnome sound setting and what are the name of
the system setting sound in gnome and unity?

Although there is no aux in sound setting, select analog input in sound
setting will select the aux

Why changing the input port from rear mic to front mic also change the
value of rear mic boost and front mic boost at the same time ?

This  forbid multi streaming capture using two mic.

>> In unity session, the system settings/sound only list  the plugged jacks.
>> I think the usage of jack detect to select input source automatically
>> is broken for for those  motherboards which have three audio jacks in
>> rear panel and retask those pink and blue jacks for surround51 output.
>> The module-switch-on-available-port should check whether "Channel
>> mode' is 6 and exclude the result those jack detect of "rear mic" and
>> "line in" since they have been retasked for output
> Hmm. That would lead to quite hairy code in PulseAudio, I'm afraid...and
I don't think it's the right way to solve the problem either.
> I think we could go about this in different ways.
> 1) The easiest way is to say that if you're changing "Channel mode"
manually in alsamixer, you're on your own. After all, the normal/newbie end
user would not know about alsamixer at all, so if you're capable of
changing things in alsamixer you're assumed to be capable of configuring
PulseAudio's profiles (using the link above) to match that as well.
> 2) We could make a policy decision to remove the code that retasks the
jacks, and direct people to hda-jack-retask if they want to do that. That
would mean simpler code for everyone - however, with the recent addition of
multi-IO in the Realtek driver (for example), things doesn't seem to head
that way...
> 3) We could add both "Line Out Surround Jack" and "Rear Mic Jack". The
"Rear Mic Jack" would always return present=no when you're in 6-channel
surround retask mode, and "Line Out Surround Jack" would always return
present=no when you're in the normal mode.

It seem that is not possible to implement 3) in current implementation in

I prefer an module parameter of hda for disable the creation of jack detect
control since this force pa to fallback like the other sound cards which
have no jack detection

The behaviour of desktop users are different from notebook users
The desktop users are unlikely to plug/unplug the jacks at rear panel every
time. They rather connected all the necessary jacks of the rear audio panel

>> BTW, the ICH8 HDA controller support multi stream capturing and ad1988
>> has thee capture subdevices
>> arecord -l
>> card 1: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
>>   Subdevices: 3/3
>>   Subdevice #0: subdevice #0
>>   Subdevice #1: subdevice #1
>>   Subdevice #2: subdevice #2
> You would be able to make a multi-source profile in PulseAudio that can
record from all of these simultaneously, but we're missing a patch that can
control volumes and switches with indices, so you would have to control the
gain manually in alsamixer.
I don't think this work since when changing from rear mic to front mic,
pulseaudio also change the rear mic boost and front mic boost. Especially
when the pulse audio API does not allow application to select different
sink or source (I.e. Multi streaming playback/capture is not supported by
pulse audio)

The possible way is
1) an module parameter of hda driver to disable creation of jack detection
2) don't use module-switch-on-available-port in default.pa

Btw it seem sound is distorted when the application capture mono and the
sound card only support stereo is because pa just sum the left and right
channel (clipping)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20120607/294be78b/attachment.htm>

More information about the pulseaudio-discuss mailing list