Age | Commit message (Collapse) | Author |
|
Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>:
Per Mark's comments in [1], each driver in one patchset and not merge
the changes to one driver in one patch, so worked out three patches.
- Sort the included headers.
- Drop sound/tpa6130a2-plat.h because no user is creating the device using
platform data
- Covert to GPIO descriptors
Checking the DTS polarity, all users are using GPIOD_ACTIVE_HIGH.
so all should work as expected with this patch.
I not have hardware to test, just my best effort to do this.
[1] https://lore.kernel.org/all/66db9962-d773-4c7a-bf59-4698eca9eedc@sirena.org.uk/
|
|
Merge series from Johan Hovold <johan+linaro@kernel.org>:
A recent change added support for looking up an optional mux control
before falling back to gpio control for us-euro plug selection.
The mux framework does however not yet support optional muxes and an
error message is now incorrectly logged on machines like the Lenovo
ThinkPad X13s which do not have one:
wcd938x_codec audio-codec: /audio-codec: failed to get mux-control (0)
Suppress the bogus error and add the missing mux error handling by
making sure that the 'mux-controls' DT property is present before
looking up the mux control.
Included is also a related cleanup.
|
|
Acer Aspire SW3-013 requires the very same quirk as other Acer Aspire
model for making it working.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220011
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250420085716.12095-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Add condition check to fix devm_snd_soc_register_card(acp-pdm-mach)
deferred probe failure, when pdm DSD entry is not available.
[15.910456] acp_mach acp-pdm-mach: devm_snd_soc_register_card(acp-pdm-mach) failed: -517
[15.910536] platform acp-pdm-mach: deferred probe pending: (reason unknown)
Fixes: 6e60db74b69c2 ("ASoC: amd: acp: Refactor acp machine select")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250425060144.1773265-3-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Update chip data using dev_get_drvdata(dev->parent) to fix
NULL pointer deref in acp_i2s_set_tdm_slot.
Fixes: cd60dec8994c ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250425060144.1773265-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
update chip data using dev_get_drvdata(dev->parent) instead of
dev_get_platdata(dev).
BUG: kernel NULL pointer dereference, address: 0000000000000010
Call Trace:
<TASK>
? __pfx_platform_pm_resume+0x10/0x10
platform_pm_resume+0x28/0x60
dpm_run_callback+0x51/0x1a0
device_resume+0x1a6/0x2b0
dpm_resume+0x168/0x230
Fixes: e3933683b25e ("ASoC: amd: acp: Remove redundant acp_dev_data structure")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250425060144.1773265-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Use max() to simplify jh7110_tdm_syncdiv() and improve its readability.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250424133648.86459-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
imx_card_parse_of() allocs 2 components for CPU/Platform (A)
static int imx_card_parse_of(...)
{
...
for_each_child_of_node(...) {
dlc = devm_kzalloc(...);
...
link->cpus = &dlc[0];
(A) link->platforms = &dlc[1];
}
...
}
The link might be used as DPCM backend, in such case, link->plaforms
will be not used. The driver overwrite it as Dummy DAI (B).
} else if (!strncmp(link->name, "HiFi-ASRC-BE", 12)) {
/* DPCM backend */
link->no_pcm = 1;
link->platforms->of_node = NULL;
(B) link->platforms->name = "snd-soc-dummy";
}
If it was not used for generic DMAEngine, we can just remove it.
By this patch, created dlc (A) will be just wasted, but it won't leak.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cydfr1z6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Due to unfortunate interaction between two recent patchsets, avs driver
ends up dereferencing NULL pointer when registering i2s boards.
Commit [1] does a call to avs_mach_ssp_tdm() which requires mach->pdata,
however due to another change in [2], mach->pdata is initialized after
the call. Reshuffle code to initialise mach->pdata before calling
avs_mach_ssp_tdm().
[1]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=79138dbff53ab0e9891ebdfce8d7b298c3783cd1
[2]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=7d859189de13f06fdc511761c745f3b302bed7b6
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250424094600.1678051-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used on
non-boolean properties") added a warning when trying to parse a property
with a value (boolean properties are defined as: absent = false, present
without any value = true). This causes a warning from meson-card-utils.
meson-card-utils needs to know about the existence of the
"audio-routing" and/or "audio-widgets" properties in order to properly
parse them. Switch to of_property_present() in order to silence the
following warning messages during boot:
OF: /sound: Read of boolean property 'audio-routing' with a value.
OF: /sound: Read of boolean property 'audio-widgets' with a value.
Fixes: 7864a79f37b5 ("ASoC: meson: add axg sound card support")
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20250419213448.59647-1-martin.blumenstingl@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
They have build/application dependencies for some new changes coming in.
|
|
The codec driver data is allocated using kzalloc() so there's no need to
clear the mux setup flag when mux selection fails during probe.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://patch.msgid.link/20250415074145.7202-3-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
A recent change added support for looking up an optional mux control
before falling back to gpio control for us-euro plug selection.
The mux framework does however not yet support optional muxes and an
error message is now incorrectly logged on machines like the Lenovo
ThinkPad X13s which do not have one:
wcd938x_codec audio-codec: /audio-codec: failed to get mux-control (0)
Suppress the bogus error and add the missing mux error handling by
making sure that the 'mux-controls' DT property is present before
looking up the mux control.
Fixes: eec611d26f84 ("ASoC: codecs: wcd938x: add mux control support for hp audio mux")
Link: https://lore.kernel.org/lkml/Z-z_ZAyVBK5ui50k@hovoldconsulting.com/
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://patch.msgid.link/20250415074145.7202-2-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
of_gpio.h is deprecated, update the driver to use GPIO descriptors.
- Use devm_gpiod_get_optional to get GPIO descriptor with default
polarity GPIOD_OUT_LOW, set consumer name.
- Use gpiod_set_value to configure output value.
Checking the DTS polarity, all users are using GPIOD_ACTIVE_HIGH.
so all should work as expected with this patch.
Cc: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-3-5f4052e656a0@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
There is no in-tree user to create the device using platform data
'struct tpa6130a2_platform_data', so drop the dead code.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-2-5f4052e656a0@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Sort headers alphabetically to easily insert new ones
and drop duplications.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-1-5f4052e656a0@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
In the latest kernel versions system crashes were noticed occasionally
during suspend/resume. This occurs because the RZ SSI suspend trigger
(called from snd_soc_suspend()) is executed after rz_ssi_pm_ops->suspend()
and it accesses IP registers. After the rz_ssi_pm_ops->suspend() is
executed the IP clocks are disabled and its reset line is asserted.
Since snd_soc_suspend() is invoked through snd_soc_pm_ops->suspend(),
snd_soc_pm_ops is associated with soc_driver (defined in
sound/soc/soc-core.c), and there is no parent-child relationship between
soc_driver and rz_ssi_driver the power management subsystem does not
enforce a specific suspend/resume order between the RZ SSI platform driver
and soc_driver.
To ensure that the suspend/resume function of rz-ssi is executed after
snd_soc_suspend(), use NOIRQ_SYSTEM_SLEEP_PM_OPS().
Fixes: 1fc778f7c833 ("ASoC: renesas: rz-ssi: Add suspend to RAM support")
Cc: stable@vger.kernel.org
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20250410141525.4126502-1-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
An empty item is required to terminate the look up loop.
Fixes: ac5b4a24f16f ("ASoC: Intel: soc-acpi-intel-ptl-match: Add cs42l43 support")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250423055722.6920-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Merge series from Nicolas Frattaroli <nicolas.frattaroli@collabora.com>:
This series adds support for Rockchip's Serial Audio Interface (SAI)
controller, found on SoCs such as the RK3576. The SAI is a flexible
controller IP that allows both transmitting and receiving digital audio
in the I2S, TDM and PCM formats. Instances of this controller are used
both for externally exposed audio interfaces, as well as for audio on
video interfaces such as HDMI.
|
|
The headphone clamps cause fairly loud pops during type detect
because they sink current from the detection process itself. Disable
the clamps whilst the type detect runs, to improve the detection
pop performance.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250423090944.1504538-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
TDM mode on the adau7118 is dsp_a compatible. Set SPT_SAI_MODE on the
SPT_CTRL1 register to 1 for TDM mode when the DAI is operating in
dsp_a mode.
Signed-off-by: Michael Sikora <michael.sikora@axis.com>
Link: https://patch.msgid.link/20250411-adau7118-dsp-a-v1-1-be3fb487a6ac@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
The Rockchip RK3576 SoC features a new audio controller, the Serial
Audio Interface, or SAI for short. It is capable of both sending and
receiving audio over up to 4 lanes for each direction using the I2S,
PCM or TDM formats.
This driver is derived from the downstream vendor driver. That is why
its original author, Sugar Zhang, is listed as a Co-developer, with
their signoff. Since adjustments to make the driver suitable for
upstream were quite extensive, I've added myself to the authors and put
myself as the commit author; all added bugs are my fault alone, and not
that of the original author at Rockchip.
The hardware is somewhat similar to the Rockchip I2S-TDM hardware when
judged based on their register map, except it uses the same mclk for
tx and rx. It appears to be much more flexible with regards to TDM.
The loopback stuff and mono mode are new as well.
In line with the changes that were made to the Rockchip I2S-TDM driver
after upstreaming, the mclk-calibrate functionality was dropped, and
setting the mclk rate properly is now left up to the Common Clock
Framework, similar to how it is in the upstream I2S-TDM driver now.
A spinlock has been introduced to protect register write accesses that
depend on the bclk/fs to be stopped, i.e. XFER[1:0] being 0. I couldn't
find whether the asoc core held a per-instance lock so only one callback
can run at a time, and so it seemed prudent to add this.
I couldn't successfully test whether TDM was working, though I've tried
with a TAS6424 codec board. I'm not sure yet whether to blame the codec
driver, this version of the SAI driver, or the vendor implementation of
the SAI driver. The TDM mask registers remain untouched in both this
version and the downstream vendor version, which is suspicious, though
the Linux ASoC core wouldn't be able to support the 128 (!!!) slots of
TDM the hardware supports anyway.
Regular old 2-channel stereo I2S thrown at an I2S stereo codec works
well though. I tested with the CPU-side SAI controller in provider mode
and an Everest ES8388 codec as the consumer.
Some vendor driver features (no-dmaengine, fifo rockchip performance
monitoring, many kcontrols) were dropped for this initial upstream
version. They can always be added later if they make sense for upstream.
Co-developed-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/20250410-rk3576-sai-v2-6-c64608346be3@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Add tristate prompt to allow codec selection.
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250418-wm8998-v1-1-21c4bead9cd8@apitzsch.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
rt5665_sel_asrc_clk_src() was added in 2016 by
commit 33ada14a26c8 ("ASoC: add rt5665 codec driver")
rt5668_sel_asrc_clk_src() was added in 2018 by
commit d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver")
Neither have been used.
Remove them.
Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://patch.msgid.link/20250420232733.182802-1-linux@treblig.org
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
When building for a platform that does not support CONFIG_PM, such as
s390, cs48l32_runtime_{suspend,resume}() are unused because
SET_RUNTIME_PM_OPS does not reference its argument when CONFIG_PM is not
set:
sound/soc/codecs/cs48l32.c:3822:12: error: 'cs48l32_runtime_suspend' defined but not used [-Werror=unused-function]
3822 | static int cs48l32_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs48l32.c:3779:12: error: 'cs48l32_runtime_resume' defined but not used [-Werror=unused-function]
3779 | static int cs48l32_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Use RUNTIME_PM_OPS and pm_ptr() to ensure these functions are seen as
used by the compiler but be dropped in the final object file when
CONFIG_PM is not set, matching the current behavior while clearing up
the warnings.
Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250418-cs48l32-modern-pm_ops-v1-1-640559407619@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Merge series from Julien Massot <julien.massot@collabora.com>:
This patch series adds support for audio playback on the MT8395-based Radxa NIO 12L platform, which uses the integrated MT6359 codec via internal DAI links.
Key additions:
- Support for a new `mediatek,mt8195_mt6359` card configuration that does not rely on external codecs like rt5682.
- Proper memory region declarations and pinctrl setup for the audio front-end (AFE) and audio DSP (ADSP).
- A device tree sound node for headphone audio routing using `DL_SRC_BE` and `AIF1`.
- Enhancements to the DT bindings to document the new compatible string, missing link-name, and additional audio routes (Headphone L/R).
|
|
Other mt8195-mt6359 cards rely on external codecs,
add a card for board that only use the mt6359 codec.
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-3-30587426e5dd@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
ETDM2_IN_BE and ETDM1_OUT_BE are defined as COMP_EMPTY(),
in the case the codec dai_name will be null.
Avoid a crash if the device tree is not assigning a codec
to these links.
[ 1.179936] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 1.181065] Mem abort info:
[ 1.181420] ESR = 0x0000000096000004
[ 1.181892] EC = 0x25: DABT (current EL), IL = 32 bits
[ 1.182576] SET = 0, FnV = 0
[ 1.182964] EA = 0, S1PTW = 0
[ 1.183367] FSC = 0x04: level 0 translation fault
[ 1.183983] Data abort info:
[ 1.184406] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
[ 1.185097] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 1.185766] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 1.186439] [0000000000000000] user address but active_mm is swapper
[ 1.187239] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
[ 1.188029] Modules linked in:
[ 1.188420] CPU: 7 UID: 0 PID: 70 Comm: kworker/u32:1 Not tainted 6.14.0-rc4-next-20250226+ #85
[ 1.189515] Hardware name: Radxa NIO 12L (DT)
[ 1.190065] Workqueue: events_unbound deferred_probe_work_func
[ 1.190808] pstate: 40400009 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 1.191683] pc : __pi_strcmp+0x24/0x140
[ 1.192170] lr : mt8195_mt6359_soc_card_probe+0x224/0x7b0
[ 1.192854] sp : ffff800083473970
[ 1.193271] x29: ffff800083473a10 x28: 0000000000001008 x27: 0000000000000002
[ 1.194168] x26: ffff800082408960 x25: ffff800082417db0 x24: ffff800082417d88
[ 1.195065] x23: 000000000000001e x22: ffff800082dbf480 x21: ffff800082dc07b8
[ 1.195961] x20: 0000000000000000 x19: 0000000000000013 x18: 00000000ffffffff
[ 1.196858] x17: 000000040044ffff x16: 005000f2b5503510 x15: 0000000000000006
[ 1.197755] x14: ffff800082407af0 x13: 6e6f69737265766e x12: 692d6b636f6c6374
[ 1.198651] x11: 0000000000000002 x10: ffff80008240b920 x9 : 0000000000000018
[ 1.199547] x8 : 0101010101010101 x7 : 0000000000000000 x6 : 0000000000000000
[ 1.200443] x5 : 0000000000000000 x4 : 8080808080000000 x3 : 303933383978616d
[ 1.201339] x2 : 0000000000000000 x1 : ffff80008240b920 x0 : 0000000000000000
[ 1.202236] Call trace:
[ 1.202545] __pi_strcmp+0x24/0x140 (P)
[ 1.203029] mtk_soundcard_common_probe+0x3bc/0x5b8
[ 1.203644] platform_probe+0x70/0xe8
[ 1.204106] really_probe+0xc8/0x3a0
[ 1.204556] __driver_probe_device+0x84/0x160
[ 1.205104] driver_probe_device+0x44/0x130
[ 1.205630] __device_attach_driver+0xc4/0x170
[ 1.206189] bus_for_each_drv+0x8c/0xf8
[ 1.206672] __device_attach+0xa8/0x1c8
[ 1.207155] device_initial_probe+0x1c/0x30
[ 1.207681] bus_probe_device+0xb0/0xc0
[ 1.208165] deferred_probe_work_func+0xa4/0x100
[ 1.208747] process_one_work+0x158/0x3e0
[ 1.209254] worker_thread+0x2c4/0x3e8
[ 1.209727] kthread+0x134/0x1f0
[ 1.210136] ret_from_fork+0x10/0x20
[ 1.210589] Code: 54000401 b50002c6 d503201f f86a6803 (f8408402)
[ 1.211355] ---[ end trace 0000000000000000 ]---
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Fixes: e70b8dd26711 ("ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-2-30587426e5dd@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
'HPOL', 'HPOR', and 'Headset Mic' are rt5682 specific,
move these routes to mt8195_rt5682_init so we keep
'mt8195_rt5682_routes' for connection between mt8195 and
mt6359.
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-1-30587426e5dd@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
This patch added the PDE status check which makes sure the PDE transition is done.
It will decrease the pop noise at the beginning of DMIC recording.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20250416092547.737879-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
mic_name returned by devm_kasprintf() could be NULL.
Add a check for it.
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Fixes: bee2fe44679f ("ASoC: Intel: sof_sdw: use generic rtd_init function for Realtek SDW DMICs")
Link: https://patch.msgid.link/20250415194134.292830-1-chenyuan0y@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
There is a spelling mistake in a cs48l32_fll_err message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250416081204.36851-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Remove unnecessary return variable and compress the return logic.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20250416041431.546370-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Remove unnecessary return variable and compress the return logic.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250416041023.546311-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
This patch added the function_status check to avoid the calibration again.
The codec driver reinitializes when the 'FUNCTION_NEEDS_INITIALIZATION' flag raises.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20250416092528.737845-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Change the code to use faux bus for the dummy codec driver device instead
of creating a platform device. Also use KUnit automatic resource cleanup to
destroy the device instead of doing it "manually" in a test case exit()
function.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250416121604.780220-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
formance low-power audio DSP with analog and
PDM digital inputs and support for low-power always-on voice-trigger
functionality.
This series adds the devicetree bindings and the ASoC codec driver.
|
|
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:
A codec endpoint may not be used. We could check the present SDCA
functions to know if the endpoint is used or not. Skip the endpoint
which is not used. And load the topology dynamically for each endpoint.
With this feature, we don't need to use the quirk to determine the
existence of the optional codec DAIs.
|
|
|
|
Use flex_array_size() when calculating the number of bytes argument to
get_random_bytes(). This replaces a calculation based on passing sizeof()
the expected type of the destination.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250415131837.568750-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Add a codec driver for the Cirrus Logic CS48L32 audio DSP.
The CS48L32 is a low-power audio DSP with microphone inputs for
"Always on Voice" (i.e. voice trigger) and voice command processing.
It has a programmable Halo Core DSP and a variety of power-efficient
fixed-function audio processors, with configurable digital mixing
and routing.
There are two I2S/TDM audio serial ports.
Four analogue inputs are available through IN1. These feed into a
2-channel ADC through an analogue mux. There is an ALSA control for
each IN1 ADC channel to select which analogue input to use.
A dedicated digital mic (DMIC) PDM input is available on IN2.
Two PDM outputs can feed DMIC inputs on another codec or a host DMIC/PDM
input.
An on-board regulator provides a power supply or bias voltage to
attached microphones. Three switchable MICBIAS outputs are fed from this
allowing only the microphone in use to be powered-up. There are DAPM
widgets for these outputs: MICBIAS1A, MICBIAS1B and MICBIAS1C. The machine
driver must create a DAPM route from the required MICBIAS1x widget to the
INn input widgets to make the MICBIAS switch on when the audio input is
powered-up. For example if the microphone feeding CS48L32 pin IN1LN_1 is
powered from MICBIAS1A, the machine driver must create the path:
(sink) IN1LN_1 <----- (source) MICBIAS1A
Co-developed-by: Stuart Henderson <stuarth@opensource.cirrus.com>
Signed-off-by: Stuart Henderson <stuarth@opensource.cirrus.com>
Co-developed-by: Qi Zhou <qi.zhou@cirrus.com>
Signed-off-by: Qi Zhou <qi.zhou@cirrus.com>
Co-developed-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com>
Signed-off-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250415115016.505777-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Use struct_size() to calculate the number of bytes to allocate and used
by 'cirrus_amp_efi_data'. Compared to offsetof(), struct_size() provides
additional compile-time checks (e.g., __must_be_array()).
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250414114528.355204-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Current graph_util_parse_dai() has 2 issue for dlc->xxx handling.
1) dlc->xxx might be filled if snd_soc_get_dai_via_args() (A) works.
In such case it will fill dlc->xxx first (B), and detect error
after that (C). We need to fill dlc->xxx in success case only.
(A) dai = snd_soc_get_dai_via_args(&args);
if (dai) {
ret = -ENOMEM;
^ dlc->of_node = ...
(B) dlc->dai_name = ...
v dlc->dai_args = ...
(C) if (!dlc->dai_args)
goto end;
...
}
2) graph_util_parse_dai() itself has 2 patterns (X)(Y) to fill dlc->xxx.
Both case, we need to call of_node_put(node) (Z) in error case, but we
are calling it only in (Y) case.
int graph_util_parse_dai(...)
{
...
dai = snd_soc_get_dai_via_args(&args);
if (dai) {
...
^ dlc->of_node = ...
(X) dlc->dai_name = ...
v dlc->dai_args = ...
...
}
...
(Y) ret = snd_soc_get_dlc(&args, dlc);
if (ret < 0) {
(Z) of_node_put(node);
...
}
...
}
This patch fixup both case. Make it easy to understand, update
lavel "end" to "err", too.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87fribr2ns.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
We already have snd_pcm_direction_name(). Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87bjszr1xp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Merge series from Keguang Zhang <keguang.zhang@gmail.com>:
Add the driver and dt-binding document for Loongson-1 AC97.
Add the dt-binding document for Realtek ALC203 Codec.
Add DT support for the AC97 generic codec driver.
|
|
Merge series from Bartosz Golaszewski <brgl@bgdev.pl>:
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. We're in the process of
converting all GPIO drivers to using the new API. This series converts
all ASoC GPIO controllers.
|
|
Merge series from cy_huang@richtek.com:
This patch series adds Richtek rt9123 and rt9123p support.
It's a 3.2W mono Class-D audio amplifier.
|
|
Merge series from James Calligeros <jcalligeros99@gmail.com>:
This series introduces a number of changes to the drivers for
the Texas Instruments TAS2764 and TAS2770 amplifiers in order to
introduce (and improve in the case of TAS2770) support for the
variants of these amps found in Apple Silicon Macs.
Apple's variant of TAS2764 is known as SN012776, and as always with
Apple is a subtly incompatible variant with a number of quirks. It
is not publicly available. The TAS2770 variant is known as TAS5770L,
and does not require incompatible handling.
Much as with the Cirrus codec patches, I do not
expect that we will get any official acknowledgement that these parts
exist from TI, however I would be delighted to be proven wrong.
This series has been living in the downstream Asahi kernel tree[1]
for over two years, and has been tested by many thousands of users
by this point[2].
v4 drops the TDM idle TX slot behaviour patches. I experimented with
the API discussed in v3, however this did not work on any of the machines
I tested it with. More tweaking is probably needed.
[1] https://github.com/AsahiLinux/linux/tree/asahi-wip
[2] https://stats.asahilinux.org/
|
|
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
This series fixes the KConfig for cs_dsp and cs-amp-lib tests so that
CONFIG_KUNIT_ALL_TESTS doesn't cause them to add modules to the build.
|
|
A codec endpoint may not be used. We could check the present SDCA
functions to know if the endpoint is used or not. Skip the endpoint
which is not used.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250414063239.85200-12-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|