[PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems

Richard Fitzgerald posted 11 patches 1 year, 2 months ago
include/sound/cs35l56.h           |  29 +-
sound/pci/hda/Kconfig             |  31 +
sound/pci/hda/Makefile            |   6 +
sound/pci/hda/cs35l56_hda.c       | 995 ++++++++++++++++++++++++++++++
sound/pci/hda/cs35l56_hda.h       |  48 ++
sound/pci/hda/cs35l56_hda_i2c.c   |  69 +++
sound/pci/hda/cs35l56_hda_spi.c   |  68 ++
sound/pci/hda/hda_auto_parser.h   |   2 +
sound/pci/hda/hda_generic.h       |   3 +
sound/soc/codecs/cs35l56-i2c.c    |  14 +-
sound/soc/codecs/cs35l56-sdw.c    |  72 +--
sound/soc/codecs/cs35l56-shared.c | 458 +++++++++++++-
sound/soc/codecs/cs35l56-spi.c    |  10 +-
sound/soc/codecs/cs35l56.c        | 648 ++++---------------
sound/soc/codecs/cs35l56.h        |  15 +-
15 files changed, 1877 insertions(+), 591 deletions(-)
create mode 100644 sound/pci/hda/cs35l56_hda.c
create mode 100644 sound/pci/hda/cs35l56_hda.h
create mode 100644 sound/pci/hda/cs35l56_hda_i2c.c
create mode 100644 sound/pci/hda/cs35l56_hda_spi.c
[PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems
Posted by Richard Fitzgerald 1 year, 2 months ago
This set of patches adds support for using the CS35L56 boosted smart
amplifier on HDA systems. In these systems the CS35L56 audio is
routed through a HDA-to-I2S bridge codec.

This doesn't include the changes to the Realtek driver to actually hook
up the CS35L56 driver, because we don't yet have the QUIRK IDs to
associate it with. But we want to publish the driver now so that it is
available for bringing up hardware with the CS35L56.

The first 9 patches are moving code out of the ASoC driver and into the
shared library so that it can be shared with the HDA driver.

Patch #10 fixes missing #includes in the HDA headers so that the CS35L56
driver doesn't have to #include headers that it doesn't use.

CHANGES SINCE V5
The series has been rebased onto commit df4167d658d4
("ASoC: cs35l56: Patch soft registers to defaults"), which removes
cs35l56_reread_firmware_registers() and adds cs35l56_set_patch().

Changes are trivial so I have carried forward Mark's and Takashi's acks.

Patch 01:
- Also changes cs35l56_set_patch() argument to new struct cs35l56_base.

Patch 11:
- Remove call to cs35l56_reread_firmware_registers()
- Add call to cs35l56_set_patch() in cs35l56_hda_common_probe()
- Do not add mute_hook to struct hda_component. This was for use with
  CS8409 as an HDA bridge, but production systems will use Realtek,
  which has its own mute control.
- Use strscpy() instead of strcpy() in cs35l56_hda_mixer_info()
- Fix missing word in Kconfig option title

Richard Fitzgerald (4):
  ASoC: cs35l56: Move runtime suspend/resume to shared library
  ASoC: cs35l56: Move cs_dsp init into shared library
  ASoC: cs35l56: Move part of cs35l56_init() to shared library
  ALSA: hda: Fix missing header dependencies

Simon Trimmer (7):
  ASoC: cs35l56: Move shared data into a common data structure
  ASoC: cs35l56: Make cs35l56_system_reset() code more generic
  ASoC: cs35l56: Convert utility functions to use common data structure
  ASoC: cs35l56: Move utility functions to shared file
  ASoC: cs35l56: Make common function for control port wait
  ASoC: cs35l56: Make a common function to shutdown the DSP
  ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier

 include/sound/cs35l56.h           |  29 +-
 sound/pci/hda/Kconfig             |  31 +
 sound/pci/hda/Makefile            |   6 +
 sound/pci/hda/cs35l56_hda.c       | 995 ++++++++++++++++++++++++++++++
 sound/pci/hda/cs35l56_hda.h       |  48 ++
 sound/pci/hda/cs35l56_hda_i2c.c   |  69 +++
 sound/pci/hda/cs35l56_hda_spi.c   |  68 ++
 sound/pci/hda/hda_auto_parser.h   |   2 +
 sound/pci/hda/hda_generic.h       |   3 +
 sound/soc/codecs/cs35l56-i2c.c    |  14 +-
 sound/soc/codecs/cs35l56-sdw.c    |  72 +--
 sound/soc/codecs/cs35l56-shared.c | 458 +++++++++++++-
 sound/soc/codecs/cs35l56-spi.c    |  10 +-
 sound/soc/codecs/cs35l56.c        | 648 ++++---------------
 sound/soc/codecs/cs35l56.h        |  15 +-
 15 files changed, 1877 insertions(+), 591 deletions(-)
 create mode 100644 sound/pci/hda/cs35l56_hda.c
 create mode 100644 sound/pci/hda/cs35l56_hda.h
 create mode 100644 sound/pci/hda/cs35l56_hda_i2c.c
 create mode 100644 sound/pci/hda/cs35l56_hda_spi.c

-- 
2.30.2
Re: [PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems
Posted by Mark Brown 1 year, 2 months ago
On Fri, 21 Jul 2023 14:21:09 +0100, Richard Fitzgerald wrote:
> This set of patches adds support for using the CS35L56 boosted smart
> amplifier on HDA systems. In these systems the CS35L56 audio is
> routed through a HDA-to-I2S bridge codec.
> 
> This doesn't include the changes to the Realtek driver to actually hook
> up the CS35L56 driver, because we don't yet have the QUIRK IDs to
> associate it with. But we want to publish the driver now so that it is
> available for bringing up hardware with the CS35L56.
> 
> [...]

Applied to

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

Thanks!

[01/11] ASoC: cs35l56: Move shared data into a common data structure
        commit: 898673b905b9318489430663083f629bc38c7461
[02/11] ASoC: cs35l56: Make cs35l56_system_reset() code more generic
        commit: cf6e7486de80b680fe178a6517dd7c4166a12dbc
[03/11] ASoC: cs35l56: Convert utility functions to use common data structure
        commit: 0a2e49230f7f1796aa79c532426d56e8739ee4b1
[04/11] ASoC: cs35l56: Move utility functions to shared file
        commit: 8a731fd37f8b33026e545f5ee5cdd7b9a837cbeb
[05/11] ASoC: cs35l56: Move runtime suspend/resume to shared library
        commit: 9974d5b57697770cba2a99c6fe925d01152cd544
[06/11] ASoC: cs35l56: Move cs_dsp init into shared library
        commit: 22e51dbb257a218e43de42764b5bdc5302f27cd1
[07/11] ASoC: cs35l56: Move part of cs35l56_init() to shared library
        commit: 84851aa055c890f2ea731a128e8feb64520c2c8e
[08/11] ASoC: cs35l56: Make common function for control port wait
        commit: f32a2bcbc092d60ba8a1b00a22607b220d53a25e
[09/11] ASoC: cs35l56: Make a common function to shutdown the DSP
        commit: 444dfa0912639fb2431553e8e54d2b35fdf590c2
[10/11] ALSA: hda: Fix missing header dependencies
        commit: 64e05321506261b737abdbfc7a82144f30d0a925
[11/11] ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier
        commit: 73cfbfa9caea8eda54b4c6e49a9555533660aa1e

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 v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems
Posted by Takashi Iwai 1 year, 2 months ago
On Mon, 24 Jul 2023 20:28:08 +0200,
Mark Brown wrote:
> 
> On Fri, 21 Jul 2023 14:21:09 +0100, Richard Fitzgerald wrote:
> > This set of patches adds support for using the CS35L56 boosted smart
> > amplifier on HDA systems. In these systems the CS35L56 audio is
> > routed through a HDA-to-I2S bridge codec.
> > 
> > This doesn't include the changes to the Realtek driver to actually hook
> > up the CS35L56 driver, because we don't yet have the QUIRK IDs to
> > associate it with. But we want to publish the driver now so that it is
> > available for bringing up hardware with the CS35L56.
> > 
> > [...]
> 
> Applied to
> 
>    https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Mark, could you send an earlier PR including this?
Otherwise we'll be in a messy situation when applying further
conflicting patches like TAS HD-audio codec patches.


thanks,

Takashi
Re: [PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems
Posted by Takashi Iwai 1 year, 2 months ago
On Fri, 21 Jul 2023 15:21:09 +0200,
Richard Fitzgerald wrote:
> 
> This set of patches adds support for using the CS35L56 boosted smart
> amplifier on HDA systems. In these systems the CS35L56 audio is
> routed through a HDA-to-I2S bridge codec.
> 
> This doesn't include the changes to the Realtek driver to actually hook
> up the CS35L56 driver, because we don't yet have the QUIRK IDs to
> associate it with. But we want to publish the driver now so that it is
> available for bringing up hardware with the CS35L56.
> 
> The first 9 patches are moving code out of the ASoC driver and into the
> shared library so that it can be shared with the HDA driver.
> 
> Patch #10 fixes missing #includes in the HDA headers so that the CS35L56
> driver doesn't have to #include headers that it doesn't use.
> 
> CHANGES SINCE V5
> The series has been rebased onto commit df4167d658d4
> ("ASoC: cs35l56: Patch soft registers to defaults"), which removes
> cs35l56_reread_firmware_registers() and adds cs35l56_set_patch().
> 
> Changes are trivial so I have carried forward Mark's and Takashi's acks.

Mark, I suppose it's fine to take all of those to my sound.git tree?


Takashi
Re: [PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems
Posted by Mark Brown 1 year, 2 months ago
On Fri, Jul 21, 2023 at 04:50:35PM +0200, Takashi Iwai wrote:
> Richard Fitzgerald wrote:

> > Changes are trivial so I have carried forward Mark's and Takashi's acks.

> Mark, I suppose it's fine to take all of those to my sound.git tree?

Should be.  Might be handy to have a branch to pull from in case of
conflicts I guess but probably not essential?
Re: [PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems
Posted by Takashi Iwai 1 year, 2 months ago
On Fri, 21 Jul 2023 16:52:52 +0200,
Mark Brown wrote:
> 
> On Fri, Jul 21, 2023 at 04:50:35PM +0200, Takashi Iwai wrote:
> > Richard Fitzgerald wrote:
> 
> > > Changes are trivial so I have carried forward Mark's and Takashi's acks.
> 
> > Mark, I suppose it's fine to take all of those to my sound.git tree?
> 
> Should be.  Might be handy to have a branch to pull from in case of
> conflicts I guess but probably not essential?

That's fine, I'll put a signed tag.


thanks,

Takashi
Re: [PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems
Posted by Takashi Iwai 1 year, 2 months ago
On Fri, 21 Jul 2023 17:04:33 +0200,
Takashi Iwai wrote:
> 
> On Fri, 21 Jul 2023 16:52:52 +0200,
> Mark Brown wrote:
> > 
> > On Fri, Jul 21, 2023 at 04:50:35PM +0200, Takashi Iwai wrote:
> > > Richard Fitzgerald wrote:
> > 
> > > > Changes are trivial so I have carried forward Mark's and Takashi's acks.
> > 
> > > Mark, I suppose it's fine to take all of those to my sound.git tree?
> > 
> > Should be.  Might be handy to have a branch to pull from in case of
> > conflicts I guess but probably not essential?
> 
> That's fine, I'll put a signed tag.

... and it turned out that it's not cleanly applicable, presumably
it's based on some more stuff of the latest asoc.

So, Mark, feel free to apply through yours.


Takashi