[PATCH 2/2] ALSA: hda: cs35l56: Log tuning unique identifiers during firmware load

Simon Trimmer posted 2 patches 9 months ago
[PATCH 2/2] ALSA: hda: cs35l56: Log tuning unique identifiers during firmware load
Posted by Simon Trimmer 9 months ago
The cs35l56 smart amplifier has some informational firmware controls
that are populated by a tuning bin file to unique values - logging these
during firmware load identifies the specific configuration being used on
that device instance.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
---
 sound/pci/hda/cs35l56_hda.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index b6fecf119261..aed7d7284231 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -676,6 +676,8 @@ static void cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
 	if (ret)
 		cs_dsp_stop(&cs35l56->cs_dsp);
 
+	cs35l56_log_tuning(&cs35l56->base, &cs35l56->cs_dsp);
+
 err_powered_up:
 	if (!cs35l56->base.fw_patched)
 		cs_dsp_power_down(&cs35l56->cs_dsp);
-- 
2.43.0
Re: [PATCH 2/2] ALSA: hda: cs35l56: Log tuning unique identifiers during firmware load
Posted by Mark Brown 8 months, 4 weeks ago
On Tue, May 13, 2025 at 01:39:24PM +0000, Simon Trimmer wrote:
> The cs35l56 smart amplifier has some informational firmware controls
> that are populated by a tuning bin file to unique values - logging these
> during firmware load identifies the specific configuration being used on
> that device instance.

Adding Takashi since this is an ALSA patch (and not deleting context for
him), Takashi is this OK to go via ASoC?

As documented in submitting-patches.rst please send patches to the 
maintainers for the code you would like to change.  The normal kernel
workflow is that people apply patches from their inboxes, if they aren't
copied they are likely to not see the patch at all and it is much more
difficult to apply patches.

> 
> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
> ---
>  sound/pci/hda/cs35l56_hda.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
> index b6fecf119261..aed7d7284231 100644
> --- a/sound/pci/hda/cs35l56_hda.c
> +++ b/sound/pci/hda/cs35l56_hda.c
> @@ -676,6 +676,8 @@ static void cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
>  	if (ret)
>  		cs_dsp_stop(&cs35l56->cs_dsp);
>  
> +	cs35l56_log_tuning(&cs35l56->base, &cs35l56->cs_dsp);
> +
>  err_powered_up:
>  	if (!cs35l56->base.fw_patched)
>  		cs_dsp_power_down(&cs35l56->cs_dsp);
> -- 
> 2.43.0
> 
Re: [PATCH 2/2] ALSA: hda: cs35l56: Log tuning unique identifiers during firmware load
Posted by Takashi Iwai 8 months, 4 weeks ago
On Wed, 14 May 2025 10:29:53 +0200,
Mark Brown wrote:
> 
> On Tue, May 13, 2025 at 01:39:24PM +0000, Simon Trimmer wrote:
> > The cs35l56 smart amplifier has some informational firmware controls
> > that are populated by a tuning bin file to unique values - logging these
> > during firmware load identifies the specific configuration being used on
> > that device instance.
> 
> Adding Takashi since this is an ALSA patch (and not deleting context for
> him), Takashi is this OK to go via ASoC?

Sure, it's a simple logging, feel free to pick it up.

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


thanks,

Takashi


> As documented in submitting-patches.rst please send patches to the 
> maintainers for the code you would like to change.  The normal kernel
> workflow is that people apply patches from their inboxes, if they aren't
> copied they are likely to not see the patch at all and it is much more
> difficult to apply patches.
> 
> > 
> > Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
> > ---
> >  sound/pci/hda/cs35l56_hda.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
> > index b6fecf119261..aed7d7284231 100644
> > --- a/sound/pci/hda/cs35l56_hda.c
> > +++ b/sound/pci/hda/cs35l56_hda.c
> > @@ -676,6 +676,8 @@ static void cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
> >  	if (ret)
> >  		cs_dsp_stop(&cs35l56->cs_dsp);
> >  
> > +	cs35l56_log_tuning(&cs35l56->base, &cs35l56->cs_dsp);
> > +
> >  err_powered_up:
> >  	if (!cs35l56->base.fw_patched)
> >  		cs_dsp_power_down(&cs35l56->cs_dsp);
> > -- 
> > 2.43.0
> > 
> Verifying...