summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-10-03 17:57:09 +0200
committerMark Brown <broonie@kernel.org>2023-10-09 14:03:28 +0200
commit76aca10ccb7c23a7b7a0d56e0bfde2c8cdddfe24 (patch)
treeda988ba6923cbd0a428b9b4e7d9d1ab2b995f3b5 /include/sound
parentASoC: dt-bindings: fsl,micfil: Document #sound-dai-cells (diff)
downloadlinux-76aca10ccb7c23a7b7a0d56e0bfde2c8cdddfe24.tar.xz
linux-76aca10ccb7c23a7b7a0d56e0bfde2c8cdddfe24.zip
ASoC: soc-dapm: Add helper for comparing widget name
Some drivers use one event callback for multiple widgets but still need to perform a bit different actions based on actual widget. This is done by comparing widget name, however drivers tend to miss possible name prefix. Add a helper to solve common mistakes. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231003155710.821315-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index d2faec9a323e..433543eb82b9 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -469,6 +469,7 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card);
int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai);
+int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s);
/* dapm path setup */
int snd_soc_dapm_new_widgets(struct snd_soc_card *card);