public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] ASoC: SDCA: make q78_get_volsw and q78_put_volsw extern
@ 2026-03-26 18:17 Niranjan H Y
  2026-03-26 18:17 ` [PATCH v2 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver Niranjan H Y
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Niranjan H Y @ 2026-03-26 18:17 UTC (permalink / raw)
  To: linux-sound
  Cc: linux-kernel, broonie, ckeepax, lgirdwood, perex, tiwai,
	cezary.rojewski, peter.ujfalusi, yung-chuan.liao,
	ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, baojun.xu,
	shenghao-ding, sandeepk, v-hampiholi, Niranjan H Y

 q78_get_volsw and q78_put_volsw are get and set functions
in sdca library to handle 16bit signed Q7.8 values for
Volume control. Make them extern so that ASoC drivers can
reuse them.

Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
---
v2:
- newly added patch
---
 include/sound/sdca_asoc.h  |  6 ++++++
 sound/soc/sdca/sdca_asoc.c | 10 ++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/include/sound/sdca_asoc.h b/include/sound/sdca_asoc.h
index aa9124f932189..bea885202c35a 100644
--- a/include/sound/sdca_asoc.h
+++ b/include/sound/sdca_asoc.h
@@ -13,6 +13,8 @@
 struct device;
 struct regmap;
 struct sdca_function_data;
+struct snd_ctl_elem_value;
+struct snd_kcontrol;
 struct snd_kcontrol_new;
 struct snd_pcm_hw_params;
 struct snd_pcm_substream;
@@ -57,5 +59,9 @@ int sdca_asoc_hw_params(struct device *dev, struct regmap *regmap,
 			struct snd_pcm_substream *substream,
 			struct snd_pcm_hw_params *params,
 			struct snd_soc_dai *dai);
+int q78_put_volsw(struct snd_kcontrol *kcontrol,
+		  struct snd_ctl_elem_value *ucontrol);
+int q78_get_volsw(struct snd_kcontrol *kcontrol,
+		  struct snd_ctl_elem_value *ucontrol);
 
 #endif // __SDCA_ASOC_H__
diff --git a/sound/soc/sdca/sdca_asoc.c b/sound/soc/sdca/sdca_asoc.c
index 733c9808891a4..6ea61e5c761c1 100644
--- a/sound/soc/sdca/sdca_asoc.c
+++ b/sound/soc/sdca/sdca_asoc.c
@@ -820,8 +820,8 @@ static int q78_write(struct snd_soc_component *component,
 	return snd_soc_component_update_bits(component, reg, mask, reg_val);
 }
 
-static int q78_put_volsw(struct snd_kcontrol *kcontrol,
-			 struct snd_ctl_elem_value *ucontrol)
+int q78_put_volsw(struct snd_kcontrol *kcontrol,
+		  struct snd_ctl_elem_value *ucontrol)
 {
 	struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;
 	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
@@ -841,6 +841,7 @@ static int q78_put_volsw(struct snd_kcontrol *kcontrol,
 
 	return ret;
 }
+EXPORT_SYMBOL_NS(q78_put_volsw, "SND_SOC_SDCA");
 
 static int q78_read(struct snd_soc_component *component,
 		    struct soc_mixer_control *mc, unsigned int reg)
@@ -855,8 +856,8 @@ static int q78_read(struct snd_soc_component *component,
 	return val & GENMASK(mc->sign_bit, 0);
 }
 
-static int q78_get_volsw(struct snd_kcontrol *kcontrol,
-			 struct snd_ctl_elem_value *ucontrol)
+int q78_get_volsw(struct snd_kcontrol *kcontrol,
+		  struct snd_ctl_elem_value *ucontrol)
 {
 	struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;
 	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
@@ -868,6 +869,7 @@ static int q78_get_volsw(struct snd_kcontrol *kcontrol,
 
 	return 0;
 }
+EXPORT_SYMBOL_NS(q78_get_volsw, "SND_SOC_SDCA");
 
 static int control_limit_kctl(struct device *dev,
 			      struct sdca_entity *entity,
-- 
2.34.1


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

end of thread, other threads:[~2026-03-30 11:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 18:17 [PATCH v2 1/4] ASoC: SDCA: make q78_get_volsw and q78_put_volsw extern Niranjan H Y
2026-03-26 18:17 ` [PATCH v2 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver Niranjan H Y
2026-03-27 10:48   ` Charles Keepax
2026-03-30 11:56     ` [EXTERNAL] " Holalu Yogendra, Niranjan
2026-03-26 18:17 ` [PATCH v2 3/4] ASoC: sdw_utils: TI amp utility for tac5xx2 family Niranjan H Y
2026-03-26 18:17 ` [PATCH v2 4/4] ASoC: tac5xx2-sdw: ACPI match for intel mtl platform Niranjan H Y
2026-03-27 10:49 ` [PATCH v2 1/4] ASoC: SDCA: make q78_get_volsw and q78_put_volsw extern Charles Keepax

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