[alsa-devel] hda-jack-sense-test (was: Sound issues with ALC269VB-based hardware)

David Henningsson david.henningsson at canonical.com
Tue Jul 17 17:20:27 CEST 2012

On 07/17/2012 05:05 PM, Takashi Iwai wrote:
> Usually the device has a jack detection mechanism, and you can check
> it via hda-verb or whatever.  Plug your headphone to the headphone
> jack, and check any of the pin reacts to GET_PIN_SENSE verb (call it
> after setting SET_PIN_SENSE verb).  For example,
> 	% hda-verb /dev/snd/hwC0D0 0x21 SET_PIN_SENSE 1

How many codecs really require SET_PIN_SENSE? I have never had a problem 
with omitting the SET_PIN_SENSE command.

> 	% hda-verb /dev/snd/hwC0D0 0x21 GET_PIN_SENSE 0
> Check the value returned from GET_PIN_SENSE.  If bit 31 (0x80000000)
> is set, this is likely the pin of the interest.
> Check this for all pins, i.e. between 0x12 and 0x21.  Some nodes are
> no pins, but it doesn't matter much.

Btw, I made convenience script for doing this a year ago. Here it is again.

To install, you put it right next to the hda-analyzer py files, as it 
makes use of hda_codec.py from hda-analyzer, then run "sudo 
hda-jack-sense-test.py -a" (see -h for switches to set codec and card 

Let me know if you're interested in having this small script in ALSA 
upstream, and if so, what I should do to get it in there.

David Henningsson, Canonical Ltd.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hda-jack-sense-test.py
Type: text/x-python
Size: 1968 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120717/a11c551b/attachment.py>

More information about the Alsa-devel mailing list