]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
3 months agoASoC: dt-bindings: Add bindings for Richtek rt9123
ChiYuan Huang [Thu, 10 Apr 2025 00:58:10 +0000 (08:58 +0800)]
ASoC: dt-bindings: Add bindings for Richtek rt9123

Document the ASoC Richtek rt9123.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://patch.msgid.link/4a0b67438f82e7d8ed9968cc90acf419fc9c22cf.1744245663.git.cy_huang@richtek.com
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: test-component: add set_tdm_slot stub implementation
Nicolas Frattaroli [Thu, 10 Apr 2025 19:25:32 +0000 (21:25 +0200)]
ASoC: test-component: add set_tdm_slot stub implementation

The test-component driver implements various stub callbacks. One
of the ones it doesn't implement is set_tdm_slot. This has no
functional impact on whether ASoC core believes test-component to
do TDM or not, it just means that any TDM configuration can't
readily be dumped for debugging purposes like it can with the other
callbacks.

Add a stub implementation to allow for this. The output uses dev_info
rather than dev_dbg, to be in line with the set_fmt stub implementation
above.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20250410-test-component-tdm-slot-v1-1-9c3a7162fa7a@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: wm_adsp: Use vmemdup_user() instead of open-coding
Richard Fitzgerald [Thu, 10 Apr 2025 10:18:12 +0000 (11:18 +0100)]
ASoC: wm_adsp: Use vmemdup_user() instead of open-coding

Use vmemdup_user() to get a copy of the user buffer in wm_coeff_tlv_put().

Apart from simplifying the code and avoiding open-coding, it means we
also automatically benefit from any security enhancements in the code
behind vmemdup_user().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250410101812.1180539-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: wcd938x: enable t14s audio headset
Mark Brown [Tue, 8 Apr 2025 09:25:20 +0000 (10:25 +0100)]
ASoC: wcd938x: enable t14s audio headset

Merge series from srinivas.kandagatla@linaro.org:

On Lenovo ThinkPad T14s, the headset is connected via a HiFi Switch to
support CTIA and OMTP headsets. This switch is used to minimise pop and
click during headset type switching.

This patchset adds required bindings and changes to codec and dts to
tnable the regulator required to power this switch along with wiring up
gpio that control the headset switching.

Without this patchset, there will be lots of noise on headset and mic
will not we functional.

3 months agoASoC: fsl_sai: add several improvements
Mark Brown [Tue, 8 Apr 2025 09:25:16 +0000 (10:25 +0100)]
ASoC: fsl_sai: add several improvements

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Add several improvements for the sai interface.
1.allow to set mclk rate with zero clk_id for master mode
2.add xlate_tdm_slot_mask() callback to avoid channel constrain
3.separate 'is_dsp_mode' for tx and rx
4.separate set_tdm_slot() for tx and rx

3 months agoASoC: codec: wcd93xx: Convert to GPIO descriptors
Mark Brown [Tue, 8 Apr 2025 09:25:12 +0000 (10:25 +0100)]
ASoC: codec: wcd93xx: Convert to GPIO descriptors

Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>:

of_gpio.h is deprecated, so update driver to use gpiod API.

The current driver use value 0 to assert reset and 1 to deassert reset.
The DTSes in tree that use the codec are using GPIO_ACTIVE_LOW.
So it is safe to use devm_gpiod_get to get GPIO descriptors and
use gpiod_set_value to configure output with value 1 means raw value
0, value 0 means raw value 1.

Note:
I not have devices to test, just my best pratice to do the convertion.

3 months agoASoC: Intel: avs: 16 channels support
Mark Brown [Tue, 8 Apr 2025 09:25:08 +0000 (10:25 +0100)]
ASoC: Intel: avs: 16 channels support

Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Relatively small delta-wise patchset which raises max channels supported
from 8 to 16.  The existing limitation is software-based, not hardware
based.  The hardware, as per HDAudio specification, section 1.2.2,
(relevant register at SDnFMT, section 3.3.41) supports the
configurations for years.  The avs-driver becomes the first consumer of
that configuration on the Linux kernel side.

Set starts off with update to string_helpers so that functionality added
with parse_int_array_user() can be utilized in kernel-kernel
interactions.

Follow up is rasing the cap on HDAudio-library side.  The format
selection procedure found in the library is good-to-go as is.

Everything that follows these two patches is avs-driver specific:
- raise channels_max for every DAI-driver template
- provide i2s_test module parameter for testing purposes.  When combined
  with I2S loopback card, allows to test 16ch on most Intel hardware post
  Broadwell era
- adjust TDM masks to reflect the 8 -> 16 channels change

3 months agoASoC: Intel: avs: Add support for FCL platform
Mark Brown [Tue, 8 Apr 2025 09:25:04 +0000 (10:25 +0100)]
ASoC: Intel: avs: Add support for FCL platform

Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

The patchset is fairly straightforward - add support for Automotive
platforms based on new DSP architecture, Frisco Lake (FCL), a
PantherLake (PTL)-based platform is an example of.  The cAVS
architecture which all Intel AudioDSP followed for years ends with
RaptorLake familty.  Like all the major updates, this one received new
name too - Audio Context Engine (ACE).

While the range of improvements and changes on the firmware/hardware
side is large, software survives this evolution without need of any
major refactoring.  Additional hardware changes brought with LunarLake
(LNL, ACE 2.0) call for update in PCM-area.  The GPDMAs previously
utilized for non-HDAudio transfer types are no longer there, everything
is running through HDAudio LINK on the Back-End side now.

In terms of code, the mtl.c file, provided with patch 05 'ASoC: Intel:
avs: PTL-based platforms support' hosts largest number of new handlers -
new IRQ and INT control and DSP-cores management.  Combined with lnl.c
and ptl.c which layer the architecture changes done over ACE
generations, provide support for PTL-based platforms e.g.: FCL.
The inheritance in summary:

mtl.c <- lnl.c <- ptl.c

The functional update to HDAudio library is there to help avs-driver
read certain capabilities directly from the hardware.  Once the pointer
to LINK is obtained, there is no need to call AudioDSP firmware to get
the caps.

3 months agoASoC: Intel: avs: Update machine board card names
Mark Brown [Tue, 8 Apr 2025 09:25:00 +0000 (10:25 +0100)]
ASoC: Intel: avs: Update machine board card names

Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

As discussed in user bug report [1] & [2], it was identified that HDA
card provides wrong FE device numbers to be used with UCM, at the same
time it was requested that we change card names to better names.

This patchset does that, by adding option for going back to old
behaviour in first patch. Using existing way of enumerating FEs from
topology in second patch. Then setting new names in all cards while
providing fallback to old name. Only exception is probe card, which is
used for debug purposes only, where we just directly rename card.

Do note that patch 2, will require updated topologies if topology
exposes more than 1 FE on card. Old topologies didn't assign id field
and it defaulted to 0, however when we use this field by setting
snd_soc_component_driver::use_dai_pcm_id field, we need topologies with
distinct values in FEs. Necessary changes are provided in avsdk and
avs-topology-xml repositories ([4] & [5]). linux-firmware update will
follow as soon as this changeset is merged.

[1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219654
[2]
Link: https://github.com/alsa-project/alsa-ucm-conf/pull/499
[3]
Link: https://lore.kernel.org/linux-sound/20250127144445.2739017-1-amadeuszx.slawinski@linux.intel.com/
[4]
https://github.com/thesofproject/avsdk/commit/a879c8ae4ba7be53b8ed528da1361a8c62475b6e
[5]
https://github.com/thesofproject/avs-topology-xml/commit/9b94d52cbc5c1e07c8d9503c86329cd62ea4c9e7
https://github.com/thesofproject/avs-topology-xml/commit/bdbc8d6ba9ea6db67daed9cbbaed3c23ff112ecb

3 months agoASoC: tas2781-i2c: Remove unnecessary NULL check before release_firmware()
Chen Ni [Mon, 7 Apr 2025 06:27:25 +0000 (14:27 +0800)]
ASoC: tas2781-i2c: Remove unnecessary NULL check before release_firmware()

release_firmware() checks for NULL pointers internally.
Remove unneeded NULL check for fmw here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20250407062725.2771916-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: wm_adsp: Remove unnecessary NULL check before release_firmware()
Chen Ni [Mon, 7 Apr 2025 06:34:03 +0000 (14:34 +0800)]
ASoC: wm_adsp: Remove unnecessary NULL check before release_firmware()

release_firmware() checks for NULL pointers internally.
Remove unneeded NULL check for fmw here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250407063403.2772040-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: pcm6240: Remove unnecessary NULL check before release_firmware()
Chen Ni [Mon, 7 Apr 2025 06:23:52 +0000 (14:23 +0800)]
ASoC: pcm6240: Remove unnecessary NULL check before release_firmware()

release_firmware() checks for NULL pointers internally.
Remove unneeded NULL check for fmw here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20250407062352.2771861-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: tas2781-fmwlib: Remove unnecessary NULL check before release_firmware()
Chen Ni [Mon, 7 Apr 2025 06:30:11 +0000 (14:30 +0800)]
ASoC: tas2781-fmwlib: Remove unnecessary NULL check before release_firmware()

release_firmware() checks for NULL pointers internally.
Remove unneeded NULL check for fmw here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20250407063011.2771977-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: codec: ak5386: Convert to GPIO descriptors
Peng Fan [Sun, 6 Apr 2025 01:05:23 +0000 (09:05 +0800)]
ASoC: codec: ak5386: Convert to GPIO descriptors

 of_gpio.h is deprecated, update the driver to use GPIO descriptors.
 - Use devm_gpiod_get_optional to get GPIO descriptor.
 - Use gpiod_set_value to configure output value.

With legacy of_gpio API, the driver set GPIO value 1 to power up
AK5386, and set value 0 to power down.
Per datasheet for PDN(reset_gpio in the driver):
 Power Down & Reset Mode Pin
 “H”: Power up, “L”: Power down & Reset
 The AK5386 must be reset once upon power-up.

There is no in-tree DTS using this codec, and the bindings does not
specify polarity. Per driver and datasheet, the GPIO polarity should be
active-high which is to power up the codec. So using GPIOD_OUT_LOW
when get the GPIO descriptor matches GPIOF_OUT_INIT_LOW when using
of_gpio API.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://patch.msgid.link/20250406010532.1212894-1-peng.fan@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Support 16 TDMs in dynamic assignment
Amadeusz Sławiński [Fri, 4 Apr 2025 09:03:37 +0000 (11:03 +0200)]
ASoC: Intel: avs: Support 16 TDMs in dynamic assignment

When assigning new widget name there needs to be enough place in buffer
to assign name.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Iterate over correct number of TDMs
Amadeusz Sławiński [Fri, 4 Apr 2025 09:03:36 +0000 (11:03 +0200)]
ASoC: Intel: avs: Iterate over correct number of TDMs

When handling TDMs, don't iterate over number of SSP ports, but over
possible number of TDMs.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Assign unique ID to platform devices
Amadeusz Sławiński [Fri, 4 Apr 2025 09:03:35 +0000 (11:03 +0200)]
ASoC: Intel: avs: Assign unique ID to platform devices

When creating machine boards there are two types, per endpoint or
compound board. For compound board we can just use I2S mask as its ID,
however, per endpoint can also be separated per TDM, which causes
problem because two boards would have same I2S mask. Shift it and add
the value of TDM to generate a unique ID.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Allow to specify custom configurations with i2s_test
Amadeusz Sławiński [Fri, 4 Apr 2025 09:03:34 +0000 (11:03 +0200)]
ASoC: Intel: avs: Allow to specify custom configurations with i2s_test

Change 'i2s_test' module option from enable-flag to string allowing to
specify which SSP port and in what TDM configuration should be enabled.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Allow for 16 channels configuration
Cezary Rojewski [Fri, 4 Apr 2025 09:03:33 +0000 (11:03 +0200)]
ASoC: Intel: avs: Allow for 16 channels configuration

Add define representing maximum number of channels that are allowed by
HDAudio standard and as such supported by HW - 16 channels. With that
done, reflect the max in BE DAIs capabilities.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Rename AVS_CHANNELS_MAX define
Amadeusz Sławiński [Fri, 4 Apr 2025 09:03:32 +0000 (11:03 +0200)]
ASoC: Intel: avs: Rename AVS_CHANNELS_MAX define

It is used for coefficient table in updown mixer module, which supports
maximum of 8 channels. However it does not represent HW capability.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoALSA: hda: Allow for 16 channels configuration
Cezary Rojewski [Fri, 4 Apr 2025 09:03:31 +0000 (11:03 +0200)]
ALSA: hda: Allow for 16 channels configuration

As per HDAudio specification, up to 16 channels are supported. Reflect
that in the code.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agolib/string_helpers: Introduce parse_int_array()
Cezary Rojewski [Fri, 4 Apr 2025 09:03:30 +0000 (11:03 +0200)]
lib/string_helpers: Introduce parse_int_array()

Existing parse_inte_array_user() works with __user buffers only.
Separate array parsing from __user bits so the functionality can be
utilized with kernel buffers too.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250404090337.3564117-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change ssm4567 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:54 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change ssm4567 card name

Rename FE from "avs_ssm4567" to "AVS I2S SSM4567".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-21-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change rt5682 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:53 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change rt5682 card name

Rename FE from "avs_rt5682" to "AVS I2S ALC5682".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-20-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change rt5663 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:52 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change rt5663 card name

Rename FE from "avs_rt5663" to "AVS I2S ALC5663".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-19-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change rt5514 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:51 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change rt5514 card name

Rename FE from "avs_rt5514" to "AVS I2S ALC5514".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-18-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change rt298 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:50 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change rt298 card name

Rename FE from "avs_rt298" to "AVS I2S ALC298".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-17-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change rt286 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:49 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change rt286 card name

Rename FE from "avs_rt286" to "AVS I2S ALC286".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-16-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change rt274 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:48 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change rt274 card name

Rename FE from "avs_rt274" to "AVS I2S ALC274".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-15-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change probe card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:47 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change probe card name

Rename FE from "avs_probe_mb" to "AVS PROBE".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-14-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change pcm3168a card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:46 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change pcm3168a card name

Rename FE from "avs_pcm3168a" to "AVS I2S PCM3168A".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-13-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change nau8825 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:45 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change nau8825 card name

Rename FE from "avs_nau8825" to "AVS I2S NAU8825".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-12-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change max98927 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:44 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change max98927 card name

Rename FE from "avs_max98927" to "AVS I2S MAX98927".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-11-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change max98373 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:43 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change max98373 card name

Rename FE from "avs_max98373" to "AVS I2S MAX98373".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-10-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change max98357a card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:42 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change max98357a card name

Rename FE from "avs_max98357a" to "AVS I2S MAX98357A".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-9-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change sspX-loopback card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:41 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change sspX-loopback card name

Rename FE from "sspX-loopback" to "AVS I2S TEST-X".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-8-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change hdaudio card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:40 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change hdaudio card name

Rename FE from "hdaudioB0D0"/"hdaudioB0D2" to "AVS HD-Audio"/"AVS HDMI".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-7-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change es8336 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:39 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change es8336 card name

Rename FE from "avs_es8336" to "AVS I2S ES8336".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-6-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change DMIC card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:38 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change DMIC card name

Rename FE from "avs_dmic" to "AVS DMIC".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-5-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Change da7219 card name
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:37 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Change da7219 card name

Rename FE from "avs_da7219" to "AVS I2S DA7219".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-4-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Use topology information for endpoint numbers
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:36 +0000 (14:41 +0200)]
ASoC: Intel: avs: Use topology information for endpoint numbers

