* [PATCH v1 0/2] ASoC: tegra: Support WM8994 by machine driver
@ 2026-10-13 18:32 Svyatoslav Ryhel
2026-10-13 18:32 ` [PATCH v1 1/2] ASoC: dt-bindings: nvidia,tegra-audio: document WM8994 CODEC Svyatoslav Ryhel
2026-10-13 18:32 ` [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
0 siblings, 2 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-13 18:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
Takashi Iwai, Svyatoslav Ryhel
Cc: linux-sound, devicetree, linux-tegra, linux-kernel
Add Wolfson Microelectronics WM8994 codec support to the Tegra ASoC
machine driver. The WM8994 codec is found on devices like LG Optimus 2X
(P990/star) and Samsung Captivate Glide (SGH-i927).
Svyatoslav Ryhel (2):
ASoC: dt-bindings: nvidia,tegra-audio: document WM8994 CODEC
ASoC: tegra: Support WM8994 by machine driver
.../sound/nvidia,tegra-audio-wm8994.yaml | 109 +++++++++++
sound/soc/tegra/Kconfig | 10 ++
sound/soc/tegra/Makefile | 2 +
sound/soc/tegra/tegra_wm8994.c | 169 ++++++++++++++++++
4 files changed, 290 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8994.yaml
create mode 100644 sound/soc/tegra/tegra_wm8994.c
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 1/2] ASoC: dt-bindings: nvidia,tegra-audio: document WM8994 CODEC
2026-10-13 18:32 [PATCH v1 0/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
@ 2026-10-13 18:32 ` Svyatoslav Ryhel
2026-10-13 18:32 ` [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
1 sibling, 0 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-13 18:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
Takashi Iwai, Svyatoslav Ryhel
Cc: linux-sound, devicetree, linux-tegra, linux-kernel
Add dt-binding for WM8994 CODEC.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
.../sound/nvidia,tegra-audio-wm8994.yaml | 109 ++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8994.yaml
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8994.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8994.yaml
new file mode 100644
index 0000000000000..3c9a055f5e4bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8994.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-wm8994.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra audio complex with WM8994 CODEC
+
+maintainers:
+ - Svyatoslav Ryhel <clamor95@gmail.com>
+
+allOf:
+ - $ref: nvidia,tegra-audio-common.yaml#
+
+properties:
+ compatible:
+ items:
+ - pattern: '^[a-z0-9]+,tegra-audio-wm8994(-[a-z0-9]+)+$'
+ - const: nvidia,tegra-audio-wm8994
+
+ nvidia,audio-routing:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ description: |
+ A list of the connections between audio components.
+ Each entry is a pair of strings, the first being the connection's sink,
+ the second being the connection's source. Valid names for sources and
+ sinks are the pins (documented in the binding document),
+ and the jacks on the board.
+ minItems: 2
+ items:
+ enum:
+ # Board Connectors
+ - Headphone Jack
+ - Int Spk
+ - Earpiece
+ - Line Out
+ - Mic Jack
+ - Int Mic
+ - Internal Mic 1
+ - Internal Mic 2
+
+ # CODEC Pins
+ - SPKOUTLP
+ - SPKOUTLN
+ - SPKOUTRP
+ - SPKOUTRN
+ - HPOUT1L
+ - HPOUT1R
+ - HPOUT2P
+ - HPOUT2N
+ - LINEOUT1P
+ - LINEOUT1N
+ - LINEOUT2P
+ - LINEOUT2N
+ - IN1LN
+ - IN1LP
+ - IN2LN
+ - IN2LP:VXRN
+ - IN1RN
+ - IN1RP
+ - IN2RN
+ - IN2RP:VXRP
+ - DMIC1DAT
+ - DMIC2DAT
+ - MICBIAS1
+ - MICBIAS2
+
+required:
+ - nvidia,i2s-controller
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra20-car.h>
+ #include <dt-bindings/gpio/gpio.h>
+
+ sound {
+ compatible = "lg,tegra-audio-wm8994-star",
+ "nvidia,tegra-audio-wm8994";
+ nvidia,model = "LG Optimus 2X WM8994";
+
+ nvidia,audio-routing =
+ "Headphone Jack", "HPOUT1L",
+ "Headphone Jack", "HPOUT1R",
+ "Int Spk", "SPKOUTLN",
+ "Int Spk", "SPKOUTLP",
+ "Earpiece", "HPOUT2N",
+ "Earpiece", "HPOUT2P",
+ "IN2RN", "MICBIAS2",
+ "IN2RN", "Mic Jack",
+ "IN1LN", "MICBIAS1",
+ "IN1LN", "Internal Mic 1",
+ "IN1RN", "MICBIAS1",
+ "IN1RN", "Internal Mic 2";
+
+ nvidia,i2s-controller = <&tegra_i2s1>;
+ nvidia,audio-codec = <&wm8994>;
+
+ nvidia,hp-det-gpios = <&gpio 51 GPIO_ACTIVE_HIGH>;
+ nvidia,mic-det-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+ nvidia,ext-mic-en-gpios = <&gpio 57 GPIO_ACTIVE_HIGH>;
+ nvidia,coupled-mic-hp-det;
+
+ clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
+ <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
+ <&tegra_car TEGRA20_CLK_CDEV1>;
+ clock-names = "pll_a", "pll_a_out0", "mclk";
+ };
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver
2026-10-13 18:32 [PATCH v1 0/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
2026-10-13 18:32 ` [PATCH v1 1/2] ASoC: dt-bindings: nvidia,tegra-audio: document WM8994 CODEC Svyatoslav Ryhel
@ 2026-10-13 18:32 ` Svyatoslav Ryhel
2026-10-13 18:49 ` sashiko-bot
2026-10-13 18:52 ` Mark Brown
1 sibling, 2 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-13 18:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
Takashi Iwai, Svyatoslav Ryhel
Cc: linux-sound, devicetree, linux-tegra, linux-kernel
Add Wolfson Microelectronics WM8994 codec support to the Tegra ASoC
machine driver. The WM8994 codec is found on devices like LG Optimus 2X
(P990/star) and Samsung Captivate Glide (SGH-i927).
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
sound/soc/tegra/Kconfig | 10 ++
sound/soc/tegra/Makefile | 2 +
sound/soc/tegra/tegra_wm8994.c | 169 +++++++++++++++++++++++++++++++++
3 files changed, 181 insertions(+)
create mode 100644 sound/soc/tegra/tegra_wm8994.c
diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig
index fdc954028d622..dd3b2d3d6c4c9 100644
--- a/sound/soc/tegra/Kconfig
+++ b/sound/soc/tegra/Kconfig
@@ -239,6 +239,16 @@ config SND_SOC_TEGRA_WM8962
boards using the WM8962 codec. Currently, the supported boards are
Microsoft Surface RT.
+config SND_SOC_TEGRA_WM8994
+ tristate "SoC Audio support for Tegra boards using a WM8994 codec"
+ depends on I2C && GPIOLIB && MFD_WM8994
+ select SND_SOC_TEGRA_MACHINE_DRV
+ select SND_SOC_WM8994
+ help
+ Say Y or M here if you want to add support for SoC audio on Tegra
+ boards using the WM8994 codec. Currently, the supported boards are
+ LG Optimus X2 P990 and Samsung Captivate Glide (SGH-i927).
+
config SND_SOC_TEGRA_WM9712
tristate "SoC Audio support for Tegra boards using a WM9712 codec"
depends on GPIOLIB
diff --git a/sound/soc/tegra/Makefile b/sound/soc/tegra/Makefile
index 1c18ef6971c09..b8f90149bfa63 100644
--- a/sound/soc/tegra/Makefile
+++ b/sound/soc/tegra/Makefile
@@ -43,10 +43,12 @@ obj-$(CONFIG_SND_SOC_TEGRA210_OPE) += snd-soc-tegra210-ope.o
# Tegra machine Support
snd-soc-tegra-wm8903-y := tegra_wm8903.o
snd-soc-tegra-wm8962-y := tegra_wm8962.o
+snd-soc-tegra-wm8994-y := tegra_wm8994.o
snd-soc-tegra-machine-y := tegra_asoc_machine.o
snd-soc-tegra-audio-graph-card-y := tegra_audio_graph_card.o
obj-$(CONFIG_SND_SOC_TEGRA_WM8903) += snd-soc-tegra-wm8903.o
obj-$(CONFIG_SND_SOC_TEGRA_WM8962) += snd-soc-tegra-wm8962.o
+obj-$(CONFIG_SND_SOC_TEGRA_WM8994) += snd-soc-tegra-wm8994.o
obj-$(CONFIG_SND_SOC_TEGRA_MACHINE_DRV) += snd-soc-tegra-machine.o
obj-$(CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD) += snd-soc-tegra-audio-graph-card.o
diff --git a/sound/soc/tegra/tegra_wm8994.c b/sound/soc/tegra/tegra_wm8994.c
new file mode 100644
index 0000000000000..950fa6ad388f9
--- /dev/null
+++ b/sound/soc/tegra/tegra_wm8994.c
@@ -0,0 +1,169 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * tegra_wm8994.c - Tegra machine ASoC driver for boards using WM8994 codec.
+ *
+ * Copyright (C) 2026 Svyatoslav Ryhel <clamor95@gmail.com>
+ *
+ * Based on tegra_wm8994 code copyright/by:
+ *
+ * Author: Sumit Bhattacharya <sumitb@nvidia.com>
+ * Copyright (C) 2010-2011 - NVIDIA, Inc.
+ *
+ * Based on code copyright/by:
+ *
+ * (c) 2009, 2010 Nvidia Graphics Pvt. Ltd.
+ *
+ * Copyright 2007 Wolfson Microelectronics PLC.
+ * Author: Graeme Gregory
+ * graeme.gregory@wolfsonmicro.com or linux@wolfsonmicro.com
+ */
+
+#include <linux/gpio/consumer.h>
+#include <linux/of.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+
+#include <sound/core.h>
+#include <sound/jack.h>
+#include <sound/soc.h>
+
+#include "../codecs/wm8994.h"
+
+#include "tegra_asoc_machine.h"
+
+static struct snd_soc_jack_pin tegra_wm8994_mic_jack_pins[] = {
+ { .pin = "Mic Jack", .mask = SND_JACK_MICROPHONE },
+};
+
+static unsigned int tegra_wm8994_mclk_rate(unsigned int srate)
+{
+ unsigned int mclk;
+
+ switch (srate) {
+ case 8000:
+ case 16000:
+ case 24000:
+ case 32000:
+ case 48000:
+ case 64000:
+ case 96000:
+ mclk = 12288000;
+ break;
+ case 11025:
+ case 22050:
+ case 44100:
+ case 88200:
+ mclk = 11289600;
+ break;
+ default:
+ mclk = 12000000;
+ break;
+ }
+
+ return mclk;
+}
+
+static const struct snd_kcontrol_new tegra_wm8994_controls[] = {
+ SOC_DAPM_PIN_SWITCH("Int Spk"),
+ SOC_DAPM_PIN_SWITCH("Internal Mic 1"),
+ SOC_DAPM_PIN_SWITCH("Internal Mic 2"),
+ SOC_DAPM_PIN_SWITCH("Mic Jack"),
+ SOC_DAPM_PIN_SWITCH("Line Out"),
+ SOC_DAPM_PIN_SWITCH("FM Radio"),
+};
+
+static int tegra_wm8994_init(struct snd_soc_pcm_runtime *rtd)
+{
+ struct tegra_machine *machine = snd_soc_card_get_drvdata(rtd->card);
+ int err;
+
+ err = tegra_asoc_machine_init(rtd);
+ if (err)
+ return err;
+
+ if (!machine->gpiod_mic_det && machine->asoc->add_mic_jack) {
+ struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
+ struct snd_soc_component *component = codec_dai->component;
+
+ err = snd_soc_card_jack_new_pins(rtd->card, "Mic Jack",
+ SND_JACK_MICROPHONE,
+ machine->mic_jack,
+ tegra_wm8994_mic_jack_pins,
+ ARRAY_SIZE(tegra_wm8994_mic_jack_pins));
+ if (err) {
+ dev_err(rtd->dev, "Mic Jack creation failed: %d\n", err);
+ return err;
+ }
+
+ wm8994_mic_detect(component, machine->mic_jack, 1);
+ }
+
+ return 0;
+}
+
+static int tegra_wm8994_remove(struct snd_soc_card *card)
+{
+ struct snd_soc_dai_link *link = &card->dai_link[0];
+ struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, link);
+ struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
+ struct snd_soc_component *component = codec_dai->component;
+
+ wm8994_mic_detect(component, NULL, 0);
+
+ return 0;
+}
+
+SND_SOC_DAILINK_DEFS(wm8994_hifi,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8994-aif1")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
+static struct snd_soc_dai_link tegra_wm8994_dai = {
+ .name = "WM8994",
+ .stream_name = "WM8994 PCM",
+ .init = tegra_wm8994_init,
+ .dai_fmt = SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBC_CFC,
+ SND_SOC_DAILINK_REG(wm8994_hifi),
+};
+
+static struct snd_soc_card snd_soc_tegra_wm8994 = {
+ .components = "codec:wm8994",
+ .dai_link = &tegra_wm8994_dai,
+ .num_links = 1,
+ .controls = tegra_wm8994_controls,
+ .num_controls = ARRAY_SIZE(tegra_wm8994_controls),
+ .remove = tegra_wm8994_remove,
+ .fully_routed = true,
+};
+
+static const struct tegra_asoc_data tegra_wm8994_data = {
+ .mclk_rate = tegra_wm8994_mclk_rate,
+ .mclk_id = WM8994_SYSCLK_MCLK1,
+ .card = &snd_soc_tegra_wm8994,
+ .add_common_dapm_widgets = true,
+ .add_common_snd_ops = true,
+ .add_mic_jack = true,
+ .add_hp_jack = true,
+};
+
+static const struct of_device_id tegra_wm8994_of_match[] = {
+ { .compatible = "nvidia,tegra-audio-wm8994", .data = &tegra_wm8994_data },
+ { },
+};
+MODULE_DEVICE_TABLE(of, tegra_wm8994_of_match);
+
+static struct platform_driver tegra_wm8994_driver = {
+ .driver = {
+ .name = "tegra-wm8994",
+ .of_match_table = tegra_wm8994_of_match,
+ .pm = &snd_soc_pm_ops,
+ },
+ .probe = tegra_asoc_machine_probe,
+};
+module_platform_driver(tegra_wm8994_driver);
+
+MODULE_AUTHOR("Svyatoslav Ryhel <clamor95@gmail.com>");
+MODULE_DESCRIPTION("Tegra+WM8994 machine ASoC driver");
+MODULE_LICENSE("GPL");
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver
2026-10-13 18:32 ` [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
@ 2026-10-13 18:49 ` sashiko-bot
2026-10-13 18:52 ` Mark Brown
1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-10-13 18:49 UTC (permalink / raw)
To: Svyatoslav Ryhel; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] asoc: tegra: UAF and state unbalance due to invalid micbias in wm8994_mic_detect() teardown
- [High] asoc: tegra: missing .owner = THIS_MODULE leads to module unload crash
- [Low] asoc: tegra: DAPM pin switches reference non-existent widgets
--
commit f9aa3ff5a04d8149180c0f26beabf248ebcd5577
Author: Svyatoslav Ryhel <clamor95@gmail.com>
ASoC: tegra: Support WM8994 by machine driver
Add Wolfson Microelectronics WM8994 codec support to the Tegra ASoC
machine driver. The WM8994 codec is found on devices like LG Optimus 2X
(P990/star) and Samsung Captivate Glide (SGH-i927).
> diff --git a/sound/soc/tegra/tegra_wm8994.c b/sound/soc/tegra/tegra_wm8994.c
> new file mode 100644
> index 0000000000000..950fa6ad388f9
> --- /dev/null
> +++ b/sound/soc/tegra/tegra_wm8994.c
[ ... ]
> +static const struct snd_kcontrol_new tegra_wm8994_controls[] = {
> + SOC_DAPM_PIN_SWITCH("Int Spk"),
> + SOC_DAPM_PIN_SWITCH("Internal Mic 1"),
> + SOC_DAPM_PIN_SWITCH("Internal Mic 2"),
> + SOC_DAPM_PIN_SWITCH("Mic Jack"),
> + SOC_DAPM_PIN_SWITCH("Line Out"),
> + SOC_DAPM_PIN_SWITCH("FM Radio"),
> +};
[Severity: Low]
Are there matching DAPM widgets defined for the "Line Out" and "FM Radio"
pin switches?
Neither tegra_asoc_machine.c nor the WM8994 codec driver appears to define
DAPM widgets with these exact names. Referencing non-existent widgets
creates unattached controls that fail to operate correctly when toggled
from userspace.
[ ... ]
> +static int tegra_wm8994_remove(struct snd_soc_card *card)
> +{
> + struct snd_soc_dai_link *link = &card->dai_link[0];
> + struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, link);
> + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
> + struct snd_soc_component *component = codec_dai->component;
> +
> + wm8994_mic_detect(component, NULL, 0);
[Severity: High]
Does calling wm8994_mic_detect() with 0 for the micbias argument skip
cleanup and return an error?
In sound/soc/codecs/wm8994.c:wm8994_mic_detect(), when micbias is 0,
it falls into the default switch case, logs a warning, and returns -EINVAL:
default:
dev_warn(component->dev, "Invalid MICBIAS %d\n", micbias);
pm_runtime_put(component->dev);
return -EINVAL;
Because it returns early, the teardown logic is never executed, and
wm8994->micdet[0].jack is not set to NULL.
When the machine driver is unbound, the snd_jack is freed. However, the
codec still holds the dangling pointer. Can a subsequent microphone IRQ fire,
causing wm8994_mic_irq() to call snd_soc_jack_report() on the freed jack
and leading to a use-after-free crash?
Additionally, is it intentional to call this unconditionally, even if it
was never enabled (for example, when machine->gpiod_mic_det is present)?
This might lead to unbalanced teardown.
> +
> + return 0;
> +}
[ ... ]
> +static struct snd_soc_card snd_soc_tegra_wm8994 = {
> + .components = "codec:wm8994",
> + .dai_link = &tegra_wm8994_dai,
> + .num_links = 1,
> + .controls = tegra_wm8994_controls,
> + .num_controls = ARRAY_SIZE(tegra_wm8994_controls),
> + .remove = tegra_wm8994_remove,
> + .fully_routed = true,
> +};
[Severity: High]
Is the .owner field intentionally omitted from this structure?
The driver uses a shared probe function, tegra_asoc_machine_probe(),
from tegra_asoc_machine.c, which contains the fallback:
if (!card->owner)
card->owner = THIS_MODULE;
Because THIS_MODULE in the fallback resolves to the snd-soc-tegra-machine
module, the snd-soc-tegra-wm8994 module's reference count is never
incremented when a PCM stream is opened.
Could this allow the snd-soc-tegra-wm8994 module to be unloaded via rmmod
while audio is actively playing, causing any subsequent ALSA core access to
callbacks or data structures in the unloaded module to trigger a kernel oops?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013183226.513658-1-clamor95@gmail.com?part=2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver
2026-10-13 18:32 ` [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
2026-10-13 18:49 ` sashiko-bot
@ 2026-10-13 18:52 ` Mark Brown
2026-10-13 18:56 ` Svyatoslav Ryhel
1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2026-10-13 18:52 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thierry Reding, Jonathan Hunter, Jaroslav Kysela, Takashi Iwai,
linux-sound, devicetree, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 856 bytes --]
On Tue, Oct 13, 2026 at 09:32:26PM +0300, Svyatoslav Ryhel wrote:
> Add Wolfson Microelectronics WM8994 codec support to the Tegra ASoC
> machine driver. The WM8994 codec is found on devices like LG Optimus 2X
> (P990/star) and Samsung Captivate Glide (SGH-i927).
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * tegra_wm8994.c - Tegra machine ASoC driver for boards using WM8994 codec.
Please make the entire comment a C++ one so things look more
intentional.
> +static const struct snd_kcontrol_new tegra_wm8994_controls[] = {
> + SOC_DAPM_PIN_SWITCH("Int Spk"),
> + SOC_DAPM_PIN_SWITCH("Internal Mic 1"),
> + SOC_DAPM_PIN_SWITCH("Internal Mic 2"),
> + SOC_DAPM_PIN_SWITCH("Mic Jack"),
> + SOC_DAPM_PIN_SWITCH("Line Out"),
> + SOC_DAPM_PIN_SWITCH("FM Radio"),
> +};
There's no Line Out or FM Radio widgets, you should get errors during
probe.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver
2026-10-13 18:52 ` Mark Brown
@ 2026-10-13 18:56 ` Svyatoslav Ryhel
2026-10-13 19:04 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-13 18:56 UTC (permalink / raw)
To: Mark Brown
Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thierry Reding, Jonathan Hunter, Jaroslav Kysela, Takashi Iwai,
linux-sound, devicetree, linux-tegra, linux-kernel
вт, 13 жовт. 2026 р. о 21:52 Mark Brown <broonie@kernel.org> пише:
>
> On Tue, Oct 13, 2026 at 09:32:26PM +0300, Svyatoslav Ryhel wrote:
> > Add Wolfson Microelectronics WM8994 codec support to the Tegra ASoC
> > machine driver. The WM8994 codec is found on devices like LG Optimus 2X
> > (P990/star) and Samsung Captivate Glide (SGH-i927).
>
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +/*
> > + * tegra_wm8994.c - Tegra machine ASoC driver for boards using WM8994 codec.
>
> Please make the entire comment a C++ one so things look more
> intentional.
>
> > +static const struct snd_kcontrol_new tegra_wm8994_controls[] = {
> > + SOC_DAPM_PIN_SWITCH("Int Spk"),
> > + SOC_DAPM_PIN_SWITCH("Internal Mic 1"),
> > + SOC_DAPM_PIN_SWITCH("Internal Mic 2"),
> > + SOC_DAPM_PIN_SWITCH("Mic Jack"),
> > + SOC_DAPM_PIN_SWITCH("Line Out"),
> > + SOC_DAPM_PIN_SWITCH("FM Radio"),
> > +};
>
> There's no Line Out or FM Radio widgets, you should get errors during
> probe.
These codec targets. LINEOUT(1P/1N/2P/2N) to Line Out and IN1LP/RP are
used by LG Optimus 2X P990 (star) for FM Radio.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver
2026-10-13 18:56 ` Svyatoslav Ryhel
@ 2026-10-13 19:04 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-10-13 19:04 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thierry Reding, Jonathan Hunter, Jaroslav Kysela, Takashi Iwai,
linux-sound, devicetree, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
On Tue, Oct 13, 2026 at 09:56:03PM +0300, Svyatoslav Ryhel wrote:
> вт, 13 жовт. 2026 р. о 21:52 Mark Brown <broonie@kernel.org> пише:
> > > + SOC_DAPM_PIN_SWITCH("Mic Jack"),
> > > + SOC_DAPM_PIN_SWITCH("Line Out"),
> > > + SOC_DAPM_PIN_SWITCH("FM Radio"),
> > > +};
> > There's no Line Out or FM Radio widgets, you should get errors during
> > probe.
> These codec targets. LINEOUT(1P/1N/2P/2N) to Line Out and IN1LP/RP are
> used by LG Optimus 2X P990 (star) for FM Radio.
Those are reasons why someone might want to create Line Out or FM Radio
for a system, but the fact remains that the machine driver uses those
widgets without creating them.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-10-13 19:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 18:32 [PATCH v1 0/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
2026-10-13 18:32 ` [PATCH v1 1/2] ASoC: dt-bindings: nvidia,tegra-audio: document WM8994 CODEC Svyatoslav Ryhel
2026-10-13 18:32 ` [PATCH v1 2/2] ASoC: tegra: Support WM8994 by machine driver Svyatoslav Ryhel
2026-10-13 18:49 ` sashiko-bot
2026-10-13 18:52 ` Mark Brown
2026-10-13 18:56 ` Svyatoslav Ryhel
2026-10-13 19:04 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox