Commit Graph

1309335 Commits

Author SHA1 Message Date
Mac Chiang
358ee2c149
ASoC: sdw_utils: Add quirk to exclude amplifier function
When SKUs use the multi-function codec, which integrates
Headset, Amplifier and DMIC. The corresponding quirks provide
options to support internal amplifier/DMIC or not.

In the case of RT722, this SKU excludes the internal amplifier and
use an additional amplifier instead.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241028072631.15536-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-28 12:35:13 +00:00
Shuming Fan
20079dd9b3
ASoC: rt1320: add mic function
This patch adds the mic function.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20241025081259.1419518-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-25 14:10:22 +01:00
Mark Brown
a2f4b8c860
ASoC: add CS42L84 codec driver
Merge series from James Calligeros <jcalligeros99@gmail.com>:

This patch set adds a driver for the Cirrus Logic CS42L84 codec. This chip
is (so far) found only on Apple Silicon Macs. In keeping with proud Apple
tradition, the CS42L84 is essentially just a CS42L42 with a different
regmap and no publicly available datasheet. It may also be missing its
parent's S/PDIF capabilities as none of Apple's devices support S/PDIF out,
however this cannot be positively confirmed.

This driver has lived in the downstream Asahi tree for quite a while now,
and gained some refinements along the way. I have squashed most of these
into the initial driver commit as they were small changes like tweaking
msleep()s or filling out TLVs, but left seperate a larger change to
tip/ring sense IRQ handling as it differs significantly from what is found
in the CS42L42 driver.
2024-10-24 19:21:16 +01:00
Mark Brown
7fc18ae228
ASoC: add Allwinner H616 audio codec support
Merge series from Ryan Walklin <ryan@testtoast.com>:

The Allwinner H616 has a playback-only audio codec, with a single stereo
or differential-mono line output.  This patch series adds support for
the H616 (and H313/H618/H700/T507) SoC.  Based on the Allwinner kernel
SDK driver, and tested on the H700.
2024-10-24 19:21:06 +01:00
Martin Povišer
f2a67da9f4
ASoC: dt-bindings: Add CS42L84 codec
CS42L84 is a headphone jack codec made by Cirrus Logic and seen in Apple
computer models starting with 2021 Macbook Pros. It is not a publicly
documented part. To a degree the part is similar to the public CS42L42.
(The L84 superseded L83 seen in earlier Apple models, and the L83 was
pretty much the same as L42.)

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20241020-cs42l84-v2-1-37ba2b6721d9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 16:09:20 +01:00
James Calligeros
2391b8719d
ASoC: cs42l84: leverage ring sense IRQs to correctly detect headsets
Some jacks integrated on devices with this codec, such as certain
Apple Silicon Macs, have quite trigger-happy tip sense switches that
cause a tip sense IRQ before the plug is fully seated. If users are
unfortunate with their timing, this can lead to headsets being detected
as mic-less headphones among other issues with the codec's device
detection routines.

Introduce some rudimentary ring sense interrupt handling so that we
can re-trigger the codec's detection routines when we are certain
that the plug is fully seated.

This seems to differ from what other Cirrus drivers do, but is
necessary for devices to be reliably detected properly here.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20241020-cs42l84-v2-3-37ba2b6721d9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 16:09:19 +01:00
Martin Povišer
250304a0fb
ASoC: cs42l84: Add new codec driver
The CS42L84 is a codec from Cirrus Logic found in Apple Silicon Macs.
The chip continues Apple's long tradition of compelling vendors to
spin out bespoke SKUs that are based on existing IP but made subtly
incompatible with the publicly available part. CS42L84 is very similar
to CS42L42, but has a different regmap.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20241020-cs42l84-v2-2-37ba2b6721d9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 16:09:18 +01:00
Bard Liao
4d9661e28b
ASoC: rt-sdw-common: fix rt_sdca_index_update_bits function parameter description
Fix the mismatch between function parameter and description.
Below warning are reported with W=1.
warning: Function parameter or struct member 'val' not described in
'rt_sdca_index_update_bits'
warning: Excess function parameter 'value' description in
'rt_sdca_index_update_bits'

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20241024060205.20201-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 13:22:34 +01:00
Ryan Walklin
542e19c205
ASoC: dt-bindings: allwinner: add H616 sun4i audio codec binding
The H616 has an audio codec compatible with the sun4i-a10 driver.

