Commit Graph

34650 Commits (master)

Author SHA1 Message Date
Linus Torvalds db9c438739 soundwire updates for 6.19
- Support for multiple sections in a BPT stream
  - Aligning DMA frame with BPT frames
  - Qualcomm: support for v3.1.0 controllers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmk8DksACgkQfBQHDyUj
 g0eK1g/6Awba2J+ME+ZJ/Narqh7qwQRk0/Q9HcnPCxeXGc8peDtuhIxatmqHM+Eg
 ReoZTIIDA+/ysa1oFrdhi0MBRoZSC1eQpvL9mAQEZ5MxG368flnLncP26rYwyJHT
 rzBy0Ca/feRMddBbeTqR7OehyDsj4CiBeInRy1aY/UvaFypIgnCagyHWO6TZzYDF
 gCEVvsGaa7I3qcc1yhi+hP6jvTPMd5FtH2pKKVgL8aNvNgWSv664WX+zz2KY9KSV
 vcjA5z1rIJ3hohuGx+cqZeQGVS2PBxUyHWjvGlp3wtSVzMRGyb2TDWYsJy8+xKkM
 2Raz1uDMJPz+mDsCYlbU2h5I6SJBBhPa7fYJpuFs5KG4GY4p/ndsdh0LRStf5QtE
 pQmxOiisvbwKgKFlzOLM10zVdRL44VLldwevBt5G7uozpH8FDJ7CTCdSVRAzk2yf
 poB5zRVh1fewWi8I23T29t+GXXMq59s+Yre5lpvIp5+UO6ZDeSqcNhL6YCT6xJaZ
 ze7pkVSRY7V3lcLGP2tM19785XZr9SPZxbNojF+X/FlQbhkAp6QvMQe6v67ouoKK
 K9/9LRMyFYvDq0D19pOdbhCcEUvXWKFgyuUXdfWCpjzkHnpDQZws38FhFhYWeBzm
 LJKkTlAzI1DPEvpFc5YQf2jx4V4OH5W8lPUzunA9MmXN7MWprJ4=
 =tDi0
 -----END PGP SIGNATURE-----

Merge tag 'soundwire-6.19-rc1_updated' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire updates from Vinod Koul:

 - Support for multiple sections in a BPT stream

 - Align DMA frame with BPT frames

 - Qualcomm support for v3.1.0 controllers

* tag 'soundwire-6.19-rc1_updated' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: intel_ace2x: handle multi BPT sections
  soundwire: pass sdw_bpt_section to cdns BPT helpers
  soundwire: introduce BPT section
  soundwire: intel_ace2x: add fake frame to BRA read command
  soundwire: cadence_master: add fake_size parameter to sdw_cdns_prepare_read_dma_buffer
  ASoC: SOF: Intel: export hda_sdw_bpt_get_buf_size_aligment
  soundwire: cadence: export sdw_cdns_bpt_find_bandwidth
  soundwire: cadence_master: set data_per_frame as frame capability
  soundwire: only compute BPT stream in sdw_compute_dp0_port_params
  soundwire: cadence_master: make frame index trace more readable
  soundwire: qcom: adding support for v3.1.0
  dt-bindings: soundwire: qcom: Document v3.1.0 version of IP block
  soundwire: qcom: prepare for v3.x
  soundwire: qcom: deprecate qcom,din/out-ports
  dt-bindings: soundwire: qcom: deprecate qcom,din/out-ports
  soundwire: qcom: remove unused rd_fifo_depth
  of: base: Add of_property_read_u8_index
2025-12-13 16:26:55 +12:00
Takashi Iwai b13efb5359 ASoC: Fixes for v6.19
A small pile of fixes that came in during the merge window, it's all
 fairly standard device specific stuff.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmk6EpEACgkQJNaLcl1U
 h9B19wf+Lf0D4e7+57nnZSWFitwEFwdHFPULFr0xlq37yQ7UzfR3bdyo2Lck2J9g
 ZjnkyG4lVCLjHdqWvuke8mqU672HC9kKLpO4GldqpkeJrlryUaKDiYyMFNxBZUS5
 4nW6fNONwNvwMvRZcXN2v1XDuQP97pYC8kadUpPvIb1LN2LdfVLn7dtnYReOeEnA
 fAbQj7STdLwzj9mtkD8QpMTClYJLB3+tV8zCYCAElTgdSxxJ6jjA7WgNB5tPL9+N
 PNxXdDty11g2U26FGhqEafWs0Uzr28h7DvTtQEccguIXU6uTyi5WK0ca/z7Wra6A
 cdrb1WYL8t6eYJqdIOezSL9uyvn6sA==
 =rQ0I
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.19-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.19

A small pile of fixes that came in during the merge window, it's all
fairly standard device specific stuff.
2025-12-11 09:34:00 +01:00
Hemalatha Pinnamreddy f34836a8dd
ASoC: amd: acp: update tdm channels for specific DAI
TDM channel updates were applied to all DAIs, causing configurations
to overwrite for unrelated streams. The logic is modified to update
channels only for targeted DAI. This prevents corruption of other DAI
settings and resolves audio issues observed during system suspend and
resume cycles.

Fixes: 12229b7e50 ("ASoC: amd: acp: Add TDM support for acp i2s stream")
Signed-off-by: Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
Signed-off-by: Raghavendra Prasad Mallela <raghavendraprasad.mallela@amd.com>
Link: https://patch.msgid.link/20251203120136.2591395-1-raghavendraprasad.mallela@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-10 09:17:53 +09:00
Richard Fitzgerald a061deb0b4
ASoC: cs35l56: Fix incorrect select SND_SOC_CS35L56_CAL_SYSFS_COMMON
KConfig SND_SOC_CS35L56_CAL_SET_CTRL must select
SND_SOC_CS35L56_CAL_DEBUGFS_COMMON.

It incorrectly selected SND_SOC_CS35L56_CAL_SYSFS_COMMON.

Fixes: 32172cf3cb ("ASoC: cs35l56: Allow restoring factory calibration through ALSA control")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/lkml/22b92ddf-6321-41b5-8073-f9c7064d3432@infradead.org/T/#u
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251209104657.485541-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-09 19:48:38 +09:00
Eric Naim b0ff70e9d4
ASoC: cs35l41: Always return 0 when a subsystem ID is found
When trying to get the system name in the _HID path, after successfully
retrieving the subsystem ID the return value isn't set to 0 but instead
still kept at -ENODATA, leading to a false negative:

[   12.382507] cs35l41 spi-VLV1776:00: Subsystem ID: VLV1776
[   12.382521] cs35l41 spi-VLV1776:00: probe with driver cs35l41 failed with error -61

Always return 0 when a subsystem ID is found to mitigate these false
negatives.

Link: https://github.com/CachyOS/CachyOS-Handheld/issues/83
Fixes: 46c8b4d2a6 ("ASoC: cs35l41: Fallback to reading Subsystem ID property if not ACPI")
Cc: stable@vger.kernel.org # 6.18
Signed-off-by: Eric Naim <dnaim@cachyos.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251206193813.56955-1-dnaim@cachyos.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-09 12:34:07 +09:00
Bard Liao 167efc6dfd ASoC: SOF: Intel: export hda_sdw_bpt_get_buf_size_aligment
The dma buffer need to be a multiple of data block size and
the fifo size. Export a function to return the LCM of data
block size and the fifo size.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20251014031450.3781789-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2025-12-08 12:37:26 +05:30
Eric Biggers 8fb817335a
ASoC: cros_ec_codec: Remove unnecessary selection of CRYPTO
The only crypto-related functionality this codec uses is the sha256()
function, which is provided by CRYPTO_LIB_SHA256.  Originally
CRYPTO_LIB_SHA256 was visible only when CRYPTO; however, that was fixed
years ago and the libraries can now be selected on their own.

So, remove the unnecessary selection of CRYPTO.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://patch.msgid.link/20251204052954.488568-1-ebiggers@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-04 13:01:39 +00:00
Mark Brown 434f8154bf
ASoC: codecs: wcd93xx: fix OF node leaks on probe
Merge series from Johan Hovold <johan@kernel.org>:

