APPLIED: [SRU][R][PATCH v8 0/3] Fix SDCA jack detection race and reprobe issues on Dell Slate Max platform with CirrusLogic audio solution

Mehmet Basaran mehmet.basaran at canonical.com
Fri Oct 9 12:33:22 UTC 2026


Applied to resolute:linux master-next branch. Thanks.

-------------- next part --------------
Chris Chiu via kernel-team <kernel-team at lists.ubuntu.com> writes:

> BugLink: https://bugs.launchpad.net/bugs/2163215
>
> [Impact]
> On Dell Slate Max systems with SoundWire Device Class Audio (SDCA) hardware, there is a race condition when setting up jack detection.
> Plug headset first, sound can output and headset Mic is workable.
> But after cold boot/reboot, audio device is keep but no sound output from headset, headset Mic also no function. Hot plug headset can recovery.
>
> [Fix]
> 1. ASoC: Add a component fixup_controls callback
>    Clean cherry-pick of 3e81e2fb2163.
>
> 2. UBUNTU: SAUCE: ASoC: SDCA: Bind jack interrupts to their control
>    after card probe
>    Uses that hook to look the "Selected Mode" control up and
>    re-drive the current hardware state once the control exists.
>
> 3. UBUNTU: SAUCE: ASoC: SDCA: Do not leak or reuse jack state across
>    a card rebind.
>    Reuses the existing allocation on re-probe and clears the
>    card-owned pointers in sdca_irq_cleanup().
>
> [Test Plan]
> Boot the system, plug headphones in and out, and check if audio switches correctly.
>
> 1. Boot the system with headphones unplugged.
> 2. Plug headphones in and check the jack state:
> 3. Unplug headphones and verify sound switches back.
> 4. Reload the SoundWire driver modules or trigger suspend/resume to force card teardown and reprobe:
>    $ sudo rtcwake -m mem -s 15
>
>    Or reload the SoundWire modules:
>
>    $ sudo modprobe -r snd_sof_intel_sdw
>    $ sudo modprobe snd_sof_intel_sdw
>
> Without these patches:
> - On boot, headphones might show up as connected when they are not, or sound might not switch correctly when plugged in.
> - After suspend/resume or reloading modules, jack detection stops working, or the system crashes/shows warnings due to stale pointers.
>
> With these patches:
> - Headphones and speaker paths are always set correctly on boot.
> - Jack detection and audio routing work correctly after suspend/resume and driver reloads.
>
> [Where problems could occur]
> Could break SDCA jack detection and SoundWire audio class drivers.
> If the new fixup_controls callback has a bug, jack IRQs will not be registered. Jack detection could stop working completely.
> If the cached kcontrol search gets a wrong pointer, the kernel will crash with a NULL pointer dereference when the IRQ handler runs.
>
> [Other Info]
> All seven patches are upstream in v7.2-rc6.
>
> v2 change:
> - Added missing fix commit 36c543cc5100 ("ASoC: SDCA: Fix bad move of
>   jack_state initialisation") which fixes cb3c257e0824 ("ASoC: SDCA:
>   Add correct masks whilst reporting SDCA jack status"). Without this
>   commit, the jack_state initialisation was accidentally moved after
>   its use, causing incorrect jack detection behavior.
>
> v3 change:
> - Remove the non-essential patches which only do refactoring
>
> v4 change:
> - Remove duplocated reporting logic: introduced type_get_mask and
>   replaced duplicated switch in sdca_jack_report()
>
> v5 change:
> - introduce the dependency from upstream f6970d8535a9
>   'ASoC: SDCA: Add missing stub for sdca_fdl_free_state()'.
> - Remove dead helper 'type_get_mask' and implement local mapping
>   in sdca_jack_report
>
> v6 change:
> - Restores alloc/init/free symmetry and fixes the transient leak
>   for the sdca_jack_state manipulation.
>
> v7 change:
> - Replace the original 7 patches backport into UBUNTU SAUCE patches
> - Leave the interrupt where resolute already requests it and simply
>   resynchronise once the control has been created, instead of moving
>   the interrupt lifetime around.
>
> v8 change:
> - Update the cover letter to reflect the change since v7
>
> Charles Keepax (1):
>   ASoC: Add a component fixup_controls callback
>
> Chris Chiu (2):
>   UBUNTU: SAUCE: ASoC: SDCA: Bind jack interrupts to their control after
>     card probe
>   UBUNTU: SAUCE: ASoC: SDCA: Do not leak or reuse jack state across a
>     card rebind
>
>  include/sound/sdca_jack.h            |  2 +
>  include/sound/soc-component.h        |  2 +
>  sound/soc/sdca/sdca_class_function.c | 11 +++++
>  sound/soc/sdca/sdca_interrupts.c     | 23 ++++++++--
>  sound/soc/sdca/sdca_jack.c           | 66 ++++++++++++++++++++++++++++
>  sound/soc/soc-component.c            | 10 +++++
>  sound/soc/soc-core.c                 |  5 +++
>  7 files changed, 116 insertions(+), 3 deletions(-)
>
> --
> 2.43.0
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 873 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20261009/3d9e61ca/attachment.sig>


More information about the kernel-team mailing list