All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Stephen Warren <swarren@nvidia.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	David Henningsson <david.henningsson@canonical.com>
Subject: Re: [PATCH] ALSA: HDA: Add jack detection for HDMI
Date: Tue, 24 May 2011 07:39:43 +0200	[thread overview]
Message-ID: <s5hr57o4py8.wl%tiwai@suse.de> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF0498A480B7@HQMAIL01.nvidia.com>

At Mon, 23 May 2011 14:49:15 -0700,
Stephen Warren wrote:
> 
> Takashi Iwai wrote at Thursday, May 19, 2011 4:06 AM:
> > At Thu, 19 May 2011 11:55:21 +0200,
> > David Henningsson wrote:
> > >
> > > On 2011-05-17 17:46, Takashi Iwai wrote:
> > > > At Tue, 17 May 2011 15:46:43 +0200,
> > > > David Henningsson wrote:
> > > >>
> > > >> Just as for headphones and microphone jacks, this patch adds reporting
> > > >> of HDMI jack status through the input layer.
> > > >>
> >...
> > 
> > OK, as the jack report itself doesn't play a big role yet so far for
> > HD-audio, let's get it in, and give pressure to graphics guys :)
> 
> I've been testing a preliminary fix for this internally. I found that
> the /proc ELD files correctly report monitor_present and eld_valid when
> we hot unplug a monitor, but the other fields in the ELD file are not
> cleared out to their default state. As best I can tell, this is an ALSA
> driver issue, since our display driver only fills in the other fields
> when ELDV==1.

Then it's just showing stale data.  The eld fields are updated only
when the data is valid.  The patch below should fix the confusion.


thanks,

Takashi

---
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;
 	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]);

  reply	other threads:[~2011-05-24  5:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 13:46 [PATCH] ALSA: HDA: Add jack detection for HDMI David Henningsson
2011-05-17 15:46 ` Takashi Iwai
2011-05-19  9:55   ` David Henningsson
2011-05-19 10:06     ` Takashi Iwai
2011-05-19 10:24       ` Setting invalid samplerate Torsten Schenk
2011-05-19 10:32         ` Torsten Schenk
2011-05-19 10:55         ` Clemens Ladisch
2011-05-19 11:28           ` Torsten Schenk
2011-05-19 11:36             ` Daniel Mack
2011-05-23 21:49       ` [PATCH] ALSA: HDA: Add jack detection for HDMI Stephen Warren
2011-05-24  5:39         ` Takashi Iwai [this message]
2011-05-24 17:27           ` Stephen Warren
2011-05-24 18:09             ` Takashi Iwai
2011-05-24 19:18               ` Stephen Warren
2011-05-24 21:00           ` Stephen Warren
2011-05-19 16:57     ` Stephen Warren
2011-05-19 22:45       ` David Henningsson
2011-05-19 22:51         ` Stephen Warren
2011-06-09 20:59           ` Stephen Warren
2011-05-17 16:00 ` Stephen Warren
2011-05-17 16:08   ` Takashi Iwai
2011-05-17 17:09     ` pl bossart
2011-05-17 17:31       ` Takashi Iwai
2011-05-17 20:51         ` pl bossart
2011-05-17 21:42           ` Stephen Warren
2011-05-17 22:11             ` pl bossart
2011-05-17 23:14               ` Stephen Warren
2011-05-18 15:43         ` pl bossart
2011-05-18 15:49           ` Takashi Iwai
2011-05-18 10:02 ` Takashi Iwai
2011-05-20 21:59 ` Stephen Warren
2011-05-21  6:25   ` David Henningsson
2011-05-21  7:37     ` Takashi Iwai
2011-05-23 15:29     ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hr57o4py8.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.