aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/hoontech.c
diff options
context:
space:
mode:
authorAlan Horstmann <gineera@aspect135.co.uk>2008-02-06 08:43:54 -0500
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:07 -0400
commitd043143d803ad9a9f4a66d6a833876735fb7b869 (patch)
treefb1d07f7a72930f34fc6eb0cd678e24a27d73200 /sound/pci/ice1712/hoontech.c
parent7d664ed58fb54bc421d5fe8e5e0adec736fd0558 (diff)
[ALSA] ice1712 - Fix hoontech MIDI input
Fixes the problems with Midi In on Hoontech/STA dsp24 cards, for example with DSP2000 box, without restricting the box configurations available. Also adds mpu_401 name strings. Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/hoontech.c')
-rw-r--r--sound/pci/ice1712/hoontech.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/sound/pci/ice1712/hoontech.c b/sound/pci/ice1712/hoontech.c
index cf5c7c0898fd..6914189073a4 100644
--- a/sound/pci/ice1712/hoontech.c
+++ b/sound/pci/ice1712/hoontech.c
@@ -208,6 +208,19 @@ static int __devinit snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
208 /* ICE1712_STDSP24_MUTE | 208 /* ICE1712_STDSP24_MUTE |
209 ICE1712_STDSP24_INSEL | 209 ICE1712_STDSP24_INSEL |
210 ICE1712_STDSP24_DAREAR; */ 210 ICE1712_STDSP24_DAREAR; */
211 /* These boxconfigs have caused problems in the past.
212 * The code is not optimal, but should now enable a working config to
213 * be achieved.
214 * ** MIDI IN can only be configured on one box **
215 * ICE1712_STDSP24_BOX_MIDI1 needs to be set for that box.
216 * Tests on a ADAC2000 box suggest the box config flags do not
217 * work as would be expected, and the inputs are crossed.
218 * Setting ICE1712_STDSP24_BOX_MIDI1 and ICE1712_STDSP24_BOX_MIDI2
219 * on the same box connects MIDI-In to both 401 uarts; both outputs
220 * are then active on all boxes.
221 * The default config here sets up everything on the first box.
222 * Alan Horstmann 5.2.2008
223 */
211 spec->boxconfig[0] = ICE1712_STDSP24_BOX_CHN1 | 224 spec->boxconfig[0] = ICE1712_STDSP24_BOX_CHN1 |
212 ICE1712_STDSP24_BOX_CHN2 | 225 ICE1712_STDSP24_BOX_CHN2 |
213 ICE1712_STDSP24_BOX_CHN3 | 226 ICE1712_STDSP24_BOX_CHN3 |
@@ -223,14 +236,14 @@ static int __devinit snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
223 (spec->config & ICE1712_STDSP24_MUTE) ? 1 : 0); 236 (spec->config & ICE1712_STDSP24_MUTE) ? 1 : 0);
224 snd_ice1712_stdsp24_insel(ice, 237 snd_ice1712_stdsp24_insel(ice,
225 (spec->config & ICE1712_STDSP24_INSEL) ? 1 : 0); 238 (spec->config & ICE1712_STDSP24_INSEL) ? 1 : 0);
226 for (box = 0; box < 1; box++) { 239 for (box = 0; box < 4; box++) {
227 if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI2) 240 if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI2)
228 snd_ice1712_stdsp24_midi2(ice, 1); 241 snd_ice1712_stdsp24_midi2(ice, 1);
229 for (chn = 0; chn < 4; chn++) 242 for (chn = 0; chn < 4; chn++)
230 snd_ice1712_stdsp24_box_channel(ice, box, chn, 243 snd_ice1712_stdsp24_box_channel(ice, box, chn,
231 (spec->boxconfig[box] & (1 << chn)) ? 1 : 0); 244 (spec->boxconfig[box] & (1 << chn)) ? 1 : 0);
232 snd_ice1712_stdsp24_box_midi(ice, box, 245 if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI1)
233 (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI1) ? 1 : 0); 246 snd_ice1712_stdsp24_box_midi(ice, box, 1);
234 } 247 }
235 248
236 return 0; 249 return 0;
@@ -322,6 +335,8 @@ struct snd_ice1712_card_info snd_ice1712_hoontech_cards[] __devinitdata = {
322 .name = "Hoontech SoundTrack Audio DSP24", 335 .name = "Hoontech SoundTrack Audio DSP24",
323 .model = "dsp24", 336 .model = "dsp24",
324 .chip_init = snd_ice1712_hoontech_init, 337 .chip_init = snd_ice1712_hoontech_init,
338 .mpu401_1_name = "MIDI-1 Hoontech/STA DSP24",
339 .mpu401_2_name = "MIDI-2 Hoontech/STA DSP24",
325 }, 340 },
326 { 341 {
327 .subvendor = ICE1712_SUBDEVICE_STDSP24_VALUE, /* a dummy id */ 342 .subvendor = ICE1712_SUBDEVICE_STDSP24_VALUE, /* a dummy id */