Commit d043143d authored by Alan Horstmann's avatar Alan Horstmann Committed by Takashi Iwai

[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: default avatarAlan Horstmann <gineera@aspect135.co.uk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7d664ed5
...@@ -208,6 +208,19 @@ static int __devinit snd_ice1712_hoontech_init(struct snd_ice1712 *ice) ...@@ -208,6 +208,19 @@ static int __devinit snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
/* ICE1712_STDSP24_MUTE | /* ICE1712_STDSP24_MUTE |
ICE1712_STDSP24_INSEL | ICE1712_STDSP24_INSEL |
ICE1712_STDSP24_DAREAR; */ ICE1712_STDSP24_DAREAR; */
/* These boxconfigs have caused problems in the past.
* The code is not optimal, but should now enable a working config to
* be achieved.
* ** MIDI IN can only be configured on one box **
* ICE1712_STDSP24_BOX_MIDI1 needs to be set for that box.
* Tests on a ADAC2000 box suggest the box config flags do not
* work as would be expected, and the inputs are crossed.
* Setting ICE1712_STDSP24_BOX_MIDI1 and ICE1712_STDSP24_BOX_MIDI2
* on the same box connects MIDI-In to both 401 uarts; both outputs
* are then active on all boxes.
* The default config here sets up everything on the first box.
* Alan Horstmann 5.2.2008
*/
spec->boxconfig[0] = ICE1712_STDSP24_BOX_CHN1 | spec->boxconfig[0] = ICE1712_STDSP24_BOX_CHN1 |
ICE1712_STDSP24_BOX_CHN2 | ICE1712_STDSP24_BOX_CHN2 |
ICE1712_STDSP24_BOX_CHN3 | ICE1712_STDSP24_BOX_CHN3 |
...@@ -223,14 +236,14 @@ static int __devinit snd_ice1712_hoontech_init(struct snd_ice1712 *ice) ...@@ -223,14 +236,14 @@ static int __devinit snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
(spec->config & ICE1712_STDSP24_MUTE) ? 1 : 0); (spec->config & ICE1712_STDSP24_MUTE) ? 1 : 0);
snd_ice1712_stdsp24_insel(ice, snd_ice1712_stdsp24_insel(ice,
(spec->config & ICE1712_STDSP24_INSEL) ? 1 : 0); (spec->config & ICE1712_STDSP24_INSEL) ? 1 : 0);
for (box = 0; box < 1; box++) { for (box = 0; box < 4; box++) {
if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI2) if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI2)
snd_ice1712_stdsp24_midi2(ice, 1); snd_ice1712_stdsp24_midi2(ice, 1);
for (chn = 0; chn < 4; chn++) for (chn = 0; chn < 4; chn++)
snd_ice1712_stdsp24_box_channel(ice, box, chn, snd_ice1712_stdsp24_box_channel(ice, box, chn,
(spec->boxconfig[box] & (1 << chn)) ? 1 : 0); (spec->boxconfig[box] & (1 << chn)) ? 1 : 0);
snd_ice1712_stdsp24_box_midi(ice, box, if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI1)
(spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI1) ? 1 : 0); snd_ice1712_stdsp24_box_midi(ice, box, 1);
} }
return 0; return 0;
...@@ -322,6 +335,8 @@ struct snd_ice1712_card_info snd_ice1712_hoontech_cards[] __devinitdata = { ...@@ -322,6 +335,8 @@ struct snd_ice1712_card_info snd_ice1712_hoontech_cards[] __devinitdata = {
.name = "Hoontech SoundTrack Audio DSP24", .name = "Hoontech SoundTrack Audio DSP24",
.model = "dsp24", .model = "dsp24",
.chip_init = snd_ice1712_hoontech_init, .chip_init = snd_ice1712_hoontech_init,
.mpu401_1_name = "MIDI-1 Hoontech/STA DSP24",
.mpu401_2_name = "MIDI-2 Hoontech/STA DSP24",
}, },
{ {
.subvendor = ICE1712_SUBDEVICE_STDSP24_VALUE, /* a dummy id */ .subvendor = ICE1712_SUBDEVICE_STDSP24_VALUE, /* a dummy id */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment