aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-08-10 15:33:10 -0400
committerMark Brown <broonie@linaro.org>2013-08-11 07:00:27 -0400
commit9a953e6f27fd280a2af5719b77394fbb228c5b46 (patch)
treed134e15592e342b245c1b58c1fc3261f825a9334 /sound/soc/soc-core.c
parentc77f872e663e3f6ea18f774bf4399884884b4b22 (diff)
ASoC: Use snd_soc_info_enum_double() for SOC_ENUM_EXT controls
snd_soc_info_enum_ext() and snd_soc_info_enum_double() are almost identical. The only difference is that snd_soc_info_enum_double() is also able to handle stereo controls. Using snd_soc_info_enum double() instead of snd_soc_info_enum_ext() for the SOC_ENUM_EXT control's info callback allows us to remove snd_soc_info_enum_ext(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6ba5f7c23d3a..f46472d50c9b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2551,33 +2551,6 @@ int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol,
2551EXPORT_SYMBOL_GPL(snd_soc_put_value_enum_double); 2551EXPORT_SYMBOL_GPL(snd_soc_put_value_enum_double);
2552 2552
2553/** 2553/**
2554 * snd_soc_info_enum_ext - external enumerated single mixer info callback
2555 * @kcontrol: mixer control
2556 * @uinfo: control element information
2557 *
2558 * Callback to provide information about an external enumerated
2559 * single mixer.
2560 *
2561 * Returns 0 for success.
2562 */
2563int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol,
2564 struct snd_ctl_elem_info *uinfo)
2565{
2566 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
2567
2568 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
2569 uinfo->count = 1;
2570 uinfo->value.enumerated.items = e->max;
2571
2572 if (uinfo->value.enumerated.item > e->max - 1)
2573 uinfo->value.enumerated.item = e->max - 1;
2574 strcpy(uinfo->value.enumerated.name,
2575 e->texts[uinfo->value.enumerated.item]);
2576 return 0;
2577}
2578EXPORT_SYMBOL_GPL(snd_soc_info_enum_ext);
2579
2580/**
2581 * snd_soc_info_volsw - single mixer info callback 2554 * snd_soc_info_volsw - single mixer info callback
2582 * @kcontrol: mixer control 2555 * @kcontrol: mixer control
2583 * @uinfo: control element information 2556 * @uinfo: control element information