The codec is relatively cut down compared to some of the other Allwinner
SoCs and only has a single line-out route (relying on a separate digital
microphone IP block for input). HDMI and SPDIF audio are handled
separately by an audio hub IP block, which is not currently implemented
in mainline kernels. This requires some additional flexibility in the
DMA bindings.

Add compatible string and routing for the H616 audio codec, and update
the required DMA descriptions.

Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241023075917.186835-3-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 13:22:19 +01:00
Ryan Walklin
9155c321a1
ASoC: sun4i-codec: support allwinner H616 codec
The H616 SoC codec is playback-only with a single line-out route, and
has some register differences from prior codecs.

Add the required compatible string, registers, quirks, DAPM widgets,
codec controls and routes, based on existing devices and the H616
datasheet.

Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Link: https://patch.msgid.link/20241023075917.186835-6-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 13:22:18 +01:00
Marcus Cooper
9fde21d6c5
ASoC: sun4i-codec: Add playback only flag to quirks
Some devices only have the playback side of the codec implemented
so add a quirk to check for this. This flag is only required internally
within the codec driver, as the DAI is configured for playback only
(capture disabled) separately in the create_card() function for these
devices.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Philippe Simons <simons.philippe@gmail.com>
Link: https://patch.msgid.link/20241023075917.186835-5-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 13:22:17 +01:00
Marcus Cooper
5836a9d2ca
ASoC: sun4i-codec: Add support for different DAC FIFOC addresses to quirks
The Allwinner H616 SoC  uses a different register address to control the
output FIFO.

Allow this to be specified separately from the ADC FIFO control
register.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Philippe Simons <simons.philippe@gmail.com>
Link: https://patch.msgid.link/20241023075917.186835-4-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-24 13:22:16 +01:00
Mark Brown
a77e6c12cd
ASoC: remove dpcm_xxx flags
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Now, we don't need to use dpcm_playback/capture flags for DPCM since v6.11,
and thus we can use playback/capture_only flags instead too for DPCM,
which is same as non-DPCM.

Let's remove dpcm_playback/capture flags, and use playback/capture_only flags
instead.

[Before]			[After]
	dpcm_playback = 1;	/* no setting is needed */
	dpcm_capture  = 1;

	dpcm_playback = 1;	playback_only = 1;
	dpcm_capture  = 0;

	dpcm_playback = 0;	capture_only = 1;
	dpcm_capture  = 1;

And then, because no-one uses dpcm_xxx flags, we don't need to have the code
for both DPCM and non-DPCM. These can be handled by same code.
2024-10-23 18:07:47 +01:00
Harshit Mogalapalli
9c2e48ee9a
ASoC: codecs: fix error code in ntp8835_i2c_probe()
When reset_control_deassert() fails it returns valid error codes stored
in return, pass that to dev_err_probe() instead of
PTR_ERR(ntp8835->reset).

Fixes: dc9004ea27 ("ASoC: codecs: Add NeoFidelity NTP8835 codec")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202409281054.DUTb5KxU-lkp@intel.com/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://patch.msgid.link/20241023144421.1720234-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 16:30:54 +01:00
Mark Brown
c4cf4a60e1
ASoC: SOF: core: Module parameter updates
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Add new debug only parameters to override the default IPC and boot
timeout, these are only available if CONFIG_SND_SOC_SOF_DEBUG is
enabled, only for developers.

