* [PATCH 01/12] ASoC: codecs: wm8903: Implement set_jack callback
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 02/12] ASoC: codecs: wm8962: " Amadeusz Sławiński
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Add set_jack callback to the component driver so machine drivers
can use the standard snd_soc_component_set_jack() API instead of
the driver-specific wm8903_mic_detect() helper.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/codecs/wm8903.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 553f8d68a546..25a488f589a7 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1638,6 +1638,17 @@ int wm8903_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *
}
EXPORT_SYMBOL_GPL(wm8903_mic_detect);
+static int wm8903_set_jack(struct snd_soc_component *component,
+ struct snd_soc_jack *jack, void *data)
+{
+ int *shrt = data;
+
+ if (!jack)
+ return wm8903_mic_detect(component, NULL, 0, 0);
+
+ return wm8903_mic_detect(component, jack, SND_JACK_MICROPHONE, shrt ? *shrt : 0);
+}
+
static irqreturn_t wm8903_irq(int irq, void *data)
{
struct wm8903_priv *wm8903 = data;
@@ -1902,6 +1913,7 @@ static void wm8903_free_gpio(struct wm8903_priv *wm8903)
static const struct snd_soc_component_driver soc_component_dev_wm8903 = {
.resume = wm8903_resume,
.set_bias_level = wm8903_set_bias_level,
+ .set_jack = wm8903_set_jack,
.seq_notifier = wm8903_seq_notifier,
.controls = wm8903_snd_controls,
.num_controls = ARRAY_SIZE(wm8903_snd_controls),
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 02/12] ASoC: codecs: wm8962: Implement set_jack callback
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 01/12] ASoC: codecs: wm8903: Implement set_jack callback Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 03/12] ASoC: codecs: wm8994: " Amadeusz Sławiński
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Add set_jack callback to the component driver so machine drivers
can use the standard snd_soc_component_set_jack() API instead of
the driver-specific wm8962_mic_detect() helper.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/codecs/wm8962.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index db8b86d522ff..b36e73fabbdd 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3601,9 +3601,16 @@ static void wm8962_remove(struct snd_soc_component *component)
wm8962_free_beep(component);
}
+static int wm8962_set_jack(struct snd_soc_component *component,
+ struct snd_soc_jack *jack, void *data)
+{
+ return wm8962_mic_detect(component, jack);
+}
+
static const struct snd_soc_component_driver soc_component_dev_wm8962 = {
.probe = wm8962_probe,
.remove = wm8962_remove,
+ .set_jack = wm8962_set_jack,
.set_bias_level = wm8962_set_bias_level,
.set_pll = wm8962_set_fll,
.use_pmdown_time = 1,
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 03/12] ASoC: codecs: wm8994: Implement set_jack callback
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 01/12] ASoC: codecs: wm8903: Implement set_jack callback Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 02/12] ASoC: codecs: wm8962: " Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 04/12] ASoC: tegra: tegra_wm8903: Use standard callback to set jack Amadeusz Sławiński
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Add set_jack callback to the component driver so machine drivers
can use the standard snd_soc_component_set_jack() API instead of
driver-specific wm8994_mic_detect() and wm8958_mic_detect() helpers.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/codecs/wm8994.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 6b91e02f130b..69afba1764eb 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -4642,12 +4642,30 @@ static void wm8994_component_remove(struct snd_soc_component *component)
kfree(wm8994->retune_mobile_texts);
}
+static int wm8994_set_jack(struct snd_soc_component *component,
+ struct snd_soc_jack *jack, void *data)
+{
+ struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component);
+ struct wm8994 *control = wm8994->wm8994;
+
+ switch (control->type) {
+ case WM8994:
+ return wm8994_mic_detect(component, jack, data ? *(int *)data : 1);
+ case WM1811:
+ case WM8958:
+ return wm8958_mic_detect(component, jack, NULL, NULL, NULL, NULL);
+ default:
+ return -EINVAL;
+ }
+}
+
static const struct snd_soc_component_driver soc_component_dev_wm8994 = {
.probe = wm8994_component_probe,
.remove = wm8994_component_remove,
.suspend = wm8994_component_suspend,
.resume = wm8994_component_resume,
.set_bias_level = wm8994_set_bias_level,
+ .set_jack = wm8994_set_jack,
.idle_bias_on = 1,
.use_pmdown_time = 1,
.endianness = 1,
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 04/12] ASoC: tegra: tegra_wm8903: Use standard callback to set jack
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (2 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 03/12] ASoC: codecs: wm8994: " Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 05/12] ASoC: tegra: tegra_wm8962: " Amadeusz Sławiński
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Use snd_soc_component_set_jack() instead of the driver-specific
wm8903_mic_detect() callback.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/tegra/tegra_wm8903.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index 91180f4cfe17..efd46d4407e6 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -93,8 +93,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
if (of_property_read_bool(card->dev->of_node, "nvidia,headset"))
shrt = SND_JACK_MICROPHONE;
- wm8903_mic_detect(component, machine->mic_jack,
- SND_JACK_MICROPHONE, shrt);
+ snd_soc_component_set_jack(component, machine->mic_jack, &shrt);
}
snd_soc_dapm_force_enable_pin(dapm, "MICBIAS");
@@ -109,7 +108,7 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_component *component = codec_dai->component;
- wm8903_mic_detect(component, NULL, 0, 0);
+ snd_soc_component_set_jack(component, NULL, NULL);
return 0;
}
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 05/12] ASoC: tegra: tegra_wm8962: Use standard callback to set jack
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (3 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 04/12] ASoC: tegra: tegra_wm8903: Use standard callback to set jack Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 06/12] ASoC: tegra: tegra_wm8994: " Amadeusz Sławiński
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Use snd_soc_component_set_jack() instead of the driver-specific
wm8962_mic_detect() callback.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/tegra/tegra_wm8962.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra_wm8962.c b/sound/soc/tegra/tegra_wm8962.c
index 31f9d9181595..1ace9261a0f3 100644
--- a/sound/soc/tegra/tegra_wm8962.c
+++ b/sound/soc/tegra/tegra_wm8962.c
@@ -89,7 +89,7 @@ static int tegra_wm8962_init(struct snd_soc_pcm_runtime *rtd)
return err;
}
- wm8962_mic_detect(component, machine->mic_jack);
+ snd_soc_component_set_jack(component, machine->mic_jack, NULL);
}
snd_soc_dapm_force_enable_pin(dapm, "MICBIAS");
@@ -104,7 +104,7 @@ static int tegra_wm8962_remove(struct snd_soc_card *card)
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_component *component = codec_dai->component;
- wm8962_mic_detect(component, NULL);
+ snd_soc_component_set_jack(component, NULL, NULL);
return 0;
}
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 06/12] ASoC: tegra: tegra_wm8994: Use standard callback to set jack
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (4 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 05/12] ASoC: tegra: tegra_wm8962: " Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 07/12] ASoC: samsung: littlemill: " Amadeusz Sławiński
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Use snd_soc_component_set_jack() instead of the driver-specific
wm8994_mic_detect() callback.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/tegra/tegra_wm8994.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra_wm8994.c b/sound/soc/tegra/tegra_wm8994.c
index 1550faeba725..11e0ad96caf4 100644
--- a/sound/soc/tegra/tegra_wm8994.c
+++ b/sound/soc/tegra/tegra_wm8994.c
@@ -98,7 +98,7 @@ static int tegra_wm8994_init(struct snd_soc_pcm_runtime *rtd)
return err;
}
- wm8994_mic_detect(component, machine->mic_jack, 1);
+ snd_soc_component_set_jack(component, machine->mic_jack, NULL);
}
return 0;
@@ -113,7 +113,7 @@ static int tegra_wm8994_remove(struct snd_soc_card *card)
struct snd_soc_component *component = codec_dai->component;
if (!machine->gpiod_mic_det && machine->asoc->add_mic_jack)
- wm8994_mic_detect(component, NULL, 1);
+ snd_soc_component_set_jack(component, NULL, NULL);
return 0;
}
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 07/12] ASoC: samsung: littlemill: Use standard callback to set jack
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (5 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 06/12] ASoC: tegra: tegra_wm8994: " Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 08/12] ASoC: samsung: midas_wm1811: " Amadeusz Sławiński
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Use snd_soc_component_set_jack() instead of driver-specific
wm8958_mic_detect() and wm8994_mic_detect() callbacks.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/samsung/littlemill.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/samsung/littlemill.c b/sound/soc/samsung/littlemill.c
index d0d1b1ee326e..fca2e18877f2 100644
--- a/sound/soc/samsung/littlemill.c
+++ b/sound/soc/samsung/littlemill.c
@@ -302,11 +302,7 @@ static int littlemill_late_probe(struct snd_soc_card *card)
if (ret)
return ret;
- /* This will check device compatibility itself */
- wm8958_mic_detect(component, &littlemill_headset, NULL, NULL, NULL, NULL);
-
- /* As will this */
- wm8994_mic_detect(component, &littlemill_headset, 1);
+ snd_soc_component_set_jack(component, &littlemill_headset, NULL);
return 0;
}
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 08/12] ASoC: samsung: midas_wm1811: Use standard callback to set jack
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (6 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 07/12] ASoC: samsung: littlemill: " Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 09/12] ASoC: samsung: tobermory: " Amadeusz Sławiński
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Use snd_soc_component_set_jack() instead of the driver-specific
wm8958_mic_detect() callback.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/samsung/midas_wm1811.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c
index 11466dd3539e..9f27f4cad124 100644
--- a/sound/soc/samsung/midas_wm1811.c
+++ b/sound/soc/samsung/midas_wm1811.c
@@ -425,8 +425,7 @@ static int midas_late_probe(struct snd_soc_card *card)
if (ret)
return ret;
- wm8958_mic_detect(aif1_dai->component, &priv->headset_jack,
- NULL, NULL, NULL, NULL);
+ snd_soc_component_set_jack(aif1_dai->component, &priv->headset_jack, NULL);
} else {
/* Some devices (n8000, t310) use a GPIO to detect the jack. */
ret = snd_soc_card_jack_new_pins(card, "Headset",
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 09/12] ASoC: samsung: tobermory: Use standard callback to set jack
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (7 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 08/12] ASoC: samsung: midas_wm1811: " Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 10/12] ASoC: codecs: wm8903: Make wm8903_mic_detect() static Amadeusz Sławiński
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Use snd_soc_component_set_jack() instead of the driver-specific
wm8962_mic_detect() callback.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/samsung/tobermory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/samsung/tobermory.c b/sound/soc/samsung/tobermory.c
index 5448c16199bd..2cce1aa0c5ec 100644
--- a/sound/soc/samsung/tobermory.c
+++ b/sound/soc/samsung/tobermory.c
@@ -193,7 +193,7 @@ static int tobermory_late_probe(struct snd_soc_card *card)
if (ret)
return ret;
- wm8962_mic_detect(component, &tobermory_headset);
+ snd_soc_component_set_jack(component, &tobermory_headset, NULL);
return 0;
}
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 10/12] ASoC: codecs: wm8903: Make wm8903_mic_detect() static
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (8 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 09/12] ASoC: samsung: tobermory: " Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 11/12] ASoC: codecs: wm8962: Make wm8962_mic_detect() static Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 12/12] ASoC: codecs: wm8994: Make mic detect functions static Amadeusz Sławiński
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Now that all callers have been switched to snd_soc_component_set_jack(),
make wm8903_mic_detect() static and unexport it.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/codecs/wm8903.c | 6 +++---
sound/soc/codecs/wm8903.h | 5 -----
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 25a488f589a7..9dbc295b0889 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1598,8 +1598,9 @@ static int wm8903_hw_params(struct snd_pcm_substream *substream,
* micdet_cfg in the platform data. Using this function will force on
* the microphone bias for the device.
*/
-int wm8903_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack,
- int det, int shrt)
+static int wm8903_mic_detect(struct snd_soc_component *component,
+ struct snd_soc_jack *jack,
+ int det, int shrt)
{
struct wm8903_priv *wm8903 = snd_soc_component_get_drvdata(component);
int irq_mask = WM8903_MICDET_EINT | WM8903_MICSHRT_EINT;
@@ -1636,7 +1637,6 @@ int wm8903_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *
return 0;
}
-EXPORT_SYMBOL_GPL(wm8903_mic_detect);
static int wm8903_set_jack(struct snd_soc_component *component,
struct snd_soc_jack *jack, void *data)
diff --git a/sound/soc/codecs/wm8903.h b/sound/soc/codecs/wm8903.h
index 4b036f4b755e..2526d0c69029 100644
--- a/sound/soc/codecs/wm8903.h
+++ b/sound/soc/codecs/wm8903.h
@@ -11,11 +11,6 @@
#include <linux/i2c.h>
-extern int wm8903_mic_detect(struct snd_soc_component *component,
- struct snd_soc_jack *jack,
- int det, int shrt);
-
-
/*
* Register values.
*/
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 11/12] ASoC: codecs: wm8962: Make wm8962_mic_detect() static
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (9 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 10/12] ASoC: codecs: wm8903: Make wm8903_mic_detect() static Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
2026-10-26 20:19 ` [PATCH 12/12] ASoC: codecs: wm8994: Make mic detect functions static Amadeusz Sławiński
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Now that all callers have been switched to snd_soc_component_set_jack(),
make wm8962_mic_detect() static and unexport it.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/codecs/wm8962.c | 3 +--
sound/soc/codecs/wm8962.h | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index b36e73fabbdd..31c9080cd814 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3244,7 +3244,7 @@ static irqreturn_t wm8962_irq(int irq, void *data)
*
* If no jack is supplied detection will be disabled.
*/
-int wm8962_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack)
+static int wm8962_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack)
{
struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
@@ -3282,7 +3282,6 @@ int wm8962_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *
return 0;
}
-EXPORT_SYMBOL_GPL(wm8962_mic_detect);
static int beep_rates[] = {
500, 1000, 2000, 4000,
diff --git a/sound/soc/codecs/wm8962.h b/sound/soc/codecs/wm8962.h
index e7f4a70ab8a4..f7e886978a50 100644
--- a/sound/soc/codecs/wm8962.h
+++ b/sound/soc/codecs/wm8962.h
@@ -3776,6 +3776,4 @@
#define WM8962_VSS_ENA_SHIFT 0 /* VSS_ENA */
#define WM8962_VSS_ENA_WIDTH 1 /* VSS_ENA */
-int wm8962_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack);
-
#endif
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 12/12] ASoC: codecs: wm8994: Make mic detect functions static
2026-10-26 20:19 [PATCH 00/12] ASoC: Convert last few codecs to set_jack Amadeusz Sławiński
` (10 preceding siblings ...)
2026-10-26 20:19 ` [PATCH 11/12] ASoC: codecs: wm8962: Make wm8962_mic_detect() static Amadeusz Sławiński
@ 2026-10-26 20:19 ` Amadeusz Sławiński
11 siblings, 0 replies; 13+ messages in thread
From: Amadeusz Sławiński @ 2026-10-26 20:19 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, patches, linux-tegra, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Sylwester Nawrocki, Thierry Reding,
Jonathan Hunter, Amadeusz Sławiński
Now that all callers have been switched to snd_soc_component_set_jack(),
make wm8994_mic_detect() and wm8958_mic_detect() static and unexport
them.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
sound/soc/codecs/wm8994.c | 12 +++++-------
sound/soc/codecs/wm8994.h | 6 ------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 69afba1764eb..43b5a05253d4 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3540,8 +3540,8 @@ static void wm8994_handle_pdata(struct wm8994_priv *wm8994)
* Configuration of detection levels is available via the micbias1_lvl
* and micbias2_lvl platform data members.
*/
-int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack,
- int micbias)
+static int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack,
+ int micbias)
{
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component);
@@ -3608,7 +3608,6 @@ int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *
return 0;
}
-EXPORT_SYMBOL_GPL(wm8994_mic_detect);
static void wm8994_mic_work(struct work_struct *work)
{
@@ -3959,9 +3958,9 @@ static void wm1811_jackdet_bootstrap(struct work_struct *work)
* flexiblity a callback is provided which allows a completely custom
* detection algorithm.
*/
-int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack,
- wm1811_micdet_cb det_cb, void *det_cb_data,
- wm1811_mic_id_cb id_cb, void *id_cb_data)
+static int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack,
+ wm1811_micdet_cb det_cb, void *det_cb_data,
+ wm1811_mic_id_cb id_cb, void *id_cb_data)
{
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component);
@@ -4050,7 +4049,6 @@ int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *
return 0;
}
-EXPORT_SYMBOL_GPL(wm8958_mic_detect);
static void wm8958_mic_work(struct work_struct *work)
{
diff --git a/sound/soc/codecs/wm8994.h b/sound/soc/codecs/wm8994.h
index e7df0a1a2314..7ed5f5e50fc0 100644
--- a/sound/soc/codecs/wm8994.h
+++ b/sound/soc/codecs/wm8994.h
@@ -47,12 +47,6 @@ enum wm8994_vmid_mode {
typedef void (*wm1811_micdet_cb)(void *data);
typedef void (*wm1811_mic_id_cb)(void *data, u16 status);
-int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack,
- int micbias);
-int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack,
- wm1811_micdet_cb det_cb, void *det_cb_data,
- wm1811_mic_id_cb id_cb, void *id_cb_data);
-
int wm8994_vmid_mode(struct snd_soc_component *component, enum wm8994_vmid_mode mode);
int wm8958_aif_ev(struct snd_soc_dapm_widget *w,
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread