mbox series

[v2,0/2] ALSA: cs35l41: prevent old firmwares using unsupported commands

Message ID 20231117163609.823627-1-sbinding@opensource.cirrus.com (mailing list archive)
Headers show
Series ALSA: cs35l41: prevent old firmwares using unsupported commands | expand

Message

Stefan Binding Nov. 17, 2023, 4:36 p.m. UTC
Some systems use older firmware which does not support newer commands
which are used to enable external boost. For those systems, we can
workaround this by writing the registers directly.

We can use the firmware version, stored inside cs_dsp, to determine
whether or not the command is supported.
To achieve this, it requires a cleanup in the api, to pass the cs_dsp
struct into the function.

We can also remove the redundant boolean firmware_running from the HDA
driver, and use the equivalent state inside cs_dsp.

Changes since V1:
- Added fixes tag to all patches
- patches rebased after v6.7 release

Stefan Binding (2):
  ALSA: hda: cs35l41: Remove unnecessary boolean state variable
    firmware_running
  ALSA: cs35l41: Fix for old systems which do not support command

 include/sound/cs35l41.h        |  2 +-
 sound/pci/hda/cs35l41_hda.c    | 28 ++++++++++++----------------
 sound/soc/codecs/cs35l41-lib.c |  6 ++++--
 sound/soc/codecs/cs35l41.c     |  4 ++--
 4 files changed, 19 insertions(+), 21 deletions(-)

Comments

Takashi Iwai Nov. 20, 2023, 11:37 a.m. UTC | #1
On Fri, 17 Nov 2023 17:36:07 +0100,
Stefan Binding wrote:
> 
> Some systems use older firmware which does not support newer commands
> which are used to enable external boost. For those systems, we can
> workaround this by writing the registers directly.
> 
> We can use the firmware version, stored inside cs_dsp, to determine
> whether or not the command is supported.
> To achieve this, it requires a cleanup in the api, to pass the cs_dsp
> struct into the function.
> 
> We can also remove the redundant boolean firmware_running from the HDA
> driver, and use the equivalent state inside cs_dsp.
> 
> Changes since V1:
> - Added fixes tag to all patches
> - patches rebased after v6.7 release
> 
> Stefan Binding (2):
>   ALSA: hda: cs35l41: Remove unnecessary boolean state variable
>     firmware_running
>   ALSA: cs35l41: Fix for old systems which do not support command

Both patches applied now.  Thanks.


Takashi