On 2014-09-19 00:29, Deucher, Alexander wrote:
Well, if jack detection (get pin sense) works, there is.
Does it react if we turn off the HDMI output via xrandr, too? I'm not sure whether we need reprogram things in that case, though...
xrandr correctly reports that "HDMI-0" is disconnected.
I'm not sure how to turn the HDMI output via xrandr, but I tried "xrandr --output HDMI-0 --off" and it made no difference in either xrandr output, nor in codec/eld output.
What I'm thinking is that it could be that the monitor_present is indicating the presence of my DVI monitor, as some cards are capable of outputting HDMI audio on their DVI outputs (through a passive DVI->HDMI adapter). This is just a guess though.
I'm not that familiar with the audio side, but on there are registers on the gpu side that will change what is reported to the audio side as far as I can tell. You might try the new hdmi patches I sent out today: http://lists.freedesktop.org/archives/dri-devel/2014-September/068544.html patch 5/5 is probably the most relevant for this discussion. It explicitly clears the audio enable bit when the display is disabled which should cascade down to the audio side if I understand correctly. If not, I think playing with the AZ_HOT_PLUG_CONTROL registers in that patch set can probably sort it out.
Thanks for the attention and the patches!
I compiled a 3.17-rc4 kernel plus the five patches. (I usually run the Ubuntu 3.13 kernel).
With this I saw that the jack reported "unplugged" when booting without an HDMI monitor, and that when the HDMI monitor was connected and got video output, the jack was now reported to be plugged in. However, when I unplugged the monitor, the jack was still reported to be plugged in.
I also tried running a get_pin_sense verb manually and it still reported to be plugged in.
Also, I think it was the third time I plugged the monitor in, I got some type of GPU hang (see attached log). It never recovered by itself so I had to use SysRq to reboot the computer.
I'm just not familiar enough with the azalia hw to know exactly how it's supposed to interact with the audio side.
Well, feel free to ask questions if you think we can answer them :-)
The bits that say PIN*_JACK_DETECTION_ENABLE and PIN*_UNSOLICITED_RESPONSE_ENABLE sounds like things that should be turned on all the time so we can properly get unsol jack detection events when the monitor is plugged or unplugged. Unless the PIN*_JACK_DETECTION_ENABLE actually represents the current state rather than the detection capability. But that's just guesses, as I assume the specs are not released?