Use DAI PCM ID from topology as Front End device endpoint number. This
allows devices to be more naturally enumerated starting from 0, like
most cards, instead of values like 1 or 2.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-3-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: boards: Add Kconfig option for obsolete card names
Amadeusz Sławiński [Mon, 7 Apr 2025 12:41:35 +0000 (14:41 +0200)]
ASoC: Intel: avs: boards: Add Kconfig option for obsolete card names

Add backward compatibility Kconfig option to allow for enabling obsolete
card names.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20250407124154.1713039-2-amadeuszx.slawinski@linux.intel.com
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoALSA: hda: Select avs-driver by default on FCL
Cezary Rojewski [Mon, 7 Apr 2025 11:23:52 +0000 (13:23 +0200)]
ALSA: hda: Select avs-driver by default on FCL

The avs-driver is the recommended solution for FriscoLake (FCL)
platform.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-11-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Add boards definitions for FCL platform
Amadeusz Sławiński [Mon, 7 Apr 2025 11:23:51 +0000 (13:23 +0200)]
ASoC: Intel: avs: Add boards definitions for FCL platform

Reuse TGL definitions to define boards configurations for the
supported ACE platforms.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-10-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Conditionally add DMA config when creating Copier
Cezary Rojewski [Mon, 7 Apr 2025 11:23:50 +0000 (13:23 +0200)]
ASoC: Intel: avs: Conditionally add DMA config when creating Copier

Starting from LunarLake (LNL) platform, non-HDAudio transfers e.g.:
I2S/DMIC utilize HDAudio LINK DMA instead of GPDMA for the data
transfer. Implement avs_append_dma_cfg() to account for the changes made
in LNL timeframe.

The handler checks the platform and transfer type before appending the
DMA configuration to the module's payload so it can safely be called
within the common initialization flow for Copier/WHM modules.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Dynamically assign ops for non-HDAudio DAIs
Cezary Rojewski [Mon, 7 Apr 2025 11:23:49 +0000 (13:23 +0200)]
ASoC: Intel: avs: Dynamically assign ops for non-HDAudio DAIs

Provide dynamic selection mechanism of DAI operations for the
non-HDAudio DAIs so that both LunarLake+ platforms and their
predecessors are supported.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: PCM operations for LNL-based platforms
Cezary Rojewski [Mon, 7 Apr 2025 11:23:48 +0000 (13:23 +0200)]
ASoC: Intel: avs: PCM operations for LNL-based platforms

Starting from LNL platform the so-called non-HDAudio transfer types,
e.g.: I2S/DMIC, utilize HDAudio LINK DMA rather than GPDMA for the data
streaming. In essence, all transfer types now utilize HDAudio Link. Most
of the existing code can be reused with the major difference being
HDAudio Link query method:

- fetch the Link by codec.addr in standard HDAudio transfer case
- fetch the Link by LEPTR.ID in non-HDAudio transfer case

To make the unification happen, store pointer to the Link in dma_data
and utilize it in the common code. And to avoid confusion in
transfer-type naming between cAVS-ACE 1.x (SkyLake till MeteorLake) and
ACE 2.0+ architecture (LunarLake onward), use:

- 'hda' for typical HDAudio transfer case
- 'nonhda' for non-HDAudio transfer case, cAVS-ACE 1.x
- 'althda' for non-HDAudio transfer case, ACE 2.0+

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: PTL-based platforms support
Cezary Rojewski [Mon, 7 Apr 2025 11:23:47 +0000 (13:23 +0200)]
ASoC: Intel: avs: PTL-based platforms support

Define handlers specific to ACE platforms, that Frisco Lake (FCL), a
PantherLake (PTL)-based platform, is founded upon. Most operations are
still inherited from their predecessors with the major difference being
AudioDSP cores management - replaced by DSP-domain power management.

Software has to ensure the DSP domain is both powered on and its
power-gating disabled before it can be utilized for streaming.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Relocate DSP status registers
Cezary Rojewski [Mon, 7 Apr 2025 11:23:46 +0000 (13:23 +0200)]
ASoC: Intel: avs: Relocate DSP status registers

The firmware status and error registers are not part of SRAM on ACE
platforms. As these registers take part in IPC on ACE and cAVS platforms
both, relocate the field denoting their offset to Host-IPC descriptor.

In consequence, code remains cohesive with the ACE specs while still
maintaining high readability for the cAVS platforms.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Read HW capabilities when possible
Cezary Rojewski [Mon, 7 Apr 2025 11:23:45 +0000 (13:23 +0200)]
ASoC: Intel: avs: Read HW capabilities when possible

Starting with LunarLake (LNL) and onward, some hardware capabilities are
visible to the sound driver directly. At the same time, these may no
longer be visible to the AudioDSP firmware. Update resource allocation
function to rely on the registers when possible.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Ignore Vendor-space manipulation for ACE
Cezary Rojewski [Mon, 7 Apr 2025 11:23:44 +0000 (13:23 +0200)]
ASoC: Intel: avs: Ignore Vendor-space manipulation for ACE

A number of Vendor Specific registers utilized on cAVS architecture
(SkyLake till RaptorLake) are not present on ACE hardware (MeteorLake
onward). Similarly, certain recommended procedures do not apply. Adjust
existing code to be ACE-friendly.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoALSA: hda: Allow to fetch hlink by ID
Cezary Rojewski [Mon, 7 Apr 2025 11:23:43 +0000 (13:23 +0200)]
ALSA: hda: Allow to fetch hlink by ID

Starting with LNL platform, Intel HDAudio Links carry IDs specifying
non-HDAudio transfer type they help facilitate e.g.: 0xC0 for I2S as
defined by AZX_REG_ML_LEPTR_ID_INTEL_SSP.

The mechanism accounts for LEPTR register as it is Reserved if
LCAP.ALT for given Link equals 0.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Link: https://patch.msgid.link/20250407112352.3720779-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: sta32x: Remove unnecessary NULL check before clk_disable_unprepare()
Chen Ni [Tue, 25 Mar 2025 03:22:26 +0000 (11:22 +0800)]
ASoC: sta32x: Remove unnecessary NULL check before clk_disable_unprepare()

clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL.
Remove unneeded NULL check for clk here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20250325032226.603963-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: hdmi-codec: wire up the .prepare callback also for SPDIF DAI ops
Martin Blumenstingl [Sat, 29 Mar 2025 19:14:33 +0000 (20:14 +0100)]
ASoC: hdmi-codec: wire up the .prepare callback also for SPDIF DAI ops

Commit 2fef64eec23a ("ASoC: hdmi-codec: Add a prepare hook") added a
prepare implementation. Back then the new callback was only integrated
with hdmi_codec_i2s_dai_ops (which is used by the I2S input code-path).
It was not added to hdmi_codec_spdif_dai_ops (which is used by the SPDIF
input code-path).

