summaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/revo.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-08-30 16:49:54 +0200
committerJaroslav Kysela <perex@suse.cz>2006-09-23 10:45:08 +0200
commit723b2b0d36fa7cea81a962af2d40d88520d5a5f1 (patch)
tree0020b109e0792aba552c99cff7b6576b81a5c2b6 /sound/pci/ice1712/revo.c
parentd0ae48471570c680333cbe28c143bbab887a4ec2 (diff)
downloadop-kernel-dev-723b2b0d36fa7cea81a962af2d40d88520d5a5f1.zip
op-kernel-dev-723b2b0d36fa7cea81a962af2d40d88520d5a5f1.tar.gz
[ALSA] Clean up and add TLV support to AK4xxx i2c driver
- Clean up the code in AK4xxx-ADDA i2c code. - Fix capture gain controls for AK5365 - Changed the static table for DAC/ADC mixer labels to use structs - Implemented TLV entries for each AK codec The volumes in AK4524, AK4528 and AK5365 are corrected with a table to be suitable for dB conversion. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ice1712/revo.c')
-rw-r--r--sound/pci/ice1712/revo.c47
1 files changed, 29 insertions, 18 deletions
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c
index 1134a57..c9eefa9 100644
--- a/sound/pci/ice1712/revo.c
+++ b/sound/pci/ice1712/revo.c
@@ -87,19 +87,34 @@ static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
* initialize the chips on M-Audio Revolution cards
*/
-static unsigned int revo71_num_stereo_front[] = {2};
-static char *revo71_channel_names_front[] = {"PCM Playback Volume"};
+#define AK_DAC(xname,xch) { .name = xname, .num_channels = xch }
-static unsigned int revo71_num_stereo_surround[] = {1, 1, 2, 2};
-static char *revo71_channel_names_surround[] = {"PCM Center Playback Volume", "PCM LFE Playback Volume",
- "PCM Side Playback Volume", "PCM Rear Playback Volume"};
+static struct snd_akm4xxx_dac_channel revo71_front[] = {
+ AK_DAC("PCM Playback Volume", 2)
+};
+
+static struct snd_akm4xxx_dac_channel revo71_surround[] = {
+ AK_DAC("PCM Center Playback Volume", 1),
+ AK_DAC("PCM LFE Playback Volume", 1),
+ AK_DAC("PCM Side Playback Volume", 2),
+ AK_DAC("PCM Rear Playback Volume", 2),
+};
-static unsigned int revo51_num_stereo[] = {2, 1, 1, 2};
-static char *revo51_channel_names[] = {"PCM Playback Volume", "PCM Center Playback Volume",
- "PCM LFE Playback Volume", "PCM Rear Playback Volume"};
+static struct snd_akm4xxx_dac_channel revo51_dac[] = {
+ AK_DAC("PCM Playback Volume", 2),
+ AK_DAC("PCM Center Playback Volume", 1),
+ AK_DAC("PCM LFE Playback Volume", 1),
+ AK_DAC("PCM Rear Playback Volume", 2),
+};
-static unsigned int revo51_adc_num_stereo[] = {2};
-static char *revo51_adc_channel_names[] = {"PCM Capture Volume","PCM Capture Switch"};
+static struct snd_akm4xxx_adc_channel revo51_adc[] = {
+ {
+ .name = "PCM Capture Volume",
+ .gain_name = "PCM Capture Gain Volume",
+ .switch_name = "PCM Capture Switch",
+ .num_channels = 2
+ },
+};
static struct snd_akm4xxx akm_revo_front __devinitdata = {
.type = SND_AK4381,
@@ -107,8 +122,7 @@ static struct snd_akm4xxx akm_revo_front __devinitdata = {
.ops = {
.set_rate_val = revo_set_rate_val
},
- .num_stereo = revo71_num_stereo_front,
- .channel_names = revo71_channel_names_front
+ .dac_info = revo71_front,
};
static struct snd_ak4xxx_private akm_revo_front_priv __devinitdata = {
@@ -130,8 +144,7 @@ static struct snd_akm4xxx akm_revo_surround __devinitdata = {
.ops = {
.set_rate_val = revo_set_rate_val
},
- .num_stereo = revo71_num_stereo_surround,
- .channel_names = revo71_channel_names_surround
+ .dac_info = revo71_surround,
};
static struct snd_ak4xxx_private akm_revo_surround_priv __devinitdata = {
@@ -152,8 +165,7 @@ static struct snd_akm4xxx akm_revo51 __devinitdata = {
.ops = {
.set_rate_val = revo_set_rate_val
},
- .num_stereo = revo51_num_stereo,
- .channel_names = revo51_channel_names
+ .dac_info = revo51_dac,
};
static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = {
@@ -171,8 +183,7 @@ static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = {
static struct snd_akm4xxx akm_revo51_adc __devinitdata = {
.type = SND_AK5365,
.num_adcs = 2,
- .num_stereo = revo51_adc_num_stereo,
- .channel_names = revo51_adc_channel_names
+ .adc_info = revo51_adc,
};
static struct snd_ak4xxx_private akm_revo51_adc_priv __devinitdata = {
OpenPOWER on IntegriCloud