linux-stable/sound
Hui Wang 7f641e26a6 ALSA: hda/hdmi - Consider eld_valid when reporting jack event
On the machines with AMD GPU or Nvidia GPU, we often meet this issue:
after s3, there are 4 HDMI/DP audio devices in the gnome-sound-setting
even there is no any monitors plugged.

When this problem happens, we check the /proc/asound/cardX/eld#N.M, we
will find the monitor_present=1, eld_valid=0.

The root cause is BIOS or GPU driver makes the PRESENCE valid even no
monitor plugged, and of course the driver will not get the valid
eld_data subsequently.

In this situation, we should not report the jack_plugged event, to do
so, let us change the function hdmi_present_sense_via_verbs(). In this
function, it reads the pin_sense via snd_hda_pin_sense(), after
calling this function, the jack_dirty is 0, and before exiting
via_verbs(), we change the shadow pin_sense according to both
monitor_present and eld_valid, then in the snd_hda_jack_report_sync(),
since the jack_dirty is still 0, it will report jack event according
to this modified shadow pin_sense.

After this change, the driver will not report Jack_is_plugged event
through hdmi_present_sense_via_verbs() if monitor_present is 1 and
eld_valid is 0.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-06 16:29:10 +02:00
..
ac97 ALSA: ac97: Fix of-node refcount unbalance 2019-02-19 22:20:14 +01:00
aoa ALSA: aoa: Fix of-node refcount unbalance 2019-02-19 22:20:45 +01:00
arm ALSA: arm: Avoid passing NULL to memory allocators 2019-02-04 16:51:46 +01:00
atmel ALSA: atmel: Drop superfluous PCM preallocation error checks 2019-02-06 10:28:39 +01:00
core Merge branch 'for-linus' into for-next 2019-05-06 15:07:57 +02:00
drivers ALSA: aloop: Support S24 sample formats 2019-03-25 16:39:18 +01:00
firewire ALSA: firewire-lib: use 8 byte header for IR context to get isochronous cycle 2019-03-18 14:50:35 +01:00
hda ALSA: hda: Initialize ext-bus-specific fields in snd_hdac_bus_init(), too 2019-04-13 10:10:26 +02:00
i2c ALSA: i2c: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
isa ALSA: gus: fix misuse of %x 2019-04-28 08:25:18 +02:00
mips ALSA: mips: pass struct device to DMA API functions 2019-02-01 17:15:44 +01:00
oss
parisc ALSA: parisc: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:03 +01:00
pci ALSA: hda/hdmi - Consider eld_valid when reporting jack event 2019-05-06 16:29:10 +02:00
pcmcia ALSA: pcmcia: Clean up with new procfs helpers 2019-02-06 18:11:57 +01:00
ppc ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index' 2019-04-17 21:17:54 +02:00
sh ALSA: sh: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:24 +01:00
soc ASoC: Updates for v5.2 2019-05-06 16:14:34 +02:00
sparc ASoC: Updates for v5.1 2019-02-08 14:20:32 +01:00
spi ALSA: spi: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:36 +01:00
synth ALSA: synth: emux: soundfont.c: divide by zero in calc_gus_envelope_time() 2019-05-06 15:08:08 +02:00
usb Merge branch 'for-linus' into for-next 2019-05-06 15:07:57 +02:00
x86 ALSA: x86: Avoid passing NULL to memory allocators 2019-02-04 16:51:34 +01:00
xen ALSA: xen-front: Do not use stream buffer size before it is set 2019-04-04 14:44:18 +02:00
ac97_bus.c
Kconfig
last.c ALSA: core: Don't refer to snd_cards array directly 2019-04-17 07:16:15 +02:00
Makefile
sound_core.c