diff options
author | Ian Molton <ian@mnementh.co.uk> | 2009-01-06 15:11:51 -0500 |
---|---|---|
committer | Ian Molton <ian@mnementh.co.uk> | 2009-01-07 16:32:54 -0500 |
commit | ca9c1aaec4187fc9922cfb6b283fffef89286943 (patch) | |
tree | 99a4fcb97ebb759a97ef97416ab55b626dd94c03 /include/sound/soc-dapm.h | |
parent | 227b4dc6432d271eecd0ff0aefe6f0897ec47397 (diff) |
ASoC: dapm: Allow explictly named mixer controls
This patch allows you to define the mixer paths as having the same name as the
paths they represent.
This is required to support codecs such as the wm9705 neatly without extra
controls in the alsa mixer.
Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r-- | include/sound/soc-dapm.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 4af1083e3287..cc99dd404934 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -76,6 +76,11 @@ | |||
76 | wcontrols, wncontrols)\ | 76 | wcontrols, wncontrols)\ |
77 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 77 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
78 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 78 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} |
79 | #define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ | ||
80 | wcontrols, wncontrols)\ | ||
81 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | ||
82 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | ||
83 | .num_kcontrols = wncontrols} | ||
79 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ | 84 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ |
80 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 85 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
81 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} | 86 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} |
@@ -101,6 +106,11 @@ | |||
101 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 106 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
102 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 107 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ |
103 | .event = wevent, .event_flags = wflags} | 108 | .event = wevent, .event_flags = wflags} |
109 | #define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ | ||
110 | wcontrols, wncontrols, wevent, wflags) \ | ||
111 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
112 | .invert = winvert, .kcontrols = wcontrols, \ | ||
113 | .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} | ||
104 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ | 114 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ |
105 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 115 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
106 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ | 116 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ |
@@ -263,6 +273,7 @@ enum snd_soc_dapm_type { | |||
263 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ | 273 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ |
264 | snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */ | 274 | snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */ |
265 | snd_soc_dapm_mixer, /* mixes several analog signals together */ | 275 | snd_soc_dapm_mixer, /* mixes several analog signals together */ |
276 | snd_soc_dapm_mixer_named_ctl, /* mixer with named controls */ | ||
266 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ | 277 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ |
267 | snd_soc_dapm_adc, /* analog to digital converter */ | 278 | snd_soc_dapm_adc, /* analog to digital converter */ |
268 | snd_soc_dapm_dac, /* digital to analog converter */ | 279 | snd_soc_dapm_dac, /* digital to analog converter */ |