Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: sn624x: honor ACPI DisCo when MIC SDCA function is absent
@ 2026-11-17  1:35 Qianghua Wang
  2026-11-17  1:51 ` sashiko-bot
  2026-11-17  2:46 ` [PATCH v2] ASoC: sn624x: skip DMIC when ACPI DisCo has no MIC function Qianghua Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Qianghua Wang @ 2026-11-17  1:35 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-sound, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Cezary Rojewski, Peter Ujfalusi, Bard Liao, Kai Vehmanen,
	Pierre-Louis Bossart, Qianghua Wang

Some laptops ship ACPI _DSD DisCo for Senary SN624x with jack and
speaker amp SDCA functions only, omitting the MIC array function even
though the codec might otherwise expose a DMIC. The driver always
advertised the DMIC capture port and ran DMIC function init against
registers not described in DisCo, which breaks bring-up on platforms
that use a minimal function list (for example some Panther Lake
designs).

Look at the parsed DisCo function list before exposing the DMIC port
and before running DMIC init. Apply AMP function init from the ACPI
init tables when an amp function is present, using the same pattern as
the jack and DMIC paths.

Link: https://github.com/thesofproject/linux/issues/6012
Signed-off-by: Qianghua Wang <qianghua.wang@senarytech.com>
---
 sound/soc/codecs/sn624x-sdca-sdw.c | 96 ++++++++++++++++++++++++++++--
 1 file changed, 92 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/sn624x-sdca-sdw.c b/sound/soc/codecs/sn624x-sdca-sdw.c
index 1d4e5f27a..f201ff38c 100644
--- a/sound/soc/codecs/sn624x-sdca-sdw.c
+++ b/sound/soc/codecs/sn624x-sdca-sdw.c
@@ -176,6 +176,9 @@ static int sn624x_uaj_ge35_apply_detected_mode(struct device *dev,
 	SDW_SDCA_CTL(SN624X_FUNC_NUM_MIC_ARRAY, SN624X_SDCA_ENT_ENTITY0, \
 		     SN624X_SDCA_CTL_FUNCTION_STATUS, 0)
 
+#define SN624X_REG_AMP_FUN_STATUS_CTL \
+	SDW_SDCA_CTL(SN624X_FUNC_NUM_SPEAKER_AMP, SN624X_SDCA_ENT_ENTITY0, \
+		     SN624X_SDCA_CTL_FUNCTION_STATUS, 0)
 /*
  * Write REQUESTED_PS then poll ACTUAL_PS with the shared SDCA helper
  * (sdca_asoc_pde_poll_actual_ps). Caller must not hand-roll ACTUAL_PS waits.
@@ -1055,6 +1058,43 @@ static int sn624x_dmic_apply_defaults(struct device *dev,
 	return sn624x_dmic_oem_fallback_init(dev, sn624x);
 }
 
+static bool sn624x_sdca_disco_has_mic(const struct sdw_slave *slave)
+{
+	int i;
+
+	if (!slave->sdca_data.interface_revision || !slave->sdca_data.num_functions)
+		return false;
+	for (i = 0; i < slave->sdca_data.num_functions; i++) {
+		const struct sdca_function_desc *desc = &slave->sdca_data.function[i];
+
+		if (desc->adr == SN624X_FUNC_NUM_MIC_ARRAY)
+			return true;
+		switch (desc->type) {
+		case SDCA_FUNCTION_TYPE_SMART_MIC:
+		case SDCA_FUNCTION_TYPE_SIMPLE_MIC:
+			return true;
+		default:
+			break;
+		}
+	}
+	return false;
+}
+
+static int sn624x_amp_apply_defaults(struct device *dev,
+				     struct sn624x_sdca_priv *sn624x)
+{
+	int ret;
+
+	if (!sn624x || !sn624x->regmap || !sn624x->slave)
+		return -ENODEV;
+	if (!sn624x->amp_func)
+		return -ENOENT;
+	ret = sn624x_write_sdca_init_table(dev, sn624x, sn624x->amp_func, "amp");
+	if (ret == 0)
+		usleep_range(1000, 1500);
+	return ret;
+}
+
 static int sn624x_sdca_jack_function_init(struct device *dev,
 					  struct sn624x_sdca_priv *sn624x)
 {
@@ -1088,11 +1128,18 @@ static int sn624x_sdca_jack_function_init(struct device *dev,
 static int sn624x_sdca_dmic_function_init(struct device *dev,
 					  struct sn624x_sdca_priv *sn624x)
 {
+	struct sdw_slave *slave = sn624x->slave;
 	unsigned int dmic_func_status;
 	const struct reg_sequence clear_status =
 		REG_SEQ0(SN624X_REG_DMIC_FUN_STATUS_CTL, 0x61);
 	int ret;
 
+	if (!sn624x_sdca_disco_has_mic(slave)) {
+		dev_dbg(dev,
+			"sn624x: no MIC SDCA function in ACPI DisCo, skip DMIC init\n");
+		return 0;
+	}
+
 	ret = regmap_read_bypassed(sn624x->regmap,
 				   SN624X_REG_DMIC_FUN_STATUS_CTL,
 				   &dmic_func_status);
@@ -1104,6 +1151,40 @@ static int sn624x_sdca_dmic_function_init(struct device *dev,
 		return 0;
 
 	ret = sn624x_dmic_apply_defaults(dev, sn624x);
+	if (ret < 0)
+		return ret;
+	ret = regmap_multi_reg_write_bypassed(sn624x->regmap, &clear_status, 1);
+	if (ret < 0)
+		return ret;
+	usleep_range(1000, 1500);
+	return 0;
+}
+
+static int sn624x_sdca_amp_function_init(struct device *dev,
+					 struct sn624x_sdca_priv *sn624x)
+{
+	unsigned int amp_func_status;
+	const struct reg_sequence clear_status =
+		REG_SEQ0(SN624X_REG_AMP_FUN_STATUS_CTL, 0x61);
+	int ret;
+
+	if (!sn624x->amp_func)
+		return 0;
+	ret = regmap_read_bypassed(sn624x->regmap,
+				   SN624X_REG_AMP_FUN_STATUS_CTL,
+				   &amp_func_status);
+	if (ret < 0)
+		return ret;
+	if (!(amp_func_status & (SN624X_JACK_FUN_NEEDS_INIT |
+				 SN624X_JACK_FUN_HAS_BEEN_RESET))) {
+		if (!sn624x->first_hw_init && sn624x->amp_func->num_init_table)
+			dev_dbg(dev,
+				"sn624x: amp FUN STATUS 0x%x, apply ACPI init table anyway\n",
+				amp_func_status);
+		else
+			return 0;
+	}
+	ret = sn624x_amp_apply_defaults(dev, sn624x);
 	if (ret < 0)
 		return ret;
 
@@ -1161,6 +1242,11 @@ static int sn624x_sdca_io_init(struct device *dev, struct sdw_slave *slave)
 		dev_err(dev, "sn624x: jack function init failed (%d)\n", ret);
 		goto err;
 	}
+	ret = sn624x_sdca_amp_function_init(dev, sn624x);
+	if (ret < 0) {
+		dev_err(dev, "sn624x: amp function init failed (%d)\n", ret);
+		goto err;
+	}
 
 	ret = sn624x_sdca_dmic_function_init(dev, sn624x);
 	if (ret < 0) {
@@ -1253,8 +1339,9 @@ static int sn624x_sdca_read_prop(struct sdw_slave *slave)
 	prop->use_domain_irq = true;
 	prop->wake_capable = true;
 
-	prop->source_ports = BIT(SN624X_PORT_JACK_CAPTURE) |
-			     BIT(SN624X_PORT_DMIC_CAPTURE);
+	prop->source_ports = BIT(SN624X_PORT_JACK_CAPTURE);
+	if (sn624x_sdca_disco_has_mic(slave))
+		prop->source_ports |= BIT(SN624X_PORT_DMIC_CAPTURE);
 	prop->sink_ports = BIT(SN624X_PORT_JACK_PLAYBACK) |
 			   BIT(SN624X_PORT_SPEAKER_PLAYBACK);
 
@@ -1292,8 +1379,9 @@ static int sn624x_sdca_read_prop(struct sdw_slave *slave)
 	prop->simple_clk_stop_capable = true;
 	prop->lane_control_support = true;
 	SN624X_DBG(&slave->dev,
-		   "read_prop: src_ports=0x%x sink_ports=0x%x lane irq paging\n",
-		   prop->source_ports, prop->sink_ports);
+		   "read_prop: src_ports=0x%x sink_ports=0x%x mic_disco=%d lane irq paging\n",
+		   prop->source_ports, prop->sink_ports,
+		   sn624x_sdca_disco_has_mic(slave));
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: sn624x: honor ACPI DisCo when MIC SDCA function is absent
  2026-11-17  1:35 [PATCH] ASoC: sn624x: honor ACPI DisCo when MIC SDCA function is absent Qianghua Wang
@ 2026-11-17  1:51 ` sashiko-bot
  2026-11-17  2:46 ` [PATCH v2] ASoC: sn624x: skip DMIC when ACPI DisCo has no MIC function Qianghua Wang
  1 sibling, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-17  1:51 UTC (permalink / raw)
  To: Qianghua Wang; +Cc: linux-sound

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] ASoC: sn624x: sn624x_sdca_amp_function_init() fails with
  -ENOENT without table
- [Medium] ASoC: sn624x: sn624x_sdca_disco_has_mic() breaks non-DisCo
  DMIC fallback
- [Medium] ASoC: sn624x: sn624x_sdca_amp_function_init() skips init
  table on re-attach
- [Low] ASoC: sn624x: missing Fixes trailer for commit 12d9c9f8679c
--

commit 153fc2fac552f6999cee2b2fc0a8d624ceaed6fb
Author: Qianghua Wang <qianghua.wang@senarytech.com>

> ASoC: sn624x: honor ACPI DisCo when MIC SDCA function is absent
>
> Some laptops ship ACPI _DSD DisCo for Senary SN624x with jack and
> speaker amp SDCA functions only, omitting the MIC array function even
> though the codec might otherwise expose a DMIC. The driver always
> advertised the DMIC capture port and ran DMIC function init against
> registers not described in DisCo, which breaks bring-up on platforms
> that use a minimal function list (for example some Panther Lake
> designs).
>
> Look at the parsed DisCo function list before exposing the DMIC port
> and before running DMIC init. Apply AMP function init from the ACPI
> init tables when an amp function is present, using the same pattern as
> the jack and DMIC paths.
>
> Link: https://github.com/thesofproject/linux/issues/6012
> Signed-off-by: Qianghua Wang <qianghua.wang@senarytech.com>

[Severity: Low]
Since this fixes bring-up on platforms with a minimal DisCo function list
and wires up speaker amp initialization, should it include a Fixes tag?

  Fixes: 12d9c9f8679c ("ASoC: codecs: add SN624x SDCA SoundWire driver")

> diff --git a/sound/soc/codecs/sn624x-sdca-sdw.c b/sound/soc/codecs/sn624x-sdca-sdw.c
> index 081858689430c..49efa429b4268 100644
> --- a/sound/soc/codecs/sn624x-sdca-sdw.c
> +++ b/sound/soc/codecs/sn624x-sdca-sdw.c
[ ... ]
> @@ -1055,6 +1058,43 @@ static int sn624x_dmic_apply_defaults(struct device *dev,
>  	return sn624x_dmic_oem_fallback_init(dev, sn624x);
>  }
>  
> +static bool sn624x_sdca_disco_has_mic(const struct sdw_slave *slave)
> +{
> +	int i;
> +
> +	if (!slave->sdca_data.interface_revision || !slave->sdca_data.num_functions)
> +		return false;

[Severity: Medium]
Does returning false when SDCA DisCo properties are absent break the
non-DisCo DMIC fallback?

When slave->sdca_data.interface_revision is 0, is_sdca_endpoint_present()
in sound/soc/sdw_utils/soc_sdw_utils.c returns 1, so the machine driver
still creates the sn624x-sdca-aif3 DMIC capture DAI link.  However, with
sn624x_sdca_disco_has_mic() returning false, sn624x_sdca_read_prop() omits
SN624X_PORT_DMIC_CAPTURE from prop->source_ports and
sn624x_sdca_dmic_function_init() skips sn624x_dmic_oem_fallback_init(),
causing PCM hw_params on that DAI link to fail with -EINVAL in
sdw_slave_port_config().

> +	for (i = 0; i < slave->sdca_data.num_functions; i++) {
> +		const struct sdca_function_desc *desc = &slave->sdca_data.function[i];
> +
> +		if (desc->adr == SN624X_FUNC_NUM_MIC_ARRAY)
> +			return true;
> +		switch (desc->type) {
> +		case SDCA_FUNCTION_TYPE_SMART_MIC:
> +		case SDCA_FUNCTION_TYPE_SIMPLE_MIC:
> +			return true;
> +		default:
> +			break;
> +		}
> +	}
> +	return false;
> +}
> +
> +static int sn624x_amp_apply_defaults(struct device *dev,
> +				     struct sn624x_sdca_priv *sn624x)
> +{
> +	int ret;
> +
> +	if (!sn624x || !sn624x->regmap || !sn624x->slave)
> +		return -ENODEV;
> +	if (!sn624x->amp_func)
> +		return -ENOENT;
> +	ret = sn624x_write_sdca_init_table(dev, sn624x, sn624x->amp_func, "amp");
> +	if (ret == 0)
> +		usleep_range(1000, 1500);
> +	return ret;
> +}
[ ... ]
> @@ -1104,6 +1151,40 @@ static int sn624x_sdca_dmic_function_init(struct device *dev,
>  		return 0;
>  
>  	ret = sn624x_dmic_apply_defaults(dev, sn624x);
> +	if (ret < 0)
> +		return ret;
> +	ret = regmap_multi_reg_write_bypassed(sn624x->regmap, &clear_status, 1);
> +	if (ret < 0)
> +		return ret;
> +	usleep_range(1000, 1500);
> +	return 0;
> +}
> +
> +static int sn624x_sdca_amp_function_init(struct device *dev,
> +					 struct sn624x_sdca_priv *sn624x)
> +{
> +	unsigned int amp_func_status;
> +	const struct reg_sequence clear_status =
> +		REG_SEQ0(SN624X_REG_AMP_FUN_STATUS_CTL, 0x61);
> +	int ret;
> +
> +	if (!sn624x->amp_func)
> +		return 0;
> +	ret = regmap_read_bypassed(sn624x->regmap,
> +				   SN624X_REG_AMP_FUN_STATUS_CTL,
> +				   &amp_func_status);
> +	if (ret < 0)
> +		return ret;
> +	if (!(amp_func_status & (SN624X_JACK_FUN_NEEDS_INIT |
> +				 SN624X_JACK_FUN_HAS_BEEN_RESET))) {
> +		if (!sn624x->first_hw_init && sn624x->amp_func->num_init_table)
> +			dev_dbg(dev,
> +				"sn624x: amp FUN STATUS 0x%x, apply ACPI init table anyway\n",
> +				amp_func_status);
> +		else
> +			return 0;
> +	}

[Severity: Medium]
Does gating this fallback on !sn624x->first_hw_init skip re-applying the
amp ACPI initialization table on re-attach after bus reset or suspend?

When the slave transitions through SDW_SLAVE_UNATTACHED,
sn624x_sdca_update_status() clears sn624x->hw_init while
sn624x->first_hw_init stays true.  On re-attachment, if amp_func_status
still does not assert NEEDS_INIT or HAS_BEEN_RESET,
sn624x_sdca_amp_function_init() returns 0 without running the init table,
and vendor registers in that table are not restored by regcache_sync()
because sn624x_sdca_volatile_register() marks !SDW_SDCA_VALID_CTL(reg)
registers as volatile.

> +	ret = sn624x_amp_apply_defaults(dev, sn624x);
> +	if (ret < 0)
> +		return ret;

[Severity: High]
Can sn624x_sdca_amp_function_init() fail with -ENOENT and abort codec
bring-up when the ACPI amp function omits
mipi-sdca-function-initialization-table?

find_sdca_init_table() treats that property as optional, so
sdca_parse_function() succeeds and sets sn624x->amp_func with
num_init_table == 0.  When amp_func_status has SN624X_JACK_FUN_NEEDS_INIT
or SN624X_JACK_FUN_HAS_BEEN_RESET set, execution reaches
sn624x_amp_apply_defaults() -> sn624x_write_sdca_init_table(), which
returns -ENOENT on !fn->num_init_table; unlike the jack and DMIC paths,
sn624x_amp_apply_defaults() has no OEM fallback, so sn624x_sdca_io_init()
aborts before clearing the status register or initializing DMIC.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117013558.1790310-1-qianghua.wang@senarytech.com?part=1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ASoC: sn624x: skip DMIC when ACPI DisCo has no MIC function
  2026-11-17  1:35 [PATCH] ASoC: sn624x: honor ACPI DisCo when MIC SDCA function is absent Qianghua Wang
  2026-11-17  1:51 ` sashiko-bot
@ 2026-11-17  2:46 ` Qianghua Wang
  2026-11-17  3:02   ` sashiko-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Qianghua Wang @ 2026-11-17  2:46 UTC (permalink / raw)
  To: linux-sound; +Cc: broonie, lgirdwood, bo.liu

Some OEM platforms, such as certain Samsung designs, use Senary SN624x
for headset jack and speaker playback only: ACPI _DSD DisCo describes
jack and speaker amp SDCA functions but omits the MIC array function
because no on-board DMIC is routed to the codec. The driver still
advertised the DMIC capture port and ran DMIC function init against
registers that DisCo does not expose, which breaks bring-up on these
machines.

Probe the parsed DisCo function list before exposing the DMIC port and
before running DMIC init. Apply AMP function init from the ACPI init
tables when an amp function is present, using the same pattern as the
existing jack and DMIC paths.

Only omit DMIC when DisCo is present but lists no MIC function, so
platforms without DisCo still use the OEM DMIC fallback. Do not fail amp
init when there is no ACPI init table. Re-apply amp init tables after
re-attach when FUN STATUS is idle but DisCo still supplies a table.

Fixes: 12d9c9f8679c
Signed-off-by: Qianghua Wang <qianghua.wang@senarytech.com>
---
Changes in v2:
- Address Sashiko review (amp -ENOENT, DisCo vs no-DisCo DMIC, re-attach amp).
- Add Fixes: 12d9c9f8679c.

 sound/soc/codecs/sn624x-sdca-sdw.c | 101 +++++++++++++++++++++++++++--
 1 file changed, 97 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/sn624x-sdca-sdw.c b/sound/soc/codecs/sn624x-sdca-sdw.c
index 1d4e5f27a..8959b447f 100644
--- a/sound/soc/codecs/sn624x-sdca-sdw.c
+++ b/sound/soc/codecs/sn624x-sdca-sdw.c
@@ -176,6 +176,9 @@ static int sn624x_uaj_ge35_apply_detected_mode(struct device *dev,
 	SDW_SDCA_CTL(SN624X_FUNC_NUM_MIC_ARRAY, SN624X_SDCA_ENT_ENTITY0, \
 		     SN624X_SDCA_CTL_FUNCTION_STATUS, 0)
 
+#define SN624X_REG_AMP_FUN_STATUS_CTL \
+	SDW_SDCA_CTL(SN624X_FUNC_NUM_SPEAKER_AMP, SN624X_SDCA_ENT_ENTITY0, \
+		     SN624X_SDCA_CTL_FUNCTION_STATUS, 0)
 /*
  * Write REQUESTED_PS then poll ACTUAL_PS with the shared SDCA helper
  * (sdca_asoc_pde_poll_actual_ps). Caller must not hand-roll ACTUAL_PS waits.
@@ -1055,6 +1058,49 @@ static int sn624x_dmic_apply_defaults(struct device *dev,
 	return sn624x_dmic_oem_fallback_init(dev, sn624x);
 }
 
+/*
+ * Return true only when ACPI DisCo is present and lists no MIC function.
+ * Without DisCo, return false so the legacy OEM fallback path still runs.
+ */
+static bool sn624x_sdca_disco_omits_mic(const struct sdw_slave *slave)
+{
+	int i;
+
+	if (!slave->sdca_data.interface_revision || !slave->sdca_data.num_functions)
+		return false;
+	for (i = 0; i < slave->sdca_data.num_functions; i++) {
+		const struct sdca_function_desc *desc = &slave->sdca_data.function[i];
+
+		if (desc->adr == SN624X_FUNC_NUM_MIC_ARRAY)
+			return false;
+		switch (desc->type) {
+		case SDCA_FUNCTION_TYPE_SMART_MIC:
+		case SDCA_FUNCTION_TYPE_SIMPLE_MIC:
+			return false;
+		default:
+			break;
+		}
+	}
+	return true;
+}
+
+static int sn624x_amp_apply_defaults(struct device *dev,
+				     struct sn624x_sdca_priv *sn624x)
+{
+	int ret;
+
+	if (!sn624x || !sn624x->regmap || !sn624x->slave)
+		return -ENODEV;
+	if (!sn624x->amp_func)
+		return 0;
+	ret = sn624x_write_sdca_init_table(dev, sn624x, sn624x->amp_func, "amp");
+	if (ret == -ENOENT)
+		return 0;
+	if (ret == 0)
+		usleep_range(1000, 1500);
+	return ret;
+}
+
 static int sn624x_sdca_jack_function_init(struct device *dev,
 					  struct sn624x_sdca_priv *sn624x)
 {
@@ -1088,11 +1134,18 @@ static int sn624x_sdca_jack_function_init(struct device *dev,
 static int sn624x_sdca_dmic_function_init(struct device *dev,
 					  struct sn624x_sdca_priv *sn624x)
 {
+	struct sdw_slave *slave = sn624x->slave;
 	unsigned int dmic_func_status;
 	const struct reg_sequence clear_status =
 		REG_SEQ0(SN624X_REG_DMIC_FUN_STATUS_CTL, 0x61);
 	int ret;
 
+	if (sn624x_sdca_disco_omits_mic(slave)) {
+		dev_dbg(dev,
+			"sn624x: ACPI DisCo has no MIC function, skip DMIC init\n");
+		return 0;
+	}
+
 	ret = regmap_read_bypassed(sn624x->regmap,
 				   SN624X_REG_DMIC_FUN_STATUS_CTL,
 				   &dmic_func_status);
@@ -1104,6 +1157,39 @@ static int sn624x_sdca_dmic_function_init(struct device *dev,
 		return 0;
 
 	ret = sn624x_dmic_apply_defaults(dev, sn624x);
+	if (ret < 0)
+		return ret;
+	ret = regmap_multi_reg_write_bypassed(sn624x->regmap, &clear_status, 1);
+	if (ret < 0)
+		return ret;
+	usleep_range(1000, 1500);
+	return 0;
+}
+
+static int sn624x_sdca_amp_function_init(struct device *dev,
+					 struct sn624x_sdca_priv *sn624x)
+{
+	unsigned int amp_func_status;
+	const struct reg_sequence clear_status =
+		REG_SEQ0(SN624X_REG_AMP_FUN_STATUS_CTL, 0x61);
+	int ret;
+
+	if (!sn624x->amp_func)
+		return 0;
+	ret = regmap_read_bypassed(sn624x->regmap,
+				   SN624X_REG_AMP_FUN_STATUS_CTL,
+				   &amp_func_status);
+	if (ret < 0)
+		return ret;
+	if (!(amp_func_status & (SN624X_JACK_FUN_NEEDS_INIT |
+				 SN624X_JACK_FUN_HAS_BEEN_RESET))) {
+		if (!sn624x->amp_func->num_init_table)
+			return 0;
+		dev_dbg(dev,
+			"sn624x: amp FUN STATUS 0x%x, apply ACPI init table\n",
+			amp_func_status);
+	}
+	ret = sn624x_amp_apply_defaults(dev, sn624x);
 	if (ret < 0)
 		return ret;
 
@@ -1161,6 +1247,11 @@ static int sn624x_sdca_io_init(struct device *dev, struct sdw_slave *slave)
 		dev_err(dev, "sn624x: jack function init failed (%d)\n", ret);
 		goto err;
 	}
+	ret = sn624x_sdca_amp_function_init(dev, sn624x);
+	if (ret < 0) {
+		dev_err(dev, "sn624x: amp function init failed (%d)\n", ret);
+		goto err;
+	}
 
 	ret = sn624x_sdca_dmic_function_init(dev, sn624x);
 	if (ret < 0) {
@@ -1253,8 +1344,9 @@ static int sn624x_sdca_read_prop(struct sdw_slave *slave)
 	prop->use_domain_irq = true;
 	prop->wake_capable = true;
 
-	prop->source_ports = BIT(SN624X_PORT_JACK_CAPTURE) |
-			     BIT(SN624X_PORT_DMIC_CAPTURE);
+	prop->source_ports = BIT(SN624X_PORT_JACK_CAPTURE);
+	if (!sn624x_sdca_disco_omits_mic(slave))
+		prop->source_ports |= BIT(SN624X_PORT_DMIC_CAPTURE);
 	prop->sink_ports = BIT(SN624X_PORT_JACK_PLAYBACK) |
 			   BIT(SN624X_PORT_SPEAKER_PLAYBACK);
 
@@ -1292,8 +1384,9 @@ static int sn624x_sdca_read_prop(struct sdw_slave *slave)
 	prop->simple_clk_stop_capable = true;
 	prop->lane_control_support = true;
 	SN624X_DBG(&slave->dev,
-		   "read_prop: src_ports=0x%x sink_ports=0x%x lane irq paging\n",
-		   prop->source_ports, prop->sink_ports);
+		   "read_prop: src_ports=0x%x sink_ports=0x%x disco_omits_mic=%d lane irq paging\n",
+		   prop->source_ports, prop->sink_ports,
+		   sn624x_sdca_disco_omits_mic(slave));
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ASoC: sn624x: skip DMIC when ACPI DisCo has no MIC function
  2026-11-17  2:46 ` [PATCH v2] ASoC: sn624x: skip DMIC when ACPI DisCo has no MIC function Qianghua Wang
@ 2026-11-17  3:02   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-17  3:02 UTC (permalink / raw)
  To: Qianghua Wang, linux-sound

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ASoC: sn624x: missing commit subject in Fixes trailer
--

commit 64d42df811f50125a7da965ef29c56e2c45716e7
Author: Qianghua Wang <qianghua.wang@senarytech.com>

> ASoC: sn624x: skip DMIC when ACPI DisCo has no MIC function
>
> Some OEM platforms, such as certain Samsung designs, use Senary SN624x
> for headset jack and speaker playback only: ACPI _DSD DisCo describes
> jack and speaker amp SDCA functions but omits the MIC array function
> because no on-board DMIC is routed to the codec. The driver still
> advertised the DMIC capture port and ran DMIC function init against
> registers that DisCo does not expose, which breaks bring-up on these
> machines.
>
> Probe the parsed DisCo function list before exposing the DMIC port and
> before running DMIC init. Apply AMP function init from the ACPI init
> tables when an amp function is present, using the same pattern as the
> existing jack and DMIC paths.
>
> Only omit DMIC when DisCo is present but lists no MIC function, so
> platforms without DisCo still use the OEM DMIC fallback. Do not fail amp
> init when there is no ACPI init table. Re-apply amp init tables after
> re-attach when FUN STATUS is idle but DisCo still supplies a table.
>
> Fixes: 12d9c9f8679c
> Signed-off-by: Qianghua Wang <qianghua.wang@senarytech.com>

[Severity: Low]
The Fixes: trailer is missing the quoted commit subject. Should it be:

  Fixes: 12d9c9f8679c ("ASoC: codecs: add SN624x SDCA SoundWire driver")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117024623.2122935-1-qianghua.wang@senarytech.com?part=1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-17  3:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17  1:35 [PATCH] ASoC: sn624x: honor ACPI DisCo when MIC SDCA function is absent Qianghua Wang
2026-11-17  1:51 ` sashiko-bot
2026-11-17  2:46 ` [PATCH v2] ASoC: sn624x: skip DMIC when ACPI DisCo has no MIC function Qianghua Wang
2026-11-17  3:02   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox