mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marian Postevca <posteuca@mutex.one>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	Marian Postevca <posteuca@mutex.one>
Subject: [PATCH v3 0/5] ASoC: amd: acp: Add sound support for a line of HUAWEI laptops
Date: Wed, 30 Aug 2023 01:01:11 +0300	[thread overview]
Message-ID: <20230829220116.1159-1-posteuca@mutex.one> (raw)

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

-- 
2.41.0


             reply	other threads:[~2023-08-29 22:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 22:01 Marian Postevca [this message]
2023-08-29 22:01 ` [PATCH v3 1/5] ASoC: es8316: Enable support for S32 LE format Marian Postevca
2023-08-29 22:01 ` [PATCH v3 2/5] ASoC: es8316: Replace NR_SUPPORTED_MCLK_LRCK_RATIOS with ARRAY_SIZE() Marian Postevca
2023-08-29 22:01 ` [PATCH v3 3/5] ASoC: es8316: Enable support for MCLK div by 2 Marian Postevca
2023-08-29 22:01 ` [PATCH v3 4/5] ASoC: amd: acp: Add support for splitting the codec specific code from the ACP driver Marian Postevca
2023-08-29 22:01 ` [PATCH v3 5/5] ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec Marian Postevca
2023-09-11 23:57 ` [PATCH v3 0/5] ASoC: amd: acp: Add sound support for a line of HUAWEI laptops Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230829220116.1159-1-posteuca@mutex.one \
    --to=posteuca@mutex.one \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome