Marco Crivellari [Fri, 5 Sep 2025 09:10:15 +0000 (11:10 +0200)]
ASoC: replace use of system_unbound_wq with system_dfl_wq
Currently if a user enqueue a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.
This lack of consistentcy cannot be addressed without refactoring the API.
system_unbound_wq should be the default workqueue so as not to enforce
locality constraints for random work whenever it's not required.
Adding system_dfl_wq to encourage its use when unbound work should be used.
queue_work() / queue_delayed_work() / mod_delayed_work() will now use the
new unbound wq: whether the user still use the old wq a warn will be
printed along with a wq redirect to the new one.
The old system_unbound_wq will be kept for a few release cycles.
Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Message-ID: <20250905091016.109428-2-marco.crivellari@suse.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Han [Fri, 5 Sep 2025 09:18:44 +0000 (17:18 +0800)]
ASoC: codecs: fs210x: Add NULL check in fs210x_register_snd_component
Add check for the return value of devm_kmemdup() to prevent
potential null pointer dereference.
Fixes: 756117701779 ("ASoC: codecs: Add FourSemi FS2104/5S audio amplifier driver") Signed-off-by: Charles Han <hanchunchao@inspur.com>
Message-ID: <20250905091845.1559-1-hanchunchao@inspur.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 4 Sep 2025 17:03:58 +0000 (18:03 +0100)]
Improve cs42l43 suspend/IRQ interactions
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
cs42l43 uses pm_runtime_force_suspend() during system suspend, however
this means care must be taken that IRQ handler code isn't running when
entering system suspend as force suspend will ignore that the handler
is holding a pm reference. Typically the result of this is just a few
error messages, but better to improve the handling and ensure that all
IRQ processing is synchronised in before system suspend.
Mark Brown [Thu, 4 Sep 2025 17:03:54 +0000 (18:03 +0100)]
ASoC: dt-bindings: Document routing strings for
Merge series from Jihed Chaibi <jihed.chaibi.dev@gmail.com>:
The series adds pin names for the es8316, wm8960, and nau8825
codecs to their respective binding files to improve the user
experience for board developers.
ASoC: dt-bindings: qcom,lpass-va-macro: Update bindings for clocks to support ADSP
Manage clock settings for ADSP solution. On Existing ADSP bypass
solutions, the macro and dcodec GDSCs are enabled using power domains
in lpass-va-macro which is not applicable for ADSP based platform.
Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-ID: <20250903151337.1037246-2-mohammad.rafi.shaik@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Wed, 3 Sep 2025 09:45:47 +0000 (10:45 +0100)]
ASoC: cs42l43: Shutdown jack detection on suspend
Fully power down the jack detection on system suspend since the device
will not be powered up during.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-ID: <20250903094549.271068-5-ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Wed, 3 Sep 2025 09:45:46 +0000 (10:45 +0100)]
ASoC: cs42l43: Disable IRQs in system suspend
Currently the MFD driver disables all the IRQs upon entering system
suspend, however there are some issues with this approach. As this
device uses runtime force suspend.
The regmap IRQ handler can run, claim a PM runtime reference and get
scheduled, the MFD can then force suspend. When the IRQ thread gets
rescheduled it will try to access volatile registers on the
suspended device. Furthermore, this race also applies to work queue
items scheduled by the IRQ handlers.
As the MFD code doesn't know about the individual work queue items, the
end drivers must mask their own IRQs and sync in any work queues as part
of entering system suspend. Update the code here to do so.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-ID: <20250903094549.271068-4-ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Wed, 3 Sep 2025 09:45:45 +0000 (10:45 +0100)]
ASoC: cs42l43: Store IRQ domain in codec private data
To support future refactoring store a pointer to the IRQ domain in the
codec private data allowing easier access to it outside of probe.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-ID: <20250903094549.271068-3-ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Wed, 3 Sep 2025 09:45:44 +0000 (10:45 +0100)]
ASoC: cs42l43: Rename system suspend callback and fix debug print
There is some confusion around cs42l43_codec_runtime_force_suspend().
This function is the system suspend callback, however the name and
the debug print both use the words runtime. Rename the function to
the simpler cs42l43_codec_suspend() and correct the debug print.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-ID: <20250903094549.271068-2-ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Add a list of the wm8960 pin names to the binding's description to make
it self-contained and improve the user experience for board developers.
Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Rob Herring (Arm) <robh@kernel.org>
Message-ID: <20250903160119.83625-4-jihed.chaibi.dev@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Add a list of the nau8825 pin names to the binding's description to make
it self-contained and improve the user experience for board developers.
Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org>
Message-ID: <20250903160119.83625-3-jihed.chaibi.dev@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Add a list of the es8316 pin names to the binding's description to make
it self-contained and improve the user experience for board developers.
Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org>
Message-ID: <20250903160119.83625-2-jihed.chaibi.dev@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 3 Sep 2025 17:58:55 +0000 (18:58 +0100)]
ASoC: Intel: avs: Adjust platform names
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:
This series is a direct follow up to the recent
machine-board-registration changes [1]. Initially, a number of smaller
patchsets were part of a bigger block of changes. My attempt to split
them up to make the review easier was unfortunately not successful [2].
The goal of this series is the same one as with [1] - allow for multiple
cards of the same type without workarounds or code duplications.
With the machine-board names being unique - thanks to
PLATFORM_DEVID_AUTO - platform component names shall be adjusted too so
that no misbindings happen.
In essence, majority of the changes can be summarized as: simplifying
card and dai_link initialization. Actions:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
- for the probe-board mach-context is dropped entirely. The panic [2] is
gone
ASoC: codecs: lpass-wsa-macro: add Codev version 2.9
Add support for lpass wsa codec macro version 2.9, which is available in
Qualcomm Glymur SoCs.
Its compatible with 2.8 w.r.t register layouts
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-ID: <20250902140044.54508-7-srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Add support for lpass codec macro version 2.9, which is available in
Qualcomm Glymur SoCs.
Its compatible with 2.8 w.r.t register layouts.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-ID: <20250902140044.54508-6-srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: dt-bindings: qcom: Add Glymur LPASS wsa and va macro codecs
Document compatibles for Qualcomm Glymur SoC macro digital codecs
(VA and WSA), compatible with previous generation (SM8550 and SM8650).
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-ID: <20250902140044.54508-5-srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: qcom: x1e80100: add compatible for glymur SoC
Add support for glymur SoC based sound card support.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Message-ID: <20250902140044.54508-4-srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Document the bindings for the glymur sound card which is
audioreach based architecture.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-ID: <20250902140044.54508-3-srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: qcom: x1e80100: set card driver name from match data
Sound machine drivers for Qualcomm SoCs can be reused across multiple
SoCs. But user space ALSA UCM files depend on the card driver name which
should be set per board/SoC.
Allow such customization by using driver match data as sound card driver
name.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Message-ID: <20250902140044.54508-2-srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-18-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-17-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-16-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-15-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-14-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-13-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-12-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
To allow for multiple instances of the card, move away from static
dai_link declaration.
While at it, simplify the code as the name of the platform component
matches the name of the card's platform_device:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-11-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-10-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-9-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-8-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-7-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-6-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-5-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
To allow for multiple instances of the card, move away from static
dai_link declaration.
While at it, simplify the code as the name of the platform component
matches the name of the card's platform_device:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-4-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-3-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The name of the platform component matches the name of the card's
platform_device.
This allows for simplifying card and dai_link initialization:
- drop mach->mach_params.platform usage
- drop snd_soc_fixup_dai_links_platform_name() usage
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Message-ID: <20250902094853.1231842-2-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Tue, 2 Sep 2025 08:32:13 +0000 (09:32 +0100)]
ASoC: SOF: ipc4-topology: Fix a less than zero check on a u32
Currently the error check from the call to sof_ipc4_get_sample_type
is always false because a u32 variable out_ref_type is being used
to perform the less than zero check. Fix this by using the int
variable ret to perform the check.
Fixes: c04c2e829649 ("ASoC: SOF: ipc4-topology: Add support for 8-bit formats") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20250902083213.2620124-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 2 Sep 2025 10:02:19 +0000 (11:02 +0100)]
ASoC: qcom: audioreach: fix sparse warnings
Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>:
Recent static calibration support patches have excersised new code path
exposing some missing checks and also accessing some variables which are
of LE type that are accessed directly without converting it to CPU type.
Thanks to Dan Carpenter and kernel test robot for reporting this.
It is possible that the topology parsing function
audioreach_widget_load_module_common() could return NULL or an error
pointer. Add missing NULL check so that we do not dereference it.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Cc: Stable@vger.kernel.org Fixes: 36ad9bf1d93d ("ASoC: qdsp6: audioreach: add topology support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20250825101247.152619-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
(A) is just wrapper for snd_kcontrol_chip().
(B) is for more complex conversion.
Having similar functions is confusable. So (A) will be replaced to
original snd_kcontrol_chip(). (B) will be stay, but the function
name should be xx_to_xx().
And it is defined at soc-component.h. It should be implemented at
soc-dapm.c.
This patch renames it to snd_soc_dapm_kcontrol_to_component(), and
move to soc-dapm.c.
This patch keeps compatible by using define, but old name will be replaced
on each drivers and removed from ASoC in the future.
Mark Brown [Fri, 29 Aug 2025 22:19:49 +0000 (23:19 +0100)]
ASoC: SOF: sof-client-probes-ipc4: Query available
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
This series improves the IPC4 probes implementation by improving the
report quality and adds support for querying the available probes
on the firmware side.
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
Up to this point we had a spoken rule what sof-client can access and what
they must not (they cannot use sdev directly), recently there were attempts
to break this rule as clients could access sdev via the sof client dev.
The series will re-arrange the client device struct to 'hide' the sdev (and
the list) from client drivers to prevent abuse.
Mark Brown [Fri, 29 Aug 2025 22:19:35 +0000 (23:19 +0100)]
ASoC: SOF: Intel: only detect codecs when HDA DSP
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
SDW codecs use the global HDaudio WAKEEN/STS to detect wakes since LNL. But
the wakeen is handled in the SDW driver. We should filter the bus->codec_mask
to only include HDA and IDISP codecs to avoid clearing the wakeen status
before it is handled.
Jyri Sarha [Fri, 29 Aug 2025 15:11:01 +0000 (18:11 +0300)]
ASoC: sof: ipc4-topology: Add support to sched_domain attribute
Add SOF_TKN_COMP_SCHED_DOMAIN and connect it to struct snd_sof_widget
comp_domain member, with new get_token_comp_domain() function.
The logic is such that if the topology attribute is not present in the
widget node the corresponding IPC4 extension value is taken from the
module's manifest like before. But if the attribute is found and
recognized its value overrides what is there in the manifest.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829151101.27327-1-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Introduce a new internal structure for wrapping the sof_client_dev and
move members away from the client visible struct that they must not
access, let alone see (sdev and the list).
The changes are mechanical in nature and contained within sof-client core
code, no functional change or change in behavior is introduced.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Message-ID: <20250829102510.15159-3-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Jyri Sarha [Fri, 29 Aug 2025 09:30:22 +0000 (12:30 +0300)]
ASoC: SOF: sof-client-probes: Add available points_info(), IPC4 only
Add another debugfs file, "probe_points_available", that shows all the
available probe points in the SOF FW at the time of query. The probe
points are there only when an active SOF stream exists in the
system. However, the stream identifiers are persistent in the sense
that the same probe point identifiers always appear with the same
playback or capture command in the same system configuration.
The output, when reading "probe_points_available", may look like this:
The triplet at the beginning of a line can be copy-pasted as such to
"probe_points" debugfs file for adding a probe point. The rest of the
line tries to give human readable explanation of what this probe point
is.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829093022.32094-6-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Jyri Sarha [Fri, 29 Aug 2025 09:30:21 +0000 (12:30 +0300)]
ASoC: SOF: sof-client-probes-ipc4: Human readable debugfs "probe_points"
The current output of three integers is not very human readable. Use
ipc4 functions to describe in more detail what the struct
sof_probe_point_desc buffer_id is actually referring to in an ipc4 SOF
system.
Before this commit the "probe_points" debugfs file could read as:
The triplet in the beginning of the line can be used to reinserted the
probe point again by writing it into "probe_points" debugfs file, if
its first removed by writing the fist number in "probe_points_remove".
The last number is ignored when creating a probe point.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829093022.32094-5-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Add sof_client_ipc4_find_swidget_by_id() for finding widgets from SOF
client devices. The motivation is to decode probes debugfs output to
be more readable.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829093022.32094-4-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Upgrade the struct sof_probes_ipc_ops points_info() method from dummy
implementation to a working implementation. The actual functionality
requires that the DSP FW supports the IPC request. The support was
just recently added. If its not there an IPC failure is reported in
the logs.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829093022.32094-2-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Seppo Ingalsuo [Fri, 29 Aug 2025 10:53:05 +0000 (13:53 +0300)]
ASoC: SOF: ipc4-topology: Add support for float sample type
This patch adds support for FLOAT_LE ALSA type for playback and
capture for IPC4 systems. Functions sof_ipc4_update_hw_params(),
sof_ipc4_get_valid_bits() and sof_ipc4_get_sample_type()
are updated to handle SOF_IPC4_TYPE_FLOAT and
SNDRV_PCM_FORMAT_FLOAT_LE.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829105305.31818-4-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Seppo Ingalsuo [Fri, 29 Aug 2025 10:53:04 +0000 (13:53 +0300)]
ASoC: SOF: ipc4-topology: Add support for 8-bit formats
This patch enables use of 8-bit unsigned, A-law, and mu-law
sample formats with IPC4 SOF.
The ipc4-topology.h is updated with IPC4 sample types. The
purpose is to convert ALSA types to IPC4 types.
The functions of_ipc4_update_hw_params(), sof_ipc4_get_valid_bits(),
and new function sof_ipc4_get_sample_type() are updated to handle
the sample type conversions.
The function sof_ipc4_prepare_copier_module() is updated to set
the DMA SCS bit for all non 32 bits sample types.
The change to function sof_ipc4_get_valid_bits() returns 8 bits
for these ALSA formats.
The change to function sof_ipc4_prepare_copier_module() is
needed to handle properly all non 32-bit formats with SCS
bit set.
To support playback with new 8 bits types, the
sof_ipc4_init_input_audio_fmt() function is updated to get
the sample type and use it in search for copier input pin
format.
To support capture, the sof_ipc4_init_output_audio_fmt()
is updated similarly. Since the function uses separate
out_ref_type argument, instead of single parameters struct,
the out_ref_type needs to be added to every user of the
function. Therefore functions sof_ipc4_prepare_copier_module(),
sof_ipc4_prepare_gain_module(), sof_ipc4_prepare_mixer_module(),
sof_ipc4_prepare_src_module(), and sof_ipc4_prepare_process_module()
are updated to set the out_ref_type.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829105305.31818-3-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 29 Aug 2025 10:53:03 +0000 (13:53 +0300)]
ASoC: SOF: ipc4-pcm: Add fixup for channels
We can have modules in path which can change the number of channels and in
this case the BE params needs to be adjusted to configure the DAI according
to the copier configuration.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Message-ID: <20250829105305.31818-2-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Bagas Sanjaya [Fri, 29 Aug 2025 07:55:22 +0000 (14:55 +0700)]
ASoC: doc: Internally link to Writing an ALSA Driver docs
ASoC codec and platform driver docs contain reference to writing ALSA
driver docs, as an external link. Use :doc: directive for the job
instead.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Message-ID: <20250829075524.45635-13-bagasdotme@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Bard Liao [Fri, 29 Aug 2025 08:29:08 +0000 (11:29 +0300)]
ASoC: SOF: Intel: only detect codecs when HDA DSP probe
SDW codecs use the global HDaudio WAKEEN/STS to detect wakes since LNL.
But the wake event is handled in the SDW driver. We should only clear
WAKESTS for the HDA and IDISP codecs that was detected when HDA DSP
probe. The SoundWire codec will be included in the codec_mask if we read
the STATESTS register when a SoundWire codec wake event happens.
The commit avoid updating bus->codec_mask in resume to not clear WAKESTS
of SoundWire codecs.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829082908.2693-3-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Bard Liao [Fri, 29 Aug 2025 08:29:07 +0000 (11:29 +0300)]
ASoC: SOF: Intel: split codec mask detect and programming UNSOL
We only need to detect codec mask in probe, but need to program UNSOL
in probe and resume. We will detect codec mask and program UNSOL
separately in the follow up commit.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829082908.2693-2-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:
Set of patches all connected to the machine-board registration process
and the board_selection.c file. Apart from LOC reduction, allows for
multiple cards of the same 'type' e.g.: avs_rt5640, to be present
simultanetously without any workarounds or tricks. The last patch
improves debugability - helps us (the devs) deal with basic I2S-boards
issues out there without forcing the user to constantly switch between
debug-friendly and non-debug options.
--
Initially I wanted to have the first two patches (new implementation and
the follow up cleanup) to be just one patch. However, the git diff, even
with --patience does not look good, at least in my opinion. Decided to
split the changes into two separate patches to make it easy to review
and comment.
As the first two patches carry heaviest load, the summary:
- provide a unified avs_register_board() wrapper for
platform_device_register_data(PLATFORM_DEVID_AUTO). The _AUTO is what
makes every device name unique and prevents any naming conflicts to
occur when matching components <-> cards in runtime
- provide avs_register_board_pdata(), a wrapper one-level above
avs_register_board() that takes all custom parameters in its argument
list so that the initialization of 'struct avs_mach_pdata' does not
need to be repeated in every function like its done today
- make use of the two above to write simpler registration functions:
1. init any interface-type-specific values e.g.: SSP port for I2S
board
2. call avs_register_board_pdata()
3. register the ASoC component with avs_register_xxx_component()
In regard to the last three patches - two are simplifications, no
functional changes just LOC reduction and readability.
The last one is to improve debug-ability, especially when working in the
open field - often we, the devs, find it useful when debugging
production systems to run i2s_test (the debug board) without impacting
the 'real' board e.g.: avs_rt5640. By default i2s_test is empty so a
typical user and their scenarios are not impacted.
Mark Brown [Thu, 28 Aug 2025 19:45:00 +0000 (21:45 +0200)]
ASoC: use int type to store negative error codes
Merge series from Qianfeng Rong <rongqianfeng@vivo.com>:
The 'ret' variable usually is used to store returns from some functions,
which return either zero on success or negative error codes on failure.
Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.
Change "ret" from u32/unsigned int to int type. No effect on runtime.
Andy Shevchenko [Tue, 26 Aug 2025 13:27:16 +0000 (15:27 +0200)]
ASoC: amd: acp: Remove (explicitly) unused header
The fwnode.h is not supposed to be used by the drivers as it
has the definitions for the core parts for different device
property provider implementations. Drop it.
Note, that fwnode API for drivers is provided in property.h
which is included here.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Message-ID: <20250826132734.278226-1-andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Qianfeng Rong [Thu, 28 Aug 2025 07:53:59 +0000 (15:53 +0800)]
ASoC: qcom: use int type to store negative error codes
Change the 'ret' variable from unsigned int to int to store negative error
codes or zero returned by regmap_field_write().
Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.
No effect on runtime.
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Message-ID: <20250828075406.386208-4-rongqianfeng@vivo.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Qianfeng Rong [Thu, 28 Aug 2025 07:53:58 +0000 (15:53 +0800)]
ASoC: adau1977: use int type to store negative error codes
Change the 'ret' variable from unsigned int to int to store negative error
codes or zero returned by regmap_update_bits().
Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.
No effect on runtime.
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Message-ID: <20250828075406.386208-3-rongqianfeng@vivo.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Qianfeng Rong [Thu, 28 Aug 2025 07:53:57 +0000 (15:53 +0800)]
ASoC: amd: use int type to store negative error codes
Change the 'ret' variable from u32 to int to store negative error codes
directly or returned by other functions.
Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.
No effect on runtime.
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Message-ID: <20250828075406.386208-2-rongqianfeng@vivo.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Wed, 27 Aug 2025 14:22:29 +0000 (16:22 +0200)]
ASoC: Intel: avs: Allow i2s test and non-test boards to coexist
The i2s_test card serves debug purpose and is not probed by default.
Currently i2s_test and non-i2s_test sound cards exclude each other. To
increase the test coverage, allow both board types to be probed
simultaneously and share the available SSP port pool.
As 'i2s_test' module parameter is empty by default and requires manual
input from user to activate, there is no impact for standard production
scenarios.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-6-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Wed, 27 Aug 2025 14:22:28 +0000 (16:22 +0200)]
ASoC: Intel: avs: Simplify avs_get_i2s_boards()
No functional changes, just code simplification and readability
improvements as there is no need to operate on 'struct avs_acpi_boards'
if 'struct snd_soc_acpi_mach' is what interests us.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-5-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Wed, 27 Aug 2025 14:22:26 +0000 (16:22 +0200)]
ASoC: Intel: avs: Cleanup duplicate members
Switch to the new board registration functions and remove the
then-unused code.
The SSP-number-check is still important and cannot be just dropped. Move
it from avs_register_i2s_board(), which is being removed with this
patch, to avs_register_i2s_boards() to maintain sanity when registering
a board.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-3-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Wed, 27 Aug 2025 14:22:25 +0000 (16:22 +0200)]
ASoC: Intel: avs: New board registration routines
To support multiple instances of the same card utilize
PLATFORM_DEVID_AUTO when registering new platform devices. This
adaptation is also an opportunity to streamline the devices
registration - avs_register_board().
All the new functions are equivalents of the existing ones apart from
adjusting platform_device_register_data() call with PLATFORM_DEVID_AUTO
and code size reduction given the presence of unified register function.
Follow up changes will complete the transition and cleanup the duplicate
members.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-2-cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Chen-Yu Tsai [Mon, 25 Aug 2025 15:11:09 +0000 (23:11 +0800)]
ASoC: mediatek: common: Switch to for_each_available_child_of_node_scoped()
Using for_each_available_child_of_node_scoped() allows us to get rid of
of_node_put() calls from early returns or breaks in the loop. It also
fixes issues with missing of_node_put() calls.
Switch to for_each_available_child_of_node_scoped() in parse_dai_link_info().
Also drop the braces around if blocks now that the inner block is just
one statement.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Fei Shao <fshao@chromium.org>
Message-ID: <20250825151111.3696404-1-wenst@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 28 Aug 2025 02:22:02 +0000 (02:22 +0000)]
ASoC: renesas: msiof: start DMAC first
MSIOF needs to start DMAC before starting HW.
It will get unknown error at 1st using without this patch.
Playback: FSERR = 0, FOVF = 0, FUDF = 1
Capture: FSERR = 1, FOVF = 0, FUDF = 0
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-ID: <87cy8guqwl.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 28 Aug 2025 02:21:57 +0000 (02:21 +0000)]
ASoC: renesas: msiof: cleanup status clear method
Current MSIOF driver clear status 1) after starting HW, and 2) clear all
status. But it should be 1') before starting HW, 2') clear necessary
status only. Cleanup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-ID: <87ecswuqwr.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 28 Aug 2025 02:21:51 +0000 (02:21 +0000)]
ASoC: renesas: msiof: tidyup error message
The meesage was strange. tidyup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-ID: <87frdcuqww.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 28 Aug 2025 02:21:46 +0000 (02:21 +0000)]
ASoC: renesas: msiof: msiof_update_and_wait() checks whether reg was updated
msiof_update_and_wait() updates reg and waits until the value was updated.
But, if the set value was same as current reg value, no update will be
happen. Check the value, and ignore waiting if no update.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-ID: <87h5xsuqx2.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Message-ID: <20250825121139.2150099-1-alexander.stein@ew.tq-group.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Xichao Zhao [Tue, 19 Aug 2025 11:26:54 +0000 (19:26 +0800)]
ASoC: SOF: imx: Remove the use of dev_err_probe()
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Reviewed-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Message-ID: <20250819112654.588527-1-zhao.xichao@vivo.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Shengjiu Wang [Wed, 20 Aug 2025 03:16:41 +0000 (11:16 +0800)]
ASoC: imx-hdmi: remove cpu_pdev related code
If a defer probe happens for the cpu device, the return value for
cpu_pdev "ret = -EINVAL" breaks defer probe. As the cpus->dai_name
can be replaced by cpus->of_node, to simplify the code, remove related
code for cpu_pdev.
Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Message-ID: <20250820031641.2158261-1-shengjiu.wang@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Linus Torvalds [Sun, 24 Aug 2025 14:13:05 +0000 (10:13 -0400)]
Merge tag 'perf_urgent_for_v6.17_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Borislav Petkov:
- Fix a case where the events throttling logic operates on inactive
events
* tag 'perf_urgent_for_v6.17_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf: Avoid undefined behavior from stopping/starting inactive events
Linus Torvalds [Sun, 24 Aug 2025 13:52:28 +0000 (09:52 -0400)]
Merge tag 'x86_urgent_for_v6.17_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Borislav Petkov:
- Fix the GDS mitigation detection on some machines after the recent
attack vectors conversion
- Filter out the invalid machine reset reason value -1 when running as
a guest as in such cases the reason why the machine was rebooted does
not make a whole lot of sense
- Init the resource control machinery on Hygon hw in order to avoid a
division by zero and to actually enable the feature on hw which
supports it
* tag 'x86_urgent_for_v6.17_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/bugs: Fix GDS mitigation selecting when mitigation is off
x86/CPU/AMD: Ignore invalid reset reason value
x86/cpu/hygon: Add missing resctrl_cpu_detect() in bsp_init helper
Linus Torvalds [Sun, 24 Aug 2025 13:43:50 +0000 (09:43 -0400)]
Merge tag 'modules-6.17-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux
Pull modules fix from Daniel Gomez:
"This includes a fix part of the KSPP (Kernel Self Protection Project)
to replace the deprecated and unsafe strcpy() calls in the kernel
parameter string handler and sysfs parameters for built-in modules.
Single commit, no functional changes"
* tag 'modules-6.17-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux:
params: Replace deprecated strcpy() with strscpy() and memcpy()
Linus Torvalds [Sat, 23 Aug 2025 15:27:31 +0000 (11:27 -0400)]
Merge tag 'char-misc-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc/iio fixes from Greg KH:
"Here are a small number of char/misc/iio and other driver fixes for
6.17-rc3. Included in here are:
- IIO driver bugfixes for reported issues
- bunch of comedi driver fixes
- most core bugfix
- fpga driver bugfix
- cdx driver bugfix
All of these have been in linux-next this week with no reported
issues"
* tag 'char-misc-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
most: core: Drop device reference after usage in get_channel()
comedi: Make insn_rw_emulate_bits() do insn->n samples
comedi: Fix use of uninitialized memory in do_insn_ioctl() and do_insnlist_ioctl()
comedi: pcl726: Prevent invalid irq number
cdx: Fix off-by-one error in cdx_rpmsg_probe()
fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable()
iio: pressure: bmp280: Use IS_ERR() in bmp280_common_probe()
iio: light: as73211: Ensure buffer holes are zeroed
iio: adc: rzg2l_adc: Set driver data before enabling runtime PM
iio: adc: rzg2l: Cleanup suspend/resume path
iio: adc: ad7380: fix missing max_conversion_rate_hz on adaq4381-4
iio: adc: bd79124: Add GPIOLIB dependency
iio: imu: inv_icm42600: change invalid data error to -EBUSY
iio: adc: ad7124: fix channel lookup in syscalib functions
iio: temperature: maxim_thermocouple: use DMA-safe buffer for spi_read()
iio: adc: ad7173: prevent scan if too many setups requested
iio: proximity: isl29501: fix buffered read on big-endian systems
iio: accel: sca3300: fix uninitialized iio scan data
Linus Torvalds [Sat, 23 Aug 2025 15:21:56 +0000 (11:21 -0400)]
Merge tag 'usb-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are some small USB driver fixes for 6.17-rc3 to resolve a bunch
of reported issues. Included in here are:
- typec driver fixes
- dwc3 new device id
- dwc3 driver fixes
- new usb-storage driver quirks
- xhci driver fixes
- other tiny USB driver fixes to resolve bugs
All of these have been in linux-next this week with no reported issues"
* tag 'usb-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: xhci: fix host not responding after suspend and resume
usb: xhci: Fix slot_id resource race conflict
usb: typec: fusb302: Revert incorrect threaded irq fix
USB: core: Update kerneldoc for usb_hcd_giveback_urb()
usb: typec: maxim_contaminant: re-enable cc toggle if cc is open and port is clean
usb: typec: maxim_contaminant: disable low power mode when reading comparator values
usb: dwc3: Remove WARN_ON for device endpoint command timeouts
USB: storage: Ignore driver CD mode for Realtek multi-mode Wi-Fi dongles
usb: storage: realtek_cr: Use correct byte order for bcs->Residue
usb: chipidea: imx: improve usbmisc_imx7d_pullup()
kcov, usb: Don't disable interrupts in kcov_remote_start_usb_softirq()
usb: dwc3: pci: add support for the Intel Wildcat Lake
usb: dwc3: Ignore late xferNotReady event to prevent halt timeout
USB: storage: Add unusual-devs entry for Novatek NTK96550-based camera
usb: core: hcd: fix accessing unmapped memory in SINGLE_STEP_SET_FEATURE test
usb: renesas-xhci: Fix External ROM access timeouts
usb: gadget: tegra-xudc: fix PM use count underflow
usb: quirks: Add DELAY_INIT quick for another SanDisk 3.2Gen1 Flash Drive
Linus Torvalds [Sat, 23 Aug 2025 14:11:34 +0000 (10:11 -0400)]
Merge tag 'trace-v6.17-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing fixes from Steven Rostedt:
- Fix rtla and latency tooling pkg-config errors
If libtraceevent and libtracefs is installed, but their corresponding
'.pc' files are not installed, it reports that the libraries are
missing and confuses the developer. Instead, report that the
pkg-config files are missing and should be installed.
- Fix overflow bug of the parser in trace_get_user()
trace_get_user() uses the parsing functions to parse the user space
strings. If the parser fails due to incorrect processing, it doesn't
terminate the buffer with a nul byte. Add a "failed" flag to the
parser that gets set when parsing fails and is used to know if the
buffer is fine to use or not.
- Remove a semicolon that was at an end of a comment line
- Fix register_ftrace_graph() to unregister the pm notifier on error
The register_ftrace_graph() registers a pm notifier but there's an
error path that can exit the function without unregistering it. Since
the function returns an error, it will never be unregistered.
- Allocate and copy ftrace hash for reader of ftrace filter files
When the set_ftrace_filter or set_ftrace_notrace files are open for
read, an iterator is created and sets its hash pointer to the
associated hash that represents filtering or notrace filtering to it.
The issue is that the hash it points to can change while the
iteration is happening. All the locking used to access the tracer's
hashes are released which means those hashes can change or even be
freed. Using the hash pointed to by the iterator can cause UAF bugs
or similar.
Have the read of these files allocate and copy the corresponding
hashes and use that as that will keep them the same while the
iterator is open. This also simplifies the code as opening it for
write already does an allocate and copy, and now that the read is
doing the same, there's no need to check which way it was opened on
the release of the file, and the iterator hash can always be freed.
- Fix function graph to copy args into temp storage
The output of the function graph tracer shows both the entry and the
exit of a function. When the exit is right after the entry, it
combines the two events into one with the output of "function();",
instead of showing:
function() {
}
In order to do this, the iterator descriptor that reads the events
includes storage that saves the entry event while it peaks at the
next event in the ring buffer. The peek can free the entry event so
the iterator must store the information to use it after the peek.
With the addition of function graph tracer recording the args, where
the args are a dynamic array in the entry event, the temp storage
does not save them. This causes the args to be corrupted or even
cause a read of unsafe memory.
Add space to save the args in the temp storage of the iterator.
- Fix race between ftrace_dump and reading trace_pipe
ftrace_dump() is used when a crash occurs where the ftrace buffer
will be printed to the console. But it can also be triggered by
sysrq-z. If a sysrq-z is triggered while a task is reading trace_pipe
it can cause a race in the ftrace_dump() where it checks if the
buffer has content, then it checks if the next event is available,
and then prints the output (regardless if the next event was
available or not). Reading trace_pipe at the same time can cause it
to not be available, and this triggers a WARN_ON in the print. Move
the printing into the check if the next event exists or not
* tag 'trace-v6.17-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
ftrace: Also allocate and copy hash for reading of filter files
ftrace: Fix potential warning in trace_printk_seq during ftrace_dump
fgraph: Copy args in intermediate storage with entry
trace/fgraph: Fix the warning caused by missing unregister notifier
ring-buffer: Remove redundant semicolons
tracing: Limit access to parser->buffer when trace_get_user failed
rtla: Check pkg-config install
tools/latency-collector: Check pkg-config install
Linus Torvalds [Sat, 23 Aug 2025 13:04:32 +0000 (09:04 -0400)]
Merge tag 'driver-core-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core
Pull driver core fixes from Danilo Krummrich:
- Fix swapped handling of lru_gen and lru_gen_full debugfs files in
vmscan
- Fix debugfs mount options (uid, gid, mode) being silently ignored
- Fix leak of devres action in the unwind path of Devres::new()
- Documentation:
- Expand and fix documentation of (outdated) Device, DeviceContext
and generic driver infrastructure
- Fix C header link of faux device abstractions
- Clarify expected interaction with the security team
- Smooth text flow in the security bug reporting process
documentation
* tag 'driver-core-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
Documentation: smooth the text flow in the security bug reporting process
Documentation: clarify the expected collaboration with security bugs reporters
debugfs: fix mount options not being applied
rust: devres: fix leaking call to devm_add_action()
rust: faux: fix C header link
driver: rust: expand documentation for driver infrastructure
device: rust: expand documentation for Device
device: rust: expand documentation for DeviceContext
mm/vmscan: fix inverted polarity in lru_gen_seq_show()
Steven Rostedt [Fri, 22 Aug 2025 22:36:06 +0000 (18:36 -0400)]
ftrace: Also allocate and copy hash for reading of filter files
Currently the reader of set_ftrace_filter and set_ftrace_notrace just adds
the pointer to the global tracer hash to its iterator. Unlike the writer
that allocates a copy of the hash, the reader keeps the pointer to the
filter hashes. This is problematic because this pointer is static across
function calls that release the locks that can update the global tracer
hashes. This can cause UAF and similar bugs.
Allocate and copy the hash for reading the filter files like it is done
for the writers. This not only fixes UAF bugs, but also makes the code a
bit simpler as it doesn't have to differentiate when to free the
iterator's hash between writers and readers.
Linus Torvalds [Fri, 22 Aug 2025 22:16:54 +0000 (18:16 -0400)]
Merge tag 'drm-fixes-2025-08-23-1' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie:
"Weekly drm fixes. Looks like things did indeed get busier after rc2,
nothing seems too major, but stuff scattered all over the place,
amdgpu, xe, i915, hibmc, rust support code, and other small fixes.
rust:
- drm device memory layout and safety fixes
tests:
- Endianness fixes
gpuvm:
- docs warning fix
panic:
- fix division on 32-bit arm
i915:
- TypeC DP display Fixes
- Silence rpm wakeref asserts on GEN11_GU_MISC_IIR access
- Relocate compression repacking WA for JSL/EHL
hibmc:
- modesetting black screen fixes
- fix UAF on irq
- fix leak on i2c failure path
nouveau:
- memory leak fixes
- typos
rockchip:
- Kconfig fix
- register caching fix"
* tag 'drm-fixes-2025-08-23-1' of https://gitlab.freedesktop.org/drm/kernel: (49 commits)
drm/xe: Fix vm_bind_ioctl double free bug
drm/xe: Move ASID allocation and user PT BO tracking into xe_vm_create
drm/xe: Assign ioctl xe file handler to vm in xe_vm_create
drm/i915/gt: Relocate compression repacking WA for JSL/EHL
drm/i915: silence rpm wakeref asserts on GEN11_GU_MISC_IIR access
drm/amd/display: Fix DP audio DTO1 clock source on DCE 6.
drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3
drm/amd/display: Don't print errors for nonexistent connectors
drm/amd/display: Don't warn when missing DCE encoder caps
drm/amd/display: Fill display clock and vblank time in dce110_fill_display_configs
drm/amd/display: Find first CRTC and its line time in dce110_fill_display_configs
drm/amd/display: Adjust DCE 8-10 clock, don't overclock by 15%
drm/amd/display: Don't overclock DCE 6 by 15%
drm/amd/display: Add null pointer check in mod_hdcp_hdcp1_create_session()
drm/amd/display: Fix Xorg desktop unresponsive on Replay panel
drm/amd/display: Avoid a NULL pointer dereference
drm/amdgpu/swm14: Update power limit logic
drm/amd/display: Revert Add HPO encoder support to Replay
drm/i915/icl+/tc: Convert AUX powered WARN to a debug message
drm/i915/lnl+/tc: Use the cached max lane count value
...
In the context between trace_empty() and trace_find_next_entry_inc()
during ftrace_dump, the ring buffer data was consumed by other readers.
This caused trace_find_next_entry_inc to return NULL, failing to populate
`iter.seq`. At this point, due to the prior trace_iterator_reset, both
`iter.seq.len` and `iter.seq.size` were set to 0. Since they are equal,
the WARN_ON_ONCE condition is triggered.
Move the trace_printk_seq() into the if block that checks to make sure the
return value of trace_find_next_entry_inc() is non-NULL in
ftrace_dump_one(), ensuring the 'iter.seq' is properly populated before
subsequent operations.
Steven Rostedt [Wed, 20 Aug 2025 23:55:22 +0000 (19:55 -0400)]
fgraph: Copy args in intermediate storage with entry
The output of the function graph tracer has two ways to display its
entries. One way for leaf functions with no events recorded within them,
and the other is for functions with events recorded inside it. As function
graph has an entry and exit event, to simplify the output of leaf
functions it combines the two, where as non leaf functions are separate:
2) | invoke_rcu_core() {
2) | raise_softirq() {
2) 0.391 us | __raise_softirq_irqoff();
2) 1.191 us | }
2) 2.086 us | }
The __raise_softirq_irqoff() function above is really two events that were
merged into one. Otherwise it would have looked like:
2) | invoke_rcu_core() {
2) | raise_softirq() {
2) | __raise_softirq_irqoff() {
2) 0.391 us | }
2) 1.191 us | }
2) 2.086 us | }
In order to do this merge, the reading of the trace output file needs to
look at the next event before printing. But since the pointer to the event
is on the ring buffer, it needs to save the entry event before it looks at
the next event as the next event goes out of focus as soon as a new event
is read from the ring buffer. After it reads the next event, it will print
the entry event with either the '{' (non leaf) or ';' and timestamps (leaf).
The iterator used to read the trace file has storage for this event. The
problem happens when the function graph tracer has arguments attached to
the entry event as the entry now has a variable length "args" field. This
field only gets set when funcargs option is used. But the args are not
recorded in this temp data and garbage could be printed. The entry field
is copied via:
data->ent = *curr;
Where "curr" is the entry field. But this method only saves the non
variable length fields from the structure.
Add a helper structure to the iterator data that adds the max args size to
the data storage in the iterator. Then simply copy the entire entry into
this storage (with size protection).
Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/20250820195522.51d4a268@gandalf.local.home Reported-by: Sasha Levin <sashal@kernel.org> Tested-by: Sasha Levin <sashal@kernel.org> Closes: https://lore.kernel.org/all/aJaxRVKverIjF4a6@lappy/ Fixes: ff5c9c576e75 ("ftrace: Add support for function argument to graph tracer") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Linus Torvalds [Fri, 22 Aug 2025 21:24:48 +0000 (17:24 -0400)]
Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd
Pull iommufd fixes from Jason Gunthorpe:
"Two very minor fixes:
- Fix mismatched kvalloc()/kfree()
- Spelling fixes in documentation"
* tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd:
iommufd: Fix spelling errors in iommufd.rst
iommufd: viommu: free memory allocated by kvcalloc() using kvfree()