kernel-hacking-2024-linux-s.../include/sound
Jarkko Nikula ead9b9199c 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>
2010-11-15 15:24:58 +00:00
..
ac97_codec.h
aci.h
ad1816a.h
ad1843.h
ak4xxx-adda.h
ak4113.h
ak4114.h
ak4117.h
ak4531_codec.h
alc5623.h ASoC: add support for alc562[123] codecs 2010-10-21 13:51:13 -07:00
asequencer.h
asound.h ALSA: pcm: Define G723 3-bit and 5-bit formats 2010-05-31 09:10:03 +02:00
asound_fm.h
asoundef.h
atmel-abdac.h
atmel-ac97c.h
control.h
core.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-10-25 08:32:05 -07:00
cs46xx.h
cs46xx_dsp_scb_types.h
cs46xx_dsp_spos.h
cs46xx_dsp_task_types.h
cs4231-regs.h
cs8403.h
cs8427.h
emu10k1.h ALSA: emu10k1: Fix warning: "CCR" redefined 2010-10-18 07:45:44 +02:00
emu10k1_synth.h
emu8000.h
emu8000_reg.h
emux_legacy.h
emux_synth.h
es1688.h ALSA: Merge es1688 and es968 drivers 2010-05-10 09:49:30 +02:00
gus.h
hda_hwdep.h
hdsp.h
hdspm.h
hwdep.h
i2c.h
info.h ALSA: info - Use standard types for info callbacks 2010-04-13 11:57:14 +02:00
initval.h
jack.h ALSA: Add more jack button slots 2010-09-07 08:04:38 +02:00
Kbuild include: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
l3.h
max98088.h ASoC: Restore MAX98088 CODEC driver 2010-10-18 16:46:27 -07:00
memalloc.h
minors.h
mixer_oss.h
mpu401.h
opl3.h
opl4.h
pcm-indirect.h
pcm.h ALSA: pcm midlevel code - add time check for double interrupt acknowledge 2010-08-18 15:18:02 +02:00
pcm_oss.h
pcm_params.h
pt2258.h
pxa2xx-lib.h
rawmidi.h
s3c24xx_uda134x.h
sb.h
sb16_csp.h
seq_device.h
seq_kernel.h
seq_midi_emul.h
seq_midi_event.h
seq_oss.h
seq_oss_legacy.h
seq_virmidi.h
sfnt_info.h
sh_dac_audio.h
sh_fsi.h ASoC: fsi: modify compile error 2010-08-31 13:28:13 +01:00
snd_wavefront.h
soc-dai.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
soc-dapm.h ASoC: Move pop time from DAPM context to sound card 2010-11-06 11:28:35 -04:00
soc.h ASoC: Add optional name_prefix for codec kcontrol, widget and route names 2010-11-15 15:24:58 +00:00
soundfont.h
tea575x-tuner.h
tea6330t.h
timer.h
tlv.h ALSA: tlv - Define numbers in sound/tlv.h 2010-10-17 10:46:14 +02:00
tlv320aic3x.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
tlv320dac33-plat.h ASoC: tlv320dac33: Add support for automatic FIFO configuration 2010-07-29 10:21:11 +01:00
tpa6130a2-plat.h Revert "ASoC: tpa6130a2: Support for limiting gain" 2010-05-07 16:42:23 +01:00
trident.h
uda134x.h ASoC: uda134x: replace a macro with a value in platform struct. 2010-06-25 12:29:01 +01:00
uda1380.h
util_mem.h
version.h ALSA: Release v1.0.23 2010-04-16 13:12:36 +02:00
vx_core.h
wavefront.h
wm2000.h
wm8903.h
wm8904.h
wm8955.h
wm8960.h
wm8962.h ASoC: Add support for WM8962 GPIO outputs 2010-10-02 14:23:04 -07:00
wm8993.h
wm9081.h
wm9090.h ASoC: Add WM9090 amplifier driver 2010-04-30 16:12:44 +01:00
wss.h
ymfpci.h