]> www.infradead.org Git - users/dwmw2/linux.git/log
users/dwmw2/linux.git
9 months agosoc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list
Herve Codina [Mon, 1 Jul 2024 11:30:34 +0000 (13:30 +0200)]
soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list

qmc_chan_get_byphandle() and the resource managed version retrieve a
channel from a simple phandle.

Extend the API and introduce qmc_chan_get_byphandles_index() and the
resource managed version in order to retrieve a channel from a phandle
list using the provided index to identify the phandle in the list.

Also update qmc_chan_get_byphandle() and the resource managed version to
use qmc_chan_get_byphandles_index() and so avoid code duplication.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-8-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: fsl_qmc_audio: Introduce qmc_dai_constraints_interleaved()
Herve Codina [Mon, 1 Jul 2024 11:30:33 +0000 (13:30 +0200)]
ASoC: fsl: fsl_qmc_audio: Introduce qmc_dai_constraints_interleaved()

Constraints are set by qmc_dai_startup(). These constraints are specific
to the interleaved mode.

With the future introduction of support for non-interleaved mode, a new
set of constraints will be set. To make the code clear and keep
qmc_dai_startup() simple, extract the current interleaved mode
constraints settings to a specific function.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-7-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: fsl_qmc_audio: Introduce qmc_audio_pcm_{read,write}_submit()
Herve Codina [Mon, 1 Jul 2024 11:30:32 +0000 (13:30 +0200)]
ASoC: fsl: fsl_qmc_audio: Introduce qmc_audio_pcm_{read,write}_submit()

Submitting data to QMC channels is done in several places: transfer
completions and DAI start. The operation done is simple and consist in
one function call.

With the future introduction of support for non-interleaved mode,
submitting data will be more complex.

To avoid copy/paste of code in several places, introduce
qmc_audio_pcm_{read,write}_submit() whose goal is to handle this
data submission.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-6-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: fsl_qmc_audio: Identify the QMC channel involved in completion routines
Herve Codina [Mon, 1 Jul 2024 11:30:31 +0000 (13:30 +0200)]
ASoC: fsl: fsl_qmc_audio: Identify the QMC channel involved in completion routines

The current QMC audio driver uses only one QMC channel per DAI. The
context used by QMC channel transfer (read and write) completion
routines does not contains any QMC channel and the only one available
per DAI is used to schedule the next transfer.
This works pretty well with only one QMC channel per DAI.

The future support for non-inlerleave mode will use several QMC channel
per DAI. In that case, QMC channel transfer completion routines need to
identify the QMC channel related to the completion.

In order to fill this lack, even if identifying the current QMC channel
among several QMC channels is not needed for the current code, add one
indirection level and introduce the qmc_dai_chan data structrure.
This structure contains the QMC channel involved in the completion and
refererences to the runtime context (capture and playback) used by the
DAI.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-5-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: fsl_qmc_audio: Split channel buffer and PCM pointer handling
Herve Codina [Mon, 1 Jul 2024 11:30:30 +0000 (13:30 +0200)]
ASoC: fsl: fsl_qmc_audio: Split channel buffer and PCM pointer handling

The driver mixes some internal values for channel DMA buffer handling
and PCM pointer handling. In the currently supported interleaved mode,
this mix does not lead to any issues but in order to prepare the
support for the non-interleaved mode, having them clearly separated will
ease the support and avoid additional computation to convert values used
in channel DMA buffer management in values usable for PCM pointer.

Use a specific set of variable for PCM pointer handling and an other set
for channel DMA buffer.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-4-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: fsl_qmc_audio: Fix issues detected by checkpatch
Herve Codina [Mon, 1 Jul 2024 11:30:29 +0000 (13:30 +0200)]
ASoC: fsl: fsl_qmc_audio: Fix issues detected by checkpatch

./scripts/checkpatch.pl --strict --codespell detected several issues
when running on the fsl_qmc_audio.c file:
  - CHECK: spaces preferred around that '*' (ctx:VxV)
  - CHECK: Alignment should match open parenthesis
  - CHECK: Comparison to NULL could be written "!prtd"
  - CHECK: spaces preferred around that '/' (ctx:VxV)
  - CHECK: Lines should not end with a '('
  - CHECK: Please don't use multiple blank lines
Some of them are present several times.

Fix all of these issues without any functional changes.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-3-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: fsl_qmc_audio: Check devm_kasprintf() returned value
Herve Codina [Mon, 1 Jul 2024 11:30:28 +0000 (13:30 +0200)]
ASoC: fsl: fsl_qmc_audio: Check devm_kasprintf() returned value

devm_kasprintf() can return a NULL pointer on failure but this returned
value is not checked.

Fix this lack and check the returned value.

Fixes: 075c7125b11c ("ASoC: fsl: Add support for QMC audio")
Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-2-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wsa884x: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:21:05 +0000 (18:21 +0200)]
ASoC: wsa884x: Constify struct regmap_config

`wsa884x_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-9-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wsa883x: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:21:04 +0000 (18:21 +0200)]
ASoC: wsa883x: Constify struct regmap_config

`wsa883x_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-8-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: wsa881x: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:21:03 +0000 (18:21 +0200)]
ASoC: wsa881x: Constify struct regmap_config

