Andres Traumann [Tue, 25 Mar 2025 10:25:35 +0000 (17:25 +0700)]
ALSA: hda/realtek: Bass speaker fixup for ASUS UM5606KA
This patch applies the ALC294 bass speaker fixup (ALC294_FIXUP_BASS_SPEAKER_15),
previously introduced in commit a7df7f909cec ("ALSA: hda: improve bass
speaker support for ASUS Zenbook UM5606WA"), to the ASUS Zenbook UM5606KA.
This hardware configuration matches ASUS Zenbook UM5606WA, where DAC NID
0x06 was removed from the bass speaker (NID 0x15), routing both speaker
pins to DAC NID 0x03.
This resolves the bass speaker routing issue, ensuring correct audio
output on ASUS UM5606KA.
Takashi Iwai [Mon, 24 Mar 2025 15:32:32 +0000 (16:32 +0100)]
ALSA: hda/realtek: Fix built-in mic assignment on ASUS VivoBook X515UA
ASUS VivoBook X515UA with PCI SSID 1043:106f had a default quirk
pickup via pin table that applies ALC256_FIXUP_ASUS_MIC, but this adds
a bogus built-in mic pin 0x13 enabled. This was no big problem
because the pin 0x13 was assigned as the secondary mic, but the recent
fix made the entries sorted, hence this bogus pin appeared now as the
primary input and it broke.
For fixing the bug, put the right quirk entry for this device pointing
to ALC256_FIXUP_ASUS_MIC_NO_PRESENCE.
Takashi Iwai [Mon, 24 Mar 2025 14:40:24 +0000 (15:40 +0100)]
Merge tag 'asoc-v6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.15
This is a very big release due to a combination of some big new work,
mainly new drivers and generic SoundWire support, and some wide ranging
cleanup work that made small changes to a lot of drivers.
- Morimoto-san has completed the conversion to use modern terminology
for the clocking configuration, and several other cleanups with
narrower impact.
- All the power management operation configuration was updated to use
current idioms by Takashi Iwai.
- Clarification of the control operations from Charles Keepax.
- Prepartory work for more generic SoundWire SCDA controls from Charles
Keepax.
- Support for AMD ACP 7.x, AWINC WM88166, Everest ES8388, Intel AVS
PEAKVOL and GAIN DSP modules Mediatek MT8188 DMIC, NXP i.MX95, nVidia
Tegra interconnects, Rockchip RK3588 S/PDIF, Texas Instruments
SN012776 and TAS5770L, and Wolfson WM8904 DMICs,
Some changes from the tip tree adding APIs needed by the AMD code are
included, these were unfortunately rebased in the tip tree after being
pulled in. There's also some regmap changes supporting the SCDA work
and some devres refactoring that was pulled in to support other changes.
Takashi Iwai [Fri, 21 Mar 2025 17:26:52 +0000 (18:26 +0100)]
ALSA: timer: Don't take register_mutex with copy_from/to_user()
The infamous mmap_lock taken in copy_from/to_user() can be often
problematic when it's called inside another mutex, as they might lead
to deadlocks.
In the case of ALSA timer code, the bad pattern is with
guard(mutex)(®ister_mutex) that covers copy_from/to_user() -- which
was mistakenly introduced at converting to guard(), and it had been
carefully worked around in the past.
This patch fixes those pieces simply by moving copy_from/to_user() out
of the register mutex lock again.
Fixes: 3923de04c817 ("ALSA: pcm: oss: Use guard() for setup") Reported-by: syzbot+2b96f44164236dda0f3b@syzkaller.appspotmail.com Closes: https://lore.kernel.org/67dd86c8.050a0220.25ae54.0059.GAE@google.com Link: https://patch.msgid.link/20250321172653.14310-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Charles Keepax [Fri, 21 Mar 2025 13:53:24 +0000 (13:53 +0000)]
ASoC: SDCA: Correct handling of selected mode DisCo property
mipi-sdca-ge-selectedmode-controls-affected is actually required by the
specification so the code should return an error if it is missing.
Reported-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Fixes: 13fe7497af19 ("ASoC: SDCA: Add support for GE Entity properties") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250321135324.380237-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
In order to reduce duplication, move the ADSP mailbox callbacks
handle_reply(), handle_request(), and other common SOF callbacks
send_msg(), get_bar_index(), pcm_hw_params() and pcm_pointer()
to the mtk-adsp-common.c file.
Mario Limonciello [Wed, 19 Mar 2025 14:56:31 +0000 (09:56 -0500)]
ASoC: dmic: Fix NULL pointer dereference
Regulator support was introduced in commit d3321a20b5111 ("ASoC: dmic: add
regulator support"). During probe `dmic->vref` is initialized with
devm_regulator_get_optional() but in the error flow doesn't get cleared in
the case that PTR_ERR(dmic->vref) is -ENODEV. This leads to the following
NULL pointer deref.
Mark Brown [Thu, 20 Mar 2025 15:35:26 +0000 (15:35 +0000)]
ASoC: wm8904: Add DMIC and DRC support
Merge series from Francesco Dolcini <francesco@dolcini.it>:
This patch series adds DMIC and DRC support to the WM8904 driver, a new
of_ helper is added to simplify the driver code.
DRC functionality is added in the same patch series to provide the
necessary dynamic range control to make DMIC support useful.
The WM8904 supports digital microphones on two of its inputs:
IN1L/DMICDAT1 and IN1R/DMICDAT2. These two inputs can either be
connected to an ADC or to the DMIC system. There is an ADC for each
line, and only one DMIC block. This DMIC block is either connected to
DMICDAT1 or to DMICDAT2. One DMIC data line supports two digital
microphones via time multiplexing.
The pin's functionality is decided during hardware design (IN1L vs
DMICDAT1 and IN1R vs DMICDAT2). This is reflected in the Device Tree.
If one line is analog and one is DMIC, we need to be able to switch
between ADC and DMIC at runtime. The DMIC source is known from the
Device Tree. If both are DMIC inputs, we need to be able to switch the
DMIC source. There is no need to switch between ADC and DMIC at runtime.
Therefore, kcontrols are dynamically added by the driver depending on
its Device Tree configuration.
This is a heavy rework of a previous patch series provided by Alifer
Moraes and Pierluigi Passaro,
https://lore.kernel.org/lkml/20220307141041.27538-1-alifer.m@variscite.com.
Mark Brown [Thu, 20 Mar 2025 15:35:21 +0000 (15:35 +0000)]
Tidy up ASoC control get and put handlers
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
There is a lot of duplicated and occasionally slightly incorrect code
around the ASoC control get and put handlers. This series add some kunit
tests and then refactors the code to get all the tests passing and
reduce some of the duplication. The focus here is on the volsw handlers,
future work could still be done on some of the others but these were the
ones that most required attention.
Hopefully the only slightly controversal change is the very last patch
which changes platform_max to be applied after the control type is
determined, more discussion in the commit message for that one.
Ernest Van Hoecke [Wed, 19 Mar 2025 14:20:59 +0000 (15:20 +0100)]
ASoC: wm8904: add DMIC support
The WM8904 codec supports both ADC and DMIC inputs.
Get input pin functionality from the platform data and add the necessary
controls depending on the possible additional routing.
The ADC and DMIC share the IN1L/DMICDAT1 and IN1R/DMICDAT2 pins.
This leads to a few scenarios requiring different DAPM routing:
- When both are connected to an analog input, only the ADC is used.
- When one line is a DMIC and the other an analog input, the DMIC source
is set from the platform data and a mux is added to select whether to
use the ADC or DMIC.
- When both are connected to a DMIC, another mux is added to this to
select the DMIC source. Note that we still need to be able to select
the ADC system for use with the IN2L, IN2R, IN3L and IN3R pins.
Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250319142059.46692-6-francesco@dolcini.it Signed-off-by: Mark Brown <broonie@kernel.org>
Datasheet: https://statics.cirrus.com/pubs/proDatasheet/WM8904_Rev4.1.pdf Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250319142059.46692-5-francesco@dolcini.it Signed-off-by: Mark Brown <broonie@kernel.org>
Ernest Van Hoecke [Wed, 19 Mar 2025 14:20:57 +0000 (15:20 +0100)]
ASoC: dt-bindings: wm8904: Add DMIC, GPIO, MIC and EQ support
Add two properties to select the IN1L/DMICDAT1 and IN2R/DMICDAT2
functionality:
- wlf,in1l-as-dmicdat1
- wlf,in1r-as-dmicdat2
Add a property to describe the GPIO configuration registers, that can be
used to set the four multifunction pins:
- wlf,gpio-cfg
Add a property to describe the mic bias control registers:
- wlf,micbias-cfg
Add two properties to describe the Dynamic Range Controller (DRC),
allowing multiple named configurations where each config sets the 4 DRC
registers (R40-R43):
- wlf,drc-cfg-regs
- wlf,drc-cfg-names
Add three properties to describe the equalizer (ReTune Mobile), allowing
multiple named configurations (associated with a samplerate) that set
the 24 (R134-R157) EQ registers:
- wlf,retune-mobile-cfg-regs
- wlf,retune-mobile-cfg-hz
- wlf,retune-mobile-cfg-rates
The set of names and configurations for DRC and ReTune Mobile are
specified by system integrators. The names are exposed directly to
userspace as options that can be selected at runtime.
Adding the DRC and ReTune Mobile data to the DT eases the transition
from pdata, which has handled them this way for over a decade. The
parameters filled in here are almost certainly specific tuning for the
hardware so it makes sense to ship them with the hardware description.
Datasheet: https://statics.cirrus.com/pubs/proDatasheet/WM8904_Rev4.1.pdf Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250319142059.46692-4-francesco@dolcini.it Signed-off-by: Mark Brown <broonie@kernel.org>
Ernest Van Hoecke [Wed, 19 Mar 2025 14:20:56 +0000 (15:20 +0100)]
ASoC: wm8904: Don't touch GPIO configs set to 0xFFFF
When updating the GPIO registers, do nothing for all fields of gpio_cfg
that are "0xFFFF".
This "do nothing" flag used to be 0 to easily check whether the gpio_cfg
field was actually set inside pdata or left empty (default).
However, 0 is a valid configuration for these registers, while 0xFFFF is
not.
With this change, users can explicitly set them to 0.
Not setting gpio_cfg in the platform data will now lead to setting all
GPIO registers to 0 instead of leaving them unset.
No one is using this platform data with this codec.
The change gets the driver ready to properly set gpio_cfg from the DT.
Datasheet: https://statics.cirrus.com/pubs/proDatasheet/WM8904_Rev4.1.pdf Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250319142059.46692-3-francesco@dolcini.it Signed-off-by: Mark Brown <broonie@kernel.org>
Ernest Van Hoecke [Wed, 19 Mar 2025 14:20:55 +0000 (15:20 +0100)]
of: Add of_property_read_u16_index
There is an of_property_read_u32_index and of_property_read_u64_index.
This patch adds a similar helper for u16.
Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250319142059.46692-2-francesco@dolcini.it Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Thu, 20 Mar 2025 10:57:20 +0000 (11:57 +0100)]
ALSA: oxygen: Fix dependency on CONFIG_PM_SLEEP
The conversion to EXPORT_SIMPLE_DEV_PM_OPS() also replaced the pm ops
assignment with pm_ptr() macro, but this made difference from the
original code; it had conditional with ifdef CONFIG_PM_SLEEP, while
we have now with CONFIG_PM, instead. This seems causing build errors
with randomconfig.
For fixing the inconsistency, replace pm_ptr() with pm_sleep_ptr().
Fixes: 5ea0a2206b58 ("ALSA: oxygen: Convert to EXPORT_SIMPLE_DEV_PM_OPS()") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202503201853.7kB0BPRw-lkp@intel.com/ Link: https://patch.msgid.link/20250320105721.10789-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Charles Keepax [Wed, 19 Mar 2025 17:51:23 +0000 (17:51 +0000)]
ASoC: ops: Apply platform_max after deciding control type
It doesn't really make sense for the type of a control to change based
on the platform_max field. platform_max allows a specific system to
limit values of a control for safety but it seems reasonable the
control type should remain the same between different systems, even
if it is restricted down to just two values. Move the application of
platform_max to after control type determination in soc_info_volsw().
Charles Keepax [Wed, 19 Mar 2025 17:51:21 +0000 (17:51 +0000)]
ASoC: ops: Factor out common code from get callbacks
There are only two differences between snd_soc_get_volsw() and
snd_soc_get_volsw_sx(). The maximum field is handled differently, and
snd_soc_get_volsw() supports double controls with both values in the
same register.
Factor out the common code into a new helper and pass in the
appropriate max value such that it is handled correctly for each
control.
irqdomain: sound: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to
the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct
device_node. Therefore, of_fwnode_handle() is added around the
parameter.
Note some of the users can likely use dev->fwnode directly instead of
indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not
guaranteed to be set for all, so this has to be investigated on case to
case basis (by people who can actually test with the HW).
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Prasad Kumpatla <quic_pkumpatl@quicinc.com> Cc: linux-sound@vger.kernel.org Link: https://patch.msgid.link/20250319092951.37667-36-jirislaby@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Tue, 18 Mar 2025 17:14:56 +0000 (17:14 +0000)]
ASoC: ops: Factor out common code from put callbacks
There are only two differences between snd_soc_put_volsw() and
snd_soc_put_volsw_sx(). The maximum field is handled differently, and
snd_soc_put_volsw() supports double controls with both values in the
same register.
Factor out the common code into a new helper and pass in the
appropriate max value such that it is handled correctly for each
control.
Charles Keepax [Tue, 18 Mar 2025 17:14:55 +0000 (17:14 +0000)]
ASoC: ops: Factor out common code from info callbacks
snd_soc_info_volsw() and snd_soc_info_volsw_sx() do very similar
things, and have a lot of code in common. Already this is causing
some issues as the detection of volume controls has been fixed
in the normal callback but not the sx callback. Factor out a new
helper containing the common code and leave the function specific
bits behind in each callback.
Charles Keepax [Tue, 18 Mar 2025 17:14:54 +0000 (17:14 +0000)]
ASoC: ops: Remove snd_soc_put_volsw_range()
With the addition of the soc_mixer_ctl_to_reg() helper it is now very
clear that the only difference between snd_soc_put_volsw() and
snd_soc_put_volsw_range() is that the former supports double controls
with both values in the same register. As such we can combine both
functions.
Charles Keepax [Tue, 18 Mar 2025 17:14:53 +0000 (17:14 +0000)]
ASoC: ops: Remove snd_soc_get_volsw_range()
With the addition of the soc_mixer_reg_to_ctl() helper it is now very
clear that the only difference between snd_soc_get_volsw() and
snd_soc_get_volsw_range() is that the former supports double controls
with both values in the same register. As such we can combine both
functions.
Charles Keepax [Tue, 18 Mar 2025 17:14:52 +0000 (17:14 +0000)]
ASoC: ops: Remove snd_soc_info_volsw_range()
The only difference between snd_soc_info_volsw() and
snd_soc_info_volsw_range() is that the later will not force a 2
value control to be of type integer if the name ends in "Volume".
The kernel currently contains no users of snd_soc_info_volsw_range()
that would return a boolean control with this code, so the risk is
quite low and it seems appropriate that it should contain volume
control detection. So remove snd_soc_info_volsw_range() and point its
users at snd_soc_info_volsw().
Charles Keepax [Tue, 18 Mar 2025 17:14:51 +0000 (17:14 +0000)]
ASoC: ops: Add control to register value helper
Add a helper function to convert from control values to register values
that can replace a lot of the duplicated code in the various put
handlers.
This also fixes a small issue in snd_soc_put_volsw where the value is
converted to a control value before doing the invert, but the invert
is done against the register max which will result in incorrect values
for inverted controls with a non-zero minimum.
Charles Keepax [Tue, 18 Mar 2025 17:14:50 +0000 (17:14 +0000)]
ASoC: ops: Replace snd_soc_read_signed() with new helper
The current snd_soc_read_signed() helper is only used from
snd_soc_get_volsw() and can be implemented more simply with
sign_extend. Remove snd_soc_read_signed() and add a new
soc_mixer_reg_to_ctl() helper. This new helper does not
include the reading of the register, but does include min and
max handling. This allows the helper to replace more of the
duplicated code and makes it easier to process the differences
between single, double register and double shift style controls.
It is worth noting this adds support for sign_bit into the _range
and sx callbacks and the invert option to sx callbacks.
Charles Keepax [Tue, 18 Mar 2025 17:14:48 +0000 (17:14 +0000)]
ASoC: ops: Update mask generation to use GENMASK
Use GENMASK to make the masks for the various control helper functions.
Also factor out a shared helper function for the volsw and volsw_range
controls since the same code is appropriate for each. Note this does add
support for sign_bit into the volsw_range callbacks.
Charles Keepax [Tue, 18 Mar 2025 17:14:45 +0000 (17:14 +0000)]
ASoC: ops-test: Add some basic kunit tests for soc-ops
Add some basic kunit tests for some of the ASoC control put and get
helpers. This will assist in doing some refactoring. Note that presently
some tests fail, but the rest of the series will fix these up.
Andres Urian Florez [Wed, 19 Mar 2025 02:05:10 +0000 (21:05 -0500)]
ALSA: echoaudio: remove unused variable
This patch cleans up the code in the __snd_echo_probe function of the
echoaudio.c driver by removing the unused variable i and moving the
declaration of the loop variable i inside the foor loops where it is
used
Shenghao Ding [Thu, 13 Mar 2025 09:32:38 +0000 (17:32 +0800)]
ASoC: tas2781: Support dsp firmware Alpha and Beta seaies
For calibration, basic version does not contain any calibration addresses,
it depends on calibration tool to convey the addresses to the driver.
Since Alpha and Beta firmware, all the calibration addresses are saved
into the firmware.
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Reviewed-by: Mark Brown <broonie@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250313093238.1184-1-shenghao-ding@ti.com
Mark Brown [Tue, 18 Mar 2025 15:34:29 +0000 (15:34 +0000)]
ASoC: Intel: avs: Replace devm_kzalloc() with
Merge series from Ethan Carter Edwards <ethan@ethancedwards.com>:
Open coded arithmetic in allocator arguments is discouraged. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred. Not
only for readability purposes but safety purposes.
The changes move `devm_kzalloc(dev, sizeof(var) * n, GFP_KERNEL)` to
the helper function `devm_kcalloc(dev, n, sizeof(var), GFP_KERNEL)`.
Here is a series of four patches within the Intel/avs drivers that make
these changes. They are all compile tested only but should have no
effect on runtime behaviour.
Olivia Mackintosh [Sun, 16 Mar 2025 15:33:23 +0000 (15:33 +0000)]
ALSA: usb-audio: separate DJM-A9 cap lvl options
Mixer quicks for the Pioneer DJM-A9 mixer was added in 5289d00 with
additional capture level values added to the common DJM array of values.
This breaks the existing DJM mixers however as alsa-utils relies on
enumeration of the actual mixer options based on the value array which
results in error when storing state.
This commit just separates the A9 values into a separate array and
references them in the corresponding mixer control.
Jayesh Choudhary [Tue, 18 Mar 2025 11:35:24 +0000 (17:05 +0530)]
ASoC: ti: j721e-evm: Fix clock configuration for ti,j7200-cpb-audio compatible
For 'ti,j7200-cpb-audio' compatible, there is support for only one PLL for
48k. For 11025, 22050, 44100 and 88200 sampling rates, due to absence of
J721E_CLK_PARENT_44100, we get EINVAL while running any audio application.
Add support for these rates by using the 48k parent clock and adjusting
the clock for these rates later in j721e_configure_refclk.
Mark Brown [Mon, 17 Mar 2025 20:18:02 +0000 (20:18 +0000)]
Some minor SDCA preparation
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
Make some small fixups and add some minor missing features that will be
needed for the next major part of the SDCA work. This series doesn't do
a lot on its own, but as the next series will add all the ALSA control
and DAPM graph creation it's probably best to get these minor things out
of the way to simplify review on the bigger stuff.
Mark Brown [Mon, 17 Mar 2025 19:43:01 +0000 (19:43 +0000)]
ASoC: Convert PCM codecs to GPIO descriptors
Merge series from Linus Walleij <linus.walleij@linaro.org>:
Three remaining TI PCM codecs use the old GPIO API in
different ways, fix them all up and move over to
<linux/gpio/consumer.h> and get rid of <linux/gpio.h>.
Mark Brown [Mon, 17 Mar 2025 18:10:49 +0000 (18:10 +0000)]
Allow retrieving accessory detection reference on
Merge series from "NÃcolas F. R. A. Prado" <nfraprado@collabora.com>:
This series enables the MT8188-MT6359 sound driver to retrieve the
MT6359 ACCDET sound component from a mediatek,accdet DT property, which
allows detecting jack insertion/removal.
Patch 1 describes the new property in the binding. Patch 2 implements
the sound component retrieval in the common MTK soundcard driver. Patch
4 updates the MT8188-MT6359 sound driver to register the audio jack and
initialize the ACCDET driver for detection, if the property is present.
Patch 3 adds a stub to prevent a linker failure in case the
MT6359-ACCDET config is disabled.
Sudeep Holla [Mon, 17 Mar 2025 10:13:18 +0000 (10:13 +0000)]
ASoC: soc-utils: Transition to the faux device interface
The ASoC soc-utils driver does not require the creation of a platform
device. Originally, this approach was chosen for simplicity when the
driver was first implemented.
With the introduction of the lightweight faux device interface, we now
have a more appropriate alternative. Migrate the driver to utilize the
faux bus, given that the platform device it previously created was not
a real one anyway. This will simplify the code, reducing its footprint
while maintaining functionality.
Laurentiu Mihalcea [Tue, 11 Mar 2025 16:32:54 +0000 (12:32 -0400)]
ASoC: dt-bindings: audio-graph-card2: add widgets and hp-det-gpios support
Introduce the 'widgets' property, allowing the creation of widgets from
4 template widgets: Microphone, Line, Headphone, and Speaker. Also
introduce the 'hp-det-gpios' property, which allows using headphone
detection using the specified GPIO.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20250311163255.2664-3-laurentiumihalcea111@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Laurentiu Mihalcea [Tue, 11 Mar 2025 16:32:53 +0000 (12:32 -0400)]
ASoC: dt-bindings: support imx95's CM7 core
Add binding for imx95's CM7 core, used for audio processing.
Additionally, introduce a common binding for NXP audio processors with
Sound Open Firmware (SOF) support.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Link: https://patch.msgid.link/20250311163255.2664-2-laurentiumihalcea111@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Fix acp_common_hw_ops declaration error by adding static and
remove export symbol.
sparse: symbol 'acp_common_hw_ops' was not declared. Should it be static?
Fixes: 8ae746fe5104 ("ASoC: amd: acp: Implement acp_common_hw_ops support for acp platforms") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202503141442.iT0LHEMx-lkp@intel.com/ Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://patch.msgid.link/20250317072413.88971-3-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:49 +0000 (10:55 +0100)]
ASoC: amd: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Takashi Iwai [Mon, 17 Mar 2025 09:55:48 +0000 (10:55 +0100)]
ASoC: xtensa: Convert to RUNTIME_PM_OPS()
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS()
together with pm_ptr().
This optimizes slightly when CONFIG_PM is disabled, too.
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-87-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:47 +0000 (10:55 +0100)]
ASoC: tegra30: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-86-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:46 +0000 (10:55 +0100)]
ASoC: tegra20: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-85-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:45 +0000 (10:55 +0100)]
ASoC: tegra210: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-84-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:44 +0000 (10:55 +0100)]
ASoC: tegra186: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-83-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:42 +0000 (10:55 +0100)]
ASoC: stm: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead
SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us
dropping superfluous CONFIG_PM_SLEEP ifdefs.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: Olivier Moysan <olivier.moysan@foss.st.com> Cc: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-81-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:38 +0000 (10:55 +0100)]
ASoC: samsung: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us to drop superfluous CONFIG_PM ifdefs.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-77-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:37 +0000 (10:55 +0100)]
ASoC: rockchip: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us to drop ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Takashi Iwai [Mon, 17 Mar 2025 09:55:36 +0000 (10:55 +0100)]
ASoC: rcar: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of
SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to
drop ugly __maybe_unused attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-75-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:35 +0000 (10:55 +0100)]
ASoC: qcom: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of
SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to
drop ugly __maybe_unused attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-74-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:34 +0000 (10:55 +0100)]
ASoC: mediatek: mt8365: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us to drop ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Takashi Iwai [Mon, 17 Mar 2025 09:55:24 +0000 (10:55 +0100)]
ASoC: intel: catpt: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-63-tiwai@suse.de Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:22 +0000 (10:55 +0100)]
ASoC: img: Convert to RUNTIME_PM_OPS() and co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping superfluous CONFIG_PM_SLEEP
ifdefs.
This optimizes slightly when CONFIG_PM is disabled, too.
Takashi Iwai [Mon, 17 Mar 2025 09:55:16 +0000 (10:55 +0100)]
ASoC: wm8994: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of
SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us
superfluous CONFIG_PM_SLEEP ifdefs.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: patches@opensource.cirrus.com Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250317095603.20073-55-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 17 Mar 2025 09:55:15 +0000 (10:55 +0100)]
ASoC: wm8962: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: patches@opensource.cirrus.com Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250317095603.20073-54-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>