[PATCH v2 00/11] ALSA: cs35l56: Add support for factory calibration

Richard Fitzgerald posted 11 patches 3 months, 2 weeks ago
include/sound/cs-amp-lib.h                 |   25 +-
include/sound/cs35l56.h                    |   35 +
sound/hda/codecs/side-codecs/Kconfig       |   15 +
sound/hda/codecs/side-codecs/cs35l56_hda.c |  116 +-
sound/hda/codecs/side-codecs/cs35l56_hda.h |    6 +
sound/soc/codecs/Kconfig                   |   18 +
sound/soc/codecs/cs-amp-lib-test.c         | 1491 +++++++++++++++++++-
sound/soc/codecs/cs-amp-lib.c              |  345 ++++-
sound/soc/codecs/cs35l56-shared.c          |  368 ++++-
sound/soc/codecs/cs35l56.c                 |  159 +++
sound/soc/codecs/cs35l56.h                 |    6 +
11 files changed, 2530 insertions(+), 54 deletions(-)
[PATCH v2 00/11] ALSA: cs35l56: Add support for factory calibration
Posted by Richard Fitzgerald 3 months, 2 weeks ago
Until now, all products with an amplifier supported by the cs35l56 driver
have shipped with Microsoft Windows pre-installed. The factory calibration
of speaker protection has therefore been done using the Windows driver.

However, products that ship with a Linux-based distro must be able to
perform the factory calibration procedure from within the Linux-based
environment. This patch series adds that support.

NOTE: unfortunately this is yet another series that is mainly ASoC but
also needs some changes to the HDA driver, and they have build dependencies
on the ASoC code. I suggest taking this all through Mark's tree and we'll
avoid sending any other commits to the HDA driver until it has all landed
in Takashi's tree.

Changes since V1:
- Changed the file handlers to be debugfs files instead of sysfs files.

Richard Fitzgerald (11):
  ASoC: cs35l56: Read silicon ID during initialization and save it
  ASoC: cs-amp-lib: Add helpers for factory calibration
  ASoC: cs35l56: Add common code for factory calibration
  ASoC: cs35l56: Create debugfs files for factory calibration
  ALSA: hda/cs35l56: Create debugfs files for factory calibration
  ASoC: cs-amp-lib-test: Add cases for factory calibration helpers
  ASoC: cs-amp-lib: Return attributes from cs_amp_get_efi_variable()
  ASoC: cs-amp-lib: Add function to write calibration to UEFI
  ASoC: cs35l56: Add calibration command to store into UEFI
  ALSA: hda/cs35l56: Set cal_index to the amp index
  ASoC: cs-amp-lib-test: Add test cases for
    cs_amp_set_efi_calibration_data()

 include/sound/cs-amp-lib.h                 |   25 +-
 include/sound/cs35l56.h                    |   35 +
 sound/hda/codecs/side-codecs/Kconfig       |   15 +
 sound/hda/codecs/side-codecs/cs35l56_hda.c |  116 +-
 sound/hda/codecs/side-codecs/cs35l56_hda.h |    6 +
 sound/soc/codecs/Kconfig                   |   18 +
 sound/soc/codecs/cs-amp-lib-test.c         | 1491 +++++++++++++++++++-
 sound/soc/codecs/cs-amp-lib.c              |  345 ++++-
 sound/soc/codecs/cs35l56-shared.c          |  368 ++++-
 sound/soc/codecs/cs35l56.c                 |  159 +++
 sound/soc/codecs/cs35l56.h                 |    6 +
 11 files changed, 2530 insertions(+), 54 deletions(-)

-- 
2.47.3
Re: [PATCH v2 00/11] ALSA: cs35l56: Add support for factory calibration
Posted by Mark Brown 3 months, 1 week ago
On Tue, 21 Oct 2025 11:50:11 +0100, Richard Fitzgerald wrote:
> Until now, all products with an amplifier supported by the cs35l56 driver
> have shipped with Microsoft Windows pre-installed. The factory calibration
> of speaker protection has therefore been done using the Windows driver.
> 
> However, products that ship with a Linux-based distro must be able to
> perform the factory calibration procedure from within the Linux-based
> environment. This patch series adds that support.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/11] ASoC: cs35l56: Read silicon ID during initialization and save it
        commit: 1afc05996299b4546e8be9b13c89f78e19912c7d
[02/11] ASoC: cs-amp-lib: Add helpers for factory calibration
        commit: cdd27fa3298ad2f39788804f7d09ab31af2b416c
[03/11] ASoC: cs35l56: Add common code for factory calibration
        commit: f7097161e94cd39df7a8848ad0de5f394124ed69
[04/11] ASoC: cs35l56: Create debugfs files for factory calibration
        commit: 191a27faf53edf9e9101901e402bfee49c44073c
[05/11] ALSA: hda/cs35l56: Create debugfs files for factory calibration
        commit: 46a3df50b0cab466099515f2375b01c5be4fb95c
[06/11] ASoC: cs-amp-lib-test: Add cases for factory calibration helpers
        commit: cf6290eebe3cc4eb677d11aa061d10cb1df12ab9
[07/11] ASoC: cs-amp-lib: Return attributes from cs_amp_get_efi_variable()
        commit: 959400caf51eb31f95d1ab754a285b5546ebd3e4
[08/11] ASoC: cs-amp-lib: Add function to write calibration to UEFI
        commit: 2b62e66626f05e277c8fdeb50d4c1e0cbab2fe0e
[09/11] ASoC: cs35l56: Add calibration command to store into UEFI
        commit: ef24466ee1912997c2bd526194006bbca424c24f
[10/11] ALSA: hda/cs35l56: Set cal_index to the amp index
        commit: 64670a6c062c4d183c366d46e71ee76395af6a15
[11/11] ASoC: cs-amp-lib-test: Add test cases for cs_amp_set_efi_calibration_data()
        commit: 4795375d8aa072e9aacb0b278e6203c6ca41816a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Re: [PATCH v2 00/11] ALSA: cs35l56: Add support for factory calibration
Posted by Mark Brown 3 months, 2 weeks ago
On Tue, Oct 21, 2025 at 11:50:11AM +0100, Richard Fitzgerald wrote:

> NOTE: unfortunately this is yet another series that is mainly ASoC but
> also needs some changes to the HDA driver, and they have build dependencies
> on the ASoC code. I suggest taking this all through Mark's tree and we'll
> avoid sending any other commits to the HDA driver until it has all landed
> in Takashi's tree.

That seems like a reasonable plan to me, Takashi?
Re: [PATCH v2 00/11] ALSA: cs35l56: Add support for factory calibration
Posted by Takashi Iwai 3 months, 1 week ago
On Wed, 22 Oct 2025 21:14:45 +0200,
Mark Brown wrote:
> 
> On Tue, Oct 21, 2025 at 11:50:11AM +0100, Richard Fitzgerald wrote:
> 
> > NOTE: unfortunately this is yet another series that is mainly ASoC but
> > also needs some changes to the HDA driver, and they have build dependencies
> > on the ASoC code. I suggest taking this all through Mark's tree and we'll
> > avoid sending any other commits to the HDA driver until it has all landed
> > in Takashi's tree.
> 
> That seems like a reasonable plan to me, Takashi?

Sorry for the late reaction, as I was off in the last week.

Let's get them through Mark's tree as suggested.
Feel free to take my ack:

Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi