summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2025-11-05ASoC: qcom: q6apm-dai: Use guard() for spin locksSrinivas Kandagatla1-18/+5
Clean up the code using guard() for spin locks. No functional changes, just cleanup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-19-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6afe: Use guard() for spin locksSrinivas Kandagatla1-6/+2
Clean up the code using guard() for spin locks. No functional changes, just cleanup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-18-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6asm: Use automatic cleanup of kfree()Srinivas Kandagatla1-124/+42
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-17-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6prm: Use automatic cleanup of kfree()Srinivas Kandagatla1-21/+6
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-16-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6apm: Use automatic cleanup of kfree()Srinivas Kandagatla1-40/+17
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-15-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6afe: Use automatic cleanup of kfree()Srinivas Kandagatla1-29/+12
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-14-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: q6adm: Use automatic cleanup of kfree()Srinivas Kandagatla1-24/+9
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-13-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: audioreach: Use automatic cleanup of kfree()Srinivas Kandagatla1-166/+66
Its common pattern in q6dsp code to allocate temporary buffer to send gpr/apr packets and free at the function exit. Now this can be simplified via __free(kfree) mechanism. No functional changes. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-12-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoc: qcom: audioreach: remove unused variablesSrinivas Kandagatla1-6/+4
remove unused variables in some of the audioreach functions. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251023102444.88158-11-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm: set runtime correctly for each streamSrinivas Kandagatla1-4/+7
Both capture and playback can have different runtimes, so set them accordingly. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-10-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm-dai: use q6asm_get_hw_pointerSrinivas Kandagatla1-7/+5
make use of q6asm_get_hw_pointer to get the current hardware read/write pointer and remove any additional code that does calculate this manually. As this is redundant and prone to errors. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-9-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm: add q6asm_get_hw_pointerSrinivas Kandagatla2-0/+13
Currently q6asm-dai is performing an extra layer of calculation on the hw_ptr, which is always prone to errors and redundant. q6asm already has tokens to indentify the pointer pointers which an be used to get the hw_ptr and this is more accurate then doing the artificial calculation at upper layers. Add helper function q6asm_get_hw_pointer() to get this hw_ptr. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-8-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm-dai: schedule all available frames to avoid dsp under-runsSrinivas Kandagatla1-7/+27
With the existing code, we are only setting up one period at a time, in a ping-pong buffer style. This triggers lot of underruns in the dsp leading to jitter noise during audio playback. Fix this by scheduling all available periods, this will ensure that the dsp has enough buffer feed and ultimatley fixing the underruns and audio distortion. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-7-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm: handle the responses after closingSrinivas Kandagatla1-0/+5
For record path, multiple read requests are queued to dsp in advance. However when data stream is closed, the pending read requests are rejected by the dsp and a response is sent to the driver, this case is not handled in the driver resulting in errors like below q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: command[0x10dac] not expecting rsp q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: command[0x10dac] not expecting rsp q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: command[0x10dac] not expecting rsp This is same for both write and eos. Fix this by allowing ASM_DATA_CMD_READ_V2, ASM_DATA_CMD_EOS and ASM_DATA_CMD_WRITE_V2 as expected response. Reported-by: Martino Facchin <m.facchin@arduino.cc> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-6-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6asm-dai: perform correct state check before closingSrinivas Kandagatla1-1/+2
Do not stop a q6asm stream if its not started, this can result in unnecessary dsp command which will timeout anyway something like below: q6asm-dai ab00000.remoteproc:glink-edge:apr:service@7:dais: CMD 10bcd timeout Fix this by correctly checking the state. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-5-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: qdsp6: q6asm-dai: set 10 ms period and buffer alignment.Srinivas Kandagatla1-2/+2
DSP expects the periods to be aligned to fragment sizes, currently setting up to hw constriants on periods bytes is not going to work correctly as we can endup with periods sizes aligned to 32 bytes however not aligned to fragment size. Update the constriants to use fragment size, and also set at step of 10ms for period size to accommodate DSP requirements of 10ms latency. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-4-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6adm: the the copp device only during last instanceSrinivas Kandagatla1-75/+71
A matching Common object post processing instance is normally resused across multiple streams. However currently we close this on DSP even though there is a refcount on this copp object, this can result in below error. q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: Found Matching Copp 0x0 qcom-q6adm aprsvc:service:4:8: cmd = 0x10325 return error = 0x2 q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: DSP returned error[2] q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: Found Matching Copp 0x0 qcom-q6adm aprsvc:service:4:8: cmd = 0x10325 return error = 0x2 q6routing ab00000.remoteproc:glink-edge:apr:service@8:routing: DSP returned error[2] qcom-q6adm aprsvc:service:4:8: cmd = 0x10327 return error = 0x2 qcom-q6adm aprsvc:service:4:8: DSP returned error[2] qcom-q6adm aprsvc:service:4:8: Failed to close copp -22 qcom-q6adm aprsvc:service:4:8: cmd = 0x10327 return error = 0x2 qcom-q6adm aprsvc:service:4:8: DSP returned error[2] qcom-q6adm aprsvc:service:4:8: Failed to close copp -22 Fix this by addressing moving the adm_close to copp_kref destructor callback. Fixes: 7b20b2be51e1 ("ASoC: qdsp6: q6adm: Add q6adm driver") Cc: Stable@vger.kernel.org Reported-by: Martino Facchin <m.facchin@arduino.cc> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-3-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-05ASoC: qcom: q6apm-dai: set flags to reflect correct operation of appl_ptrSrinivas Kandagatla1-0/+2
Driver does not expect the appl_ptr to move backward and requires explict sync. Make sure that the userspace does not do appl_ptr rewinds by specifying the correct flags in pcm_info. Without this patch, the result could be a forever loop as current logic assumes that appl_ptr can only move forward. Fixes: 3d4a4411aa8b ("ASoC: q6apm-dai: schedule all available frames to avoid dsp under-runs") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-04ASoC: tas2781: Add tas5822 supportBaojun Xu1-1/+6
TAS5822 has on-chip DSP without current/voltage feedback. Signed-off-by: Baojun Xu <baojun.xu@ti.com> Link: https://patch.msgid.link/20251104041314.792-1-baojun.xu@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-04ASoC: tas2781: Replace deprecated strcpy() with strscpy()HariKrishna Sagala1-1/+2
strcpy() is deprecated,use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com> Link: https://patch.msgid.link/20251104054257.9953-2-hariconscious@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-04ASoC: da7213: Use component driver suspend/resumeClaudiu Beznea2-25/+45
Since snd_soc_suspend() is invoked through snd_soc_pm_ops->suspend(), and snd_soc_pm_ops is associated with the soc_driver (defined in sound/soc/soc-core.c), and there is no parent-child relationship between the soc_driver and the DA7213 codec driver, the power management subsystem does not enforce a specific suspend/resume order between the DA7213 driver and the soc_driver. Because of this, the different codec component functionalities, called from snd_soc_resume() to reconfigure various functions, can race with the DA7213 struct dev_pm_ops::resume function, leading to misapplied configuration. This occasionally results in clipped sound. Fix this by dropping the struct dev_pm_ops::{suspend, resume} and use instead struct snd_soc_component_driver::{suspend, resume}. This ensures the proper configuration sequence is handled by the ASoC subsystem. Cc: stable@vger.kernel.org Fixes: 431e040065c8 ("ASoC: da7213: Add suspend to RAM support") Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20251104114914.2060603-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-04ALSA: usb-audio: add min_mute quirk for SteelSeries ArctisPauli Virtanen1-0/+2
ID 1038:1294 SteelSeries ApS Arctis Pro Wireless is reported to have muted min playback volume. Apply quirk for that. Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4229#note_3174448 Signed-off-by: Pauli Virtanen <pav@iki.fi> Link: https://patch.msgid.link/a83f2694b1f8c37e4667a3cf057ffdc408b0f70d.1762108507.git.pav@iki.fi Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-03ASoC: codecs: aw88261: pass pointer directly instead of passing the addressDan Carpenter1-4/+4
It's a little bit cleaner to just pass "aw88261" instead of the address of it "&aw88261". Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aQYKxl2f-zGVdYFC@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-03ASoC: codecs: simplify aw87390_init() argument a bitDan Carpenter1-4/+4
Just pass "aw87390" instead of the address of it. It's a bit simpler. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aQYKuQuKekmoUrHP@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-03ASoC: max98090/91: adding the two virtual Mux widgets in the routesSharique Mohammad1-2/+9
The two virtual multiplexers are now part of the alsa routing. The "DMIC M1 Mux" now sits between the primary digital mics "DMICL"/"DMICR" and the virtual multiplexer "DMIC Mux". And "DMIC M2 Mux" sits between the secondary digital mics "DMIC2L"/"DMIC2R" and the audio out interfaces "AIFOUT2L"/"AIFOUT2R". This patch makes sure that the M1 and M2 mics can be switched On/Off independently, by default both will be enabled. Signed-off-by: Sharique Mohammad <sharq0406@gmail.com> Link: https://patch.msgid.link/20251103091648.771947-1-sharq0406@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-03ASoC: fsl_spdif: Constify some structuresChristophe JAILLET1-8/+8
'struct fsl_spdif_soc_data' and 'struct snd_kcontrol_new' are not modified in this driver. Constifying these structures moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 53548 25576 128 79252 13594 sound/soc/fsl/fsl_spdif.o After: ===== text data bss dec hex filename 54828 24296 128 79252 13594 sound/soc/fsl/fsl_spdif.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/5fe08f028395a6c6f50d11eee8fdb4a90b1f68ab.1762151503.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-03ASoC: max98090/91: adding two virtual Mux widgets for digital micsSharique Mohammad1-0/+16
The two digital mics M1(primary digital mic) and M2(secondary digital mic) work independently of one another. It means they could be switched On or Off independently of one another. To control their On or Off state, with this patch creating two virtual multiplexer widgets "DMIC M1 Mux" and "DMIC M2 Mux", with two options "Enable" and "Disable". Signed-off-by: Sharique Mohammad <sharq0406@gmail.com> Link: https://patch.msgid.link/20251103091447.771793-1-sharq0406@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-02ALSA: line6: add support for POD HD Pro XBaltazár Radics1-1/+15
It uses the same protocol as other POD HD models so it just needed proper config. Signed-off-by: Baltazár Radics <baltazar.radics@gmail.com> Link: https://patch.msgid.link/20251031183514.40926-1-baltazar.radics@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-30Add support for an external Master Clock in theMark Brown1-3/+30
Merge series from Herve Codina <herve.codina@bootlin.com>: The Cirrus CS4271 codec can have its Master Clock provided by an external clock when no crystal is used. This series adds support for this external Master clock.
2025-10-30ASoC: qcom: sdw: fix memory leakMark Brown16-280/+118
Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>: For some reason we endedup allocating sdw_stream_runtime for every cpu dai, this has two issues. 1. we never set snd_soc_dai_set_stream for non soundwire dai, which means there is no way that we can free this, resulting in memory leak 2. startup and shutdown callbacks can be called without hw_params callback called. This combination results in memory leak because machine driver sruntime array pointer is only set in hw_params callback. All the machine drivers have these memory leaks, so cleanup the mess and make them use common helpers from sdw.c This patch series fix the issue, and while we are at it, it also remove some redundant code from machine drivers.
2025-10-30ASoC: soc-core: check ops & auto_selectable_formats in snd_soc_dai_get_fmt() ↵HariKrishna Sagala1-2/+3
to prevent dereference error Smatch reported an issue that "ops" could be null (see line 174) where later "ops" is dereferenced to extract the dai fmts, also auto_selectable_formats can also be null. Add a proper null check before accessing both the ptrs to ensure a safe execution. Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com> Link: https://patch.msgid.link/20251030105313.32199-2-hariconscious@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-30ASoC: codec: wm8400: replace printk() calls with dev_*() device aware loggingHariKrishna Sagala1-4/+5
Replace direct printk() calls with the appropriate dev_*() logging APIs.Use dev_err, dev_warn, dev_info, or dev_dbg to reflect the correct severity level. Pass the canonical struct device pointer so logs include device context and become traceable to specific hardware instances.Improve log clarity, make messages filterable by device and align the driver with kernel logging conventions to aid debugging and maintenance. Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20251025043011.598300-1-hariconscious@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-30ASoC: SOF: Intel: remove hyphen from AMP<index> name_prexixBard Liao1-0/+8
For those amp with "AMP" name_prefix in the codec_info_list[], use the AMP<index> format to meet the UCM expectation. Fixes: 5cd5f8fc29fa ("ASoC: SOF: Intel: add hyphen between name and index to amp name_prefix") Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20251030065503.1216419-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-30Merge tag 'asoc-fix-v6.18-rc2' of ↵Takashi Iwai16-88/+201
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.18 A bigger batch of fixes than I'd like, things built up due to holidays and some last minute issues which caused me to hold off on sending a pul request. None of these are super remarkable, and there's a few new device IDs in here too including a relatively big block of AMD devices. The Cirrus Logic CS530x support subject line is actually a fix that was on the start of that series and got pulled in here, I forgot to fix the subject up when merging.
2025-10-30ASoC: max98090/91: fixing the stream indexSharique Mohammad1-3/+3
The function SND_SOC_DAPM_AIF_OUT has its third parameter as stream index. The stream index is numbered from 0 to 3 for every output interface widget but with same stream name "HiFi Capture". So, if the stream name is same, the stream index cannot be different. Also for capture, there is only one stream "HiFi Capture", so only one stream index. Therefore, with this patch changed the stream index to 0 for all the output interface widgets with stream name "HiFi Capture". Signed-off-by: Sharique Mohammad <sharq0406@gmail.com> Link: https://patch.msgid.link/20251029164134.4123618-1-sharq0406@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-30ALSA: hda/realtek: Enable mic on Vaio RPLEdson Juliano Drosdeck1-0/+12
Vaio RPL is equipped with ACL256, and needs a fix to make the internal mic and headphone mic to work. Also must to limits the internal microphone boost. Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com> Link: https://patch.msgid.link/20251029181152.389302-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-29ASoC: codecs: va-macro: fix revision checkingSrinivas Kandagatla1-4/+4
The revision rework patch seems to have reversed the bit positions for macro presence in core_id_1 register. This broken RB1 and Arduino UnoQ audio. Fix these bit positions to correctly reflect the register definition. Fixes: 281c97376cfc ("ASoC: codecs: va-macro: Rework version checking") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20251029144336.356816-1-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: SOF: Intel: select SND_SOC_SDW_UTILS in SND_SOC_SOF_HDA_GENERICBard Liao1-0/+1
The "ASoC: SOF: Intel: use sof_sdw as default SDW machine driver" commit uses asoc_sdw_get_codec_info_list_count() and codec_info_list[] in the hda_sdw_machine_select() function. Select SND_SOC_SDW_UTILS to fix the function undefined issue. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202510220819.KrN5gjKL-lkp@intel.com/ Fixes: 5226d19d4cae53 ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver") Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20251029040344.1116201-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: SOF: pcm: Set the PCM device name for HDMIPeter Ujfalusi1-0/+18
User space (alsa-lib) uses the PCM device name to detect HDMI devices, the name is expected to be in form of 'HDMI'+<space>+number. The PCM device name is not configured in ASoC, only the PCM id is set based on the loaded topology. Detect the HDMI PCM playback devices and configure the name to help user space to handle HDMI PCMs correctly. aplay -l | grep HDMI (Audio capable monitor connected) Before the change: card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) [] card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) [] card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) [] after the change: card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) [DELL P1917S] card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) [HDMI 2] card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) [HDMI 3] Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20251029105134.1342-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: cs4271: Add support for the external mclkHerve Codina1-3/+26
The mclk (master clock) of the cs4271 codec can be an input clock. In this case the connected clock needs to be enabled outside of any audio stream. Indeed, this clock is needed for i2c communication. Add support of this clock and enable it before the first i2c transfer. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://patch.msgid.link/20251029093921.624088-5-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: cs4271: Disable regulators in component_probe() error pathHerve Codina1-3/+7
The commit 9a397f473657 ("ASoC: cs4271: add regulator consumer support") has introduced regulators in the driver. Regulators are enabled at the beginning of component_probe() but they are not disabled on errors. This can lead to unbalanced enable/disable. Fix the error path to disable regulators on errors. Fixes: 9a397f473657 ("ASoC: cs4271: add regulator consumer support") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://patch.msgid.link/20251029093921.624088-3-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: tas2783: Fix build for SoundWire API updateMark Brown1-1/+2
In parallel with this driver being introduced there was an update in commit 013a3a66f25a ("regmap: sdw-mbq: Don't assume the regmap device is the SoundWire slave") which changed the API for devm_regmap_init_sdw_mbq_cfg() resulting in a build break. Update to fix that. Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: renesas: rz-ssi: Use proper dma_buffer_pos after resumeClaudiu Beznea1-13/+12
When the driver supports DMA, it enqueues four DMA descriptors per substream before the substream is started. New descriptors are enqueued in the DMA completion callback, and each time a new descriptor is queued, the dma_buffer_pos is incremented. During suspend, the DMA transactions are terminated. There might be cases where the four extra enqueued DMA descriptors are not completed and are instead canceled on suspend. However, the cancel operation does not take into account that the dma_buffer_pos was already incremented. Previously, the suspend code reinitialized dma_buffer_pos to zero, but this is not always correct. To avoid losing any audio periods during suspend/resume and to prevent clip sound, save the completed DMA buffer position in the DMA callback and reinitialize dma_buffer_pos on resume. Cc: stable@vger.kernel.org Fixes: 1fc778f7c833a ("ASoC: renesas: rz-ssi: Add suspend to RAM support") Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20251029141134.2556926-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: qcom: sc7280: make use of common helpersSrinivas Kandagatla2-64/+14
sc7280 machine driver can make use of common sdw functions to do most of the soundwire related operations. Remove such redundant code from sc7280 driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Steev Klimaszewski <threeway@gmail.com> # Thinkpad X13s Link: https://patch.msgid.link/20251022143349.1081513-5-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: qcom: sdm845: make use of common helpersSrinivas Kandagatla1-50/+3
sdm845 machine driver can make use of common sdw functions to do most of the soundwire related operations. Remove such redundant code from sdm845 driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Steev Klimaszewski <threeway@gmail.com> # Thinkpad X13s Link: https://patch.msgid.link/20251022143349.1081513-4-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: qcom: sdw: remove redundant codeSrinivas Kandagatla5-107/+22
remove redundant code and pointers to handle sdw_stream_runtime by making use of qcom_snd_sdw_get_stream(). This removes need of machine specific shutdown and hw_params sdw callbacks and also need to store sdw_stream_runtime pointers in machine drivers. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Steev Klimaszewski <threeway@gmail.com> # Thinkpad X13s Link: https://patch.msgid.link/20251022143349.1081513-3-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29ASoC: qcom: sdw: fix memory leak for sdw_stream_runtimeSrinivas Kandagatla6-50/+64
For some reason we endedup allocating sdw_stream_runtime for every cpu dai, this has two issues. 1. we never set snd_soc_dai_set_stream for non soundwire dai, which means there is no way that we can free this, resulting in memory leak 2. startup and shutdown callbacks can be called without hw_params callback called. This combination results in memory leak because machine driver sruntime array pointer is only set in hw_params callback. Fix this by 1. adding a helper function to get sdw_runtime for substream which can be used by shutdown callback to get hold of sruntime to free. 2. only allocate sdw_runtime for soundwire dais. Fixes: d32bac9cb09c ("ASoC: qcom: Add helper for allocating Soundwire stream runtime") Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Steev Klimaszewski <threeway@gmail.com> # Thinkpad X13s Link: https://patch.msgid.link/20251022143349.1081513-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-29Add SDCA UMP/FDL supportMark Brown10-76/+1271
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Next installment of the SDCA changes, hopefully the next series after this should be the full class driver. It is worth noting this series has a build dependency on a patch working its way through the PM/ACPI tree: commit ac46f5b6c661 ("ACPICA: Add SoundWire File Table (SWFT) signature") git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git But we can probably worry about that later, as normally there is a reasonable amount of review on these SDCA series'. This series broadly breaks down into 3 chunks, first there are several changes to remove the assumption that the struct device used for SDCA purposes represents the SoundWire slave. This is because the SDCA class driver will be made of an auxiliary driver for each SDCA Function, thus the SoundWire slave will be on the parent device for each individual driver. Then there are patches to add support for UMP/FDL. And then finally since the rest of the HID support is there and UMP was the last missing part required a small patch to add a function to allow reporting of HID events from SDCA devices.
2025-10-28Add support for Cirrus Logic CS530x DAC and CODECMark Brown6-106/+628
Merge series from Vitaly Rodionov <vitalyr@opensource.cirrus.com>: This patch series introduces DAC, CODEC, and SPI control bus support for Cirrus Logic CS530x variants, along with general code cleanup and resolution of checkpatch.pl warnings.
2025-10-28ASoC: spacemit: fix build warning and errorMark Brown1-2/+1
Merge series from Troy Mitchell <troy.mitchell@linux.spacemit.com>: After the i2s patch for K1 was merged, two issues were identified: - Missing error handling for the init_dai() function [1], which is required since the function allocates memory internally. - The Kconfig entry ignored the dependency chain of DMA_CMA [2]. This series fixes both issues. Link: https://lore.kernel.org/all/aPtiNCZ_KBezL2Dr@stanley.mountain/#t [1] Link: https://lore.kernel.org/all/20251022141705.714b19b5@canb.auug.org.au/ [2]