Thanks Colin and Spidey for making this clarification.<br><br>So regarding JACK detection and routing:<br><br>
1. module-udev-detect currently can detect JACK physical hot-plugging
but it can't decode the information about what type of JACK device (
input or output ) is connected to the sound-card, and for that one need
to write an JACK detection module to handle that. <br>
is my understanding correct ?<br>
<br>
2 Currently our Kernel/ALSA team support for providing seperate
kcontrol (amixer scripts) for enabling/disabling loudspeaker and headset
to PA, so it might be an good idea to handle Jack detection and routing
in one of the existing module or write up an new jack detection module
for this, as Colin suggested, provided that we are able to recognize
Jack device type (input/mic or output/headset or both) from point 1, ( i will take further help from kernel team here about detecting jack device type, but any suggestions are welcome :-) )<br>
<br>
BR\\<br>
Himanshu<br>
<br>
<br><br>On Wed, Jul 20, 2011 at 7:11 PM, Spidey / Claudio <span dir="ltr"><<a href="mailto:spideybr@gmail.com">spideybr@gmail.com</a>></span> wrote:<br>The udev module in PA also detects your coldplugged hardware, it's just a hardware detection layer. It handles hotplugging too.<br>
The difference between an USB headset and a p2 (conventional)
headphone/headset is that the USB one is detected by the computer (not
only by linux/pa/alsa) as a complete new sound card. This new sound card
has one input and one output only, both hard-wired to the headphone and
microphone in the headset.<br>
Jack detection acts like udev hotplug manager, but for physical
connections: the sound board is there already, jack is just "something"
that watches sound card connection impedances, and switches it's working
mode (input or output) depending on what is connected. So PA udev
module can't decode that information, PA needs a Jack module to handle
that.<br>
<br>______________________________<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">_________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a></blockquote><div><br> </div><br><div class="gmail_quote">On Tue, Jul 19, 2011 at 2:10 PM, Colin Guthrie <span dir="ltr"><<a href="mailto:gmane@colin.guthr.ie">gmane@colin.guthr.ie</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">'Twas brillig, and Himanshu Chug at 19/07/11 07:14 did gyre and gimble:<br>
<div class="im">> Hi Colin,<br>
> Thanks for the useful information, good to know this information.<br>
> and after discussion with our kernel team here I come to know that they<br>
> can handle the JACK detection and route audio internally at ALSA level<br>
> (like in ubuntu10.10) and also they can exposed few mixer scripts to PA<br>
> to externally route the data over headset and loudspeaker if needed.<br>
<br>
</div>At present, if (and not all harware/drivers do this) alsa provides<br>
separate kcontrols for Headphones vs. Speakers, PA should detect this<br>
and offer different "ports" on the alsa sink itself. These ports have to<br>
be manually selected just now (tho' it would be easy enough for you to<br>
hack up a module to flip them if you do your own Jack detection).<br>
<br>
This allows PA to use the correct kcontrol for the current volume<br>
situation and thus also use optimum power.<br>
<div class="im"><br>
> few more clarification :<br>
> - if not jack detection, then what module-udev-detect is montior for ?<br>
> or in other words what is the functionality of module-udev-detect?<br>
<br>
</div>udev detects new sound cards. The term headset used in your title, I<br>
interpreted to be USB Headsets... (normally I would expect jack<br>
detection to be triggered by headphones (subtly different to headsets!).<br>
This is just a quirk of English where I'm a perhaps jumping to<br>
conclusions (the words are not incorrect - gotta love the langauage!)<br>
<br>
Anyway, yeah, it will detect if the user plugs in e.g. new USB Speakers,<br>
or similar.<br>
<div class="im"><br>
> - what will happen in case of USB headset plug-in/out, will that be<br>
> appear as a new sink ? or USB detection is also same as jack detection ?<br>
<br>
</div>USB is quite different to Headphone Jack detection. USB devices do<br>
indeed appear as new sinks and this is done by udev-detect, whereas a<br>
Headphone Jack will (when all the support is added in the various<br>
layers) will just change an existing sink - USB can be used at the same<br>
time as internal device, but the speakers and the headphones cannot be<br>
used at the same time, one overrides the other (this is not strictly<br>
true but the principle and model is more or less true). So that's why<br>
Jack detection is different to USB.<br>
<div class="im"><br>
> - what to trigger to PA to appear/show a new sink (pacmd list-sink)? I<br>
> am trying to understand the "sink" definition in terms of PA ?<br>
<br>
</div>Sink is an output device. In the case of headphones it's typically the<br>
same device you are accessing. You'll just access it in one of two<br>
modes... either speakers or headphones. That's where ports come in. They<br>
allow you to change the operating mode of the sink.<br>
<br>
HTHs<br>
<div><div></div><div class="h5"><br>
Col<br>
<br>
--<br>
<br>
Colin Guthrie<br>
gmane(at)<a href="http://colin.guthr.ie" target="_blank">colin.guthr.ie</a><br>
<a href="http://colin.guthr.ie/" target="_blank">http://colin.guthr.ie/</a><br>
<br>
Day Job:<br>
Tribalogic Limited [<a href="http://www.tribalogic.net/" target="_blank">http://www.tribalogic.net/</a>]<br>
Open Source:<br>
Mageia Contributor [<a href="http://www.mageia.org/" target="_blank">http://www.mageia.org/</a>]<br>
PulseAudio Hacker [<a href="http://www.pulseaudio.org/" target="_blank">http://www.pulseaudio.org/</a>]<br>
Trac Hacker [<a href="http://trac.edgewall.org/" target="_blank">http://trac.edgewall.org/</a>]<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</div></div></blockquote></div><br>