#include <linux/init.h>
#include <linux/slab.h>
#include <linux/pnp.h>
+#include <linux/moduleparam.h>
#include <sound/core.h>
#include <sound/cs4231.h>
#include <sound/mpu401.h>
#include <sound/opl3.h>
-#define SNDRV_GET_ID
#include <sound/initval.h>
-#define chip_t cs4231_t
-
MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_LICENSE("GPL");
-MODULE_CLASSES("{sound}");
#ifdef CS4232
MODULE_DESCRIPTION("Cirrus Logic CS4232");
-MODULE_DEVICES("{{Turtle Beach,TBS-2000},"
+MODULE_SUPPORTED_DEVICE("{{Turtle Beach,TBS-2000},"
"{Turtle Beach,Tropez Plus},"
"{SIC CrystalWave 32},"
"{Hewlett Packard,Omnibook 5500},"
"{Philips,PCA70PS}}");
#else
MODULE_DESCRIPTION("Cirrus Logic CS4235-9");
-MODULE_DEVICES("{{Crystal Semiconductors,CS4235},"
+MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235},"
"{Crystal Semiconductors,CS4236},"
"{Crystal Semiconductors,CS4237},"
"{Crystal Semiconductors,CS4238},"
static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */
static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */
-MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(index, int, NULL, 0444);
MODULE_PARM_DESC(index, "Index value for " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
-MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+module_param_array(id, charp, NULL, 0444);
MODULE_PARM_DESC(id, "ID string for " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
-MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC(enable, "Enable " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
#ifdef CONFIG_PNP
-MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(isapnp, bool, NULL, 0444);
MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
#endif
-MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+module_param_array(port, long, NULL, 0444);
MODULE_PARM_DESC(port, "Port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
-MODULE_PARM(cport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+module_param_array(cport, long, NULL, 0444);
MODULE_PARM_DESC(cport, "Control port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(cport, SNDRV_PORT12_DESC);
-MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+module_param_array(mpu_port, long, NULL, 0444);
MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+module_param_array(fm_port, long, NULL, 0444);
MODULE_PARM_DESC(fm_port, "FM port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(sb_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+module_param_array(sb_port, long, NULL, 0444);
MODULE_PARM_DESC(sb_port, "SB port # for " IDENT " driver (optional).");
-MODULE_PARM_SYNTAX(sb_port, SNDRV_PORT12_DESC);
-MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(irq, int, NULL, 0444);
MODULE_PARM_DESC(irq, "IRQ # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
-MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(mpu_irq, int, NULL, 0444);
MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(dma1, int, NULL, 0444);
MODULE_PARM_DESC(dma1, "DMA1 # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
-MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
struct snd_card_cs4236 {
struct resource *res_sb_port;
{ .id = "CSC0225", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
/* Intel Marlin Spike Motherboard (#2) - CS4235 */
{ .id = "CSC0225", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC0103" } } },
+ /* Unknown Intel mainboard - CS4235 */
+ { .id = "CSC0225", .devs = { { "CSC0100" }, { "CSC0110" } } },
/* Genius Sound Maker 3DJ - CS4237B */
{ .id = "CSC0437", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
/* Digital PC 5000 Onboard - CS4236B */
{ .id = "CSCd937", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
/* CS4235 without MPU401 */
{ .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" } } },
+ /* Unknown SiS530 - CS4235 */
+ { .id = "CSC4825", .devs = { { "CSC0100" }, { "CSC0110" } } },
/* IBM IntelliStation M Pro 6898 11U - CS4236B */
{ .id = "CSCe835", .devs = { { "CSC0000" }, { "CSC0010" } } },
/* IBM PC 300PL Onboard - CS4236B */
module_init(alsa_card_cs423x_init)
module_exit(alsa_card_cs423x_exit)
-
-#ifndef MODULE
-
-/* format is: snd-cs4232=enable,index,id,isapnp,port,
- cport,mpu_port,fm_port,sb_port,
- irq,mpu_irq,dma1,dma2 */
-/* format is: snd-cs4236=enable,index,id,isapnp,port,
- cport,mpu_port,fm_port,sb_port,
- irq,mpu_irq,dma1,dma2 */
-
-static int __init alsa_card_cs423x_setup(char *str)
-{
- static unsigned __initdata nr_dev = 0;
- int __attribute__ ((__unused__)) pnp = INT_MAX;
-
- 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,&pnp) == 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 &&
- get_option(&str,&dma2[nr_dev]) == 2);
-#ifdef CONFIG_PNP
- if (pnp != INT_MAX)
- isapnp[nr_dev] = pnp;
-#endif
- nr_dev++;
- return 1;
-}
-
-#ifdef CS4232
-__setup("snd-cs4232=", alsa_card_cs423x_setup);
-#else /* CS4236 */
-__setup("snd-cs4236=", alsa_card_cs423x_setup);
-#endif
-
-#endif /* ifndef MODULE */