`wsa881x_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-7-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: jz4770: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:21:02 +0000 (18:21 +0200)]
ASoC: jz4770: Constify struct regmap_config

`jz4760_codec_regmap_config` is not modified and can be declared as
const to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-6-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: jz4760: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:21:01 +0000 (18:21 +0200)]
ASoC: jz4760: Constify struct regmap_config

`jz4760_codec_regmap_config` is not modified and can be declared as
const to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-5-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs53l30: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:21:00 +0000 (18:21 +0200)]
ASoC: cs53l30: Constify struct regmap_config

`cs53l30_regmap` is not modified and can be declared as const to move
its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-4-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l36: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:20:59 +0000 (18:20 +0200)]
ASoC: cs35l36: Constify struct regmap_config

`cs35l36_regmap` is not modified and can be declared as const to move
its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-3-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l35: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:20:58 +0000 (18:20 +0200)]
ASoC: cs35l35: Constify struct regmap_config

`cs35l35_regmap` is not modified and can be declared as const to move
its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-2-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l34: Constify struct regmap_config
Javier Carrasco [Wed, 3 Jul 2024 16:20:57 +0000 (18:20 +0200)]
ASoC: cs35l34: Constify struct regmap_config

`cs35l34_regmap` is not modified and can be declared as const to move
its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-1-2e379b0446a7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l56: Set correct upper volume limit
Mark Brown [Wed, 3 Jul 2024 16:30:47 +0000 (17:30 +0100)]
ASoC: cs35l56: Set correct upper volume limit

Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

These two commits set the upper limit of the Speaker Volume control
to +12dB instead of +100dB.

This should have been a simple 1-line change to the #define in the
header file, but only the HDA cs35l56 driver is using this define.
The ASoC cs35l56 driver was using hardcoded numbers instead of the
header defines.

So the first commit changes the ASoC driver to use the #defined
constants. The second commit corrects the value of the constant.

9 months agoASoC: fsl_xcvr: Improve suspend/resume flow in fsl_xcvr_trigger()
Chancel Liu [Fri, 28 Jun 2024 09:43:54 +0000 (18:43 +0900)]
ASoC: fsl_xcvr: Improve suspend/resume flow in fsl_xcvr_trigger()

In the current flow all interrupts are disabled in runtime suspend
phase. However interrupts enablement only exists in fsl_xcvr_prepare().
After resume fsl_xcvr_prepare() may not be called so it will cause all
interrupts still disabled even if resume from suspend. Interrupts
should be explictily enabled after resume.

Also, DPATH reset setting only exists in fsl_xcvr_prepare(). After
resume from suspend DPATH should be reset otherwise there'll be channel
swap issue.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20240628094354.780720-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Richard Fitzgerald [Wed, 3 Jul 2024 09:55:17 +0000 (10:55 +0100)]
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum

Change CS35L56_MAIN_RENDER_USER_VOLUME_MAX to 48, to limit the maximum
value of the Speaker Volume control to +12dB. The minimum value is
unchanged so that the default 0dB has the same integer control value.

The original maximum of 400 (+100dB) was the largest value that can be
mathematically handled by the DSP. The actual maximum amplification is
+12dB.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240703095517.208077-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l56: Use header defines for Speaker Volume control definition
Richard Fitzgerald [Wed, 3 Jul 2024 09:55:16 +0000 (10:55 +0100)]
ASoC: cs35l56: Use header defines for Speaker Volume control definition

The "Speaker Volume" control was being defined using four hardcoded magic
numbers. There are #defines in the cs35l56.h header for these numbers, so
change the code to use the defined constants.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240703095517.208077-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: tas2781: Use of_property_read_reg()
Rob Herring (Arm) [Tue, 2 Jul 2024 21:54:01 +0000 (15:54 -0600)]
ASoC: tas2781: Use of_property_read_reg()

Replace the open-coded parsing of "reg" with of_property_read_reg().
The #ifdef is also easily replaced with IS_ENABLED().

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240702215402.839673-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: PCM6240: Use of_property_read_reg()
Rob Herring (Arm) [Tue, 2 Jul 2024 21:53:49 +0000 (15:53 -0600)]
ASoC: PCM6240: Use of_property_read_reg()

Replace the open-coded parsing of "reg" with of_property_read_reg().
The #ifdef is also easily replaced with IS_ENABLED().

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240702215349.839350-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: kcontrol registration cleanup
Mark Brown [Tue, 2 Jul 2024 20:32:07 +0000 (21:32 +0100)]
ASoC: topology: kcontrol registration cleanup

Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

Code used to create standalone and widget controls is mostly same, with
with exception that in standalone case dynamic object needs to be
registered and control created directly.

Following patches clean up and unify kcontrol creation code in topology
code.

9 months agoAdd master clock handling for nau8824
Mark Brown [Tue, 2 Jul 2024 19:26:51 +0000 (20:26 +0100)]
Add master clock handling for nau8824

Merge series from Maxim Kochetkov <fido_max@inbox.ru>:

nau8824 has external MCLK pin. So add enable/disable external clock
management.

9 months agoASoC: dt-bindings: realtek,rt5645: Convert to dtschema
Animesh Agarwal [Tue, 2 Jul 2024 12:00:58 +0000 (17:30 +0530)]
ASoC: dt-bindings: realtek,rt5645: Convert to dtschema

Convert the RT5650/RT5645 audio CODEC bindings to DT schema.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20240702120106.17100-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Unify code for creating standalone and widget enum control
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:50 +0000 (12:18 +0200)]
ASoC: topology: Unify code for creating standalone and widget enum control

Code used to create standalone and widget enum control is same, with
exception that in standalone case dynamic object needs to be registered
and control created directly.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-14-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Unify code for creating standalone and widget mixer control
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:49 +0000 (12:18 +0200)]
ASoC: topology: Unify code for creating standalone and widget mixer control

Code used to create standalone and widget mixer control is same, with
exception that in standalone case dynamic object needs to be registered
and control created directly.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-13-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Unify code for creating standalone and widget bytes control
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:48 +0000 (12:18 +0200)]
ASoC: topology: Unify code for creating standalone and widget bytes control

Code used to create standalone and widget bytes control is same, with
exception that in standalone case dynamic object needs to be registered
and control created directly.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-12-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Reshuffle function placement
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:47 +0000 (12:18 +0200)]
ASoC: topology: Reshuffle function placement

In preparation for following cleanups move functions around.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-11-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Rename function creating widget kcontrol
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:46 +0000 (12:18 +0200)]
ASoC: topology: Rename function creating widget kcontrol

In following patches it will be reused to also create standalone
kcontrol, so it makes sense to name it in more generic way.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-10-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Align dynamic object initialization for controls
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:45 +0000 (12:18 +0200)]
ASoC: topology: Align dynamic object initialization for controls

soc_tplg_dbytes_create() missed se->dobj.index initialization, so add it
there. Additionally separate dynamic object initialization into separate
logical block code.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-9-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Correctly set shift_r in soc_tplg_denum_create()
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:44 +0000 (12:18 +0200)]
ASoC: topology: Correctly set shift_r in soc_tplg_denum_create()

This aligns soc_tplg_denum_create() with
soc_tplg_dapm_widget_denum_create(), as there is no reason for
difference in behavior.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-8-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Cleanup soc_tplg_dapm_widget_denum_create
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:43 +0000 (12:18 +0200)]
ASoC: topology: Cleanup soc_tplg_dapm_widget_denum_create

Minor cleanups to increase readability.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Cleanup soc_tplg_dapm_widget_dmixer_create
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:42 +0000 (12:18 +0200)]
ASoC: topology: Cleanup soc_tplg_dapm_widget_dmixer_create

Minor cleanups to increase readability.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Cleanup soc_tplg_dapm_widget_dbytes_create
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:41 +0000 (12:18 +0200)]
ASoC: topology: Cleanup soc_tplg_dapm_widget_dbytes_create

Minor cleanups to increase readability.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Properly initialize soc_enum values
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:40 +0000 (12:18 +0200)]
ASoC: topology: Properly initialize soc_enum values

soc_tplg_denum_create_values() should properly set its values field.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Do not do unnecessary dobj management
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:39 +0000 (12:18 +0200)]
ASoC: topology: Do not do unnecessary dobj management

Widget kcontrols do not need to be managed as topology dynamic objects
with an index and a linked list. As they are always associated with a
widget which is already a topology dynamic object, thus all
addition/removals of a widget will by design manage the kcontrol.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: topology: Simplify code
Amadeusz Sławiński [Thu, 27 Jun 2024 10:18:38 +0000 (12:18 +0200)]
ASoC: topology: Simplify code

Instead of using goto, when there is no controls, just do a loop when
there are. Overall the check seems to be a bit redundant as
num_kcontrols will only be above 0 if kcontrols are set anyway, but
let's keep it, while simplifying code.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20240627101850.2191513-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agofirmware: cs_dsp: Don't allow writes to read-only controls
Richard Fitzgerald [Tue, 2 Jul 2024 11:08:09 +0000 (12:08 +0100)]
firmware: cs_dsp: Don't allow writes to read-only controls

Add a check to cs_dsp_coeff_write_ctrl() to abort if the control
is not writeable.

The cs_dsp code originated as an ASoC driver (wm_adsp) where all
controls were exported as ALSA controls. It relied on ALSA to
enforce the read-only permission. Now that the code has been
separated from ALSA/ASoC it must perform its own permission check.

This isn't currently causing any problems so there shouldn't be any
need to backport this. If the client of cs_dsp exposes the control as
an ALSA control, it should set permissions on that ALSA control to
protect it. The few uses of cs_dsp_coeff_write_ctrl() inside drivers
are for writable controls.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240702110809.16836-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: codecs: nau8824: Add master clock handling
Maxim Kochetkov [Mon, 1 Jul 2024 21:16:22 +0000 (00:16 +0300)]
ASoC: codecs: nau8824: Add master clock handling

Use master clock "mclk" if provided through device tree.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://patch.msgid.link/20240701211631.92384-3-fido_max@inbox.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: nau8824: Add master clock handling
Maxim Kochetkov [Mon, 1 Jul 2024 21:16:21 +0000 (00:16 +0300)]
ASoC: dt-bindings: nau8824: Add master clock handling

Use master clock "mclk" if provided through device tree.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240701211631.92384-2-fido_max@inbox.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: simple-audio-mux: add state-labels
Mark Brown [Tue, 2 Jul 2024 12:03:13 +0000 (13:03 +0100)]
ASoC: simple-audio-mux: add state-labels

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

simple-audio-mux is designed to be used generally, thus "Input 1" or
"Input 2" are used to selecting MUX input. This numbered inputs would work,
but might be not user friendly in some case, for example in case of system
hardware design has some clear labels.
Adds new "state-labels" property and enable to select MUX by own state names.

Original
> amixer set "MUX" "Input 1"
> amixer set "MUX" "Input 2"

Use mux-names
sound_mux: mux {
compatible = "simple-audio-mux";
mux-gpios = <...>;
=> state-labels = "Label_A", "Label_B";
};

> amixer set "MUX" "Label_A"
> amixer set "MUX" "Label_B"

9 months agoASoC: cs35l56: Remove obsolete and redundant code
Mark Brown [Tue, 2 Jul 2024 12:03:05 +0000 (13:03 +0100)]
ASoC: cs35l56: Remove obsolete and redundant code

Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

These commits remove various code that is either no longer needed,
or is redundant.

9 months agoASoC: codecs: wsa88xx: add support for static port
Mark Brown [Tue, 2 Jul 2024 12:02:57 +0000 (13:02 +0100)]
ASoC: codecs: wsa88xx: add support for static port

Merge series from srinivas.kandagatla@linaro.org:

Existing way of allocating soundwire master ports on Qualcommm platforms is
dynamic, and in linear order starting from 1 to MAX_PORTS.
This will work as long as soundwire device ports are 1:1 mapped
linearly. However on most Qcom SoCs like SM8550, SM8650, x1e80100, these
are NOT mapped in that order.

The result of this is that only one speaker among the pair of speakers
is always silent, With recent changes for WSA codec to support codec
versions and along with these patches we are able to get all speakers
working on these SoCs.

9 months agoASoC: codecs: lpass-wsa-macro: Fix using NULL pointer in probe() dev_err
Krzysztof Kozlowski [Fri, 28 Jun 2024 09:58:31 +0000 (11:58 +0200)]
ASoC: codecs: lpass-wsa-macro: Fix using NULL pointer in probe() dev_err

The 'wsa->dev' is assigned closer to the end of the probe() function, so
the dev_err() must not use it - it is still NULL at this point.  Instead
there is already a local 'dev' variable.

Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240628095831.207942-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err
Krzysztof Kozlowski [Fri, 28 Jun 2024 09:58:30 +0000 (11:58 +0200)]
ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err

The 'rx->dev' is assigned closer to the end of the probe() function, so
the dev_err() must not use it - it is still NULL at this point.  Instead
there is already a local 'dev' variable.

Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240628095831.207942-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: lpc3xxx-i2s: Include bitfield.h for FIELD_PREP
Nathan Chancellor [Mon, 1 Jul 2024 18:26:38 +0000 (11:26 -0700)]
ASoC: fsl: lpc3xxx-i2s: Include bitfield.h for FIELD_PREP

bitfield.h is not explicitly included but it is required for FIELD_PREP
to be expanded by the preprocessor. If it is not implicitly included,
there will be a compiler error (as seen with ARCH=hexagon allmodconfig):

  sound/soc/fsl/lpc3xxx-i2s.c:169:10: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    169 |                 tmp |= LPC3XXX_I2S_WW8 | LPC3XXX_I2S_WS_HP(LPC3XXX_I2S_WW8_HP);
        |                        ^
  sound/soc/fsl/lpc3xxx-i2s.h:42:30: note: expanded from macro 'LPC3XXX_I2S_WW8'
     42 | #define LPC3XXX_I2S_WW8      FIELD_PREP(0x3, 0) /* Word width is 8bit */
        |                              ^
  sound/soc/fsl/lpc3xxx-i2s.c:205:34: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    205 |                              LPC3XXX_I2S_DMA1_TX_EN | LPC3XXX_I2S_DMA0_TX_DEPTH(4));
        |                                                       ^
  sound/soc/fsl/lpc3xxx-i2s.h:65:38: note: expanded from macro 'LPC3XXX_I2S_DMA0_TX_DEPTH'
     65 | #define LPC3XXX_I2S_DMA0_TX_DEPTH(s) FIELD_PREP(0xF0000, s) /* Set the DMA1 TX Request level */
        |                                      ^
  sound/soc/fsl/lpc3xxx-i2s.c:210:34: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    210 |                              LPC3XXX_I2S_DMA0_RX_EN | LPC3XXX_I2S_DMA1_RX_DEPTH(4));
        |                                                       ^
  sound/soc/fsl/lpc3xxx-i2s.h:70:38: note: expanded from macro 'LPC3XXX_I2S_DMA1_RX_DEPTH'
     70 | #define LPC3XXX_I2S_DMA1_RX_DEPTH(s) FIELD_PREP(0x700, s) /* Set the DMA1 RX Request level */
        |                                      ^

Include bitfield.h explicitly, so that FIELD_PREP is always expanded,
clearing up the compiler error.

Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-include-for-field_prep-v1-1-0c5d7f71921b@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl: lpc3xxx-i2s: Avoid using ret uninitialized in lpc32xx_i2s_probe()
Nathan Chancellor [Mon, 1 Jul 2024 16:24:16 +0000 (09:24 -0700)]
ASoC: fsl: lpc3xxx-i2s: Avoid using ret uninitialized in lpc32xx_i2s_probe()

clang points out that ret may be used uninitialized in
lpc32xx_i2s_probe() in an error pointer path (which becomes fatal with
CONFIG_WERROR):

  sound/soc/fsl/lpc3xxx-i2s.c:326:47: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
    326 |                                      "failed to init register map: %d\n", ret);
        |                                                                           ^~~
  sound/soc/fsl/lpc3xxx-i2s.c:310:9: note: initialize the variable 'ret' to silence this warning
    310 |         int ret;
        |                ^
        |                 = 0
  1 error generated.

One solution would be a small refactoring of the second parameter in
dev_err_probe(), PTR_ERR(i2s_info_p->regs), to be the value of ret in
the if statement. However, a nicer solution for debugging purposes,
which is the point of this statement, would be to use the '%pe'
specifier to symbolically print the error pointer value. Do so, which
eliminates the uninitialized use of ret, clearing up the warning.

Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-uninitialized-ret-v1-1-985d86189739@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: realtek,rt5677: Convert to dtschema
Animesh Agarwal [Thu, 27 Jun 2024 10:50:26 +0000 (16:20 +0530)]
ASoC: dt-bindings: realtek,rt5677: Convert to dtschema

Convert the RT5677 audio CODEC bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240627105030.14360-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoc: tas2781: Add name_prefix as the prefix name of DSP firmwares and calibrated...
Shenghao Ding [Sat, 29 Jun 2024 10:11:10 +0000 (18:11 +0800)]
ASoc: tas2781: Add name_prefix as the prefix name of DSP firmwares and calibrated data files

Add name_prefix as the prefix name of DSP firmwares
and calibrated data files which stored speaker
calibrated impedance.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240629101112.628-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: codecs: wsa884x: parse port-mapping information
Srinivas Kandagatla [Thu, 27 Jun 2024 14:44:41 +0000 (15:44 +0100)]
ASoC: codecs: wsa884x: parse port-mapping information

Add support to parse static master port map information from device tree.
This is required for correct port mapping between soundwire device and
master ports.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240626-port-map-v2-4-6cc1c5608cdd@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: wsa8840: Document port mapping property
Srinivas Kandagatla [Thu, 27 Jun 2024 14:44:40 +0000 (15:44 +0100)]
ASoC: dt-bindings: wsa8840: Document port mapping property

Document port mapping property for wsa884x. Port mapping is required
to be able map correct master ports.

All the device ports are not mapped in same order as master ports, so
there is a need for having static port mapping for WSA codecs.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://patch.msgid.link/20240626-port-map-v2-3-6cc1c5608cdd@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: codecs: wsa883x: parse port-mapping information
Srinivas Kandagatla [Thu, 27 Jun 2024 14:44:39 +0000 (15:44 +0100)]
ASoC: codecs: wsa883x: parse port-mapping information

Add support to parse static master port map information from device tree.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240626-port-map-v2-2-6cc1c5608cdd@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: wsa883x: Document port mapping property
Manikantan R [Thu, 27 Jun 2024 14:44:38 +0000 (15:44 +0100)]
ASoC: dt-bindings: wsa883x: Document port mapping property

Document port mapping property for wsa883x. Port mapping is required
to be able map correct master ports for VI feedback.

All the device ports are not mapped in same order as master ports, so
there is a need for having static port mapping for WSA codecs.

Signed-off-by: Manikantan R <quic_manrav@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://patch.msgid.link/20240626-port-map-v2-1-6cc1c5608cdd@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: simple-audio-mux: add state-labels property
Kuninori Morimoto [Mon, 1 Jul 2024 00:38:59 +0000 (00:38 +0000)]
ASoC: dt-bindings: simple-audio-mux: add state-labels property

simple-audio-mux is designed to be used generally, thus "Input 1" or
"Input 2" are used to selecting MUX input. This numbered inputs would
work, but might be not user friendly in some case, for example in case
of system hardware design has some clear labels.
Adds new "state-labels" property and enable to select MUX by own state
names.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/87le2m7xp8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: simple-audio-mux: enable to select MUX names
Kuninori Morimoto [Mon, 1 Jul 2024 00:38:51 +0000 (00:38 +0000)]
ASoC: simple-audio-mux: enable to select MUX names

simple-audio-mux is designed to be used generally, thus "Input 1" or
"Input 2" are used to selecting MUX input. This numbered inputs would
work, but might be not user friendly in some case, for example in case
of system hardware design has some clear labels.
Adds new "state-labels" property and enable to select MUX by own state
names.

Original
> amixer set "MUX" "Input 1"

Use mux-names
sound_mux: mux {
compatible = "simple-audio-mux";
mux-gpios = <...>;
state-labels = "Label_A", "Label_B";
};

> amixer set "MUX" "Label_A"

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msn27xpg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: realtek,rt5659: Convert to dtschema
Animesh Agarwal [Mon, 24 Jun 2024 13:29:44 +0000 (18:59 +0530)]
ASoC: dt-bindings: realtek,rt5659: Convert to dtschema

Convert the RT5659/RT5658 audio CODEC bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240624132949.124228-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: fsl_rpmsg: Add support for i.MX95 platform
Chancel Liu [Wed, 26 Jun 2024 07:12:02 +0000 (16:12 +0900)]
ASoC: fsl_rpmsg: Add support for i.MX95 platform

Add compatible string and specific soc data to support rpmsg sound card
on i.MX95 platform.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20240626071202.7149-2-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX95
Chancel Liu [Wed, 26 Jun 2024 07:12:01 +0000 (16:12 +0900)]
ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX95

Add compatible string for i.MX95 platform which supports audio
function through rpmsg channel between Cortex-A and Cortex-M core.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240626071202.7149-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l56: Remove redundant clearing of clk_stop_mode1
Richard Fitzgerald [Mon, 1 Jul 2024 10:44:44 +0000 (11:44 +0100)]
ASoC: cs35l56: Remove redundant clearing of clk_stop_mode1

struct sdw_slave_prop is zero-initialized by the SoundWire core so there
is no need to clear clk_stop_mode1 to false. Removing this also avoids
having an unnecessary build dependency on a struct member.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240701104444.172556-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l56: Remove support for A1 silicon
Richard Fitzgerald [Mon, 1 Jul 2024 10:44:43 +0000 (11:44 +0100)]
ASoC: cs35l56: Remove support for A1 silicon

No product was ever released with A1 silicon so there is no
need for the driver to include support for it.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240701104444.172556-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: cs35l56: Revert support for dual-ownership of ASP registers
Richard Fitzgerald [Mon, 1 Jul 2024 10:44:42 +0000 (11:44 +0100)]
ASoC: cs35l56: Revert support for dual-ownership of ASP registers

This patch reverts a series of commits that allowed for the ASP
registers to be owned by either the driver or the firmware. Nothing
currently depends on the functionality that is being reverted, so
it is safe to remove.

The commits being reverted are (last 3 are bugfixes to the first 2):
commit 72a77d7631c6
("ASoC: cs35l56: Fix to ensure ASP1 registers match cache")
commit 07f7d6e7a124
("ASoC: cs35l56: Fix for initializing ASP1 mixer registers")
commit 4703b014f28b
("ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put()")
commit c14f09f010cc
("ASoC: cs35l56: Fix deadlock in ASP1 mixer register initialization")
commit dfd2ffb37399
("ASoC: cs35l56: Prevent overwriting firmware ASP config")

These reverts have been squashed into a single commit because there
would be no reason to revert only some of them (which would just
reintroduce bugs).

The changes introduced by the commits were well-intentioned but
somewhat misguided. ACPI does not provide any information about how
audio hardware is linked together, so that information has to be
hardcoded into drivers. On Windows the firmware is customized to
statically setup appropriate configuration of the audio links,
and the intent of the commits was to re-use this information if the
Linux host drivers aren't taking control of the ASP. This would
avoid having to hardcode the ASP config into the machine driver on
some systems.

However, this added complexity and race conditions into the driver.
It also complicates implementation of new code.

The only case where the ASP is used but the host is not taking
ownership is when CS35L56 is used in SoundWire mode with the ASP
as a reference audio interconnect. But even in that case it's not
necessarily required even if the firmware initialized it. Typically
it is used to avoid the host SDCA drivers having to be capable of
aggregating capture paths from multiple SoundWire peripherals. But
the SOF SoundWire support is capable of doing that aggregation.

Reverting all these commits significantly simplifies the driver.
Let's just use the normal Linux mechanisms of the machine driver and
ALSA controls to set things up instead of trying to use the firmware
to do use-case setup.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240701104444.172556-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoAdd audio support for LPC32XX CPUs
Mark Brown [Fri, 28 Jun 2024 17:07:12 +0000 (18:07 +0100)]
Add audio support for LPC32XX CPUs

Merge series from Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>:

This pach set is to bring back audio to machines with a LPC32XX CPU.
The legacy LPC32XX SoC used to have audio spport in linux 2.6.27.
The support was dropped due to lack of interest from mainaeners.

10 months agoASoC: meson: tdm: add sample rate support up to 768kHz
Jerome Brunet [Fri, 28 Jun 2024 12:32:54 +0000 (14:32 +0200)]
ASoC: meson: tdm: add sample rate support up to 768kHz

Add support for 705.6kHz and 768kHz sample rates

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20240628123256.2019224-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts
Shengjiu Wang [Thu, 27 Jun 2024 09:52:59 +0000 (17:52 +0800)]
ASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts

On i.MX8MP, there are 3 interrupts, the third interrupt is
SPDIF wakeup interrupt from PHY

Add ref: dai-common.yaml for #sound-dai-cells is needed and
XCVR is a DAI device.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/1719481981-4069-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: max98088: Check for clk_prepare_enable() error
Chen Ni [Fri, 28 Jun 2024 08:05:34 +0000 (16:05 +0800)]
ASoC: max98088: Check for clk_prepare_enable() error

clk_prepare_enable() may fail, so we should better check its return
value and propagate it in the case of error.

Fixes: 62a7fc32a628 ("ASoC: max98088: Add master clock handling")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20240628080534.843815-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Remove unneeded semicolon
Yang Li [Fri, 28 Jun 2024 05:24:06 +0000 (13:24 +0800)]
ASoC: Remove unneeded semicolon

./sound/soc/codecs/ak4619.c:757:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9442
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://patch.msgid.link/20240628052406.36644-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai
Jerome Brunet [Fri, 28 Jun 2024 12:01:29 +0000 (14:01 +0200)]
ASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai

The dummy DAI should allow any (reasonable) rates possible.
Make the rate continuous for dummy and set range from 5512Hz to 768kHz

The change is mostly cosmetic as dummy is skipped when setting
the hwparams.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20240628120130.2015665-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs
Piotr Wojtaszczyk [Thu, 27 Jun 2024 15:00:29 +0000 (17:00 +0200)]
ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

This driver was ported from an old version in linux 2.6.27 and adjusted
for the new ASoC framework and DMA API.

Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Link: https://patch.msgid.link/20240627150046.258795-12-piotr.wojtaszczyk@timesys.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding
Piotr Wojtaszczyk [Thu, 27 Jun 2024 15:00:21 +0000 (17:00 +0200)]
ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding

Add nxp,lpc3220-i2s DT binding documentation.

Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240627150046.258795-4-piotr.wojtaszczyk@timesys.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: add missing select of common code
Krzysztof Kozlowski [Thu, 27 Jun 2024 12:52:03 +0000 (14:52 +0200)]
ASoC: codecs: lpass-wsa-macro: add missing select of common code

The Qualcomm LPASS WSA macro codec driver uses now parts of common
module, so it has to select SND_SOC_LPASS_MACRO_COMMON.

  sound/soc/codecs/lpass-wsa-macro.o: in function `wsa_macro_probe':
  sound/soc/codecs/lpass-wsa-macro.c:2767:(.text+0x1c9c): undefined reference to `lpass_macro_get_codec_version'

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406272231.th1LtuLk-lkp@intel.com/
Fixes: 5dcf442bbbca ("ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240627125203.171048-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: imx-audmix: Split capture device to be a new
Mark Brown [Thu, 27 Jun 2024 11:30:52 +0000 (12:30 +0100)]
ASoC: imx-audmix: Split capture device to be a new

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

The transmitter and receiver part of the SAI interface need to be
configured with different master/slave mode, especially to work
with the audiomix module.

The SAI1 TX is in master mode, but SAI1 RX is in slave mode.
So add another two DAIs for TX and RX separately in fsl_sai driver.

There will be three devices for audiomix sound card, hw:x,0 is
the playback device for one SAI, hw:x,1 is the playback device
for another SAI, hw:x,2 is the capture device for audmix
output.

10 months agoASoC: simple-card / audio-graph:
Mark Brown [Thu, 27 Jun 2024 11:30:40 +0000 (12:30 +0100)]
ASoC: simple-card / audio-graph:

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Introduce the ability for sound cards to manually order the startup of
the various components in the card.

10 months agoASoC: rt712-sdca: add the function for version B
Shuming Fan [Thu, 20 Jun 2024 10:32:37 +0000 (18:32 +0800)]
ASoC: rt712-sdca: add the function for version B

The version B will support the multi-lane function and integrate the DMIC function
in one SoundWire interface.
Due to some registers having different default values between version A and B,
this patch also removes the redundant default registers to avoid confusion.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20240620103237.2124196-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rt712-sdca: change the definition name of SDCA channel number
Shuming Fan [Thu, 20 Jun 2024 10:32:24 +0000 (18:32 +0800)]
ASoC: rt712-sdca: change the definition name of SDCA channel number

This patch doesn't have any change of functionality.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20240620103224.2124179-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: amlogic,gx-sound-card: drop minItems for audio-widgets
Neil Armstrong [Wed, 5 Jun 2024 09:40:51 +0000 (11:40 +0200)]
ASoC: dt-bindings: amlogic,gx-sound-card: drop minItems for audio-widgets

Like "audio-routing" drop the minItems: 2 from the "audio-widgets", because
any limit here - lower or upper- is rather meaningless.

This will also fix `dtbs_check` warnings like:
sound: audio-widgets: ['Speaker', '7J4-14 LEFT', 'Speaker', '7J4-11 RIGHT'] is too long

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240605-topic-amlogic-upstream-bindings-fixes-audio-widgets-v1-1-65bd7cc2e09b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe()
Aleksandr Mishin [Wed, 5 Jun 2024 10:49:53 +0000 (13:49 +0300)]
ASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe()

If IORESOURCE_MEM "lpass-rxtx-cdc-dma-lpm" or "lpass-va-cdc-dma-lpm"
resources is not provided in Device Tree due to any error,
platform_get_resource_byname() will return NULL which is later
dereferenced. According to sound/qcom,lpass-cpu.yaml, these resources
are provided, but DT can be broken due to any error. In such cases driver
must be able to protect itself, since the DT is external data for the
driver.
Adjust this issues by adding NULL return check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: b138706225c9 ("ASoC: qcom: Add regmap config support for codec dma driver")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Link: https://patch.msgid.link/20240605104953.12072-1-amishin@t-argos.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: imx-audmix: Split capture device for audmix
Shengjiu Wang [Wed, 12 Jun 2024 06:40:52 +0000 (14:40 +0800)]
ASoC: imx-audmix: Split capture device for audmix

There will be three devices for this sound card, hw:x,0 is
the playback device for one SAI, hw:x,1 is the playback device
for another SAI, hw:x,2 is the capture device for audmix
output. then capture device and playback device can be configured
with different master/slave mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718174452-17596-4-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_audmix: Split playback and capture stream to different DAI
Shengjiu Wang [Wed, 12 Jun 2024 06:40:51 +0000 (14:40 +0800)]
ASoC: fsl_audmix: Split playback and capture stream to different DAI

As audmix requires playback and capture stream in different
master/slave mode, so separate playback and capture stream to
different DAI. There are three DAIs required, two DAIs for playback
one DAI for capture.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718174452-17596-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_sai: Add separate DAI for transmitter and receiver
Shengjiu Wang [Wed, 12 Jun 2024 06:40:50 +0000 (14:40 +0800)]
ASoC: fsl_sai: Add separate DAI for transmitter and receiver

The transmitter and receiver part of the SAI interface need to be
configured with different master/slave mode, especially to work
with the audiomix module.

+-------+               +-----------+
| SAI1  |   --TX-->     |           |
|       |   <--RX--     |           |
+-------+               |           |
                        | AUDIOMIX  |
+-------+               |           |
| SAI2  |   --TX-->     |           |
+-------+               +-----------+

The SAI1 TX is in master mode, but SAI1 RX is in slave mode.
So add another two DAIs for TX and RX separately. but only
defined fsl_sai_set_dai_fmt_tx() and fsl_sai_set_dai_fmt_rx()
ops function for current case, in the future, the other ops
function for TX and RX can be defined if required.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718174452-17596-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: audio-graph-card2: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:52 +0000 (06:02 +0000)]
ASoC: audio-graph-card2: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Audio Graph
Card2 still not yet support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msnqzoj8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: audio-graph-card: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:46 +0000 (06:02 +0000)]
ASoC: audio-graph-card: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Audio Graph
Card still not yet support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o786zojd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: simple-audio-card: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:39 +0000 (06:02 +0000)]
ASoC: simple-audio-card: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Simple Audio
Card still not yet support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plsmzojk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: simple-card-utils: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:33 +0000 (06:02 +0000)]
ASoC: simple-card-utils: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Simple Audio
Card / Audio Graph Card still not support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87r0d2zojq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: audio-graph-port: add link-trigger-order
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:26 +0000 (06:02 +0000)]
ASoC: audio-graph-port: add link-trigger-order

Sound Card need to consider/adjust HW control ordering based on the
combination of CPU/Codec. The controlling feature is already supported
on ASoC, but Simple Audio Card / Audio Graph Card still not support it.
Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sexizojx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-macro: Use enum for handling codec version
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:57:36 +0000 (18:57 +0200)]
ASoC: codecs: lpass-macro: Use enum for handling codec version

Replace 'int' with proper 'enum lpass_codec_version' in every place
which handles the parsed codec version (not raw register values!) to be
explicit about contents of the variable.  This makes code easier to read
and compilers could check missing switch cases.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625165736.722106-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-macro: Gracefully handle unknown version
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:57:35 +0000 (18:57 +0200)]
ASoC: codecs: lpass-macro: Gracefully handle unknown version

Qualcomm LPASS macro codec driver parses registers in order to
detect version of the codec.  It recognizes codecs v2.0 - v2.8, however
we know that there are earlier versions and 'enum lpass_codec_version'
has also v1.0, v1.1 and v1.2.  If by any chance we run on unrecognized
version, driver will use random value from the stack as the codec
version.

Fix it by mapping such cases to an enum of value 0:
LPASS_CODEC_VERSION_UNKNOWN.

Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625165736.722106-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:58:47 +0000 (18:58 +0200)]
ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version

Starting with v2.5 of Qualcomm LPASS Codec, few registers in the WSA
macro block change.  Bring proper support for this v2.5 and newer
versions, to fix second speaker playback (speaker was silent).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-3-f65ffdfc368c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:58:46 +0000 (18:58 +0200)]
ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions

The driver for Qualcomm LPASS WSA macro codec was developed and tested
on codec v2.1, however v2.5 has significant changes in the registers.
The driver correctly works for v2.1 codec, but has issues when running
on SoC with v2.5 codec (so starting with SM8450, even though playback
works properly on that SoC).

Prepare the driver for handling differences in register layouts of newer
version.  This does not have functional impact on older codec versions,
but just:
1. Renames few soc_enums and widgets as v2.1,
2. For registers being different in v2.5, moves the defaults and regmap
   configuration to new structures,
3. Adds new 'struct wsa_reg_layout' with offsets and masks for few
   registers, so most of the code can stay unchaged on v2.5,
4. Chooses proper widgets, regmap config and register layout based on
   version of the codec.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-2-f65ffdfc368c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: Drop unused define
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:58:45 +0000 (18:58 +0200)]
ASoC: codecs: lpass-wsa-macro: Drop unused define

WSA_MACRO_MUX_INP_MASK2 define is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-1-f65ffdfc368c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rt711-sdca: add GE selected mode control
Shuming Fan [Tue, 25 Jun 2024 08:43:03 +0000 (16:43 +0800)]
ASoC: rt711-sdca: add GE selected mode control

The SDCA spec defines a 'selected_mode' control which can override
the 'detected_mode' reported by hardware.
This is useful for platform integration as well as in cases
where the hardware(e.g. 3.5mm jack cable) is not able to accurately detect the jack type.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Tested-by: yung-chuan.liao@linux.intel.com
Link: https://patch.msgid.link/20240625084303.2273911-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-rx-macro: add missing handling of v2.1 codec
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:06:14 +0000 (18:06 +0200)]
ASoC: codecs: lpass-rx-macro: add missing handling of v2.1 codec

We have also v2.1 version of the codec (see 'enum lpass_codec_version'),
so handle it as well in all switch cases.

Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://patch.msgid.link/20240625160614.450506-1-krzysztof.kozlowski@linaro.org
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Uwe Kleine-König [Mon, 24 Jun 2024 13:17:27 +0000 (15:17 +0200)]
ASoC: codecs: Drop explicit initialization of struct i2c_device_id::driver_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240624131728.1244053-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoMAINTAINERS: adjust file entries after adding vendor prefix in sound dtbs
Lukas Bulwahn [Tue, 25 Jun 2024 03:34:19 +0000 (05:34 +0200)]
MAINTAINERS: adjust file entries after adding vendor prefix in sound dtbs

Commit ae8fc2948b48 ("ASoC: dt-bindings: add missing vender prefix on
filename") renames a few files in Documentation/devicetree/bindings/sound/,
but misses to adjust the file entries pointing to those files in
MAINTAINERS.

Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about
broken references.

Adjust the file entries in NXP SGTL5000 DRIVER and TEXAS INSTRUMENTS AUDIO
(ASoC/HDA) DRIVERS.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20240625033419.149775-1-lukas.bulwahn@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: boards: updates for 6.11 - part2
Mark Brown [Tue, 25 Jun 2024 11:34:52 +0000 (12:34 +0100)]
ASoC: Intel: boards: updates for 6.11 - part2

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Minor additions and cleanups this time.

10 months agoASoC: codecs: ES8326: Solving headphone detection and
Mark Brown [Tue, 25 Jun 2024 11:34:44 +0000 (12:34 +0100)]
ASoC: codecs: ES8326: Solving headphone detection and

Merge series from Zhang Yi <zhangyi@everest-semi.com>:

We propose four patches to solve headphone detection and suspend issues.
And there are several registers that should be read-only registers. So
we create es8326_writeable_register, and set these registers to false.

10 months agoASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43
Bard Liao [Mon, 24 Jun 2024 12:11:19 +0000 (14:11 +0200)]
ASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43

Cs42l43 bridge mode needs the two configurations.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_sdw: add quirk for Dell SKU 0B8C
Pierre-Louis Bossart [Mon, 24 Jun 2024 12:11:18 +0000 (14:11 +0200)]
ASoC: Intel: sof_sdw: add quirk for Dell SKU 0B8C

Jack detection needs to rely on JD2, as most other Dell
AlderLake-based devices.

Closes: https://github.com/thesofproject/linux/issues/5021
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: maxim-common: add max_98373_get_tx_mask function
Brent Lu [Mon, 24 Jun 2024 12:11:17 +0000 (14:11 +0200)]
ASoC: Intel: maxim-common: add max_98373_get_tx_mask function

Add a helper function max_98373_get_tx_mask() to get tx mask from
max98373 ACPI device properties at runtime.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_sdw: fix jack detection on ADL-N variant RVP
Pierre-Louis Bossart [Mon, 24 Jun 2024 12:11:16 +0000 (14:11 +0200)]
ASoC: Intel: sof_sdw: fix jack detection on ADL-N variant RVP

Experimental tests show that JD2_100K is required, otherwise the jack
is detected always even with nothing plugged-in.

To avoid matching with other known quirks the SKU information is used.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>