diff options
author | David Henningsson <david.henningsson@canonical.com> | 2013-12-18 04:46:04 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-12-18 06:40:45 -0500 |
commit | da4a7a3926d09c13ae052ede67feb7285e01e3f5 (patch) | |
tree | 191c7ac5aa619a2f658fa55192d334ad1bc81eeb /sound/pci | |
parent | f0e9c08065dc31210fc4cf313c4ecaa088187dc5 (diff) |
ALSA: hda - Explicitly keep codec powered up in hdmi_present_sense
This should help us avoid the following mutex deadlock:
[] mutex_lock+0x2a/0x50
[] hdmi_present_sense+0x53/0x3a0 [snd_hda_codec_hdmi]
[] generic_hdmi_resume+0x5a/0x70 [snd_hda_codec_hdmi]
[] hda_call_codec_resume+0xec/0x1d0 [snd_hda_codec]
[] snd_hda_power_save+0x1e4/0x280 [snd_hda_codec]
[] codec_exec_verb+0x5f/0x290 [snd_hda_codec]
[] snd_hda_codec_read+0x5b/0x90 [snd_hda_codec]
[] snd_hdmi_get_eld_size+0x1e/0x20 [snd_hda_codec_hdmi]
[] snd_hdmi_get_eld+0x2c/0xd0 [snd_hda_codec_hdmi]
[] hdmi_present_sense+0x9a/0x3a0 [snd_hda_codec_hdmi]
[] hdmi_repoll_eld+0x34/0x50 [snd_hda_codec_hdmi]
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index f5060fc7c303..977db17db26c 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1496,11 +1496,14 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) | |||
1496 | * specification worked this way. Hence, we just ignore the data in | 1496 | * specification worked this way. Hence, we just ignore the data in |
1497 | * the unsolicited response to avoid custom WARs. | 1497 | * the unsolicited response to avoid custom WARs. |
1498 | */ | 1498 | */ |
1499 | int present = snd_hda_pin_sense(codec, pin_nid); | 1499 | int present; |
1500 | bool update_eld = false; | 1500 | bool update_eld = false; |
1501 | bool eld_changed = false; | 1501 | bool eld_changed = false; |
1502 | bool ret; | 1502 | bool ret; |
1503 | 1503 | ||
1504 | snd_hda_power_up(codec); | ||
1505 | present = snd_hda_pin_sense(codec, pin_nid); | ||
1506 | |||
1504 | mutex_lock(&per_pin->lock); | 1507 | mutex_lock(&per_pin->lock); |
1505 | pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE); | 1508 | pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE); |
1506 | if (pin_eld->monitor_present) | 1509 | if (pin_eld->monitor_present) |
@@ -1573,6 +1576,7 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) | |||
1573 | jack->block_report = !ret; | 1576 | jack->block_report = !ret; |
1574 | 1577 | ||
1575 | mutex_unlock(&per_pin->lock); | 1578 | mutex_unlock(&per_pin->lock); |
1579 | snd_hda_power_down(codec); | ||
1576 | return ret; | 1580 | return ret; |
1577 | } | 1581 | } |
1578 | 1582 | ||