Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
	vkoul@kernel.org, lgirdwood@gmail.com,
	peter.ujfalusi@linux.intel.com, shumingf@realtek.com,
	linux-sound@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH 3/7] ASoC: SDCA: Add ASoC jack hookup in class driver
Date: Tue, 25 Nov 2025 15:21:24 +0000	[thread overview]
Message-ID: <20251125152128.274808-4-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20251125152128.274808-1-ckeepax@opensource.cirrus.com>

Add the necessary calls to the class driver to connect the ASoC jack
from the machine driver.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/sdca/sdca_class_function.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sound/soc/sdca/sdca_class_function.c b/sound/soc/sdca/sdca_class_function.c
index 0028482a1e752..416948cfb5cb9 100644
--- a/sound/soc/sdca/sdca_class_function.c
+++ b/sound/soc/sdca/sdca_class_function.c
@@ -19,6 +19,7 @@
 #include <sound/sdca_fdl.h>
 #include <sound/sdca_function.h>
 #include <sound/sdca_interrupts.h>
+#include <sound/sdca_jack.h>
 #include <sound/sdca_regmap.h>
 #include <sound/sdw.h>
 #include <sound/soc-component.h>
@@ -195,6 +196,15 @@ static int class_function_component_probe(struct snd_soc_component *component)
 	return sdca_irq_populate(drv->function, component, core->irq_info);
 }
 
+static int class_function_set_jack(struct snd_soc_component *component,
+				   struct snd_soc_jack *jack, void *d)
+{
+	struct class_function_drv *drv = snd_soc_component_get_drvdata(component);
+	struct sdca_class_drv *core = drv->core;
+
+	return sdca_jack_set_jack(core->irq_info, jack);
+}
+
 static const struct snd_soc_component_driver class_function_component_drv = {
 	.probe			= class_function_component_probe,
 	.endianness		= 1,
@@ -351,6 +361,9 @@ static int class_function_probe(struct auxiliary_device *auxdev,
 		return dev_err_probe(dev, PTR_ERR(drv->regmap),
 				     "failed to create regmap");
 
+	if (desc->type == SDCA_FUNCTION_TYPE_UAJ)
+		cmp_drv->set_jack = class_function_set_jack;
+
 	ret = sdca_asoc_populate_component(dev, drv->function, cmp_drv,
 					   &dais, &num_dais,
 					   &class_function_sdw_ops);
-- 
2.47.3


  parent reply	other threads:[~2025-11-25 15:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 15:21 [PATCH 0/7] SDCA jack and system suspend fixups Charles Keepax
2025-11-25 15:21 ` [PATCH 1/7] ASoC: SDCA: Factor out jack handling into new c file Charles Keepax
2025-12-09 12:00   ` Pierre-Louis Bossart
2025-12-10 16:31     ` Charles Keepax
2025-12-20 11:22       ` Pierre-Louis Bossart
2025-11-25 15:21 ` [PATCH 2/7] ASoC: SDCA: Add ability to connect SDCA jacks to ASoC jacks Charles Keepax
2025-11-25 15:21 ` Charles Keepax [this message]
2025-11-25 15:21 ` [PATCH 4/7] ASoC: SDCA: Add SDCA IRQ enable/disable helpers Charles Keepax
2025-12-09 12:03   ` Pierre-Louis Bossart
2025-11-25 15:21 ` [PATCH 5/7] ASoC: SDCA: Add basic system suspend support Charles Keepax
2025-12-09 12:11   ` Pierre-Louis Bossart
2025-12-10 14:43     ` Charles Keepax
2025-12-10 16:48       ` Charles Keepax
2025-12-11 10:33       ` Vinod Koul
2025-12-11 11:28         ` Charles Keepax
2025-12-20 11:31       ` Pierre-Louis Bossart
2025-11-25 15:21 ` [PATCH 6/7] ASoC: SDCA: Device boot into the system suspend process Charles Keepax
2025-12-09 12:18   ` Pierre-Louis Bossart
2025-12-11 11:59     ` Charles Keepax
2025-12-20 11:36       ` Pierre-Louis Bossart
2025-11-25 15:21 ` [PATCH 7/7] ASoC: SDCA: Add lock to serialise the Function initialisation Charles Keepax
2025-12-09 12:20   ` Pierre-Louis Bossart
2025-12-10 15:27     ` Charles Keepax
2025-12-11 10:26       ` Richard Fitzgerald
2025-12-20 11:21         ` Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251125152128.274808-4-ckeepax@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=shumingf@realtek.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox