[SRU][oem-5.14][pull-request v3] alsa: enable the cirrus-logic side-codec to make the speaker output sound

Hui Wang hui.wang at canonical.com
Tue Mar 29 03:22:03 UTC 2022

In the v3:

Dropped 17 patches which are fixing build errors for 
sound/asoc/codec/cs35l41*.c. Without those 17 patches, I did some change 
in the sound/asoc/codec/cs35l41*.c to make sure there are no failures 
when building them, and change the cherry-pick to backport in some patches.

After dropping the 17 patches, this SRU is pretty clean now, it nearly 
doesn't change the existing APIs or functions, it only introduces new 
files or new functions in the existing files. It is safe to merge to 
jammy kernel

And I also cleaned the annotations to fix the errors like "check-config: 
FAIL (m != -):..."

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

We have a couple of lenovo latops models which have cirrus-logic side
codec between realtek codec and speaker, it plays a role as amplifier,
we need to enable this side-codec, otherwise the speaker can't output

Backport codec patches and some i2c and acpi detection patches from
mainline kernel and linux-next

boot the patched kernel, run speaker test, both left and right channel
could work well.

[Where problems could occur]
If it could introduce regression, it will be on soc wm_adsp codec
drivers, since most of patch are adding new codec drivers, it will
not touch existing codec drivers. If a machine with wm_adsp codec
can't output sound or record sound, it means this SRU introduce
the regression on wm_adsp driver, but this possibility is very
low, since all patches are picked from mainline kernel.

The following changes since commit ead0ca00148b78edbafa0b34a8ad2956d52532d1:

   UBUNTU: Ubuntu-oem-5.14-5.14.0-1029.32 (2022-03-18 15:06:46 +0200)

are available in the Git repository at:


for you to fetch changes up to 0bb5c224500e019829fd4b3937cea426e181450e:

   UBUNTU: [Config]: Add cirruslogic side codec support (2022-03-23 
18:12:44 +0800)

Alexander Sergeyev (1):
       ALSA: hda/realtek: fix speakers and micmute on HP 855 G8

Charles Keepax (15):
       ASoC: cs35l41: Fix use of an uninitialised variable
       ASoC: cs35l41: Use regmap_read_poll_timeout to wait for OTP boot
       ASoC: cs35l41: Combine adjacent register writes
       ASoC: cs35l41: Don't overwrite returned error code
       ASoC: cs35l41: Fixup the error messages
       ASoC: cs35l41: Fix a bunch of trivial code formating/style issues
       misc: cs35l41: Remove unused pdn variable
       ASoC: cs35l41: Change monitor widgets to siggens
       ASoC: cs35l41: Remove incorrect comment
       ASoC: cs35l41: Correct DSP power down
       ASoC: cs35l41: Correct handling of some registers in the cache
       ASoC: cs35l41: Update handling of test key registers
       ASoC: cs35l41: Add support for hibernate memory retention mode
       ALSA: hda: cs35l41: Avoid overwriting register patch
       ALSA: hda: cs35l41: Add calls to newly added test key function

Dan Carpenter (1):
       ALSA: hda: cs35l41: fix double free on error in probe()

David Rhodes (3):
       ASoC: cs35l41: CS35L41 Boosted Smart Amplifier
       ASoC: cs35l41: DSP Support
       ASoC: cs35l41: Add cs35l51/53 IDs

Hans de Goede (2):
       i2c: acpi: Add an i2c_acpi_client_count() helper function
       platform/x86: i2c-multi-instantiate: Use the new 
i2c_acpi_client_count() helper

Hui Wang (1):
       UBUNTU: [Config]: Add cirruslogic side codec support

Lucas Tanure (19):
       ASoC: cs35l41: Set the max SPI speed for the whole device
       ASoC: cs35l41: Fix link problem
       ASoC: cs35l41: Fix undefined reference to core functions
       ASoC: cs35l41: Convert tables to shared source code
       ASoC: cs35l41: Move cs35l41_otp_unpack to shared code
       ASoC: cs35l41: Move power initializations to reg_sequence
       ASoC: cs35l41: Create shared function for errata patches
       ASoC: cs35l41: Create shared function for setting channels
       ASoC: cs35l41: Create shared function for boost configuration
       ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems
       ALSA: hda: cs35l41: Move cs35l41* calls to its own symbol namespace
       ALSA: hda: cs35l41: Add missing default cases
       ALSA: hda: cs35l41: Make use of the helper function dev_err_probe()
       ALSA: hda: cs35l41: Tidyup code
       ALSA: hda/realtek: Add support for Legion 7 16ACHg6 laptop
       platform/x86: i2c-multi-instantiate: Rename it for a generic 
serial driver name
       platform/x86: serial-multi-instantiate: Reorganize I2C functions
       ALSA: hda/realtek: Add support for HP Laptops
       ACPI / scan: Create platform device for CS35L41

Saranya Gopal (1):
       Revert "platform/x86: i2c-multi-instantiate: Don't create 
platform device for INT3515 ACPI nodes"

Stefan Binding (5):
       ALSA: hda/realtek: Add CS35L41 support for Thinkpad laptops
       spi: Create helper API to lookup ACPI info for spi device
       spi: Support selection of the index of the ACPI Spi Resource 
before alloc
       spi: Add API to count spi acpi resources
       platform/x86: serial-multi-instantiate: Add SPI support

Uwe Kleine-König (2):
       ASoC: cs35l41: Make cs35l41_remove() return void
       ALSA: hda: cs35l41: Make cs35l41_hda_remove() return void

  MAINTAINERS                                     |    7 +-
  debian.oem/abi/amd64/oem.modules                |    1 -
  debian.oem/config/annotations                   |   20 +-
  debian.oem/config/config.common.ubuntu          |    9 +-
  drivers/acpi/scan.c                             |   16 +-
  drivers/i2c/i2c-core-acpi.c                     |   32 +++
  drivers/platform/x86/Kconfig                    |   12 +-
  drivers/platform/x86/Makefile                   |    2 +-
  drivers/platform/x86/i2c-multi-instantiate.c    |  214 -----------------
  drivers/platform/x86/serial-multi-instantiate.c |  348 
  drivers/spi/spi.c                               |  131 +++++++++--
  include/linux/i2c.h                             |    5 +
  include/linux/spi/spi.h                         |    9 +
  include/sound/cs35l41.h                         |  780 
  sound/pci/hda/Kconfig                           |   29 +++
  sound/pci/hda/Makefile                          |   10 +
  sound/pci/hda/cs35l41_hda.c                     |  542 
  sound/pci/hda/cs35l41_hda.h                     |   69 ++++++
  sound/pci/hda/cs35l41_hda_i2c.c                 |   68 ++++++
  sound/pci/hda/cs35l41_hda_spi.c                 |   65 ++++++
  sound/pci/hda/hda_component.h                   |   20 ++
  sound/pci/hda/patch_realtek.c                   |  201 +++++++++++++++-
  sound/soc/codecs/Kconfig                        |   26 +++
  sound/soc/codecs/Makefile                       |    8 +
  sound/soc/codecs/cs35l41-i2c.c                  |  102 ++++++++
  sound/soc/codecs/cs35l41-lib.c                  | 1040 
  sound/soc/codecs/cs35l41-spi.c                  |  100 ++++++++
  sound/soc/codecs/cs35l41.c                      | 1596 
  sound/soc/codecs/cs35l41.h                      |   60 +++++
  29 files changed, 5275 insertions(+), 247 deletions(-)
  delete mode 100644 drivers/platform/x86/i2c-multi-instantiate.c
  create mode 100644 drivers/platform/x86/serial-multi-instantiate.c
  create mode 100644 include/sound/cs35l41.h
  create mode 100644 sound/pci/hda/cs35l41_hda.c
  create mode 100644 sound/pci/hda/cs35l41_hda.h
  create mode 100644 sound/pci/hda/cs35l41_hda_i2c.c
  create mode 100644 sound/pci/hda/cs35l41_hda_spi.c
  create mode 100644 sound/pci/hda/hda_component.h
  create mode 100644 sound/soc/codecs/cs35l41-i2c.c
  create mode 100644 sound/soc/codecs/cs35l41-lib.c
  create mode 100644 sound/soc/codecs/cs35l41-spi.c
  create mode 100644 sound/soc/codecs/cs35l41.c
  create mode 100644 sound/soc/codecs/cs35l41.h

More information about the kernel-team mailing list