The second patch moves the firmware, topology name/path and IPC
version overrides from acpi/pci/of platform code to core and markes
the platform parameters deprecated, to be removed in few kernel
cycles.
There is really no point of duplicating these overrides as they
are not platform dependent.
2024-10-23 16:30:23 +01:00
Kuninori Morimoto
a6ff8572fd
ASoC: soc-pcm: merge DPCM and non-DPCM validation check
DPCM and non-DPCM validation check are very similar. The big difference
is that DPCM doesn't check Codec validation. This is historical reason.
It should be checked, but it breaks existing driver/behavior.

Anyway, if we uses dummy DAI as Codec when DPCM case, there is no
difference between DPCM and non-DPCM. Let's merge these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/8734kq9vgq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:02:05 +01:00
Kuninori Morimoto
0e3dc8e4bd
ASoC: doc: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874j569vgw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:02:04 +01:00
Kuninori Morimoto
c7ae655153
ASoC: soc-pcm: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875xpm9vh3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:02:03 +01:00
Kuninori Morimoto
ae0967da4b
ASoC: intel: boards: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877ca29vh9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:02:02 +01:00
Kuninori Morimoto
44b6f24018
ASoC: soc-topology: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/878qui9vhe.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:02:02 +01:00
Kuninori Morimoto
0f77c88f0e
ASoC: soc-compress: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87a5ey9vhj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:02:01 +01:00
Kuninori Morimoto
b6b8caf647
ASoC: soc-core: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/87bjze9vhp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:02:00 +01:00
Kuninori Morimoto
ec15e5043d
ASoC: mediatek: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cyju9vhu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:01:59 +01:00
Kuninori Morimoto
fa9c4b46fb
ASoC: samsung: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ed4a9vi0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:01:58 +01:00
Kuninori Morimoto
d26aed5eba
ASoC: intel: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87froq9vi9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:01:57 +01:00
Kuninori Morimoto
90bbbf612f
ASoC: sof: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87h6969vie.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:01:56 +01:00
Kuninori Morimoto
efa527f984
ASoC: fsl: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87iktm9vij.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:01:55 +01:00
Kuninori Morimoto
12c61265e5
ASoC: amd: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jze29vip.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:01:54 +01:00
Peter Ujfalusi
acb219840f
ASoC: SOF: core: Add fw, tplg and ipc type override parameters
The different bus type helpers define their own override parameters for
firmware name/path, topology name/path. sof-pci-dev covers all while others
just a subset.
There is no technical reason to do that since these are generic platform
independent parameters.

Add the override module options to core (snd-sof module) and update the
description for the device helper modules as deprecated.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241023110610.6141-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 12:46:24 +01:00
Peter Ujfalusi
de688e50f5
ASoC: SOF: core: Add debug module parameters to set IPC and boot timeout
Add two module parameters to override the IPC and boot timeout values if
the SOF stack is compiled with debug enabled to allow experimenting with
different timeout values without the need to recompile the kernel.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241023110610.6141-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 12:46:23 +01:00
Ingyu Jang
9b0c65115a
ASoC: uniphier: Handle regmap_write errors in aio_iecout_set_enable()
The aio_oport_set_stream_type() function did not previously check the
return values of regmap_write().
If these functions fail, it could lead to silent failures when
configuring the audio playback port, causing improper behavior in audio
stream output via S/PDIF without any indication of an error.

This patch modifies aio_oport_set_stream_type() to check the return
values of regmap_write().
If regmap_write() fails, the error code is propagated back to the caller
to ensure proper error handling.

Signed-off-by: Ingyu Jang <ingyujang25@unist.ac.kr>
Link: https://patch.msgid.link/SE1P216MB2287962B462AE91B26248D19FD7E2@SE1P216MB2287.KORP216.PROD.OUTLOOK.COM
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 00:07:04 +01:00
Mark Brown
43aea89ac2
ASoC: fsl_xcvr: enable some interrupts
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Enable interrupt of cmdc status update and the interrupts for
wrong preamble received.
2024-10-22 20:48:31 +01:00
Shengjiu Wang
1e5d0f1061
ASoC: fsl_xcvr: reset RX dpath after wrong preamble
Below preamble error means wrong preamble of IEC958 received,
the channel order may be wrong at the moment.