With commit baf616647fe6 ("drm/connector: implement generic HDMI audio
helpers") the DRM subsystem has gained a helper framework which can be
used by HDMI controller drivers. HDMI controller drivers are often
tightly coupled with the hdmi-codec because of the so-called HDMI audio
infoframe (which is often managed by the display controller).

To allow the new DRM HDMI audio framework to work with the hdmi-codec
driver for SPDIF inputs we also need to hook up the prepare callback to
hdmi_codec_spdif_dai_ops. Just hooking into the hw_params callback would
not be enough as hw_params (is called too early and) doesn't have access
to the HDMI audio infoframe contents.

Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250329191433.873237-1-martin.blumenstingl@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: codecs: rt5677: Use secs_to_jiffies() instead of msecs_to_jiffies()
Thorsten Blum [Sat, 5 Apr 2025 12:58:08 +0000 (14:58 +0200)]
ASoC: codecs: rt5677: Use secs_to_jiffies() instead of msecs_to_jiffies()

Use secs_to_jiffies() instead of msecs_to_jiffies() and avoid scaling
'delay' to milliseconds.

Since 'delay' isn't a compile-time constant, secs_to_jiffies() expands
to much simpler code compared to msecs_to_jiffies(), reducing the size
of 'snd-soc-rt5677-spi.ko' by 472 bytes.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250405125808.302259-1-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: Remove unused SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
Helen Koike [Thu, 3 Apr 2025 13:02:42 +0000 (10:02 -0300)]
ASoC: Intel: Remove unused SND_SOC_INTEL_DA7219_MAX98357A_GENERIC

This config was used by bxt_da7219_max98357a and kbl_da7219_max98357a,
both were removed.

Now it is not used anymore, so remove it.

Signed-off-by: Helen Koike <koike@igalia.com>
Link: https://patch.msgid.link/20250403130242.1227770-1-koike@igalia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: dt-bindings: fsl,mqs: Reference common DAI properties
Shengjiu Wang [Fri, 28 Mar 2025 02:13:39 +0000 (10:13 +0800)]
ASoC: dt-bindings: fsl,mqs: Reference common DAI properties

Reference the dai-common.yaml schema to allow '#sound-dai-cells' and
"sound-name-prefix' to be used.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250328021339.1593635-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: dt-bindings: maxim,max98925: Fix include placement in DTS example
Krzysztof Kozlowski [Mon, 24 Mar 2025 12:51:31 +0000 (13:51 +0100)]
ASoC: dt-bindings: maxim,max98925: Fix include placement in DTS example

Coding style and common logic dictates that headers should not be
included in device nodes.  No functional impact.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20250324125131.81867-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: loongson: Replace deprecated PCI functions
Philipp Stanner [Fri, 4 Apr 2025 12:19:12 +0000 (14:19 +0200)]
ASoC: loongson: Replace deprecated PCI functions

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20250404121911.85277-13-phasta@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: sun8i-codec: Remove unnecessary NULL check before clk_prepare_enable/clk_disabl...
Chen Ni [Tue, 25 Mar 2025 09:26:40 +0000 (17:26 +0800)]
ASoC: sun8i-codec: Remove unnecessary NULL check before clk_prepare_enable/clk_disable_unprepare

clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter.Remove unneeded NULL check for clk here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20250325092640.996802-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: Intel: avs: Permit deferred card registration
Cezary Rojewski [Fri, 4 Apr 2025 10:16:22 +0000 (12:16 +0200)]
ASoC: Intel: avs: Permit deferred card registration

Utilize card->deferrable flag to support delayed card enumeration -
scenario where snd_soc_register_card() occurs before all the required
card components are registered into the framework.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404101622.3673850-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: core: Complete support for card rebinding
Cezary Rojewski [Fri, 4 Apr 2025 10:16:21 +0000 (12:16 +0200)]
ASoC: core: Complete support for card rebinding

Since commit e894efef9ac7 ("ASoC: core: add support to card rebind")
there is a support for card rebind. The support is only partial though.
Let's consider the following scenarios both of which aim to enumerate a
sound card:

1)
    snd_soc_add_component(comp1);
    (...)
    snd_soc_register_card(card1);

2)
    snd_soc_register_card(card1);
    (...)
    snd_soc_add_component(comp1);

For the sake of simplicity, let comp1 be the last dependency needed for
the card1 to enumerate.
Case 1) will end up succeeding whereas 2) is a certain fail -
snd_soc_bind_card() does not honor unbind_card_list so even a non-fatal
return code of EPROBE_DEFER will cause the card to collapse. Given the
typical usecase of platform_device serving as a card->dev and its
probe() ending with:

int carddev_probe(struct platform_device *pdev)
{
(...)
return devm_snd_soc_register_card(dev, card);
}

failure to register card triggers device_unbind_cleanup() -
really_probe() in dd.c.

To allow for card registration to be deferred while being friendly
towards existing users of devm_snd_soc_register_card(), add new
card->devres_dev field, and devm_xxx() variants for card registration:

devm_snd_soc_register_deferrable_card() (external)
devm_snd_soc_bind_card() (internal)

In essence, if requested, devm_snd_soc_bind_card() replaces
snd_soc_bind_card(). The rebind procedure takes care of destroying
old devres before attempting the new bind. This makes sure nothing is
left hanging if binding fails and card becomes unbound but is still
registered to the ASoC framework.

To allow snd_soc_bind_card() to be reused by the deferrable friends,
move 'client_mutex' locking to the function's callers and select between
devm_xxx and non-devm_xxx variants of snd_soc_bind_card() based on
card->devres_dev.

On top of the feature, the refactoring brings two benefits:
a) single lock/unlock of 'client_mutex' in snd_soc_add_component()
   instead of ambiguous unlock and immediate lock in
   snd_soc_try_rebind_card()
b) all unbind_card_list manipulations done under 'client_mutex'

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250404101622.3673850-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: stm: stm32_sai: Use dev_err_probe()
Zhang Enpei [Thu, 3 Apr 2025 07:41:42 +0000 (15:41 +0800)]
ASoC: stm: stm32_sai: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Link: https://patch.msgid.link/20250403154142936Po-soX8Bifyvw_eWSbddT@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: codecs: wcd938x: add mux control support for hp audio mux
Srinivas Kandagatla [Thu, 27 Mar 2025 10:06:32 +0000 (10:06 +0000)]
ASoC: codecs: wcd938x: add mux control support for hp audio mux

On some platforms to minimise pop and click during switching between
CTIA and OMTP headset an additional HiFi mux is used. Most common
case is that this switch is switched on by default, but on some
platforms this needs a regulator enable.

move to using mux control to enable both regulator and handle gpios,
deprecate the usage of gpio.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Christopher Obbard <christopher.obbard@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250327100633.11530-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: dt-bindings: wcd93xx: add bindings for audio mux controlling hp
Srinivas Kandagatla [Thu, 27 Mar 2025 10:06:31 +0000 (10:06 +0000)]
ASoC: dt-bindings: wcd93xx: add bindings for audio mux controlling hp

On some platforms to minimise pop and click during switching between
CTIA and OMTP headset an additional HiFi mux is used. Most common
case is that this switch is switched on by default, but on some
platforms this needs a regulator enable.

Move to using mux-controls so that both the gpio and regulators can be
driven correctly, rather than adding regulator handing in the codec.

This patch adds required bindings to add such mux controls.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250327100633.11530-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: codecs: wcd-mbhc: cleanup swap_gnd_mic api
Srinivas Kandagatla [Thu, 27 Mar 2025 10:06:30 +0000 (10:06 +0000)]
ASoC: codecs: wcd-mbhc: cleanup swap_gnd_mic api

Remove confusing and unused argument in swap_gnd_mic api, the second
argument active is not really used, and always set to true in the mbhc
drivers.

The callback itself is used to toggle the gnd_mic lines when a cross
connection is detected by mbhc circuits, so there is no need of this
argument.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250327100633.11530-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: fsl_sai: separate set_tdm_slot() for tx and rx
Shengjiu Wang [Fri, 28 Mar 2025 08:57:44 +0000 (16:57 +0800)]
ASoC: fsl_sai: separate set_tdm_slot() for tx and rx

The transmitter and receiver of SAI can be used for different slot number
and slot width configuration, so refine fsl_sai_set_dai_tdm_slot(), add
fsl_sai_set_dai_tdm_slot_tx() for tx and fsl_sai_set_dai_tdm_slot_rx()
for rx.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20250328085744.1893434-5-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: fsl_sai: separate 'is_dsp_mode' for tx and rx
Shengjiu Wang [Fri, 28 Mar 2025 08:57:43 +0000 (16:57 +0800)]
ASoC: fsl_sai: separate 'is_dsp_mode' for tx and rx