The original wcd938x driver has a couple of OF node reference leaks
which have been reproduced in the two later added drivers.
2025-12-04 11:38:34 +00:00
Mark Brown 9b30ceba1c
ASoC: ak4458 & ak5558: disable regulator if error
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Disable regulator when error happens to balance the reference count.
2025-12-04 11:38:30 +00:00
Johan Hovold 39191ce5db
ASoc: qcom: q6afe: fix bad guard conversion
A recent spinlock guard conversion used the wrong guard so that
interrupts are no longer disabled while holding the port list lock.

Based on a cursory look this appears to be safe currently, but it could
cause a deadlock if one of these helpers are ever called in interrupt
context.

Fixes: 4b1edbb028 ("ASoC: qcom: q6afe: Use guard() for spin locks")
Cc: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203105542.24765-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03 16:50:23 +00:00
Krzysztof Kozlowski 57d508b5f7
ASoC: rockchip: Fix Wvoid-pointer-to-enum-cast warning (again)
'version' is an enum, thus cast of pointer on 64-bit compile test with
clang W=1 causes:

  rockchip_pdm.c:583:17: error: cast to smaller integer type 'enum rk_pdm_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

This was already fixed in commit 49a4a8d126 ("ASoC: rockchip: Fix
Wvoid-pointer-to-enum-cast warning") but then got bad in
commit 9958d85968 ("ASoC: Use device_get_match_data()").

Discussion on LKML also pointed out that 'uintptr_t' is not the correct
type and either 'kernel_ulong_t' or 'unsigned long' should be used,
with several arguments towards the latter [1].

Link: https://lore.kernel.org/r/CAMuHMdX7t=mabqFE5O-Cii3REMuyaePHmqX+j_mqyrn6XXzsoA@mail.gmail.com/ [1]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203141644.106459-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03 14:54:38 +00:00
Krzysztof Kozlowski 2c7e5e17c0
ASoC: codecs: nau8325: Silence uninitialized variables warnings
clang W=1 builds warn:

  nau8325.c:430:13: error: variable 'n2_max' is uninitialized when used here [-Werror,-Wuninitialized]

which are false positive, because the variables will be always
initialized when used (guarded by mclk_max!=0 check).  However
initializing them upfront makes the code more obvious and easier, plus
it silences the warning.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203140611.87191-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03 14:54:37 +00:00
Shengjiu Wang 1f8f726a2a
ASoC: ak5558: Disable regulator when error happens
Disable regulator in runtime resume when error happens to balance
the reference count of regulator.

Fixes: 2ff6d5a108 ("ASoC: ak5558: Add regulator support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251203100529.3841203-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03 12:38:14 +00:00
Shengjiu Wang ae585fabb9
ASoC: ak4458: Disable regulator when error happens
Disable regulator in runtime resume when error happens to balance
the reference count of regulator.

Fixes: 7e3096e8f8 ("ASoC: ak4458: Add regulator support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251203100529.3841203-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03 12:38:13 +00:00
Hemalatha Pinnamreddy 3ee257aba1
ASoC: amd: acp: Audio is not resuming after s0ix
Audio fails to resume after system exits suspend mode
due to accessing incorrect ring buffer address during
resume. This patch resolves issue by selecting correct
address based on the ACP version.

Fixes: f6f7d25b11 ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform")
Signed-off-by: Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
Signed-off-by: Raghavendra Prasad Mallela <raghavendraprasad.mallela@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20251203064650.2554625-1-raghavendraprasad.mallela@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03 11:26:16 +00:00
Haotian Zhang 0ebbd45c33
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()
bcm63xx_soc_pcm_new() does not check the return value of
of_dma_configure(), which may fail with -EPROBE_DEFER or
other errors, allowing PCM setup to continue with incomplete
DMA configuration.

Add error checking for of_dma_configure() and return on failure.

Fixes: 88eb404ccc ("ASoC: brcm: Add DSL/PON SoC audio driver")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251202101642.492-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-03 11:26:14 +00:00
Richard Fitzgerald 2b69bee5a2
ASoC: cs-amp-lib: Revert use of __free(kfree) back to normal C cleanup
Revert commit 6797540c8b ("ASoC: cs-amp-lib: Use __free(kfree) instead
of manual freeing").

Krzysztof Kozlowski pointed out that __free() can be dangerous.
It can introduce new cleanup bugs. These are more subtle and difficult to
spot than a missing goto in traditional cleanup, because they are triggered
by writing regular idiomatic C code instead of using C++ conventions. As
it's regular C style it's more likely to be missed because the code is as
would be expected for C. The traditional goto also more obviously flags
to anyone changing the code in the future that they must be careful about
the cleanup.

We can just revert the change. There was nothing wrong with the original
code and as Krzysztof noted: "it does not make the code simpler."

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 6797540c8b ("ASoC: cs-amp-lib: Use __free(kfree) instead of manual freeing")
Link: https://patch.msgid.link/20251201111429.43517-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-02 13:37:50 +00:00
Johan Hovold 3ef4d9ede2
ASoC: codecs: wcd939x: fix OF node leaks on probe failure
The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.

Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.

Fixes: 10f514bd17 ("ASoC: codecs: Add WCD939x Codec driver")
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251201093419.24474-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-02 13:37:44 +00:00
Johan Hovold 32ae6ebe17
ASoC: codecs: wcd938x: fix OF node leaks on probe failure
The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.

Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.

Fixes: 8d78602aa8 ("ASoC: codecs: wcd938x: add basic driver")
Cc: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251201093419.24474-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-02 13:37:43 +00:00
Johan Hovold 22a03ca7c2
ASoC: codecs: wcd937x: fix OF node leaks on probe failure
The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.

Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.

Fixes: 9be3ec196d ("ASoC: codecs: wcd937x: add wcd937x codec driver")
Cc: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Cc: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251201093419.24474-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-02 13:37:42 +00:00
Takashi Iwai 9747b22a41 ASoC: Updates for v6.19
This is a very large set of updates, as well as some more extensive
 cleanup work from Morimto-san we've also added a generic SCDA class
 driver for SoundWire devices enabling us to support many chips with
 no custom code.  There's also a batch of new drivers added for both
 SoCs and CODECs.
 
  - Added a SoundWire SCDA generic class driver, pulling in a little
    regmap work to support it.
  - A *lot* of cleaup and API improvement work from Morimoto-san.
  - Lots of work on the existing Cirrus, Intel, Maxim and Qualcomm
    drivers.
  - Support for Allwinner A523, Mediatek MT8189, Qualcomm QCM2290,
    QRB2210 and SM6115, SpacemiT K1, and TI TAS2568, TAS5802, TAS5806,
    TAS5815, TAS5828 and TAS5830.
 
 This also pulls in some gpiolib changes supporting shared GPIOs in the
 core there so we can convert some of the ASoC drivers open coding
 handling of that to the core functionality.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmkt6lUACgkQJNaLcl1U
 h9D7dgf+JP2+yZIeRBud7CEO4Docda2uoRssT7GAIY/Rqrpem5FI0c0pWyZISvhn
 scyjkoCrQfHEoeYrtC3l5bDI7F8o5Tc91hGzhJiCi3mb8jSwi+CaNIpR0Cet3epV
 B9wQgzxlxbmKCxJRUYTPQF3n1uBJWc5EBHSc5QPddTZ0vdUfSlX0FAKHsabpmaOC
 TpkdJnOlH8WUokmP3kP3TpzlflmOSLehnWX4BelJe5Os5O0PQpiKh/JG3oCYHSmc
 yEbzCjOaya80HHn11FShOpy+B4b6sLUMcN+CAmDiLAdNFGvvjgmjpwwZtLYAm09Z
 zFhN7XuVk1vXf+Zx/jHqYKaZtvvAsQ==
 =Xwls
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v6.19

This is a very large set of updates, as well as some more extensive
cleanup work from Morimto-san we've also added a generic SCDA class
driver for SoundWire devices enabling us to support many chips with
no custom code.  There's also a batch of new drivers added for both
SoCs and CODECs.

 - Added a SoundWire SCDA generic class driver, pulling in a little
   regmap work to support it.
 - A *lot* of cleaup and API improvement work from Morimoto-san.
 - Lots of work on the existing Cirrus, Intel, Maxim and Qualcomm
   drivers.
 - Support for Allwinner A523, Mediatek MT8189, Qualcomm QCM2290,
   QRB2210 and SM6115, SpacemiT K1, and TI TAS2568, TAS5802, TAS5806,
   TAS5815, TAS5828 and TAS5830.

This also pulls in some gpiolib changes supporting shared GPIOs in the
core there so we can convert some of the ASoC drivers open coding
handling of that to the core functionality.
2025-12-02 07:12:56 +01:00
Takashi Iwai 72987d2ddc Merge branch 'for-linus' into for-next
Pull remaining 6.18-devel changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-01 16:25:31 +01:00
Mark Brown c5fae31f60
ASoC: fsl_micfil: Set default quality and channel
Merge series from Chancel Liu <chancel.liu@nxp.com>:

Add default quality for different platforms.
Set channel range control.
2025-11-29 00:59:00 +00:00
Weidong Wang fd16593d45
ASoC: codecs: Modify awinic amplifier dsp read and write functions
Modify the dsp read and write functions of the chip and normalize
the dsp read and write functions of all awinic amplifier

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://patch.msgid.link/20251128130323.628091-1-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-28 21:35:38 +00:00
Charles Keepax b025f01ee9
ASoC: SDCA: Fixup some more Kconfig issues
As the class driver is manually selectable, it needs to depend on
SOUNDWIRE, which is obviously necessary. Also the depends on in
SND_SOC_SDCA_HID needs to be pulled into SND_SOC_SDCA_CLASS as well,
since HID is selected by the class driver.

Fixes: 2d877d0659 ("ASoC: SDCA: Add basic SDCA class driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511281223.DDs12LiC-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202511280822.i2fveMpR-lkp@intel.com/
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251128102841.2930808-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-28 11:48:02 +00:00
Richard Fitzgerald 816c9cac35
ASoC: cs35l56: Log a message if firmware is missing
If the amp is still reporting FIRMWARE_MISSING after cs35l56_patch()
has completed it is helpful to log a warning.

After a complete firmware download the FIRMWARE_MISSING flag will be
clear. If this isn't the case, the driver should log a message to
report this.

The amp can produce basic audio output without firmware, as a fallback,
so this wasn't originally logged as a warning condition because the amp
is still in an operational state - just not with full functionality.
However, it was not at all obvious to an end user that anything is
unusual.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251128112520.40067-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-28 11:48:02 +00:00
Dan Carpenter feab287589
ASoC: nau8325: Delete a stray tab
This line is indented too far.  Delete a tab.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aSlNO0sqQr2A4vzG@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-28 11:48:01 +00:00
Chancel Liu ef1a7e02fd
ASoC: fsl_micfil: Set channel range control
The range control register can't directly adjust volume gain according
to specification. It's the dynamic range of the CIC filter. The range
value should meet some conditions otherwise the channel data is not
reliable. Add an array in soc data to store const value in formula
with which range with all quality on different platforms can be
calculated. If the value set to range control exceeds the max range
there'll be warning logs.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20251127022652.674574-3-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-28 11:47:49 +00:00
Chancel Liu e04aab96b3
ASoC: fsl_micfil: Add default quality for different platforms
Add a default quality flag in soc data. For i.MX8MP/93/943 platforms on
which range control is constrained, set medium quality by default to
achieve better audio performance and wider adjustable range control.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20251127022652.674574-2-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-28 11:47:48 +00:00
Mark Brown a76e1d951f
ASoC: Intel: catpt: Round of fixes and PM changes
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Set of changes addressing gaps in DRAM offset checks, error paths and
PM.

The first three patches are straight-forward, the last three relate to
the power management. The standing out PM change is removal of the
catpt-driver as a system-suspend (S3) blocker. This is a suggestion from
Andy as indeed, audio is not a critical component that should prevent
the system from going into S3. Whatever happens, the driver can recover
on a follow up resume (S3 -> S0).
2025-11-27 21:50:47 +00:00
Mark Brown f2b4592300
Add support for cs42l45 into the Intel machine driver
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

Now that the full class driver is in place we can add support to the
Intel machine driver for Cirrus's new SDCA audio CODEC the cs42l45. This
makes some minor tweaks to the machine driver itself to support SDCA
devices, and then adds the necessary tables etc. to define the device.

Note, this series shouldn't have any dependencies on the other series of
improvements to the class driver that is already on the list. So either
can be merged first.
2025-11-27 21:50:42 +00:00
Charles Keepax 1e645bca9d
ASoC: intel: sof_sdw: Add codec_info for cs42l45
Add support for the Cirrus Logic CS42L45 standalone using SoundWire.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-8-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 19:18:51 +00:00
Charles Keepax 3f6b562f21
ASoC: sdw_utils: Add cs42l45 support functions
Add the helper functions into the machine driver for the cs42l45,
this will register a jack for jack detection and add things into
to the components string if they are needed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 19:18:50 +00:00
Charles Keepax c66297d09e
ASoC: intel: sof_sdw: Add ability to have auxiliary devices
Currently the sof_sdw machine driver assumes that all devices involved
in the sound card are connected through a DAI link. However for SDCA
devices we still want the HID (Human Interface Device, used for jack
buttons) to be part of the sound card, but it contains no DAI links.

Add support into the machine driver to specify a list of auxiliary
devices to merged into the card.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 19:18:49 +00:00
Charles Keepax 2ae4659533
ASoC: sdw_utils: Move codec_name to dai info
As SDCA devices will support each DAI link on a different child device,
move the codec name from codec_info to each dai_info. To allow the
appropriate function device to be bound to each DAI link.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 19:18:48 +00:00
Charles Keepax 26ee34d2f5
ASoC: sdw_utils: Add codec_conf for every DAI
The assumption so far is that all the DAI links for a given audio part
would be on the same device. However, as SDCA implements each audio
function on a separate auxiliary driver this will no longer be true.
This means it is necessary to add additional codec_conf structures to
get the prefix for an audio part to apply to all the auxiliary drivers
that make up that part.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 19:18:47 +00:00
Charles Keepax 48fa77af2f
ASoC: SDCA: Add terminal type into input/output widget name
There have been some complaints around the UCM files for SDCA
devices that the control system is quite hard to follow. This is
definitely true without the specification handy the naming can be
a little cryptic. However, as most of the information is parsed
from DisCo there are some limits to what the driver can safely do
to improve this.

However, one area that can be improved is the non-streaming
input/output terminals. These have a field (enum sdca_terminal_type)
that describes the usage of that terminal. These types can be
appended to the entity name to give the users a better clue as
to the purpose. For example "OT 43", would now become "OT 43
Headphone". This would follow through into the jack controls which
would change from "OT 43 Jack" to "OT 43 Headphone Jack", making the
purpose much more obvious to the user.

This provides slightly more readable controls without relying on
implicit knowledge that individual parts might not conform to.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 19:18:46 +00:00
Charles Keepax 5fee9edf79
ASoC: SDCA: Align mute controls to ALSA expectations
Currently mute controls will be called "FU xx Mute Switch" (note
the switch is added programmatically outside the coverage of this
patch) and the accompanying volume control would be called "FU xx
Channel Volume".  These names are taken from the SDCA specification,
however, this does not mesh well with the ALSA naming system. ALSA
generally expects enables rather than mutes and expects that mutes
and volumes have matching names.

Update the names and invert the mute controls to make them more
standard "FU XX Channel Switch", this does slightly deviate from
the SDCA specification but it makes the rest of the Linux ecosystem
a lot happier.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 19:18:46 +00:00
Johan Hovold 86dc090f73
ASoC: codecs: wcd939x: fix regmap leak on probe failure
The soundwire regmap that may be allocated during probe is not freed on
late probe failures.

Add the missing error handling.

Fixes: be2af391ce ("ASoC: codecs: Add WCD939x Soundwire devices driver")
Cc: stable@vger.kernel.org	# 6.9
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251127135057.2216-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 16:36:37 +00:00
Richard Fitzgerald 6797540c8b
ASoC: cs-amp-lib: Use __free(kfree) instead of manual freeing
Use the __free(kfree) cleanup to replace instances of manually
calling kfree(). Also make some code path simplifications that this
allows.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127155817.1374079-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 16:36:36 +00:00
Cezary Rojewski 56736543b5
ASoC: Intel: catpt: Do not block the system from suspending
Even if something goes wrong when performing suspend on DSP, from the
system perspective the component is not critical enough to block the
suspend operation entirely. Leaving recovery to next resume() suffices.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 11:41:17 +00:00
Cezary Rojewski 8a342b2be1
ASoC: Intel: catpt: Do not ignore errors on runtime resume
If pm_runtime_resume_and_get() fails, follow up pm_runtime_xxx()
operate on device in erroneous state.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 11:41:16 +00:00
Cezary Rojewski 16e1773628
ASoC: Intel: catpt: Fix probing order of driver components
catpt_dai_pcm_new() is called during the bring up sequence of the
machine board device which is a different device to the parent (DSP)
device yet utilizes pm_runtime_xxx() against it in order to send IPCs.
If the parent's pm_runtime is not configured before that happens,
errors will occur.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 11:41:15 +00:00
Cezary Rojewski 86a5b621be
ASoC: Intel: catpt: Fix error path in hw_params()
Do not leave any resources hanging on the DSP side if
applying user settings fails.

Fixes: 768a3a3b32 ("ASoC: Intel: catpt: Optimize applying user settings")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 11:41:14 +00:00
Cezary Rojewski ea38b262a2
ASoC: Intel: catpt: Switch to resource_xxx() API
There is a number of interfaces available for manipulating instances of
struct resource. To improve readability, move away from manual editing
in favor of the common interface.

While at it, adjust spacing so that both code blocks, while found in
separate functions, looks cohesive.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 11:41:13 +00:00
Cezary Rojewski 1a0ce0a1e6
ASoC: Intel: catpt: Fix offset checks
Verify if the entire block is found within DRAM, not just
the start of it.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-27 11:41:12 +00:00
Mark Brown 5d0cad4090
ASoC: stm32: sai: fix device and OF node leaks on
Merge series from Johan Hovold <johan@kernel.org>:

This series fixes device and OF node reference leaks during probe and
a clock prepare imbalance on probe failures.

Included is a related cleanup of an error path.
2025-11-26 22:56:01 +00:00
Mark Brown 994a0b2eb6
nau8325 build fixes
Merge series from Jaroslav Kysela <perex@perex.cz>:

Add missing build configuration and fix the i2c probe function to follow
latest i2c core interface.

Jaroslav Kysela (2):
  ASoC: nau8325: use simple i2c probe function
  ASoC: nau8325: add missing build config

 sound/soc/codecs/Kconfig   | 5 +++++
 sound/soc/codecs/Makefile  | 2 ++
 sound/soc/codecs/nau8325.c | 3 +--
 3 files changed, 8 insertions(+), 2 deletions(-)

--
2.51.1
2025-11-26 19:13:03 +00:00
Dan Carpenter 9d3fcd0ebe
ASoC: mediatek: mt8189: remove unnecessary NULL check
Smatch complains that the call to snd_soc_component_get_drvdata(component)
will dereference "component" so this NULL check is too late.  The probe()
function will never be called with a NULL component pointer so just
delete the check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aScUKqCEhSIZoOmg@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-26 17:41:27 +00:00
Shengjiu Wang 73b97d46dd
ASoC: fsl_xcvr: clear the channel status control memory
memset_io() writes memory byte by byte with __raw_writeb() on the arm
platform if the size is word. but XCVR data RAM memory can't be accessed
with byte address, so with memset_io() the channel status control memory
is not really cleared, use writel_relaxed() instead.

Fixes: 2856448686 ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251126064509.1900974-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-26 13:24:19 +00:00