FSL_XCVR_IRQ_PREAMBLE_MISMATCH
FSL_XCVR_IRQ_UNEXP_PRE_REC
FSL_XCVR_IRQ_M_W_PRE_MISMATCH
FSL_XCVR_IRQ_B_PRE_MISMATCH

All above errors may cause channel swap, to avoid such issues,
need to reset the DMAC path.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1728368873-31379-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-22 17:55:44 +01:00
Shengjiu Wang
06461e288a
ASoC: fsl_xcvr: enable interrupt of cmdc status update
This enables the interrupt to be asserted when there
is a change in Capabilities data structure / Latency
request of the CMDC Status register.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1728368873-31379-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-22 17:55:43 +01:00
Krzysztof Kozlowski
6a646e6de5
ASoC: dt-bindings: qcom: Add SM8750 LPASS macro codecs
Document compatibles for Qualcomm SM8750 SoC macro digital codecs (RX,
TX, VA and WSA), compatible with previous generation (SM8550 and
SM8650).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241022064155.22800-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-22 15:06:30 +01:00
Ritu Chaudhary
4204eccc7b
ASoC: tegra: Add support for S24_LE audio format
Add support for S24_LE format for all internal and IO AHUB
modules, except for ASRC (which is already supported).

The data flow happens as mentioned below:

- ADMAIF picks 24-bit valid data and converts it to 32-bit before
  sending to internal AHUB modules. This makes the driver change
  simpler for internal AHUB modules.
- IO modules CIF converts the 32-bit data to 24-bit before sending it
  to the external world.
- To maintain consistency across modules, conversions between 24-bit
  and 32-bit occur either at ADMAIF or at the IO modules CIF.

This feature has been thoroughly tested and verified with all internal
AHUB modules on the Jetson AGX Orin Platform, as well as with the
external RT5640 codec.

Signed-off-by: Ritu Chaudhary <rituc@nvidia.com>
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Link: https://patch.msgid.link/20241022041330.3421765-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-22 15:06:29 +01:00
Cristian Ciocaltea
e6d20a9b0f
ASoC: dt-bindings: everest,es8328: Document audio graph port
The ES8328/ES8388 audio codec is currently used in conjunction with
audio-graph-card to provide an endpoint for binding with the other side
of the audio link.

This is achieved via the 'port' property, which is not supported by the
binding:

  rk3588s-indiedroid-nova.dtb: audio-codec@11: 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
    from schema $id: http://devicetree.org/schemas/sound/everest,es8328.yaml#

Document the missing property.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20241019-es8328-doc-port-v1-1-25c1d1b5c65c@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-22 12:32:46 +01:00
Nuno Sa
cca8824838
ASoC: codecs: adau1372: add match table
Add an of_device_id table for both the I2C and SPI drivers.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241021-adau1372-of-table-v1-1-6efbc7946957@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-22 12:32:45 +01:00
Ryan Roberts
5337ff41d3
ASoC: soc-utils: Remove PAGE_SIZE compile-time constant assumption
In pursuit of the goal of supporting boot-time page size selection,
remove use of PAGE_SIZE from the dummy_dma_hardware struct definition,
since the value is not known at compile-time for this config.

Given the previous parameters were "essentially random", let's just
hardcode them as 4K and 4K*2 to sidestep the need to boot-time patch the
structure with the selected PAGE_SIZE.

Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Link: https://patch.msgid.link/20241021130308.3616451-1-ryan.roberts@arm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-21 14:14:56 +01:00
Mark Brown
478fc2f421
ASoC/soundwire: add initial support for SDCA
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

