]> err.no Git - linux-2.6/commitdiff
[ALSA] ice1712 - Set mpu401 info flags from _card_info
authorAlan Horstmann <gineera@aspect135.co.uk>
Fri, 26 May 2006 15:19:34 +0000 (17:19 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 22 Jun 2006 19:34:02 +0000 (21:34 +0200)
To permit use, in ice1712, of the mpu401 info flags recently added to
mpu401_uart, adds info_flags in snd_ice1712_card_info so that additional
flags can be set, if desired.  'MPU401_INFO_INTEGRATED' is always set with
the ice1712.  The flags are passed on to snd_mpu401_uart_new().
_INFO_OUTPUT is set for DMX6fire mpu2.

Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/ews.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1712.h

index 2e1cf112058280f2b7e42f7dc875d4679668f317..b135389fec6c7cbc83e69a73f9f05f5cdf1272ef 100644 (file)
@@ -1033,6 +1033,7 @@ struct snd_ice1712_card_info snd_ice1712_ews_cards[] __devinitdata = {
                .build_controls = snd_ice1712_ews_add_controls,
                .mpu401_1_name = "MIDI-Front DMX6fire",
                .mpu401_2_name = "Wavetable DMX6fire",
+               .mpu401_2_info_flags = MPU401_INFO_OUTPUT,
        },
        { } /* terminator */
 };
index aa5a41fecb0815972a0787f78e96b541958d78c4..845907159b74cc8cbb230dd4f2f2eb736ed2f297 100644 (file)
@@ -61,7 +61,6 @@
 #include <sound/core.h>
 #include <sound/cs8427.h>
 #include <sound/info.h>
-#include <sound/mpu401.h>
 #include <sound/initval.h>
 
 #include <sound/asoundef.h>
@@ -2739,7 +2738,8 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
        if (! c->no_mpu401) {
                if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
                                               ICEREG(ice, MPU1_CTRL),
-                                              MPU401_INFO_INTEGRATED,
+                                              (c->mpu401_1_info_flags |
+                                               MPU401_INFO_INTEGRATED),
                                               ice->irq, 0,
                                               &ice->rmidi[0])) < 0) {
                        snd_card_free(card);
@@ -2755,7 +2755,8 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
                        /*  2nd port used  */
                        if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712,
                                                       ICEREG(ice, MPU2_CTRL),
-                                                      MPU401_INFO_INTEGRATED,
+                                                      (c->mpu401_2_info_flags |
+                                                       MPU401_INFO_INTEGRATED),
                                                       ice->irq, 0,
                                                       &ice->rmidi[1])) < 0) {
                                snd_card_free(card);
index d4776319a0cdbae1336355533b57808aaa2ee19e..ce27eac40d4e15d5e8e10a5f3e94b65cda98d90b 100644 (file)
@@ -29,6 +29,7 @@
 #include <sound/ak4xxx-adda.h>
 #include <sound/ak4114.h>
 #include <sound/pcm.h>
+#include <sound/mpu401.h>
 
 
 /*
@@ -495,6 +496,8 @@ struct snd_ice1712_card_info {
        int (*chip_init)(struct snd_ice1712 *);
        int (*build_controls)(struct snd_ice1712 *);
        unsigned int no_mpu401: 1;
+       unsigned int mpu401_1_info_flags;
+       unsigned int mpu401_2_info_flags;
        const char *mpu401_1_name;
        const char *mpu401_2_name;
        unsigned int eeprom_size;