The transmitter and receiver of SAI can be used for different dsp modes,
then 'is_dsp_mode' needs to be separated.

Expand 'is_dsp_mode' to array 'is_dsp_mode[]' to support different
configuration of tx and rx.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20250328085744.1893434-4-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: fsl_sai: add xlate_tdm_slot_mask() callback
Shengjiu Wang [Fri, 28 Mar 2025 08:57:42 +0000 (16:57 +0800)]
ASoC: fsl_sai: add xlate_tdm_slot_mask() callback

With DPCM case, for example ASRC->SAI->AMIX, the SAI can be codec dai
device in backend, but __soc_pcm_hw_params() will get the tdm_mask
for channel constraint, tdm_mask is set by snd_soc_dai_set_tdm_slot()
from slot number, but SAI supports flexible channel number with fixed slot
number, so add an empty xlate_tdm_slot_mask() callback to avoid the
channel constraint in __soc_pcm_hw_params().

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20250328085744.1893434-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: fsl_sai: allow to set mclk rate with zero clk_id
Shengjiu Wang [Fri, 28 Mar 2025 08:57:41 +0000 (16:57 +0800)]
ASoC: fsl_sai: allow to set mclk rate with zero clk_id

If clk_id is zero, it means FSL_SAI_CLK_BUS in fsl_sai_set_dai_sysclk(),
as the clk[FSL_SAI_CLK_BUS]'s rate can't be changed, there is no rate
changed for mclk.

But with audio-graph-card, the clk_id is always zero, in order to allow
to set mclk rate with zero clk_id, update the condition to be if clk_id is
zero, then set the FSL_SAI_CLK_MAST1's rate. This would not change the
original function for master mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20250328085744.1893434-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: codec: wcd9335: Convert to GPIO descriptors
Peng Fan [Mon, 24 Mar 2025 11:51:29 +0000 (19:51 +0800)]
ASoC: codec: wcd9335: Convert to GPIO descriptors

of_gpio.h is deprecated, update the driver to use GPIO descriptors.
- Use dev_gpiod_get to get GPIO descriptor.
- Use gpiod_set_value to configure output value.

With legacy of_gpio API, the driver set gpio value 0 to assert reset,
and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
output low, set value 0 means output high with gpiod API.

The in-tree DTS files have the right polarity set up already so we can
expect this to "just work"

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250324-wcd-gpiod-v2-3-773f67ce3b56@nxp.com
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: codec: wcd938x: Convert to GPIO descriptors
Peng Fan [Mon, 24 Mar 2025 11:51:28 +0000 (19:51 +0800)]
ASoC: codec: wcd938x: Convert to GPIO descriptors

of_gpio.h is deprecated, update the driver to use GPIO descriptors.
 - Use dev_gpiod_get to get GPIO descriptor.
 - Use gpiod_set_value to configure output value.

With legacy of_gpio API, the driver set gpio value 0 to assert reset,
and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
output low, set value 0 means output high with gpiod API.

The in-tree DTS files have the right polarity set up already so we
can expect this to "just work".

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Link: https://patch.msgid.link/20250324-wcd-gpiod-v2-2-773f67ce3b56@nxp.com
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: codec: wcd939x: Convert to GPIO descriptors
Peng Fan [Mon, 24 Mar 2025 11:51:27 +0000 (19:51 +0800)]
ASoC: codec: wcd939x: Convert to GPIO descriptors

of_gpio.h is deprecated, update the driver to use GPIO descriptors.
 - Use dev_gpiod_get to get GPIO descriptor.
 - Use gpiod_set_value to configure output value.

With legacy of_gpio API, the driver set gpio value 0 to assert reset,
and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
output low, set value 0 means output high with gpiod API.

The in-tree DTS files have the right polarity set up already so we
can expect this to "just work".

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250324-wcd-gpiod-v2-1-773f67ce3b56@nxp.com
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoLinux 6.15-rc1
Linus Torvalds [Sun, 6 Apr 2025 20:11:33 +0000 (13:11 -0700)]
Linux 6.15-rc1

3 months agotools/include: make uapi/linux/types.h usable from assembly
Thomas Weißschuh [Wed, 2 Apr 2025 20:21:57 +0000 (21:21 +0100)]
tools/include: make uapi/linux/types.h usable from assembly

The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
included from assembly code.

Mirror this behaviour in the tools/ variant.

Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
toolchain automatically.

Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/
Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoMerge tag 'turbostat-2025.05.06' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 6 Apr 2025 19:32:43 +0000 (12:32 -0700)]
Merge tag 'turbostat-2025.05.06' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux

Pull turbostat updates from Len Brown:

 - support up to 8192 processors

 - add cpuidle governor debug telemetry, disabled by default

 - update default output to exclude cpuidle invocation counts

 - bug fixes

* tag 'turbostat-2025.05.06' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power turbostat: v2025.05.06
  tools/power turbostat: disable "cpuidle" invocation counters, by default
  tools/power turbostat: re-factor sysfs code
  tools/power turbostat: Restore GFX sysfs fflush() call
  tools/power turbostat: Document GNR UncMHz domain convention
  tools/power turbostat: report CoreThr per measurement interval
  tools/power turbostat: Increase CPU_SUBSET_MAXCPUS to 8192
  tools/power turbostat: Add idle governor statistics reporting
  tools/power turbostat: Fix names matching
  tools/power turbostat: Allow Zero return value for some RAPL registers
  tools/power turbostat: Clustered Uncore MHz counters should honor show/hide options

3 months agoMerge tag 'soundwire-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 6 Apr 2025 19:04:53 +0000 (12:04 -0700)]
Merge tag 'soundwire-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire fix from Vinod Koul:

 - add missing config symbol CONFIG_SND_HDA_EXT_CORE required for asoc
   driver CONFIG_SND_SOF_SOF_HDA_SDW_BPT

* tag 'soundwire-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  ASoC: SOF: Intel: Let SND_SOF_SOF_HDA_SDW_BPT select SND_HDA_EXT_CORE

3 months agotools/power turbostat: v2025.05.06
Len Brown [Sun, 6 Apr 2025 18:49:20 +0000 (14:49 -0400)]
tools/power turbostat: v2025.05.06

Support up to 8192 processors
Add cpuidle governor debug telemetry, disabled by default
Update default output to exclude cpuidle invocation counts
Bug fixes

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: disable "cpuidle" invocation counters, by default
Len Brown [Sun, 6 Apr 2025 18:29:57 +0000 (14:29 -0400)]
tools/power turbostat: disable "cpuidle" invocation counters, by default

Create "pct_idle" counter group, the sofware notion of residency
so it can now be singled out, independent of other counter groups.

Create "cpuidle" group, the cpuidle invocation counts.
Disable "cpuidle", by default.

Create "swidle" = "cpuidle" + "pct_idle".
Undocument "sysfs", the old name for "swidle", but keep it working
for backwards compatibilty.

Create "hwidle", all the HW idle counters

Modify "idle", enabled by default
"idle" = "hwidle" + "pct_idle" (and now excludes "cpuidle")

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agoMerge tag 'perf-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 6 Apr 2025 17:48:12 +0000 (10:48 -0700)]
Merge tag 'perf-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf event fix from Ingo Molnar:
 "Fix a perf events time accounting bug"

* tag 'perf-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/core: Fix child_total_time_enabled accounting bug at task exit

3 months agoMerge tag 'sched-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 6 Apr 2025 17:44:58 +0000 (10:44 -0700)]
Merge tag 'sched-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:

 - Fix a nonsensical Kconfig combination

 - Remove an unnecessary rseq-notification

