ice712 -set mpu401 info flags from card info, patch
Following your recent addition of mpu401 info flags, patch to set additional flags from snd_ice1712_card_info.
For my ease I moved #include <sound/mpu401.h> from ice1712.c to ice1712.h so that the flags definition is available to all vendor specific code files (such as ews.c) without duplicating the include in each one. Please advise if you have a different preference.
Alan
Summary: in ice1712, set mpu401 info flags from _card_info
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.
alsa-kernel/pci/ice1712/ews.c +1 -0
@@ -1033,6 +1033,7 @@ .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 */ };
alsa-kernel/pci/ice1712/ice1712.c +6 -5
@@ -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>
@@ -2736,9 +2737,10 @@ }if (! c->no_mpu401) { + c->mpu401_1_info_flags |=MPU401_INFO_INTEGRATED ;if ((err =snd_mpu401_uart_new (card,0 ,MPU401_HW_ICE1712 , -ICEREG (ice,MPU1_CTRL ), -MPU401_INFO_INTEGRATED , +ICEREG (ice,MPU1_CTRL ), + c->mpu401_1_info_flags, ice->irq,0 , &ice->rmidi[0 ])) <0 ) {snd_card_free (card);
@@ -2748,9 +2751,10 @@ "%s %d", c->mpu401_1_name, card->number);if (ice->eeprom.data[ICE_EEP1_CODEC ] & ICE1712_CFG_2xMPU401) {/* 2nd port used */ + c->mpu401_2_info_flags |=MPU401_INFO_INTEGRATED ;if ((err =snd_mpu401_uart_new (card,1 ,MPU401_HW_ICE1712 , -ICEREG (ice,MPU2_CTRL ), -MPU401_INFO_INTEGRATED , +ICEREG (ice,MPU2_CTRL ), + c->mpu401_2_info_flags, ice->irq,0 , &ice->rmidi[1 ])) <0 ) {snd_card_free (card);
alsa-kernel/pci/ice1712/ice1712.h +3 -0
@@ -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 @@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;
At Wed, 24 May 2006 22:35:31 +0100,
alsa-kernel/pci/ice1712/ice1712.c line 2740
Quoted 6 lines · Alan Horstmann
alsa-kernel/pci/ice1712/ice1712.c +1
-0@@ -2736,9 +2737,10 @@ }if (! c->no_mpu401) { + c->mpu401_1_info_flags |=MPU401_INFO_INTEGRATED ;
Don't change the contents of card info here, instead...
alsa-kernel/pci/ice1712/ice1712.c line 2743
Quoted 5 lines
alsa-kernel/pci/ice1712/ice1712.c +2
-2if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, - ICEREG(ice, MPU1_CTRL), - MPU401_INFO_INTEGRATED, + ICEREG(ice, MPU1_CTRL), + c->mpu401_1_info_flags,
... add "| MPU401_INFO_INTEGRETED" at this point.
(Ditto for mpu401_2_info_flags)
Could you repost the fixed patch?
thanks,
Takashi
Quoted 20 lines · you
At Wed, 24 May 2006 22:35:31 +0100,
Review line 2740
Quoted 5 lines · Alan Horstmann
(quoted diff) +1
-0@@ -2736,9 +2737,10 @@ } if (! c->no_mpu401) { + c->mpu401_1_info_flags |= MPU401_INFO_INTEGRATED;Don't change the contents of card info here, instead...
Review line 2743
Quoted 5 lines
(quoted diff) +2
-2if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, - ICEREG(ice, MPU1_CTRL), - MPU401_INFO_INTEGRATED, + ICEREG(ice, MPU1_CTRL), + c->mpu401_1_info_flags,... add "|
MPU401_INFO_INTEGRETED" at this point.
(Ditto formpu401_2_info_flags)
Quoted 1 line
Could you repost the fixed patch?
Fair comment, I shouldn't use it as a variable. Revised patch attached.
Alan
ice1712-mpu401-infoflags-2.patch
Summary: in ice1712, set mpu401 info flags from _card_info
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.
alsa-kernel/pci/ice1712/ews.c +1 -0
@@ -1033,6 +1033,7 @@ .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 */ };
alsa-kernel/pci/ice1712/ice1712.c +4 -5
@@ -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>
@@ -2737,8 +2738,8 @@if (! c->no_mpu401) {if ((err =snd_mpu401_uart_new (card,0 ,MPU401_HW_ICE1712 , -ICEREG (ice,MPU1_CTRL ), -MPU401_INFO_INTEGRATED , +ICEREG (ice,MPU1_CTRL ), + c->mpu401_1_info_flags |MPU401_INFO_INTEGRATED , ice->irq,0 , &ice->rmidi[0 ])) <0 ) {snd_card_free (card);
@@ -2749,8 +2751,8 @@if (ice->eeprom.data[ICE_EEP1_CODEC ] & ICE1712_CFG_2xMPU401) {/* 2nd port used */ if ((err =snd_mpu401_uart_new (card,1 ,MPU401_HW_ICE1712 , -ICEREG (ice,MPU2_CTRL ), -MPU401_INFO_INTEGRATED , +ICEREG (ice,MPU2_CTRL ), + c->mpu401_2_info_flags |MPU401_INFO_INTEGRATED , ice->irq,0 , &ice->rmidi[1 ])) <0 ) {snd_card_free (card);
alsa-kernel/pci/ice1712/ice1712.h +3 -0
@@ -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 @@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;
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Takashi Iwai
AppliedAt Fri, 26 May 2006 16:14:11 +0100,
Quoted 32 lines · Alan Horstmann
Quoted 20 lines · you
At Wed, 24 May 2006 22:35:31 +0100,
alsa-kernel/pci/ice1712/ice1712.c line 2740
Quoted 5 lines · Alan Horstmann
alsa-kernel/pci/ice1712/ice1712.c +1
-0@@ -2736,9 +2737,10 @@ }if (! c->no_mpu401) { + c->mpu401_1_info_flags |=MPU401_INFO_INTEGRATED ;Don't change the contents of card info here, instead...
alsa-kernel/pci/ice1712/ice1712.c
Quoted 5 lines
alsa-kernel/pci/ice1712/ice1712.c +2
-2if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, - ICEREG(ice, MPU1_CTRL), - MPU401_INFO_INTEGRATED, + ICEREG(ice, MPU1_CTRL), + c->mpu401_1_info_flags,... add "|
MPU401_INFO_INTEGRETED" at this point.
(Ditto formpu401_2_info_flags)Quoted 1 line
Could you repost the fixed patch?
Fair comment, I shouldn't use it as a variable. Revised patch attached.
Alan
ice1712-mpu401-infoflags-2.patch
Summary: in ice1712, set mpu401 info flags from
_card_info
Quoted 7 lines
To permit use, in ice1712, of the mpu401 info flags recently added to
mpu401_uart, addsinfo_flagsinsnd_ice1712_card_infoso that additional flags can be set, if desired. 'MPU401_INFO_INTEGRATED' is always set with the ice1712. The flags are passed on tosnd_mpu401_uart_new(). _INFO_OUTPUT is set for DMX6fire mpu2.Signed-off-by Alan Horstmann <[email protected]>
Applied to HG repo. I folded too long lines but else applied as is.
Thanks.
Takashi