aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-09-24 11:23:11 +0100
committerTakashi Iwai <tiwai@suse.de>2008-10-13 02:15:42 +0200
commit5817b52a298adce69e01acf2c131b3dcfda65d64 (patch)
treef6ce8d3d9cf475c954c997626e6338906b32ca11 /sound
parent72474be62d6ec2e0337ff01ecbd737f9c5c242c7 (diff)
downloadkernel_samsung_tuna-5817b52a298adce69e01acf2c131b3dcfda65d64.zip
kernel_samsung_tuna-5817b52a298adce69e01acf2c131b3dcfda65d64.tar.gz
kernel_samsung_tuna-5817b52a298adce69e01acf2c131b3dcfda65d64.tar.bz2
ALSA: ASoC: Allow machine drivers to mark pins as not connected
Add a new API call snd_soc_dapm_nc_pin() which allows machine drivers to mark pins as being permanently disabled. At present this is identical to snd_soc_dapm_disable_pin() except in terms of improving the internal documentation of machine drivers that use it. The intention is that in future it will be extended to provide additional features such as hiding controls that are only relevant to paths using the disconnected pin. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 9ca9c08..83fa9c4 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1484,6 +1484,26 @@ int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin)
EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
/**
+ * snd_soc_dapm_nc_pin - permanently disable pin.
+ * @codec: SoC codec
+ * @pin: pin name
+ *
+ * Marks the specified pin as being not connected, disabling it along
+ * any parent or child widgets. At present this is identical to
+ * snd_soc_dapm_disable_pin() but in future it will be extended to do
+ * additional things such as disabling controls which only affect
+ * paths through the pin.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, char *pin)
+{
+ return snd_soc_dapm_set_pin(codec, pin, 0);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin);
+
+/**
* snd_soc_dapm_get_pin_status - get audio pin status
* @codec: audio codec
* @pin: audio signal pin endpoint (or start point)