mbox series

[v3,0/5] ASoC: amd: acp: Add sound support for a line of HUAWEI laptops

Message ID 20230829220116.1159-1-posteuca@mutex.one (mailing list archive)
Headers show
Series ASoC: amd: acp: Add sound support for a line of HUAWEI laptops | expand

Message

Marian Postevca Aug. 29, 2023, 10:01 p.m. UTC
This series adds support for a line of HUAWEI laptops with
AMD CPUs that connect using the ACP3x module to a ES8336 CODEC.

The CODEC driver must be extended to support the S32 LE format
and the MCLK div by 2 option. MCLK div by 2 is needed for one specific
SKU, which uses a 48Mhz MCLK, which seems to be too high of a frequency
for the CODEC and must be divided by 2.

The acp legacy driver must also be extended by using callbacks so that
the more complicated handling of this specific CODEC can be moved
outside the more generic ACP code.

Changes in v3:

- Modified commit message for patch 1: ASoC: es8316: Enable support for
   S32 LE format. The commit message implied that S32 LE format is the
   only one that is supported by the machine driver. The AMD ACP
   supports a wide variety of formats that are also supported by the
   CODEC. Now the purpose of the patch is to enable one additional
   format that is supported by the CODEC chip.

- Added new patch: Replace NR_SUPPORTED_MCLK_LRCK_RATIOS with ARRAY_SIZE()
   No need to have a special define when we can use ARRAY_SIZE() directly.

- Reworked the MCLK div by 2 option. Now the CODEC driver will first
   try to use halved frequency by checking if it can generate
   suitable clocking. If it can not, then the full MCLK will be used.
   In this way we can also support unknown SKU that have a too high
   MCLK frequency.

- Moved generic ACP code from patch 5, that introduces the new machine
   driver, to patch 4, that introduces ACP legacy callback mechanism.

- Removed the forced S32 LE format in the new machine driver.

Marian Postevca (5):
  ASoC: es8316: Enable support for S32 LE format
  ASoC: es8316: Replace NR_SUPPORTED_MCLK_LRCK_RATIOS with ARRAY_SIZE()
  ASoC: es8316: Enable support for MCLK div by 2
  ASoC: amd: acp: Add support for splitting the codec specific code from
    the ACP driver
  ASoC: amd: acp: Add machine driver that enables sound for systems with
    a ES8336 codec

 sound/soc/amd/acp-config.c                    |  70 +++
 sound/soc/amd/acp/Makefile                    |   2 +-
 sound/soc/amd/acp/acp-legacy-mach.c           | 102 +++-
 sound/soc/amd/acp/acp-mach-common.c           |   8 +
 sound/soc/amd/acp/acp-mach.h                  |  67 +++
 sound/soc/amd/acp/acp-renoir.c                |   4 +
 sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c | 443 ++++++++++++++++++
 sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.h |  12 +
 sound/soc/codecs/es8316.c                     |  52 +-
 sound/soc/codecs/es8316.h                     |   3 +
 10 files changed, 736 insertions(+), 27 deletions(-)
 create mode 100644 sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
 create mode 100644 sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.h

Comments

Mark Brown Sept. 11, 2023, 11:57 p.m. UTC | #1
On Wed, 30 Aug 2023 01:01:11 +0300, Marian Postevca wrote:
> This series adds support for a line of HUAWEI laptops with
> AMD CPUs that connect using the ACP3x module to a ES8336 CODEC.
> 
> The CODEC driver must be extended to support the S32 LE format
> and the MCLK div by 2 option. MCLK div by 2 is needed for one specific
> SKU, which uses a 48Mhz MCLK, which seems to be too high of a frequency
> for the CODEC and must be divided by 2.
> 
> [...]

Applied to

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

Thanks!

[1/5] ASoC: es8316: Enable support for S32 LE format
      commit: 2f06f231f0bfe74711fee14e28a8789a3de9bc36
[2/5] ASoC: es8316: Replace NR_SUPPORTED_MCLK_LRCK_RATIOS with ARRAY_SIZE()
      commit: a43c0dc1004cbe2edbae9b6e6793db71f6896449
[3/5] ASoC: es8316: Enable support for MCLK div by 2
      commit: 869f30782cdad0a86598a700a864e4a2bf44f8cc
[4/5] ASoC: amd: acp: Add support for splitting the codec specific code from the ACP driver
      commit: c680f57095411559e7605af689c7ce01f2281005
[5/5] ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec
      commit: 54fcd9dd44b2c82a0262e29b288c2d0b36c6bba5

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