alsa/sof: All audio jacks can't detect hotplug when only codec is suspended

Bug #1950540 reported by Hui Wang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Critical
Hui Wang
linux (Ubuntu)
Fix Released
High
Hui Wang
Focal
Invalid
Undecided
Unassigned
Impish
Won't Fix
High
Unassigned
Jammy
Fix Released
High
Hui Wang
linux-oem-5.13 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
High
Unassigned
Impish
Invalid
Undecided
Unassigned
Jammy
Invalid
Undecided
Unassigned
linux-oem-5.14 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
High
Unassigned
Impish
Invalid
Undecided
Unassigned
Jammy
Invalid
Undecided
Unassigned

Bug Description

[Impact]
If the codec is in rt_suspend while the controller is in rt_resume,
all audio jacks can't detect hotplug.

[Fix]
Backport a upstream patch, this will enable WAKEEN in the period
between codec suspend and controller suspend.

[Test]
Booting the patched kernel, add snd_sof_pci.sof_pci_debug=0x1 in
the bootargs, plug the headset to the audio jacks, the system
could detect the plug in or plug out.

[Where problems could occur]
The patch enable the WAKEEN after codec is in rt_suspend, this
could affect the audio jack hotplug detection, if it introduces
regression, it will be on the audio jack detection, but this
possibility is very low, we already verified this patch on
many machines.

CVE References

Hui Wang (hui.wang)
tags: added: oem-priority originate-from-1946720 sutton
Changed in linux (Ubuntu Focal):
status: New → Invalid
Changed in linux-oem-5.13 (Ubuntu Impish):
status: New → Invalid
Changed in linux-oem-5.13 (Ubuntu Jammy):
status: New → Invalid
Changed in linux-oem-5.14 (Ubuntu Impish):
status: New → Invalid
Changed in linux-oem-5.14 (Ubuntu Jammy):
status: New → Invalid
Changed in linux-oem-5.13 (Ubuntu Focal):
status: New → In Progress
Changed in linux-oem-5.14 (Ubuntu Focal):
importance: Undecided → High
status: New → In Progress
Changed in linux-oem-5.13 (Ubuntu Focal):
importance: Undecided → High
Changed in linux (Ubuntu Impish):
importance: Undecided → High
status: New → In Progress
Changed in linux (Ubuntu Jammy):
importance: Undecided → High
status: New → In Progress
summary: - alsa/sof: All audio jack can't detect hotplug when only codec is
+ alsa/sof: All audio jacks can't detect hotplug when only codec is
suspended
Hui Wang (hui.wang)
description: updated
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.13 (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-oem-5.13/5.13.0-1020.24 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Revision history for this message
Hui Wang (hui.wang) wrote :

Verification done for oem-5.13 kernel.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (48.0 KiB)

This bug was fixed in the package linux-oem-5.13 - 5.13.0-1020.24

---------------
linux-oem-5.13 (5.13.0-1020.24) focal; urgency=medium

  * focal/linux-oem-5.13: 5.13.0-1020.24 -proposed tracker (LP: #1949739)

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.11.08)

  * alsa/sof: All audio jacks can't detect hotplug when only codec is suspended
    (LP: #1950540)
    - ASoC: SOF: Intel: hda: fix hotplug when only codec is suspended

  * Let NVMe with HMB use native power control again (LP: #1950042)
    - nvme-pci: use attribute group for cmb sysfs
    - nvme-pci: cmb sysfs: one file, one value
    - nvme-pci: disable hmb on idle suspend
    - nvme: allow user toggling hmb usage

  [ Ubuntu: 5.13.0-22.22 ]

  * impish/linux: 5.13.0-22.22 -proposed tracker (LP: #1949740)
  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.11.08)
  * ebpf: bpf_redirect fails with ip6 gre interfaces (LP: #1947164)
    - net: handle ARPHRD_IP6GRE in dev_is_mac_header_xmit()
  * require CAP_NET_ADMIN to attach N_HCI ldisc (LP: #1949516)
    - Bluetooth: hci_ldisc: require CAP_NET_ADMIN to attach N_HCI ldisc
  * CVE-2021-3744 // CVE-2021-3764
    - crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
  * ppc64 BPF JIT mod by 1 will not return 0 (LP: #1948351)
    - powerpc/bpf: Fix BPF_MOD when imm == 1
  * Fix Screen freeze after resume from suspend with iGPU [1002:6987]
    (LP: #1949050)
    - drm/amdgpu: reenable BACO support for 699F:C7 polaris12 SKU
    - drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
    - drm/amdgpu: Fix crash on device remove/driver unload
  * Intel I225-IT ethernet controller: igc: probe of 0000:02:00.0 failed with
    error -1 (LP: #1945576)
    - igc: Remove _I_PHY_ID checking
    - igc: Remove phy->type checking
  * Fail to detect audio output from external monitor (LP: #1948767)
    - ALSA: hda: intel: Allow repeatedly probing on codec configuration errors
  * Drop "UBUNTU: SAUCE: cachefiles: Page leaking in
    cachefiles_read_backing_file while vmscan is active" (LP: #1947709)
    - Revert "UBUNTU: SAUCE: cachefiles: Page leaking in
      cachefiles_read_backing_file while vmscan is active"
  * rtw89 kernel module for Realtek 8852 wifi is missing (LP: #1945967)
    - rtw89: add Realtek 802.11ax driver
    - rtw89: Remove redundant check of ret after call to rtw89_mac_enable_bb_rf
    - rtw89: fix return value check in rtw89_cam_send_sec_key_cmd()
    - rtw89: remove unneeded semicolon
    - [Config] RTW89=m
  * Impish update: upstream stable patchset 2021-11-03 (LP: #1949636)
    - mm: fix uninitialized use in overcommit_policy_handler
    - usb: gadget: r8a66597: fix a loop in set_feature()
    - usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave
    - usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
    - usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
    - cifs: fix incorrect check for null pointer in header_assemble
    - xen/x86: fix PV trap handling on secondary processors
    - usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
    - USB: s...

Changed in linux-oem-5.13 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-5.14 - 5.14.0-1013.13

---------------
linux-oem-5.14 (5.14.0-1013.13) focal; urgency=medium

  * focal/linux-oem-5.14: 5.14.0-1013.13 -proposed tracker (LP: #1955464)

  * devices on thunderbolt dock are not recognized on adl-p platform
    (LP: #1955016)
    - SAUCE: thunderbolt: Runtime PM activate both ends of the device link
    - SAUCE: thunderbolt: Tear down existing tunnels when resuming from hibernate
    - SAUCE: thunderbolt: Runtime resume USB4 port when retimers are scanned
    - SAUCE: thunderbolt: Do not allow subtracting more NFC credits than
      configured
    - SAUCE: thunderbolt: Do not program path HopIDs for USB4 routers
    - SAUCE: thunderbolt: Add debug logging of DisplayPort resource allocation

 -- Chia-Lin Kao (AceLan) <email address hidden> Tue, 21 Dec 2021 16:59:25 +0800

Changed in linux-oem-5.14 (Ubuntu Focal):
status: In Progress → Fix Released
Timo Aaltonen (tjaalton)
Changed in linux (Ubuntu Impish):
status: In Progress → Won't Fix
Timo Aaltonen (tjaalton)
Changed in hwe-next:
importance: Undecided → Critical
status: New → Confirmed
Changed in hwe-next:
assignee: nobody → Hui Wang (hui.wang)
Revision history for this message
Anthony Wong (anthonywong) wrote :

commit 517b391e25d489c20b5a78f4daac0dbb8bcaea99
Author: Kai Vehmanen <email address hidden>
AuthorDate: Fri Nov 5 13:16:55 2021 +0200
Commit: Andrea Righi <email address hidden>
CommitDate: Tue Jan 4 09:48:59 2022 +0100

    ASoC: SOF: Intel: hda: fix hotplug when only codec is suspended

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

    [ Upstream commit fd572393baf0350835e8d822db588f679dc7bcb8 ]

    If codec is in runtime suspend, but controller is not, hotplug events
    are missed as the codec has no way to alert the controller. Problem does
    not occur if both controller and codec are active, or when both are
    suspended.

    An easy way to reproduce is to play an audio stream on one codec (e.g.
    to HDMI/DP display codec), wait for other HDA codec to go to runtime
    suspend, and then plug in a headset to the suspended codec. The jack
    event is not reported correctly in this case. Another way to reproduce
    is to force controller to stay active with
    "snd_sof_pci.sof_pci_debug=0x1"

    Fix the issue by reconfiguring the WAKEEN register when powering up/down
    individual links, and handling control events in the interrupt handler.

    Fixes: 87fc20e4a0cb ("ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management")
    Reported-by: Hui Wang <email address hidden>
    Signed-off-by: Kai Vehmanen <email address hidden>
    Reviewed-by: Pierre-Louis Bossart <email address hidden>
    Reviewed-by: Ranjani Sridharan <email address hidden>
    Reviewed-by: Péter Ujfalusi <email address hidden>
    Link: https://<email address hidden>
    Signed-off-by: Mark Brown <email address hidden>
    Signed-off-by: Sasha Levin <email address hidden>
    Signed-off-by: Andrea Righi <email address hidden>

Changed in hwe-next:
status: Confirmed → Fix Released
Changed in linux (Ubuntu Jammy):
status: In Progress → Fix Released
Changed in linux (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.