[alsa-devel] [PATCH] ALSA: HDA: Add jack detection for HDMI

Stephen Warren swarren at nvidia.com
Tue May 24 23:00:13 CEST 2011

Takashi Iwai wrote at Monday, May 23, 2011 11:40 PM:
> diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
> index 74b0560..cd96b1d 100644
> --- a/sound/pci/hda/hda_eld.c
> +++ b/sound/pci/hda/hda_eld.c
> @@ -477,6 +477,8 @@ static void hdmi_print_eld_info(struct snd_info_entry
> *entry,
>  	snd_iprintf(buffer, "monitor_present\t\t%d\n", e->monitor_present);
>  	snd_iprintf(buffer, "eld_valid\t\t%d\n", e->eld_valid);
> +	if (!e->eld_valid)
> +		return;

Thinking about this more, that condition should be:

    if (!(eld->monitor_present && eld->eld_valid))

I think. Of course, graphics drivers shouldn't be setting ELDV without
PD, but best to be safe within ALSA.

As background, it looks like one of our codecs might be inverting the
PD bit (an issue different to the existing old_pin_detect WAR), which
ends up causing that combination.

Related, there are a few inconsistencies in the way patch_hdmi.c handles
ELD retrieval; hdmi_present_sense looks only at ELDV, whereas
hdmi_intrinsic_event looks at both PD and ELDV. I plan to make a patch
to solve that and the WAR for the NVIDIA HW PD handling above. I can
roll your change into that if you want.

>  	snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name);
>  	snd_iprintf(buffer, "connection_type\t\t%s\n",
>  				eld_connection_type_names[e->conn_type]);


More information about the Alsa-devel mailing list