<br><br>David Henningsson &lt;<a href="mailto:david.henningsson@canonical.com">david.henningsson@canonical.com</a>&gt; 於 2012年6月1日星期五寫道:<br>&gt; On 06/01/2012 04:54 AM, Raymond Yau wrote:<br>&gt;&gt;<br>&gt;&gt; 2012/5/30 David Henningsson&lt;<a href="mailto:david.henningsson@canonical.com">david.henningsson@canonical.com</a>&gt;:<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; On 05/30/2012 03:04 PM, Raymond Yau wrote:<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; I am afraid this does not work with desktop computer which has front<br>&gt;&gt;&gt;&gt; mic , internal mic, Line in ,CD (or stereo mix with those via hda<br>
&gt;&gt;&gt;&gt; codecs)<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; With ubuntu 12.04 and unity ,  if I enable hda jack detect with my<br>&gt;&gt;&gt;&gt; ad198x on my desktop, sound  preference does not allow me to select<br>
&gt;&gt;&gt;&gt; front mic since I am still using ac97 front panel (with no jack detect<br>&gt;&gt;&gt;&gt; circuit)<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;<br>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&#39;t regard cd or stereo mic as valid port of the input source.<br>
<br>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.<br><br>So it won&#39;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 <a href="http://setting.it">setting.it</a> will change to the mic1of another sound card(last port)<br>
<br><br>&gt;&gt; There are difference for the system settings/sound in unity and gnome<br>&gt;&gt;<br>&gt;&gt; In gnome session, the system settings/sound list the three hardcoded<br>&gt;&gt; ports (front mic, line and rear mic) instead of all the items in the<br>
&gt;&gt; &quot;Input source&quot; / &quot;Capture Source&quot; controls ( There is no CD in HDA,<br>&gt;&gt; and no CD , stereo mix, aux, phone for my other sound cards with ac97<br>&gt;&gt; codec)<br>&gt;&gt;<br>&gt;&gt; Is there any way to add back &quot;Stereo Mix&quot; to pulseaudio &#39;s port ?<br>
&gt;<br>&gt; Yes. See:<br>&gt;<br>&gt; <a href="http://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles">http://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles</a><br>&gt;<br>&gt; 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.<br>
<br>I have follows colin&#39;s tutorial compiling and running pulse audio from git.<br>Do i need to build the unity/gnome sound setting and what are the name of the system setting sound in gnome and unity?<br><br>Although there is no aux in sound setting, select analog input in sound setting will select the aux<br>
<br>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 ?<br><br>This  forbid multi streaming capture using two mic.<br><br>&gt;<br>&gt;&gt; In unity session, the system settings/sound only list  the plugged jacks.<br>
&gt;&gt;<br>&gt;&gt; I think the usage of jack detect to select input source automatically<br>&gt;&gt; is broken for for those  motherboards which have three audio jacks in<br>&gt;&gt; rear panel and retask those pink and blue jacks for surround51 output.<br>
&gt;&gt;<br>&gt;&gt; The module-switch-on-available-port should check whether &quot;Channel<br>&gt;&gt; mode&#39; is 6 and exclude the result those jack detect of &quot;rear mic&quot; and<br>&gt;&gt; &quot;line in&quot; since they have been retasked for output<br>
&gt;<br>&gt; Hmm. That would lead to quite hairy code in PulseAudio, I&#39;m afraid...and I don&#39;t think it&#39;s the right way to solve the problem either.<br>&gt;<br>&gt; I think we could go about this in different ways.<br>
&gt;<br>&gt; 1) The easiest way is to say that if you&#39;re changing &quot;Channel mode&quot; manually in alsamixer, you&#39;re on your own. After all, the normal/newbie end user would not know about alsamixer at all, so if you&#39;re capable of changing things in alsamixer you&#39;re assumed to be capable of configuring PulseAudio&#39;s profiles (using the link above) to match that as well.<br>
&gt;<br>&gt; 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&#39;t seem to head that way...<br>
&gt;<br>&gt; 3) We could add both &quot;Line Out Surround Jack&quot; and &quot;Rear Mic Jack&quot;. The &quot;Rear Mic Jack&quot; would always return present=no when you&#39;re in 6-channel surround retask mode, and &quot;Line Out Surround Jack&quot; would always return present=no when you&#39;re in the normal mode.<br>
&gt;<br><br><br>It seem that is not possible to implement 3) in current implementation in hda-jack.c<br><br>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<br>
<br>The behaviour of desktop users are different from notebook users<br>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<br>
<br>&gt;&gt; BTW, the ICH8 HDA controller support multi stream capturing and ad1988<br>&gt;&gt; has thee capture subdevices<br>&gt;&gt;<br>&gt;&gt; arecord -l<br>&gt;&gt; card 1: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]<br>
&gt;&gt;   Subdevices: 3/3<br>&gt;&gt;   Subdevice #0: subdevice #0<br>&gt;&gt;   Subdevice #1: subdevice #1<br>&gt;&gt;   Subdevice #2: subdevice #2<br>&gt;<br>&gt; You would be able to make a multi-source profile in PulseAudio that can record from all of these simultaneously, but we&#39;re missing a patch that can control volumes and switches with indices, so you would have to control the gain manually in alsamixer.<br>
&gt;<br>I don&#39;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)<br>
<br>The possible way is<br>1) an module parameter of hda driver to disable creation of jack detection controls<br>2) don&#39;t use module-switch-on-available-port in <a href="http://default.pa">default.pa</a><br><br>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)