We need to get rt712 version by reading SDCA version and functions.
This patch series adds initial support for SDCA and add a helper to tell
if the codec is RT712_VB.

This series may go via the ASoC tree with Vinod's Acked-by tag.

Bard Liao (1):
  soundwire: sdw_intel: include linux/acpi.h

Pierre-Louis Bossart (10):
  ASoC/soundwire: remove sdw_slave_extended_id
  ASoC: SDCA: add initial module
  soundwire: slave: lookup SDCA version and functions
  ASoC: SDCA: add quirk function for RT712_VB match
  ASoC: rt712-sdca: detect the SMART_MIC function during the probe stage
  ASoC: soc-acpi: introduce new 'machine check' callback
  ASoC: sdw_utils: add SmartMic DAI for RT712 VB
  ASoC: sdw_utils: add SmartMic DAI for RT713 VB
  ASoC: Intel: soc-acpi: add is_device_rt712_vb() helper
  ASoC: SOF: Intel: hda: use machine_check() for SoundWire

 drivers/soundwire/Kconfig                     |   1 +
 drivers/soundwire/amd_init.c                  |  12 +-
 drivers/soundwire/intel_init.c                |  13 +-
 drivers/soundwire/slave.c                     |  14 ++
 include/linux/soundwire/sdw.h                 |   9 +-
 include/linux/soundwire/sdw_amd.h             |   7 +-
 include/linux/soundwire/sdw_intel.h           |   8 +-
 include/sound/sdca.h                          |  62 +++++++
 include/sound/sdca_function.h                 |  55 ++++++
 include/sound/soc-acpi.h                      |   8 +-
 sound/soc/Kconfig                             |   1 +
 sound/soc/Makefile                            |   1 +
 sound/soc/amd/ps/pci-ps.c                     |   3 +-
 sound/soc/codecs/rt712-sdca-sdw.c             |   1 +
 sound/soc/codecs/rt712-sdca.c                 |  38 +++-
 sound/soc/codecs/rt712-sdca.h                 |   1 +
 sound/soc/intel/Kconfig                       |   5 +
 sound/soc/intel/common/Makefile               |   3 +
 .../intel/common/soc-acpi-intel-mtl-match.c   |  51 ++++++
 .../intel/common/soc-acpi-intel-sdca-quirks.c |  42 +++++
 .../intel/common/soc-acpi-intel-sdca-quirks.h |  14 ++
 sound/soc/sdca/Kconfig                        |  11 ++
 sound/soc/sdca/Makefile                       |   5 +
 sound/soc/sdca/sdca_device.c                  |  67 +++++++
 sound/soc/sdca/sdca_functions.c               | 173 ++++++++++++++++++
 sound/soc/sdw_utils/soc_sdw_utils.c           |  18 +-
 sound/soc/soc-acpi.c                          |  30 +--
 sound/soc/sof/amd/acp-common.c                |   3 +-
 sound/soc/sof/intel/hda.c                     |  19 +-
 29 files changed, 610 insertions(+), 65 deletions(-)
 create mode 100644 include/sound/sdca.h
 create mode 100644 include/sound/sdca_function.h
 create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c
 create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.h
 create mode 100644 sound/soc/sdca/Kconfig
 create mode 100644 sound/soc/sdca/Makefile
 create mode 100644 sound/soc/sdca/sdca_device.c
 create mode 100644 sound/soc/sdca/sdca_functions.c

--
2.43.0
2024-10-18 21:01:45 +01:00
Mark Brown
42fb51612f
ASoC: add support for some new Lenovo laptops with
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Some SKUs are using host DMICs rather than the cs42l43 DMICs, update the
endpoint structure for these SKUs to remove the DMIC endpoint.

