aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-09-08 06:27:38 -0400
committerJaroslav Kysela <perex@suse.cz>2006-09-23 04:46:55 -0400
commit854b66e44260320c21ebe4b8a18e189f2e45b5be (patch)
tree2e9636686f69d9f7ab659d3afa1b7495ef6de7d8 /include
parent8f88820ee49359ea33af42845456ce9dbf54d39a (diff)
[ALSA] ak4xxx - Remove bogus IPGA controls
Remove IPGA volume controls and merge the IPGA range to ADC volume controls. These two volumes are not really independent but connected simply in different ranges 0-0x7f and 0x80-max. It doesn't make sense to provide two controls. Since both 0x7f and 0x80 specify 0dB, a hack is needed for IPGA range to skip 0x80 (increment one) for such controls. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/sound/ak4xxx-adda.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h
index 026e4072a9a1..d0deca669b92 100644
--- a/include/sound/ak4xxx-adda.h
+++ b/include/sound/ak4xxx-adda.h
@@ -48,7 +48,6 @@ struct snd_akm4xxx_dac_channel {
48/* ADC labels and channels */ 48/* ADC labels and channels */
49struct snd_akm4xxx_adc_channel { 49struct snd_akm4xxx_adc_channel {
50 char *name; /* capture gain volume label */ 50 char *name; /* capture gain volume label */
51 char *gain_name; /* IPGA */
52 char *switch_name; /* capture switch */ 51 char *switch_name; /* capture switch */
53 unsigned int num_channels; 52 unsigned int num_channels;
54}; 53};
@@ -91,13 +90,4 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak);
91#define snd_akm4xxx_set_vol(ak,chip,reg,val) \ 90#define snd_akm4xxx_set_vol(ak,chip,reg,val) \
92 ((ak)->volumes[(chip) * 16 + (reg)] = (val)) 91 ((ak)->volumes[(chip) * 16 + (reg)] = (val))
93 92
94/* Warning: IPGA is tricky - we assume the addr + 4 is unused
95 * so far, it's OK for all AK codecs with IPGA:
96 * AK4524, AK4528 and EK5365
97 */
98#define snd_akm4xxx_get_ipga(ak,chip,reg) \
99 snd_akm4xxx_get_vol(ak, chip, (reg) + 4)
100#define snd_akm4xxx_set_ipga(ak,chip,reg,val) \
101 snd_akm4xxx_set_vol(ak, chip, (reg) + 4, val)
102
103#endif /* __SOUND_AK4XXX_ADDA_H */ 93#endif /* __SOUND_AK4XXX_ADDA_H */