diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-12-05 13:22:34 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:30:18 -0500 |
commit | 59acf76e0268e3f0156ef5113e89d838a8c02bb6 (patch) | |
tree | 1bf84e8e5f2458c7f9686401bf53cc84bd7cb1ce /sound/pci/ice1712 | |
parent | bd01e7bc9e975d7d3d6fe4eb2f2cf7ae83041c49 (diff) |
[ALSA] ice1724 - Add support of M-Audio Revolution 5.1
Modules: ICE1724 driver
Added the basic support of M-Audio Revolution 5.1.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r-- | sound/pci/ice1712/revo.c | 45 | ||||
-rw-r--r-- | sound/pci/ice1712/revo.h | 4 |
2 files changed, 45 insertions, 4 deletions
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 664b738bb647..b5754b32b802 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c | |||
@@ -61,7 +61,7 @@ static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) | |||
61 | else | 61 | else |
62 | dfs = 0; | 62 | dfs = 0; |
63 | 63 | ||
64 | if (ak->type == SND_AK4355) { | 64 | if (ak->type == SND_AK4355 || ak->type == SND_AK4358) { |
65 | reg = 2; | 65 | reg = 2; |
66 | shift = 4; | 66 | shift = 4; |
67 | } else { | 67 | } else { |
@@ -128,6 +128,26 @@ static struct snd_ak4xxx_private akm_revo_surround_priv __devinitdata = { | |||
128 | .mask_flags = 0, | 128 | .mask_flags = 0, |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static struct snd_akm4xxx akm_revo51 __devinitdata = { | ||
132 | .type = SND_AK4358, | ||
133 | .num_dacs = 6, | ||
134 | .ops = { | ||
135 | .set_rate_val = revo_set_rate_val | ||
136 | } | ||
137 | }; | ||
138 | |||
139 | static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = { | ||
140 | .caddr = 2, | ||
141 | .cif = 0, | ||
142 | .data_mask = VT1724_REVO_CDOUT, | ||
143 | .clk_mask = VT1724_REVO_CCLK, | ||
144 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2, | ||
145 | .cs_addr = 0, | ||
146 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2, | ||
147 | .add_flags = VT1724_REVO_CCLK, /* high at init */ | ||
148 | .mask_flags = 0, | ||
149 | }; | ||
150 | |||
131 | static int __devinit revo_init(struct snd_ice1712 *ice) | 151 | static int __devinit revo_init(struct snd_ice1712 *ice) |
132 | { | 152 | { |
133 | struct snd_akm4xxx *ak; | 153 | struct snd_akm4xxx *ak; |
@@ -138,14 +158,17 @@ static int __devinit revo_init(struct snd_ice1712 *ice) | |||
138 | case VT1724_SUBDEVICE_REVOLUTION71: | 158 | case VT1724_SUBDEVICE_REVOLUTION71: |
139 | ice->num_total_dacs = 8; | 159 | ice->num_total_dacs = 8; |
140 | ice->num_total_adcs = 2; | 160 | ice->num_total_adcs = 2; |
161 | ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed; | ||
162 | break; | ||
163 | case VT1724_SUBDEVICE_REVOLUTION51: | ||
164 | ice->num_total_dacs = 6; | ||
165 | ice->num_total_adcs = 2; | ||
141 | break; | 166 | break; |
142 | default: | 167 | default: |
143 | snd_BUG(); | 168 | snd_BUG(); |
144 | return -EINVAL; | 169 | return -EINVAL; |
145 | } | 170 | } |
146 | 171 | ||
147 | ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed; | ||
148 | |||
149 | /* second stage of initialization, analog parts and others */ | 172 | /* second stage of initialization, analog parts and others */ |
150 | ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL); | 173 | ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL); |
151 | if (! ak) | 174 | if (! ak) |
@@ -153,6 +176,7 @@ static int __devinit revo_init(struct snd_ice1712 *ice) | |||
153 | ice->akm_codecs = 2; | 176 | ice->akm_codecs = 2; |
154 | switch (ice->eeprom.subvendor) { | 177 | switch (ice->eeprom.subvendor) { |
155 | case VT1724_SUBDEVICE_REVOLUTION71: | 178 | case VT1724_SUBDEVICE_REVOLUTION71: |
179 | ice->akm_codecs = 2; | ||
156 | if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo_front, &akm_revo_front_priv, ice)) < 0) | 180 | if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo_front, &akm_revo_front_priv, ice)) < 0) |
157 | return err; | 181 | return err; |
158 | if ((err = snd_ice1712_akm4xxx_init(ak + 1, &akm_revo_surround, &akm_revo_surround_priv, ice)) < 0) | 182 | if ((err = snd_ice1712_akm4xxx_init(ak + 1, &akm_revo_surround, &akm_revo_surround_priv, ice)) < 0) |
@@ -160,6 +184,13 @@ static int __devinit revo_init(struct snd_ice1712 *ice) | |||
160 | /* unmute all codecs */ | 184 | /* unmute all codecs */ |
161 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE); | 185 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE); |
162 | break; | 186 | break; |
187 | case VT1724_SUBDEVICE_REVOLUTION51: | ||
188 | ice->akm_codecs = 1; | ||
189 | if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo51, &akm_revo51_priv, ice)) < 0) | ||
190 | return err; | ||
191 | /* unmute all codecs - needed! */ | ||
192 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE); | ||
193 | break; | ||
163 | } | 194 | } |
164 | 195 | ||
165 | return 0; | 196 | return 0; |
@@ -172,6 +203,7 @@ static int __devinit revo_add_controls(struct snd_ice1712 *ice) | |||
172 | 203 | ||
173 | switch (ice->eeprom.subvendor) { | 204 | switch (ice->eeprom.subvendor) { |
174 | case VT1724_SUBDEVICE_REVOLUTION71: | 205 | case VT1724_SUBDEVICE_REVOLUTION71: |
206 | case VT1724_SUBDEVICE_REVOLUTION51: | ||
175 | err = snd_ice1712_akm4xxx_build_controls(ice); | 207 | err = snd_ice1712_akm4xxx_build_controls(ice); |
176 | if (err < 0) | 208 | if (err < 0) |
177 | return err; | 209 | return err; |
@@ -188,5 +220,12 @@ struct snd_ice1712_card_info snd_vt1724_revo_cards[] __devinitdata = { | |||
188 | .chip_init = revo_init, | 220 | .chip_init = revo_init, |
189 | .build_controls = revo_add_controls, | 221 | .build_controls = revo_add_controls, |
190 | }, | 222 | }, |
223 | { | ||
224 | .subvendor = VT1724_SUBDEVICE_REVOLUTION51, | ||
225 | .name = "M Audio Revolution-5.1", | ||
226 | .model = "revo51", | ||
227 | .chip_init = revo_init, | ||
228 | .build_controls = revo_add_controls, | ||
229 | }, | ||
191 | { } /* terminator */ | 230 | { } /* terminator */ |
192 | }; | 231 | }; |
diff --git a/sound/pci/ice1712/revo.h b/sound/pci/ice1712/revo.h index ca4420b5e3ec..dea52ea219df 100644 --- a/sound/pci/ice1712/revo.h +++ b/sound/pci/ice1712/revo.h | |||
@@ -25,9 +25,11 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define REVO_DEVICE_DESC \ | 27 | #define REVO_DEVICE_DESC \ |
28 | "{MidiMan M Audio,Revolution 7.1}," | 28 | "{MidiMan M Audio,Revolution 7.1},"\ |
29 | "{MidiMan M Audio,Revolution 5.1}," | ||
29 | 30 | ||
30 | #define VT1724_SUBDEVICE_REVOLUTION71 0x12143036 | 31 | #define VT1724_SUBDEVICE_REVOLUTION71 0x12143036 |
32 | #define VT1724_SUBDEVICE_REVOLUTION51 0x12143136 | ||
31 | 33 | ||
32 | /* entry point */ | 34 | /* entry point */ |
33 | extern struct snd_ice1712_card_info snd_vt1724_revo_cards[]; | 35 | extern struct snd_ice1712_card_info snd_vt1724_revo_cards[]; |