~vicamo/+git/ubuntu-kernel:bug-1855244/backport-asound-patches/oem-osp1

Last commit made on 2020-02-05
Get this branch:
git clone -b bug-1855244/backport-asound-patches/oem-osp1 https://git.launchpad.net/~vicamo/+git/ubuntu-kernel
Only You-Sheng Yang can upload to this branch. If you are You-Sheng Yang please log in for upload directions.

Branch merges

Branch information

Name:
bug-1855244/backport-asound-patches/oem-osp1
Repository:
lp:~vicamo/+git/ubuntu-kernel

Recent commits

651e8e7... by You-Sheng Yang

Bug 1855244: backport patches to 18.04 OEM kernel

093352b... by Takashi Iwai

ALSA: hda - Allow runtime PM for controller if component notifier is used

Currently we disallow the runtime PM of the HD-audio controller if
it's bound with HDMI/DP on Nvidia / AMD unless it's for dGPU. This is
for keeping the link up to get the proper notification for ELD
hotplug.

As explained in the commit 37a3a98ef601 ("ALSA: hda - Enable runtime
PM only for discrete GPU"), this keep-power-up behavior is rather a
stop-gap solution until the ELD notification via audio component.
And now we finally got the audio component for these graphics drivers
via commit ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for
AMD/ATI and Nvidia HDMI"), so it's time to change.

This patch makes HD-audio controller again runtime-suspendable when
the device gets bound with audio component in HDMI codec driver. For
making it easier to access from the codec driver, move the flag into
the common hda_bus object instead of hda_intel flag. Also rename it
to keep_power, to indicate the actual meaning.

Signed-off-by: Takashi Iwai <email address hidden>
(backported from commit dd23e1d566d0f74aa3b68ab3237927bb15f0e644)
Signed-off-by: You-Sheng Yang <email address hidden>

b6c0bb7... by Takashi Iwai

ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI

AMD/ATI and Nvidia HDMI codec drivers didn't have the audio component
binding like i915, but it worked only with the traditional HD-audio
unsolicited event for the HDMI hotplug detection and the ELD read-up
thereafter. This has been a problem in many ways: first of all, it
goes through the hardware event transition (from GPU register write,
HD-audio controller trigger, and finally to HD-audio unsolicited event
handling), which is often unreliable and may miss some opportunities.
Second, each unsol event handling and ELD read-up need the explicit
power up / down when the codec is in the runtime suspend. Last but
not least, which is the most important, the hotplug wakeup may be
missed when the HD-audio controller is in runtime suspend. Especially
the last point is a big problem due to the recent change relevant with
vga_switcheroo that forcibly enables the runtime PM for AMD HDMI
controllers.

These issues are solved by introducing the audio component; the
hotplug notification is done by a direct function callback, which is
more accurate and reliable, and it can be processed without the actual
hardware access, i.e. no runtime PM trigger is needed, and the
HD-audio gets the event even if it's in runtime suspend. The same for
ELD query, as it's read directly from the cached ELD bytes stored in
the DRM driver, hence the whole hardware access can be skipped.

So here it is: this patch implements the audio component binding with
AMD/ATI and Nouveau DRM drivers. The biggest difference from i915
implementation is that this binding is fully optional and it can be
enabled asynchronously on the fly. That is, the driver will switch
from the HD-audio unsolicited event to the notify callback once when
the DRM component gets bound. Similarly, when DRM driver gets
unloaded, the HDMI event handling returns to the legacy mode, too.

Also, another difference from i915 is that the new code registers the
component in the codec driver, while i915 HDMI codec assumes the
component binding was already done in the HD-audio controller driver.
Hence the new code does need to de-register the component binding at
the codec exit, too.

Some other details:
- The match component ops assumes that both VGA and HD-audio
  controller PCI entries belong to the same PCI bus, and only accepts
  such an entry.

- The pin2port audio_ops is implemented with assumption of the fixed
  widget layout. For AMD, it's starting from 3, with step 2 (3, 5, 7,
  ...), while for Nvidia, it's starting from 4, with step 1 (4, 5, 6,
  ...)

As of this patch, the corresponding component isn't implemented in DRM
side, so this change alone won't give any benefit. By the following
changes in DRM sides, the mission will be completed.

Signed-off-by: Takashi Iwai <email address hidden>
(backported from commit ade49db337a9d44ac5835cfce1ee873549011b27)
Signed-off-by: You-Sheng Yang <email address hidden>

cae56e0... by Takashi Iwai

ALSA: hda/hdmi - Don't report spurious jack state changes

The HDMI jack handling reports the state change always via
snd_jack_report() whenever hdmi_present_sense() is called, even if the
state itself doesn't change from the previous time. This is mostly
harmless but still a bit confusing to user-space.

This patch reduces such spurious jack state changes and reports only
when the state really changed. Also, as a minor optimization, avoid
overwriting the pin ELD data when the state is identical.

Reviewed-by: Kai Vehmanen <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
(cherry picked from commit 551626ec0ad28dc43cae3094c35be7088cc625ab)
Signed-off-by: You-Sheng Yang <email address hidden>

fe4a2c1... by Jaroslav Kysela <email address hidden>

ALSA: hda/hdmi - consider eld_valid also in sync_eld_via_acomp()

In the commit 7f641e26a6df9269cb25dd7a4b0a91d6586ed441 (ALSA: hda/hdmi
- Consider eld_valid when reporting jack event) the eld_valid check was
added for the jack event reports. Do the same in sync_eld_via_acomp()
function. Apparently, it is required for the NVIDIA proprietary driver
(monitor presence reported first, but ELD is available later).

Signed-off-by: Jaroslav Kysela <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
(cherry picked from commit 855b5e01c0732d66c306cdd5215c3337e5311899)
Signed-off-by: You-Sheng Yang <email address hidden>

756edf5... by Timo Aaltonen

UBUNTU: Ubuntu-oem-osp1-5.0.0-1037.42

Signed-off-by: Timo Aaltonen <email address hidden>

a6b1872... by Timo Aaltonen

UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1860784
Properties: no-test-build
Signed-off-by: Timo Aaltonen <email address hidden>

aa149ee... by Timo Aaltonen

Revert "ASoC: SOF: Intel: hda: use fallback for firmware name"

BugLink: https://bugs.launchpad.net/bugs/1860642

This reverts commit f011b2891df4a6141231f21606adbf646cf60fea which
regressed shipping hardware.

Signed-off-by: Timo Aaltonen <email address hidden>

230de1f... by Timo Aaltonen

Revert "ASoC: Intel: acpi-match: split CNL tables in three"

BugLink: https://bugs.launchpad.net/bugs/1860642

This reverts commit 4173dae93d21fe2b8cf8b2fe816bcc8820dd7103 which
regressed shipping hardware.

Signed-off-by: Timo Aaltonen <email address hidden>

e4a25c4... by Timo Aaltonen

Revert "ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names."

BugLink: https://bugs.launchpad.net/bugs/1860642

This reverts commit bf34b3c1a8f63ebdf11a7133b9706e1cbedda092 which
regressed shipping hardware.

Signed-off-by: Timo Aaltonen <email address hidden>