Hi Takashi,
Check the value output by
hda-verb /dev/snd/hwC0D0 0x10 SET_PIN_SENSE 0 hda-verb /dev/snd/hwC0D0 0x10 GET_PIN_SENSE 0
before and after plugging the headphone. Normally, the second line should show 0x80000000 after plugging the jack.
Doesn't look like it:
ian@button~ [i]> sudo hda-verb /dev/snd/hwC0D0 0x10 SET_PIN_SENSE 0 nid = 0x10, verb = 0x709, param = 0x0 value = 0x0 ian@button~ [i]> sudo hda-verb /dev/snd/hwC0D0 0x10 GET_PIN_SENSE 0 nid = 0x10, verb = 0xf09, param = 0x0 value = 0x0
<plug in headphones>
ian@button~ [i]> sudo hda-verb /dev/snd/hwC0D0 0x10 SET_PIN_SENSE 0 nid = 0x10, verb = 0x709, param = 0x0 value = 0x0 ian@button~ [i]> sudo hda-verb /dev/snd/hwC0D0 0x10 GET_PIN_SENSE 0 nid = 0x10, verb = 0xf09, param = 0x0 value = 0x0
If it shows only zero for both plug/unplug, either the headphone pin assignment is wrong or the jack detection is broken. In the former case, you can check by adjusting the headphone volume or mute mixer control and see whether it really happens on the machine.
I can confirm that adjusting the headphone volume & mute with alsamixer does correctly adjust the headphone volume, so I guess the jack detection isn't working.
It seems that pulseaudio was doing some funny things with the mute controls (muting any one of headphones, speakers & master would mute all three & all would have to be individually unmuted before getting sound again - I guess pulseaudio doesn't expect anyone to adjust the sound card mixer directly while it is running), so I temporarily uninstalled it again for this test.
One other weird thing I noticed while testing this is that setting the volume to 0% and/or muting does the controls does not seem to completely mute the sound - it is just really quiet (quiet enough not to be an issue for me). Some observations:
__Speakers__ Master: Mute AND/OR Speakers: Mute --> Speakers are muted.
Master: 0% AND Speakers: 0% --> Sound still comes from speakers, but is very quiet.
Master: 0% --> speaker control affects volume.
__Headphones__ Master: 0% AND/OR Headphones: 0% --> Sound still comes from headphones at low volume (if either control is 0%, the volume of the other control has no effect - both have to be non-zero to raise the volume).
Master: Mute AND/OR Headphones: Mute --> Sound still comes from headphones, though is fairly quiet (much lower than 0%).
Cheers, -Ian