mbox series

[0/2] ALSA: hda: Move component binding support into separate library

Message ID 20240124112607.77614-1-rf@opensource.cirrus.com (mailing list archive)
Headers show
Series ALSA: hda: Move component binding support into separate library | expand

Message

Richard Fitzgerald Jan. 24, 2024, 11:26 a.m. UTC
The Cirrus Logic amplifiers are currently paired with Realtek HDA codecs.
But they could be used with other codecs. To prepare for this, these two
patches move the manager side of the component binding out of the Realtek
driver into a library module.

The first patch tweaks the CS35L41 code so that it is not hardcoded to
CS35L41, and changes the TAS2781 handling so that it re-uses that code
instead of having a near-identical copy of it.

Can someone please test that these two patches don't break TAS2781?
I have checked that they should work in theory but I don't have hardware
to test on.

Richard Fitzgerald (2):
  ALSA: hda: realtek: Re-work CS35L41 fixups to re-use for other amps
  ALSA: hda: realtek: Move hda_component implementation to module

 MAINTAINERS                   |   1 +
 sound/pci/hda/Kconfig         |   4 +
 sound/pci/hda/Makefile        |   2 +
 sound/pci/hda/hda_component.c | 169 ++++++++++++++++++++++++++
 sound/pci/hda/hda_component.h |  59 +++++++++
 sound/pci/hda/patch_realtek.c | 217 ++++------------------------------
 6 files changed, 261 insertions(+), 191 deletions(-)
 create mode 100644 sound/pci/hda/hda_component.c

Comments

Takashi Iwai Jan. 24, 2024, 1:43 p.m. UTC | #1
On Wed, 24 Jan 2024 12:26:05 +0100,
Richard Fitzgerald wrote:
> 
> The Cirrus Logic amplifiers are currently paired with Realtek HDA codecs.
> But they could be used with other codecs. To prepare for this, these two
> patches move the manager side of the component binding out of the Realtek
> driver into a library module.
> 
> The first patch tweaks the CS35L41 code so that it is not hardcoded to
> CS35L41, and changes the TAS2781 handling so that it re-uses that code
> instead of having a near-identical copy of it.
> 
> Can someone please test that these two patches don't break TAS2781?
> I have checked that they should work in theory but I don't have hardware
> to test on.
> 
> Richard Fitzgerald (2):
>   ALSA: hda: realtek: Re-work CS35L41 fixups to re-use for other amps
>   ALSA: hda: realtek: Move hda_component implementation to module

Through a quick glance, it looks good.
I'll wait for the verification for TAS codec for a while.


thanks,

Takashi
Gergo Koteles Jan. 24, 2024, 9:55 p.m. UTC | #2
Hi Richard,

On Wed, 2024-01-24 at 11:26 +0000, Richard Fitzgerald wrote:
> The Cirrus Logic amplifiers are currently paired with Realtek HDA codecs.
> But they could be used with other codecs. To prepare for this, these two
> patches move the manager side of the component binding out of the Realtek
> driver into a library module.
> 
> The first patch tweaks the CS35L41 code so that it is not hardcoded to
> CS35L41, and changes the TAS2781 handling so that it re-uses that code
> instead of having a near-identical copy of it.
> 
> Can someone please test that these two patches don't break TAS2781?
> I have checked that they should work in theory but I don't have hardware
> to test on.
> 

It works on a Lenovo Yoga 7 14ARB7 laptop.

Tested-by: Gergo Koteles <soyer@irl.hu>

Regards,
Gergo

> Richard Fitzgerald (2):
>   ALSA: hda: realtek: Re-work CS35L41 fixups to re-use for other amps
>   ALSA: hda: realtek: Move hda_component implementation to module
> 
>  MAINTAINERS                   |   1 +
>  sound/pci/hda/Kconfig         |   4 +
>  sound/pci/hda/Makefile        |   2 +
>  sound/pci/hda/hda_component.c | 169 ++++++++++++++++++++++++++
>  sound/pci/hda/hda_component.h |  59 +++++++++
>  sound/pci/hda/patch_realtek.c | 217 ++++------------------------------
>  6 files changed, 261 insertions(+), 191 deletions(-)
>  create mode 100644 sound/pci/hda/hda_component.c
>
Takashi Iwai Jan. 25, 2024, 9:05 a.m. UTC | #3
On Wed, 24 Jan 2024 14:43:47 +0100,
Takashi Iwai wrote:
> 
> On Wed, 24 Jan 2024 12:26:05 +0100,
> Richard Fitzgerald wrote:
> > 
> > The Cirrus Logic amplifiers are currently paired with Realtek HDA codecs.
> > But they could be used with other codecs. To prepare for this, these two
> > patches move the manager side of the component binding out of the Realtek
> > driver into a library module.
> > 
> > The first patch tweaks the CS35L41 code so that it is not hardcoded to
> > CS35L41, and changes the TAS2781 handling so that it re-uses that code
> > instead of having a near-identical copy of it.
> > 
> > Can someone please test that these two patches don't break TAS2781?
> > I have checked that they should work in theory but I don't have hardware
> > to test on.
> > 
> > Richard Fitzgerald (2):
> >   ALSA: hda: realtek: Re-work CS35L41 fixups to re-use for other amps
> >   ALSA: hda: realtek: Move hda_component implementation to module
> 
> Through a quick glance, it looks good.
> I'll wait for the verification for TAS codec for a while.

Now applied to for-next branch.


thanks,

Takashi