Arnd Bergmann [Wed, 5 Mar 2025 17:27:32 +0000 (18:27 +0100)]
ASoC: cs42l43: convert to SYSTEM_SLEEP_PM_OPS
The custom suspend function causes a build warning when CONFIG_PM_SLEEP
is disabled:
sound/soc/codecs/cs42l43.c:2405:12: error: unused function 'cs42l43_codec_runtime_force_suspend' [-Werror,-Wunused-function]
Change SET_SYSTEM_SLEEP_PM_OPS() to the newer SYSTEM_SLEEP_PM_OPS(),
to avoid this.
Fixes: 164b7dd4546b ("ASoC: cs42l43: Add jack delay debounce after suspend") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250305172738.3437513-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Thu, 6 Mar 2025 10:42:33 +0000 (10:42 +0000)]
ASoC: dapm: Fix changes to DECLARE_ADAU17X1_DSP_MUX_CTRL
The changes to DECLARE_ADAU17X1_DSP_MUX_CTRL did avoid the issue with a
compiler not liking all the macro indirection. However it introduced a
new issue with respect to the mux not being declared static:
sound/soc/codecs/adau17x1.c:275:8: sparse: sparse: symbol
'adau17x1_dac_mux' was not declared. Should it be static?
sound/soc/codecs/adau17x1.c:278:8: sparse: sparse: symbol
'adau17x1_capture_mux' was not declared. Should it be static?
Fix this up by going back to the inline declaration of the soc_enum, but
just call SOC_ENUM_EXT directly rather than indirecting through
SOC_DAPM_ENUM_EXT.
Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202503061119.4QGlnOi6-lkp@intel.com/ Fixes: c951b20766f0 ("ASoC: dapm: Use ASoC control macros where possible") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250306104233.1638625-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Bard Liao [Wed, 5 Mar 2025 13:41:13 +0000 (21:41 +0800)]
ASoC: rt1320: set wake_capable = 0 explicitly
"generic_new_peripheral_assigned: invalid dev_num 1, wake supported 1"
is reported by our internal CI test.
Rt1320's wake feature is not used in Linux and that's why it is not in
the wake_capable_list[] list in intel_auxdevice.c.
However, BIOS may set it as wake-capable. Overwrite wake_capable to 0
in the codec driver to align with wake_capable_list[].
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Acked-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250305134113.201326-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Tue, 4 Mar 2025 14:05:00 +0000 (14:05 +0000)]
ASoC: Tidy up SOC_DOUBLE_* and SOC_SINGLE_* helpers
Re-implement SOC_DOUBLE_VALUE() in terms of SOC_DOUBLE_S_VALUE().
SOC_DOUBLE_S_VALUE() already had a minimum value so add this to
SOC_DOUBLE_VALUE as well, this allows replacement of several hard coded
value entries. Likewise update SOC_SINGLE_VALUE to match, which allows
replacement of even more hard coded values.
Mark Brown [Tue, 4 Mar 2025 15:47:02 +0000 (15:47 +0000)]
Tidy up ASoC VALUE control macros
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
Tidy up the ASoC control value macros. Fix some drivers that should be
using core macros that aren't, combine the existing core macros to be
a little more consistent in style, and update the core macros to use
each other where possible.
Mark Brown [Tue, 4 Mar 2025 14:43:55 +0000 (14:43 +0000)]
ASoC: codecs: Update device_id tables for Realtek
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:
The series aims to streamline the formatting for ACPI IDs so that a
single pattern can be used to identify the device.
Work implicitly suggested by Andy Shevchenko - reading and learning from
number of his reviews on the Linux mailing lists.
Several formats do exists, however, after technical discussion PCI-based
format has been selected as the recommended one. For Realtek devices, it
is going to be 10ECxxxx where 10EC unambiguously identifies Realtek
company whereas the following 4 hexes specify the PART_ID i.e.: the
device.
While at it, there shall be no comma after the terminator entry and
initializing fields with 0 for statically defined structs is redundant.
Mark Brown [Tue, 4 Mar 2025 14:43:46 +0000 (14:43 +0000)]
ASoC: audio-graph-card2-custom-sample: Separate Sample
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
audio-graph-card2-custom-sample has many sample connections, but because
ALSA card has number limition for links, it is impossible to have all
samples into 1 ASoC card.
This patch-set separate sample DT into 2 parts, and remove original sample.
Because of this separation, we can see all sample connection via multi Card.
Maciej Strozek [Tue, 4 Mar 2025 14:05:04 +0000 (14:05 +0000)]
ASoC: cs42l43: Add jack delay debounce after suspend
Hardware reports jack absent after reset/suspension regardless of jack
state, so introduce an additional delay only in suspension case to allow
proper detection to take place after a short delay.
Linus Walleij [Mon, 3 Mar 2025 08:41:44 +0000 (09:41 +0100)]
ASoC: samsung: speyside: Convert to GPIO descriptor
The Speyside ASoC uses a single GPIO from the WM8996
that we can provide from the local offset on that chip
rather than from the global GPIO numberspace as is being
done currently.
The offset 2 was done by calculating the base offset
for the CODEC (i.e. wm8996) GPIOs to 212, by reading
arch/arm/mach-s3c/gpio-samsung-s3c64xx.h and
arch/arm/mach-s3c/crag6410.h and adding up all the
offsets that were occasionally adding a +1 blank GPIO
between each GPIO provider.
ES8328 and ES8388 codecs are I2C or SPI devices, thus they are
addressable on their bus and 'reg' property should be always provided.
Requiring 'reg' is pretty close to redundant, because the I2C and SPI
controller/bus bindings require it already, but the convention is to
mention 'reg' also in the device schemas.
Krzysztof Kozlowski [Tue, 4 Mar 2025 10:38:07 +0000 (11:38 +0100)]
ASoC: dt-bindings: everest,es8328: Mark ES8388 compatible with ES8328
Based on Linux driver, the ES8388 looks fully compatible with ES8328.
One upstream DTS (ARM rk3288-rock2-square.dts) already uses ES8328
fallback, so mark the devices as compatible in the binding.
Louis-Alexis Eyraud [Fri, 28 Feb 2025 10:32:19 +0000 (11:32 +0100)]
ASoC: mediatek: mt6359: Fix DT parse error due to wrong child node name
A recent dtbs_check error fix in mt6359.dtsi file changed a node name
(from "mt6359codec" to "audio-codec") without modifying the mt6539
codec code that uses it.
It leads to a probe failure after devicetree parsing returns in error:
```
[ 1.354025] mt6359-sound mt6359-sound: mt6359_platform_driver_probe() failed to parse dts
[ 1.355066] mt6359-sound mt6359-sound: probe with driver mt6359-sound failed with error -22
```
So, add the child node retrieval with the new name and if not found,
try with the older one for backward compatibility.
Fixes: 76b35f59bbe6 ("arm64: dts: mediatek: mt6359: fix dtbs_check error for audio-codec") Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://patch.msgid.link/20250228-mt6359-fix-probe-failed-v1-1-64941d387b2c@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Mon, 3 Mar 2025 17:14:23 +0000 (17:14 +0000)]
ASoC: Tidy up SOC_DOUBLE_R_* helpers
Re-implement SOC_DOUBLE_R_VALUE() in terms of SOC_DOUBLE_R_S_VALUE().
SOC_DOUBLE_R_S_VALUE() already had a minimum value so add this to
SOC_DOUBLE_R_VALUE() as well, which makes SOC_DOUBLE_R_RANGE_VALUE()
redundant, so its usage is replaced.
Charles Keepax [Mon, 3 Mar 2025 17:14:22 +0000 (17:14 +0000)]
ASoC: dapm: Use ASoC control macros where possible
Update the DAPM kcontrol creation macros to use the ASoC macros where a
helpful version exists. One minor fixup is required in adau17x1, the
compiler doesn't like the extra level of macro indirection coupled with
the inline struct definition. Make the struct definition explicit.
The rt715 does not appear to use the SOC_DOUBLE_R_EXT() macro and even
if it did, the macro is defined identically in the ASoC headers.
Remove the redundant macro definitions.
Shengjiu Wang [Wed, 26 Feb 2025 10:05:07 +0000 (18:05 +0800)]
ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional
Make 'dais' property to be optional. When there is no 'dais' property,
driver won't register the card, dts should have audio graph card node
for linking this device.
Thorsten Blum [Sat, 22 Feb 2025 22:56:59 +0000 (23:56 +0100)]
ASoC: tegra: Fix ADX S24_LE audio format
Commit 4204eccc7b2a ("ASoC: tegra: Add support for S24_LE audio format")
added support for the S24_LE audio format, but duplicated S16_LE in
OUT_DAI() for ADX instead.
Fix this by adding support for the S24_LE audio format.
Alexey Klimov [Fri, 21 Feb 2025 04:40:24 +0000 (04:40 +0000)]
ASoC: codecs: wsa884x: report temps to hwmon in millidegree of Celsius
Temperatures are reported in units of Celsius however hwmon expects
values to be in millidegree of Celsius. Userspace tools observe values
close to zero and report it as "Not available" or incorrect values like
0C or 1C. Add a simple conversion to fix that.
Peter Ujfalusi [Mon, 3 Mar 2025 06:55:52 +0000 (14:55 +0800)]
ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
Initialize current_be_id to 0 to handle the unlikely case when there are
no devices connected to a DAI.
In this case create_sdw_dailink() would return without touching the passed
pointer to current_be_id.
Found by gcc -fanalyzer
Fixes: 59bf457d8055 ("ASoC: intel: sof_sdw: Factor out SoundWire DAI creation") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Cc: stable@vger.kernel.org Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250303065552.78328-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Alexey Klimov [Fri, 21 Feb 2025 03:21:41 +0000 (03:21 +0000)]
ASoC: codecs: wsa883x: Implement temperature reading and hwmon
Read temperature of the amplifier and expose it via hwmon interface, which
will be later used during calibration of speaker protection algorithms.
The method is the same as for wsa884x and therefore this is based on
Krzysztof Kozlowski's approach implemented in commit 6b99dc62d940 ("ASoC:
codecs: wsa884x: Implement temperature reading and hwmon").
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Steev Klimaszewski <steev@kali.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Tested-by: Steev Klimaszewski <steev@kali.org> #Thinkpad X13s Link: https://patch.msgid.link/20250221032141.1206902-1-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 18 Feb 2025 01:14:58 +0000 (01:14 +0000)]
ASoC: audio-graph-card2-custom-sample.dtsi: remove original sample
audio-graph-card2-custom-sample has many sample connections, but because
ALSA card has number limition for links, it is impossible to have all
samples into 1 ASoC card.
The sample is separated into 2 samples. Remove original sample.
Kuninori Morimoto [Tue, 18 Feb 2025 01:14:54 +0000 (01:14 +0000)]
ASoC: audio-graph-card2-custom-sample2.dtsi: Separate Sample DT
audio-graph-card2-custom-sample has many sample connections, but because
ALSA card has number limition for links, it is impossible to have all
samples into 1 ASoC card.
Separate it and took DPCM / Codec2Codec connection part.
Kuninori Morimoto [Tue, 18 Feb 2025 01:14:47 +0000 (01:14 +0000)]
ASoC: audio-graph-card2-custom-sample1.dtsi: Separate Sample DT
audio-graph-card2-custom-sample has many sample connections, but because
ALSA card has number limition for links, it is impossible to have all
samples into 1 ASoC card.