port_array has been removed since
e740b019d7c6 ("xhci: xhci-hub: use new port structures to get port address instead of port array")
but this structure has been re-introduced from linux-stable
006f19b21100 ("xhci: Fix perceived dead host due to runtime suspend race with event handler")
So replace it by new array.
We apply the codec resume forcibly at system resume callback for
updating and syncing the jack detection state that may have changed
during sleeping. This is, however, superfluous for the codec like
Intel HDMI/DP, where the jack detection is managed via the audio
component notification; i.e. the jack state change shall be reported
sooner or later from the graphics side at mode change.
This patch changes the codec resume callback to avoid the forcible
resume conditionally with a new flag, codec->relaxed_resume, for
reducing the resume time. The flag is set in the codec probe.
Although this doesn't fix the entire bug mentioned in the bugzilla
entry below, it's still a good optimization and some improvements are
seen.
Make codec enter D3 before rebooting or poweroff can fix the noise
issue on some laptops. And in theory it is harmless for all codecs
to enter D3 before rebooting or poweroff, let us add a generic
reboot_notify, then realtek and conexant drivers can call this
function.
Cc: <email address hidden>
Signed-off-by: Hui Wang <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
(cherry picked from commit 871b9066027702e6e6589da0e1edd3b7dede7205
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git)
Signed-off-by: Hui Wang <email address hidden>
We have 3 new lenovo laptops which have conexant codec 0x14f11f86,
these 3 laptops also have the noise issue when rebooting, after
letting the codec enter D3 before rebooting or poweroff, the noise
disappers.
Instead of adding a new ID again in the reboot_notify(), let us make
this function apply to all conexant codec. In theory make codec enter
D3 before rebooting or poweroff is harmless, and I tested this change
on a couple of other Lenovo laptops which have different conexant
codecs, there is no side effect so far.
Cc: <email address hidden>
Signed-off-by: Hui Wang <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
(cherry picked from commit 401714d9534aad8c24196b32600da683116bbe09
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git)
Signed-off-by: Hui Wang <email address hidden>