* tag 'sched-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  rseq: Eliminate useless task_work on execve
  sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP

3 months agoDisable SLUB_TINY for build testing
Linus Torvalds [Sun, 6 Apr 2025 17:00:04 +0000 (10:00 -0700)]
Disable SLUB_TINY for build testing

... and don't error out so hard on missing module descriptions.

Before commit 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
we used to warn about missing module descriptions, but only when
building with extra warnigns (ie 'W=1').

After that commit the warning became an unconditional hard error.

And it turns out not all modules have been converted despite the claims
to the contrary.  As reported by Damian Tometzki, the slub KUnit test
didn't have a module description, and apparently nobody ever really
noticed.

The reason nobody noticed seems to be that the slub KUnit tests get
disabled by SLUB_TINY, which also ends up disabling a lot of other code,
both in tests and in slub itself.  And so anybody doing full build tests
didn't actually see this failre.

So let's disable SLUB_TINY for build-only tests, since it clearly ends
up limiting build coverage.  Also turn the missing module descriptions
error back into a warning, but let's keep it around for non-'W=1'
builds.

Reported-by: Damian Tometzki <damian@riscv-rocks.de>
Link: https://lore.kernel.org/all/01070196099fd059-e8463438-7b1b-4ec8-816d-173874be9966-000000@eu-central-1.amazonses.com/
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Fixes: 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agotools/power turbostat: re-factor sysfs code
Len Brown [Sun, 6 Apr 2025 16:53:18 +0000 (12:53 -0400)]
tools/power turbostat: re-factor sysfs code

Probe cpuidle "sysfs" residency and counts separately,
since soon we will make one disabled on, and the
other disabled off.

Clarify that some BIC (build-in-counters) are actually "groups".
since we're about to re-name some of those groups.

no functional change.

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: Restore GFX sysfs fflush() call
Zhang Rui [Wed, 19 Mar 2025 00:53:07 +0000 (08:53 +0800)]
tools/power turbostat: Restore GFX sysfs fflush() call

Do fflush() to discard the buffered data, before each read of the
graphics sysfs knobs.

Fixes: ba99a4fc8c24 ("tools/power turbostat: Remove unnecessary fflush() call")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: Document GNR UncMHz domain convention
Len Brown [Sun, 6 Apr 2025 16:23:22 +0000 (12:23 -0400)]
tools/power turbostat: Document GNR UncMHz domain convention

Document that on Intel Granite Rapids Systems,
Uncore domains 0-2 are CPU domains, and
uncore domains 3-4 are IO domains.

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: report CoreThr per measurement interval
Len Brown [Sun, 6 Apr 2025 15:18:39 +0000 (11:18 -0400)]
tools/power turbostat: report CoreThr per measurement interval

The CoreThr column displays total thermal throttling events
since boot time.

Change it to report events during the measurement interval.

This is more useful for showing a user the current conditions.
Total events since boot time are still available to the user via
/sys/devices/system/cpu/cpu*/thermal_throttle/*

Document CoreThr on turbostat.8

Fixes: eae97e053fe30 ("turbostat: Support thermal throttle count print")
Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Chen Yu <yu.c.chen@intel.com>
3 months agotools/power turbostat: Increase CPU_SUBSET_MAXCPUS to 8192
Justin Ernst [Wed, 19 Mar 2025 20:27:31 +0000 (15:27 -0500)]
tools/power turbostat: Increase CPU_SUBSET_MAXCPUS to 8192

On systems with >= 1024 cpus (in my case 1152), turbostat fails with the error output:
"turbostat: /sys/fs/cgroup/cpuset.cpus.effective: cpu str malformat 0-1151"

A similar error appears with the use of turbostat --cpu when the inputted cpu
range contains a cpu number >= 1024:
# turbostat -c 1100-1151
"--cpu 1100-1151" malformed
...

Both errors are caused by parse_cpu_str() reaching its limit of CPU_SUBSET_MAXCPUS.

It's a good idea to limit the maximum cpu number being parsed, but 1024 is too low.
For a small increase in compute and allocated memory, increasing CPU_SUBSET_MAXCPUS
brings support for parsing cpu numbers >= 1024.

Increase CPU_SUBSET_MAXCPUS to 8192, a common setting for CONFIG_NR_CPUS on x86_64.

Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Signed-off-by: Len Brown <len.brown@intel.com>
3 months agoMerge tag 'timers-cleanups-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 6 Apr 2025 15:35:37 +0000 (08:35 -0700)]
Merge tag 'timers-cleanups-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer cleanups from Thomas Gleixner:
 "A set of final cleanups for the timer subsystem:

   - Convert all del_timer[_sync]() instances over to the new
     timer_delete[_sync]() API and remove the legacy wrappers.

     Conversion was done with coccinelle plus some manual fixups as
     coccinelle chokes on scoped_guard().

   - The final cleanup of the hrtimer_init() to hrtimer_setup()
     conversion.

     This has been delayed to the end of the merge window, so that all
     patches which have been merged through other trees are in mainline
     and all new users are catched.

  Doing this right before rc1 ensures that new code which is merged post
  rc1 is not introducing new instances of the original functionality"

* tag 'timers-cleanups-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tracing/timers: Rename the hrtimer_init event to hrtimer_setup
  hrtimers: Rename debug_init_on_stack() to debug_setup_on_stack()
  hrtimers: Rename debug_init() to debug_setup()
  hrtimers: Rename __hrtimer_init_sleeper() to __hrtimer_setup_sleeper()
  hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()
  hrtimers: Make callback function pointer private
  hrtimers: Merge __hrtimer_init() into __hrtimer_setup()
  hrtimers: Switch to use __htimer_setup()
  hrtimers: Delete hrtimer_init()
  treewide: Convert new and leftover hrtimer_init() users
  treewide: Switch/rename to timer_delete[_sync]()

3 months agoMerge tag 'irq-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 6 Apr 2025 15:17:43 +0000 (08:17 -0700)]
Merge tag 'irq-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull more irq updates from Thomas Gleixner:
 "A set of updates for the interrupt subsystem:

   - A treewide cleanup for the irq_domain code, which makes the naming
     consistent and gets rid of the original oddity of naming domains
     'host'.

     This is a trivial mechanical change and is done late to ensure that
     all instances have been catched and new code merged post rc1 wont
     reintroduce new instances.

   - A trivial consistency fix in the migration code

     The recent introduction of irq_force_complete_move() in the core
     code, causes a problem for the nostalgia crowd who maintains ia64
     out of tree.

     The code assumes that hierarchical interrupt domains are enabled
     and dereferences irq_data::parent_data unconditionally. That works
     in mainline because both architectures which enable that code have
     hierarchical domains enabled. Though it breaks the ia64 build,
     which enables the functionality, but does not have hierarchical
     domains.

     While it's not really a problem for mainline today, this
     unconditional dereference is inconsistent and trivially fixable by
     using the existing helper function irqd_get_parent_data(), which
     has the appropriate #ifdeffery in place"

* tag 'irq-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq/migration: Use irqd_get_parent_data() in irq_force_complete_move()
  irqdomain: Stop using 'host' for domain
  irqdomain: Rename irq_get_default_host() to irq_get_default_domain()
  irqdomain: Rename irq_set_default_host() to irq_set_default_domain()

3 months agoMerge tag 'timers-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 6 Apr 2025 15:13:16 +0000 (08:13 -0700)]
Merge tag 'timers-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Thomas Gleixner:
 "A revert to fix a adjtimex() regression:

  The recent change to prevent that time goes backwards for the coarse
  time getters due to immediate multiplier adjustments via adjtimex(),
  changed the way how the timekeeping core treats that.

  That change result in a regression on the adjtimex() side, which is
  user space visible:

   1) The forwarding of the base time moves the update out of the
      original period and establishes a new one. That's changing the
      behaviour of the [PF]LL control, which user space expects to be
      applied periodically.

   2) The clearing of the accumulated NTP error due to #1, changes the
      behaviour as well.

  An attempt to delay the multiplier/frequency update to the next tick
  did not solve the problem as userspace expects that the multiplier or
  frequency updates are in effect, when the syscall returns.

  There is a different solution for the coarse time problem available,
  so revert the offending commit to restore the existing adjtimex()
  behaviour"

* tag 'timers-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  Revert "timekeeping: Fix possible inconsistencies in _COARSE clockids"

3 months agoMerge tag 'sh-for-v6.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubi...
Linus Torvalds [Sun, 6 Apr 2025 15:10:45 +0000 (08:10 -0700)]
Merge tag 'sh-for-v6.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux

Pull sh updates from John Paul Adrian Glaubitz:
 "One important fix and one small configuration update.

  The first patch by Artur Rojek fixes an issue with the J2 firmware
  loader not being able to find the location of the device tree blob due
  to insufficient alignment of the .bss section which rendered J2 boards
  unbootable.

  The second patch by Johan Korsnes updates the defconfigs on sh to drop
  the CONFIG_NET_CLS_TCINDEX configuration option which became obsolete
  after 8c710f75256b ("net/sched: Retire tcindex classifier").

  Summary:

   - sh: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX

   - sh: Align .bss section padding to 8-byte boundary"

* tag 'sh-for-v6.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
  sh: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX
  sh: Align .bss section padding to 8-byte boundary

3 months agoMerge tag 'kbuild-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Linus Torvalds [Sat, 5 Apr 2025 22:46:50 +0000 (15:46 -0700)]
Merge tag 'kbuild-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild updates from Masahiro Yamada:

 - Improve performance in gendwarfksyms

 - Remove deprecated EXTRA_*FLAGS and KBUILD_ENABLE_EXTRA_GCC_CHECKS

 - Support CONFIG_HEADERS_INSTALL for ARCH=um

 - Use more relative paths to sources files for better reproducibility

 - Support the loong64 Debian architecture

 - Add Kbuild bash completion

 - Introduce intermediate vmlinux.unstripped for architectures that need
   static relocations to be stripped from the final vmlinux

 - Fix versioning in Debian packages for -rc releases

 - Treat missing MODULE_DESCRIPTION() as an error

 - Convert Nios2 Makefiles to use the generic rule for built-in DTB

 - Add debuginfo support to the RPM package

* tag 'kbuild-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (40 commits)
  kbuild: rpm-pkg: build a debuginfo RPM
  kconfig: merge_config: use an empty file as initfile
  nios2: migrate to the generic rule for built-in DTB
  rust: kbuild: skip `--remap-path-prefix` for `rustdoc`
  kbuild: pacman-pkg: hardcode module installation path
  kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION unconditionally
  modpost: require a MODULE_DESCRIPTION()
  kbuild: make all file references relative to source root
  x86: drop unnecessary prefix map configuration
  kbuild: deb-pkg: add comment about future removal of KDEB_COMPRESS
  kbuild: Add a help message for "headers"
  kbuild: deb-pkg: remove "version" variable in mkdebian
  kbuild: deb-pkg: fix versioning for -rc releases
  Documentation/kbuild: Fix indentation in modules.rst example
  x86: Get rid of Makefile.postlink
  kbuild: Create intermediate vmlinux build with relocations preserved
  kbuild: Introduce Kconfig symbol for linking vmlinux with relocations
  kbuild: link-vmlinux.sh: Make output file name configurable
  kbuild: do not generate .tmp_vmlinux*.map when CONFIG_VMLINUX_MAP=y
  Revert "kheaders: Ignore silly-rename files"
  ...

3 months agoMerge tag 'drm-next-2025-04-05' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Sat, 5 Apr 2025 22:35:11 +0000 (15:35 -0700)]
Merge tag 'drm-next-2025-04-05' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly fixes, mostly from the end of last week, this week was very
  quiet, maybe you scared everyone away. It's mostly amdgpu, and xe,
  with some i915, adp and bridge bits, since I think this is overly
  quiet I'd expect rc2 to be a bit more lively.

  bridge:
   - tda998x: Select CONFIG_DRM_KMS_HELPER

  amdgpu:
   - Guard against potential division by 0 in fan code
   - Zero RPM support for SMU 14.0.2
   - Properly handle SI and CIK support being disabled
   - PSR fixes
   - DML2 fixes
   - DP Link training fix
   - Vblank fixes
   - RAS fixes
   - Partitioning fix
   - SDMA fix
   - SMU 13.0.x fixes
   - Rom fetching fix
   - MES fixes
   - Queue reset fix

  xe:
   - Fix NULL pointer dereference on error path
   - Add missing HW workaround for BMG
   - Fix survivability mode not triggering
   - Fix build warning when DRM_FBDEV_EMULATION is not set

  i915:
   - Bounds check for scalers in DSC prefill latency computation
   - Fix build by adding a missing include

  adp:
   - Fix error handling in plane setup"

  # -----BEGIN PGP SIGNATURE-----

* tag 'drm-next-2025-04-05' of https://gitlab.freedesktop.org/drm/kernel: (34 commits)
  drm/i2c: tda998x: select CONFIG_DRM_KMS_HELPER
  drm/amdgpu/gfx12: fix num_mec
  drm/amdgpu/gfx11: fix num_mec
  drm/amd/pm: Add gpu_metrics_v1_8
  drm/amdgpu: Prefer shadow rom when available
  drm/amd/pm: Update smu metrics table for smu_v13_0_6
  drm/amd/pm: Remove host limit metrics support
  Remove unnecessary firmware version check for gc v9_4_2
  drm/amdgpu: stop unmapping MQD for kernel queues v3
  Revert "drm/amdgpu/sdma_v4_4_2: update VM flush implementation for SDMA"
  drm/amdgpu: Parse all deferred errors with UMC aca handle
  drm/amdgpu: Update ta ras block
  drm/amdgpu: Add NPS2 to DPX compatible mode
  drm/amdgpu: Use correct gfx deferred error count
  drm/amd/display: Actually do immediate vblank disable
  drm/amd/display: prevent hang on link training fail
  Revert "drm/amd/display: dml2 soc dscclk use DPM table clk setting"
  drm/amd/display: Increase vblank offdelay for PSR panels
  drm/amd: Handle being compiled without SI or CIK support better
  drm/amd/pm: Add zero RPM enabled OD setting support for SMU14.0.2
  ...

3 months agokbuild: rpm-pkg: build a debuginfo RPM
Uday Shankar [Mon, 31 Mar 2025 22:46:32 +0000 (16:46 -0600)]
kbuild: rpm-pkg: build a debuginfo RPM

The rpm-pkg make target currently suffers from a few issues related to
debuginfo:
1. debuginfo for things built into the kernel (vmlinux) is not available
   in any RPM produced by make rpm-pkg. This makes using tools like
   systemtap against a make rpm-pkg kernel impossible.
2. debug source for the kernel is not available. This means that
   commands like 'disas /s' in gdb, which display source intermixed with
   assembly, can only print file names/line numbers which then must be
   painstakingly resolved to actual source in a separate editor.
3. debuginfo for modules is available, but it remains bundled with the
   .ko files that contain module code, in the main kernel RPM. This is a
   waste of space for users who do not need to debug the kernel (i.e.
   most users).

Address all of these issues by additionally building a debuginfo RPM
when the kernel configuration allows for it, in line with standard
patterns followed by RPM distributors. With these changes:
1. systemtap now works (when these changes are backported to 6.11, since
   systemtap lags a bit behind in compatibility), as verified by the
   following simple test script:

   # stap -e 'probe kernel.function("do_sys_open").call { printf("%s\n", $$parms); }'
   dfd=0xffffffffffffff9c filename=0x7fe18800b160 flags=0x88800 mode=0x0
   ...

2. disas /s works correctly in gdb, with source and disassembly
   interspersed:

   # gdb vmlinux --batch -ex 'disas /s blk_op_str'
   Dump of assembler code for function blk_op_str:
   block/blk-core.c:
   125     {
      0xffffffff814c8740 <+0>:     endbr64

   127
   128             if (op < ARRAY_SIZE(blk_op_name) && blk_op_name[op])
      0xffffffff814c8744 <+4>:     mov    $0xffffffff824a7378,%rax
      0xffffffff814c874b <+11>:    cmp    $0x23,%edi
      0xffffffff814c874e <+14>:    ja     0xffffffff814c8768 <blk_op_str+40>
      0xffffffff814c8750 <+16>:    mov    %edi,%edi

   126             const char *op_str = "UNKNOWN";
      0xffffffff814c8752 <+18>:    mov    $0xffffffff824a7378,%rdx

   127
   128             if (op < ARRAY_SIZE(blk_op_name) && blk_op_name[op])
      0xffffffff814c8759 <+25>:    mov    -0x7dfa0160(,%rdi,8),%rax

   126             const char *op_str = "UNKNOWN";
      0xffffffff814c8761 <+33>:    test   %rax,%rax
      0xffffffff814c8764 <+36>:    cmove  %rdx,%rax

   129                     op_str = blk_op_name[op];
   130
   131             return op_str;
   132     }
      0xffffffff814c8768 <+40>:    jmp    0xffffffff81d01360 <__x86_return_thunk>
   End of assembler dump.

3. The size of the main kernel package goes down substantially,
   especially if many modules are built (quite typical). Here is a
   comparison of installed size of the kernel package (configured with
   allmodconfig, dwarf4 debuginfo, and module compression turned off)
   before and after this patch:

   # rpm -qi kernel-6.13* | grep -E '^(Version|Size)'
   Version     : 6.13.0postpatch+
   Size        : 1382874089
   Version     : 6.13.0prepatch+
   Size        : 17870795887

   This is a ~92% size reduction.

Note that a debuginfo package can only be produced if the following
configs are set:
- CONFIG_DEBUG_INFO=y
- CONFIG_MODULE_COMPRESS=n
- CONFIG_DEBUG_INFO_SPLIT=n

The first of these is obvious - we can't produce debuginfo if the build
does not generate it. The second two requirements can in principle be
removed, but doing so is difficult with the current approach, which uses
a generic rpmbuild script find-debuginfo.sh that processes all packaged
executables. If we want to remove those requirements the best path
forward is likely to add some debuginfo extraction/installation logic to
the modules_install target (controllable by flags). That way, it's
easier to operate on modules before they're compressed, and the logic
can be reused by all packaging targets.

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
3 months agokconfig: merge_config: use an empty file as initfile
Daniel Gomez [Fri, 28 Mar 2025 14:28:37 +0000 (14:28 +0000)]
kconfig: merge_config: use an empty file as initfile

The scripts/kconfig/merge_config.sh script requires an existing
$INITFILE (or the $1 argument) as a base file for merging Kconfig
fragments. However, an empty $INITFILE can serve as an initial starting
point, later referenced by the KCONFIG_ALLCONFIG Makefile variable
if -m is not used. This variable can point to any configuration file
containing preset config symbols (the merged output) as stated in
Documentation/kbuild/kconfig.rst. When -m is used $INITFILE will
contain just the merge output requiring the user to run make (i.e.
KCONFIG_ALLCONFIG=<$INITFILE> make <allnoconfig/alldefconfig> or make
olddefconfig).

Instead of failing when `$INITFILE` is missing, create an empty file and
use it as the starting point for merges.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
3 months agonios2: migrate to the generic rule for built-in DTB
Masahiro Yamada [Sun, 22 Dec 2024 00:30:53 +0000 (09:30 +0900)]
nios2: migrate to the generic rule for built-in DTB

Commit 654102df2ac2 ("kbuild: add generic support for built-in boot
DTBs") introduced generic support for built-in DTBs.

Select GENERIC_BUILTIN_DTB when built-in DTB support is enabled.

To keep consistency across architectures, this commit also renames
CONFIG_NIOS2_DTB_SOURCE_BOOL to CONFIG_BUILTIN_DTB, and
CONFIG_NIOS2_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
3 months agosh: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX
Johan Korsnes [Sun, 23 Mar 2025 19:13:30 +0000 (20:13 +0100)]
sh: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX

This option was removed from Kconfig in 8c710f75256b ("net/sched:
Retire tcindex classifier") but from the defconfigs.

Fixes: 8c710f75256b ("net/sched: Retire tcindex classifier")
Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
3 months agosh: Align .bss section padding to 8-byte boundary
Artur Rojek [Sun, 16 Feb 2025 17:55:44 +0000 (18:55 +0100)]
sh: Align .bss section padding to 8-byte boundary

J2-based devices expect to find a device tree blob at the end of the
.bss section. As of a77725a9a3c5 ("scripts/dtc: Update to upstream
version v1.6.1-19-g0a3a9d3449c8"), libfdt enforces 8-byte alignment
for the DTB, causing J2 devices to fail early in sh_fdt_init().

As the J2 loader firmware calculates the DTB location based on the kernel
image .bss section size rather than the __bss_stop symbol offset, the
required alignment can't be enforced with BSS_SECTION(0, PAGE_SIZE, 8).

To fix this, inline a modified version of the above macro which grows
.bss by the required size. While this change affects all existing SH
boards, it should be benign on platforms which don't need this alignment.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Tested-by: Rob Landley <rob@landley.net>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
3 months agoMerge tag 'input-for-v6.15-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Apr 2025 16:20:39 +0000 (09:20 -0700)]
Merge tag 'input-for-v6.15-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - a brand new driver for touchpads and touchbars in newer Apple devices

 - support for Berlin-A series in goodix-berlin touchscreen driver

 - improvements to matrix_keypad driver to better handle GPIOs toggling

 - assorted small cleanups in other input drivers

* tag 'input-for-v6.15-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: goodix_berlin - add support for Berlin-A series
  dt-bindings: input: goodix,gt9916: Document gt9897 compatible
  dt-bindings: input: matrix_keypad - add wakeup-source property
  dt-bindings: input: matrix_keypad - add missing property
  Input: pm8941-pwrkey - fix dev_dbg() output in pm8941_pwrkey_irq()
  Input: synaptics - hide unused smbus_pnp_ids[] array
  Input: apple_z2 - fix potential confusion in Kconfig
  Input: matrix_keypad - use fsleep for delays after activating columns
  Input: matrix_keypad - add settle time after enabling all columns
  dt-bindings: input: matrix_keypad: add settle time after enabling all columns
  dt-bindings: input: matrix_keypad: convert to YAML
  dt-bindings: input: Correct indentation and style in DTS example
  MAINTAINERS: Add entries for Apple Z2 touchscreen driver
  Input: apple_z2 - add a driver for Apple Z2 touchscreens
  dt-bindings: input: touchscreen: Add Z2 controller
  Input: Switch to use hrtimer_setup()
  Input: drop vb2_ops_wait_prepare/finish

3 months agotracing/timers: Rename the hrtimer_init event to hrtimer_setup
Nam Cao [Wed, 5 Feb 2025 10:55:21 +0000 (11:55 +0100)]
tracing/timers: Rename the hrtimer_init event to hrtimer_setup

The function hrtimer_init() doesn't exist anymore. It was replaced by
hrtimer_setup().

Thus, rename the hrtimer_init trace event to hrtimer_setup to keep it
consistent.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/all/cba84c3d853c5258aa3a262363a6eac08e2c7afc.1738746927.git.namcao@linutronix.de