Commit f1546fea authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

Generic drivers,MPU401 UART,ALSA Core,ALS100 driver,AZT2320 driver
CMI8330 driver,DT019x driver,ES18xx driver,OPL3SA2 driver
Sound Galaxy driver,Sound Scape driver,AD1816A driver,AD1848 driver
CS4231 driver,CS4236+ driver,PC98(CS423x) driver,ES1688 driver
GUS Classic driver,GUS Extreme driver,GUS MAX driver
AMD InterWave driver,Opti9xx drivers,ES968 driver,SB16/AWE driver
SB8 driver,Wavefront drivers,CMIPCI driver,VIA82xx driver,YMFPCI driver
- fixed the boot parameters with long ints for non-intel architectures.
- added get_option_long() for parsing the parameter.
parent b82b6c4b
......@@ -163,4 +163,16 @@ static int __init get_id(char **str, char **dst)
}
#endif
/* simple wrapper for long variable.
* the value more than 32bit won't work!
*/
inline static int get_option_long(char **str, long *valp)
{
int val, ret;
ret = get_option(str, &val);
if (ret)
*valp = val;
return ret;
}
#endif /* __SOUND_INITVAL_H */
......@@ -157,7 +157,7 @@ static int __init alsa_card_mpu401_setup(char *str)
#ifdef CONFIG_X86_PC9800
get_option(&str,&pc98ii[nr_dev]) == 2 &&
#endif
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2);
nr_dev++;
return 1;
......
......@@ -813,7 +813,7 @@ static int __init alsa_card_mtpav_setup(char *str)
(void)(get_option(&str,&enable) == 2 &&
get_option(&str,&index) == 2 &&
get_id(&str,&id) == 2 &&
get_option(&str,(int *)&port) == 2 &&
get_option_long(&str,&port) == 2 &&
get_option(&str,&irq) == 2 &&
get_option(&str,&hwports) == 2);
return 1;
......
......@@ -975,7 +975,7 @@ static int __init alsa_card_serial_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&speed[nr_dev]) == 2 &&
get_option(&str,&base[nr_dev]) == 2 &&
......
......@@ -338,9 +338,9 @@ static int __init alsa_card_ad1816a_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
......
......@@ -174,7 +174,7 @@ static int __init alsa_card_ad1848_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
get_option(&str,&thinkpad[nr_dev]) == 2);
......
......@@ -359,9 +359,9 @@ static int __init alsa_card_als100_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma8[nr_dev]) == 2 &&
......
......@@ -393,9 +393,9 @@ static int __init alsa_card_azt2320_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&wss_port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&wss_port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
......
......@@ -658,11 +658,11 @@ static int __init alsa_card_cmi8330_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&sbport[nr_dev]) == 2 &&
get_option_long(&str,&sbport[nr_dev]) == 2 &&
get_option(&str,&sbirq[nr_dev]) == 2 &&
get_option(&str,&sbdma8[nr_dev]) == 2 &&
get_option(&str,&sbdma16[nr_dev]) == 2 &&
get_option(&str,(int *)&wssport[nr_dev]) == 2 &&
get_option_long(&str,&wssport[nr_dev]) == 2 &&
get_option(&str,&wssirq[nr_dev]) == 2 &&
get_option(&str,&wssdma[nr_dev]) == 2);
#ifdef CONFIG_PNP
......
......@@ -194,8 +194,8 @@ static int __init alsa_card_cs4231_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
......
......@@ -638,11 +638,11 @@ static int __init alsa_card_cs423x_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&cport[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option(&str,(int *)&sb_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&cport[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&sb_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
......
......@@ -455,9 +455,9 @@ static int __init alsa_card_pc98_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
......
......@@ -347,9 +347,9 @@ static int __init alsa_card_dt019x_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma8[nr_dev]) == 2);
......
......@@ -226,8 +226,8 @@ static int __init alsa_card_es1688_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
get_option(&str,&dma8[nr_dev]) == 2);
......
......@@ -2286,9 +2286,9 @@ static int __init alsa_card_es18xx_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
get_option(&str,&dma2[nr_dev]) == 2);
......
......@@ -284,7 +284,7 @@ static int __init alsa_card_gusclassic_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
get_option(&str,&dma2[nr_dev]) == 2 &&
......
......@@ -417,9 +417,9 @@ static int __init alsa_card_gusextreme_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&gf1_port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&gf1_port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&gf1_irq[nr_dev]) == 2 &&
get_option(&str,&mpu_irq[nr_dev]) == 2 &&
......
......@@ -424,7 +424,7 @@ static int __init alsa_card_gusmax_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
get_option(&str,&dma2[nr_dev]) == 2 &&
......
......@@ -994,9 +994,9 @@ static int __init alsa_card_interwave_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
#ifdef SNDRV_STB
get_option(&str,(int *)&port_tc[nr_dev]) == 2 &&
get_option_long(&str,&port_tc[nr_dev]) == 2 &&
#endif
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
......
......@@ -945,11 +945,11 @@ static int __init alsa_card_opl3sa2_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&sb_port[nr_dev]) == 2 &&
get_option(&str,(int *)&wss_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option(&str,(int *)&midi_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&sb_port[nr_dev]) == 2 &&
get_option_long(&str,&wss_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&midi_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
get_option(&str,&dma2[nr_dev]) == 2 &&
......
......@@ -2240,9 +2240,9 @@ static int __init alsa_card_opti9xx_setup(char *str)
get_option(&str,&index) == 2 &&
get_id(&str,&id) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&port) == 2 &&
get_option(&str,(int *)&mpu_port) == 2 &&
get_option(&str,(int *)&fm_port) == 2 &&
get_option_long(&str,&port) == 2 &&
get_option_long(&str,&mpu_port) == 2 &&
get_option_long(&str,&fm_port) == 2 &&
get_option(&str,&irq) == 2 &&
get_option(&str,&mpu_irq) == 2 &&
get_option(&str,&dma1) == 2
......
......@@ -257,7 +257,7 @@ static int __init alsa_card_es968_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma8[nr_dev]) == 2);
nr_dev++;
......
......@@ -696,9 +696,9 @@ static int __init alsa_card_sb16_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma8[nr_dev]) == 2 &&
get_option(&str,&dma16[nr_dev]) == 2 &&
......@@ -709,7 +709,7 @@ static int __init alsa_card_sb16_setup(char *str)
#endif
#ifdef SNDRV_SBAWE_EMU8000
&&
get_option(&str,(int *)&awe_port[nr_dev]) == 2 &&
get_option_long(&str,&awe_port[nr_dev]) == 2 &&
get_option(&str,&seq_ports[nr_dev]) == 2
#endif
);
......
......@@ -242,7 +242,7 @@ static int __init alsa_card_sb8_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option_long(&str,&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma8[nr_dev]) == 2);
nr_dev++;
......
......@@ -341,10 +341,10 @@ static int __init alsa_card_sgalaxy_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&sbport[nr_dev]) == 2 &&
get_option(&str,(int *)&wssport[nr_dev]) == 2 &&
get_option(&str,(int *)&irq[nr_dev]) == 2 &&
get_option(&str,(int *)&dma1[nr_dev]) == 2);
get_option_long(&str,&sbport[nr_dev]) == 2 &&
get_option_long(&str,&wssport[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2);
nr_dev++;
return 1;
}
......
......@@ -31,6 +31,7 @@
#include <sound/hwdep.h>
#include <sound/cs4231.h>
#include <sound/mpu401.h>
#define SNDRV_GET_ID
#include <sound/initval.h>
#include <sound/sscape_ioctl.h>
......@@ -1538,8 +1539,8 @@ static int __init builtin_sscape_setup(char *str)
return 0;
(void)((get_option(&str, &index[nr_dev]) == 2) &&
(get_option(&str, (int*)&id[nr_dev]) == 2) &&
(get_option(&str, (int*)&port[nr_dev]) == 2) &&
(get_id(&str, &id[nr_dev]) == 2) &&
(get_option_long(&str, &port[nr_dev]) == 2) &&
(get_option(&str, &irq[nr_dev]) == 2) &&
(get_option(&str, &mpu_irq[nr_dev]) == 2) &&
(get_option(&str, &dma[nr_dev]) == 2));
......
......@@ -756,13 +756,13 @@ static int __init alsa_card_wavefront_setup(char *str)
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&isapnp[nr_dev]) == 2 &&
get_option(&str,(int *)&cs4232_pcm_port[nr_dev]) == 2 &&
get_option_long(&str,&cs4232_pcm_port[nr_dev]) == 2 &&
get_option(&str,&cs4232_pcm_irq[nr_dev]) == 2 &&
get_option(&str,(int *)&cs4232_mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&cs4232_mpu_port[nr_dev]) == 2 &&
get_option(&str,&cs4232_mpu_irq[nr_dev]) == 2 &&
get_option(&str,(int *)&ics2115_port[nr_dev]) == 2 &&
get_option_long(&str,&ics2115_port[nr_dev]) == 2 &&
get_option(&str,&ics2115_irq[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option(&str,&dma1[nr_dev]) == 2 &&
get_option(&str,&dma2[nr_dev]) == 2 &&
get_option(&str,&use_cs4232_midi[nr_dev]) == 2);
......
......@@ -3229,8 +3229,8 @@ static int __init alsa_card_cmipci_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2);
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option_long(&str,&fm_port[nr_dev]) == 2);
nr_dev++;
return 1;
}
......
......@@ -2160,17 +2160,15 @@ module_exit(alsa_card_via82xx_exit)
static int __init alsa_card_via82xx_setup(char *str)
{
static unsigned __initdata nr_dev = 0;
int port;
if (nr_dev >= SNDRV_CARDS)
return 0;
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&port) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
get_option(&str,&ac97_clock[nr_dev]) == 2 &&
get_option(&str,&dxs_support[nr_dev]) == 2);
mpu_port[nr_dev] = port;
nr_dev++;
return 1;
}
......
......@@ -319,8 +319,8 @@ static int __init alsa_card_ymfpci_setup(char *str)
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
get_option(&str,(int *)&mpu_port[nr_dev]) == 2);
get_option_long(&str,&fm_port[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2);
nr_dev++;
return 1;
}
......
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