Charles Keepax (4):
  ASoC: sdw_utils: Add support for exclusion DAI quirks
  ASoC: sdw_utils: Add a quirk to allow the cs42l43 mic DAI to be
    ignored
  ASoC: Intel: sof_sdw: Add quirk for cs42l43 system using host DMICs
  ASoC: Intel: sof_sdw: Add quirks for some new Lenovo laptops

 include/sound/soc_sdw_utils.h       |  2 ++
 sound/soc/intel/boards/sof_sdw.c    | 41 +++++++++++++++++++++++++++++
 sound/soc/sdw_utils/soc_sdw_utils.c |  5 +++-
 3 files changed, 47 insertions(+), 1 deletion(-)

--
2.43.0
2024-10-18 21:01:38 +01:00
Vitaliy Shevtsov
1b9971a4e0
ASoC: nau8821: check regmap_raw_read/regmap_raw_write for failure
The return values from both regmap_raw_read() and regmap_raw_write() are not
checked despite they can fail. Propagate possible errors to caller.

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

Signed-off-by: Vitaliy Shevtsov <v.shevtsov@maxima.ru>
Link: https://patch.msgid.link/20241018110743.18786-1-v.shevtsov@maxima.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-18 18:44:28 +01:00
Mario Limonciello
b2385de2ae
ASoC: amd: acp: Add stream name to ACP PDM DMIC devices
Add for sof and legacy dai links to dummy DMIC codec.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20241017210952.3586713-1-superm1@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-18 18:44:27 +01:00
Liu Jing
4d003b81f4
ASoC: rx651: Use card->dev in replace of the &pdev->dev argument in the dev_err function
Because card->dev = &pdev->dev is already defined in the rx51_soc_probe
function, and then &pdev->dev is still used.

Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241015074938.6247-1-liujing@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-18 18:44:26 +01:00
Pierre-Louis Bossart
e92edcf802
ASoC: SOF: Intel: hda: use machine_check() for SoundWire
Use the new machine_check() callback to select an alternate topology
for RT712-VB devices.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-12-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17 18:42:18 +01:00
Pierre-Louis Bossart
5703ab86ff
ASoC: Intel: soc-acpi: add is_device_rt712_vb() helper
Add a filter to skip the RT172 VB configuration if a SmartMic Function
is not found in the SDCA descriptors.

If the ACPI information is incorrect this can only be quirked further
with DMI information.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-11-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17 18:42:17 +01:00
Pierre-Louis Bossart
7d6f2d5254
ASoC: sdw_utils: add SmartMic DAI for RT713 VB
In theory the dailinks are created based on the number of endpoints
reported in ACPI match tables, so it should harmless to add a new
dailink: RT713 VA would not use it since it has only 2 endpoints.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17 18:42:16 +01:00
Pierre-Louis Bossart
9489db97f6
ASoC: sdw_utils: add SmartMic DAI for RT712 VB
In theory the dailinks are created based on the number of endpoints
reported in ACPI match tables, so it should harmless to add a new
dailink: RT712 VA would not use it since it has only 2 endpoints.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-9-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17 18:42:15 +01:00
Pierre-Louis Bossart
dcf4694f20
ASoC: soc-acpi: introduce new 'machine check' callback
The existing machine_quirk() returns a pointer to a soc_acpi_mach
structure.
For SoundWire/SDCA support, we need a slightly different
functionality where a quirk function either validates or NACKs an
initial selection, based on additional firmware/DMI information.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17 18:42:14 +01:00
Pierre-Louis Bossart
9aa6df9cb8
ASoC: rt712-sdca: detect the SMART_MIC function during the probe stage
We shouldn't do any devm_ based allocation in the io_init(), this need
to happen in the probe(). Luckily, we now have an SDCA helper to look
in ACPI tables if a SMART_MIC function is exposed.

FIXME: the registers are not well handled today, the regmap lists
registers which are not really supported in all platforms. The regmap
needs to throw an error if those registers are accessed without
existing.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-7-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17 18:42:14 +01:00