aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8993.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2010-11-13 20:40:44 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-15 15:24:58 +0000
commitead9b9199c09653dd9b889933c7af75f020c7286 (patch)
tree54ea7e4e8b8954236387f1131a9a09e305704c46 /sound/soc/codecs/wm8993.c
parent6ccd744123679c1f19fb6e414e3df717d9ed57f6 (diff)
downloadkernel_samsung_aries-ead9b9199c09653dd9b889933c7af75f020c7286.zip
kernel_samsung_aries-ead9b9199c09653dd9b889933c7af75f020c7286.tar.gz
kernel_samsung_aries-ead9b9199c09653dd9b889933c7af75f020c7286.tar.bz2
ASoC: Add optional name_prefix for codec kcontrol, widget and route names
There is a need to prefix codec kcontrol, widget and internal route names in an ASoC machine that has multiple codecs with conflicting names. The name collision would occur when codec drivers try to registering kcontrols with the same name or when building audio paths. This patch introduces optional prefix_map into struct snd_soc_card. With it machine drivers can specify a unique name prefix to each codec that have conflicting names with anothers. Prefix to codec is matched with codec name. Following example illustrates a machine that has two same codec instances. Name collision from kcontrol registration is avoided by specifying a name prefix "foo" for the second codec. As the codec widget names are prefixed then second audio map for that codec shows a prefixed widget name. static const struct snd_soc_dapm_route map0[] = { {"Spk", NULL, "MONO"}, }; static const struct snd_soc_dapm_route map1[] = { {"Vibra", NULL, "foo MONO"}, }; static struct snd_soc_prefix_map codec_prefix[] = { { .dev_name = "codec.2", .name_prefix = "foo", }, }; static struct snd_soc_card card = { ... .prefix_map = codec_prefix, .num_prefixes = ARRAY_SIZE(codec_prefix), }; Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8993.c')
0 files changed, 0 insertions, 0 deletions