aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2013-11-07 07:38:25 -0500
committerTakashi Iwai <tiwai@suse.de>2013-11-07 08:03:33 -0500
commit464837a7bc0a3495e3490e3bf85099bb2300efbd (patch)
tree0d4aba6b3260f50112cd58fb9534013e82775d84 /sound/pci/hda
parent0f568959de1c90be3f9ec51c271a40d7583f5809 (diff)
ALSA: hda - block HDMI jack reports while repolling
This fixes a race condition in case several monitors are being repolled in parallel. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_hdmi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index ce412d1a15d0..a96403a828af 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1477,6 +1477,7 @@ static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx)
1477 1477
1478static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) 1478static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
1479{ 1479{
1480 struct hda_jack_tbl *jack;
1480 struct hda_codec *codec = per_pin->codec; 1481 struct hda_codec *codec = per_pin->codec;
1481 struct hdmi_spec *spec = codec->spec; 1482 struct hdmi_spec *spec = codec->spec;
1482 struct hdmi_eld *eld = &spec->temp_eld; 1483 struct hdmi_eld *eld = &spec->temp_eld;
@@ -1564,6 +1565,11 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
1564 ret = true; /* AMD codecs create ELD by itself */ 1565 ret = true; /* AMD codecs create ELD by itself */
1565 else 1566 else
1566 ret = !repoll || !pin_eld->monitor_present || pin_eld->eld_valid; 1567 ret = !repoll || !pin_eld->monitor_present || pin_eld->eld_valid;
1568
1569 jack = snd_hda_jack_tbl_get(codec, pin_nid);
1570 if (jack)
1571 jack->block_report = !ret;
1572
1567 mutex_unlock(&per_pin->lock); 1573 mutex_unlock(&per_pin->lock);
1568 return ret; 1574 return ret;
1569} 1575}