summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-08-15 21:22:25 +0300
committerMark Brown <broonie@kernel.org>2023-08-15 21:22:25 +0300
commit6e9fd076e72a6c32fe79b1dfcff074823ff1a09a (patch)
tree5651dd9c0a25b52b655f08867606bf671b738e29 /include
parent63e041027669473ab7474c195771bc86af9685a6 (diff)
parent56ce7b791b787e0aee19601e422f13a18d4eafe7 (diff)
downloadlinux-6e9fd076e72a6c32fe79b1dfcff074823ff1a09a.tar.xz
ASoC: SOF: topology: simplify kcontrol names with
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: The use of the widget name as a prefix for the kcontrol name is quite useful in the case of multiple pipelines going to the same endpoint, but it's overkill in simpler cases. This patchset extends the existing DAPM code to drop the widget name prefix and make the kcontrol names simpler when there's no possible ambiguity, e.g. "gain.2.1 Main Playback Volume" becomes just "Main Playback Volume".
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc-dapm.h1
-rw-r--r--include/uapi/sound/sof/tokens.h6
2 files changed, 6 insertions, 1 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 2e38dff16779..d2faec9a323e 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -650,6 +650,7 @@ struct snd_soc_dapm_widget {
unsigned char power_checked:1; /* power checked this run */
unsigned char is_supply:1; /* Widget is a supply type widget */
unsigned char is_ep:2; /* Widget is a endpoint type widget */
+ unsigned char no_wname_in_kcontrol_name:1; /* No widget name prefix in kcontrol name */
int subseq; /* sort within widget type */
int (*power_check)(struct snd_soc_dapm_widget *w);
diff --git a/include/uapi/sound/sof/tokens.h b/include/uapi/sound/sof/tokens.h
index e9ec7e4eb982..453cab2a1209 100644
--- a/include/uapi/sound/sof/tokens.h
+++ b/include/uapi/sound/sof/tokens.h
@@ -99,7 +99,11 @@
#define SOF_TKN_COMP_OUTPUT_PIN_BINDING_WNAME 414
#define SOF_TKN_COMP_NUM_INPUT_AUDIO_FORMATS 415
#define SOF_TKN_COMP_NUM_OUTPUT_AUDIO_FORMATS 416
-
+/*
+ * The token value is copied to the dapm_widget's
+ * no_wname_in_kcontrol_name.
+ */
+#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417
/* SSP */
#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500