summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2024-08-02 11:57:32 +0100
committerMark Brown <broonie@kernel.org>2024-08-02 14:04:39 +0100
commitc8a132e2e032b00828d51141ab34f9aeb24f44ae (patch)
tree4a5460bfaabe5c1f70c3d79798c99dadb33f9f46 /include/sound
parentbecfa08bfefa2cbb22c84d9e583e81387f2f3bf2 (diff)
downloadlinux-c8a132e2e032b00828d51141ab34f9aeb24f44ae.tar.gz
linux-c8a132e2e032b00828d51141ab34f9aeb24f44ae.tar.bz2
linux-c8a132e2e032b00828d51141ab34f9aeb24f44ae.zip
ASoC: soc-component: Add new snd_soc_component_get_kcontrol() helpers
Add new helper functions snd_soc_component_get_kcontrol() and snd_soc_component_get_kcontrol_locked() that returns a kcontrol by name, but will factor in the components name_prefix, to handle situations where multiple components are present with the same controls. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20240802105734.2309788-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-component.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index ceca69b46a82..bf2e381cd124 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -462,6 +462,11 @@ int snd_soc_component_force_enable_pin_unlocked(
const char *pin);
/* component controls */
+struct snd_kcontrol *snd_soc_component_get_kcontrol(struct snd_soc_component *component,
+ const char * const ctl);
+struct snd_kcontrol *
+snd_soc_component_get_kcontrol_locked(struct snd_soc_component *component,
+ const char * const ctl);
int snd_soc_component_notify_control(struct snd_soc_component *component,
const char * const ctl);