[alsa-devel] [PATCH] sound/isa: kill pnp_resource_change.
Hi Takashi.
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread).
Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets).
Signed-off-by: Rene Herman rene.herman@gmail.com
Documentation/ALSA-Configuration.txt | 35 ------------ isa/ad1816a/ad1816a.c | 55 ++----------------- isa/als100.c | 49 ---------------- isa/azt2320.c | 50 ----------------- isa/cmi8330.c | 42 +------------- isa/cs423x/cs4236.c | 101 +++++++---------------------------- isa/dt019x.c | 48 +--------------- isa/es18xx.c | 58 +++----------------- isa/gus/interwave.c | 39 +------------ isa/opl3sa2.c | 36 ------------ isa/opti9xx/opti92x-ad1848.c | 50 +---------------- isa/sb/es968.c | 27 --------- isa/sb/sb16.c | 39 ------------- isa/wavefront/wavefront.c | 55 +------------------ 14 files changed, 65 insertions(+), 619 deletions(-)
diff --git a/Documentation/ALSA-Configuration.txt b/Documentation/ALSA-Configuration.txt --- a/Documentation/ALSA-Configuration.txt +++ b/Documentation/ALSA-Configuration.txt @@ -150,13 +150,6 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on Analog Devices AD1816A/AD1815 ISA chips.
- port - port # for AD1816A chip (PnP setup) - mpu_port - port # for MPU-401 UART (PnP setup) - fm_port - port # for OPL3 (PnP setup) - irq - IRQ # for AD1816A chip (PnP setup) - mpu_irq - IRQ # for MPU-401 UART (PnP setup) - dma1 - first DMA # for AD1816A chip (PnP setup) - dma2 - second DMA # for AD1816A chip (PnP setup) clockfreq - Clock frequency for AD1816A chip (default = 0, 33000Hz)
This module supports multiple cards, autoprobe and PnP. @@ -203,14 +196,6 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on Avance Logic ALS100/ALS120 ISA chips.
- port - port # for ALS100 (SB16) chip (PnP setup) - irq - IRQ # for ALS100 (SB16) chip (PnP setup) - dma8 - 8-bit DMA # for ALS100 (SB16) chip (PnP setup) - dma16 - 16-bit DMA # for ALS100 (SB16) chip (PnP setup) - mpu_port - port # for MPU-401 UART (PnP setup) - mpu_irq - IRQ # for MPU-401 (PnP setup) - fm_port - port # for OPL3 FM (PnP setup) - This module supports multiple cards, autoprobe and PnP.
The power-management is supported. @@ -304,15 +289,6 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on Aztech System AZT2320 ISA chip (PnP only).
- port - port # for AZT2320 chip (PnP setup) - wss_port - port # for WSS (PnP setup) - mpu_port - port # for MPU-401 UART (PnP setup) - fm_port - FM port # for AZT2320 chip (PnP setup) - irq - IRQ # for AZT2320 (WSS) chip (PnP setup) - mpu_irq - IRQ # for MPU-401 UART (PnP setup) - dma1 - 1st DMA # for AZT2320 (WSS) chip (PnP setup) - dma2 - 2nd DMA # for AZT2320 (WSS) chip (PnP setup) - This module supports multiple cards, PnP and autoprobe.
The power-management is supported. @@ -504,13 +480,6 @@ Prior to version 0.9.0rc4 options had a
Module for Diamond Technologies DT-019X / Avance Logic ALS-007 (PnP only) - - port - Port # (PnP setup) - mpu_port - Port # for MPU-401 (PnP setup) - fm_port - Port # for FM OPL-3 (PnP setup) - irq - IRQ # (PnP setup) - mpu_irq - IRQ # for MPU-401 (PnP setup) - dma8 - DMA # (PnP setup)
This module supports multiple cards. This module is enabled only with ISA PnP support. @@ -609,10 +578,6 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on ESS ES968 chip (PnP only).
- port - port # for ES968 (SB8) chip (PnP setup) - irq - IRQ # for ES968 (SB8) chip (PnP setup) - dma1 - DMA # for ES968 (SB8) chip (PnP setup) - This module supports multiple cards, PnP and autoprobe.
The power-management is supported. diff --git a/isa/ad1816a/ad1816a.c b/isa/ad1816a/ad1816a.c --- a/isa/ad1816a/ad1816a.c +++ b/isa/ad1816a/ad1816a.c @@ -61,20 +61,6 @@ MODULE_PARM_DESC(id, "ID string for ad18 MODULE_PARM_DESC(id, "ID string for ad1816a based soundcard."); module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable ad1816a based soundcard."); -module_param_array(port, long, NULL, 0444); -MODULE_PARM_DESC(port, "Port # for ad1816a driver."); -module_param_array(mpu_port, long, NULL, 0444); -MODULE_PARM_DESC(mpu_port, "MPU-401 port # for ad1816a driver."); -module_param_array(fm_port, long, NULL, 0444); -MODULE_PARM_DESC(fm_port, "FM port # for ad1816a driver."); -module_param_array(irq, int, NULL, 0444); -MODULE_PARM_DESC(irq, "IRQ # for ad1816a driver."); -module_param_array(mpu_irq, int, NULL, 0444); -MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for ad1816a driver."); -module_param_array(dma1, int, NULL, 0444); -MODULE_PARM_DESC(dma1, "1st DMA # for ad1816a driver."); -module_param_array(dma2, int, NULL, 0444); -MODULE_PARM_DESC(dma2, "2nd DMA # for ad1816a driver."); module_param_array(clockfreq, int, NULL, 0444); MODULE_PARM_DESC(clockfreq, "Clock frequency for ad1816a driver (default = 0).");
@@ -117,16 +103,12 @@ static int __devinit snd_card_ad1816a_pn const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->dev == NULL) { - kfree(cfg); + if (acard->dev == NULL) return -EBUSY; - } + acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL); if (acard->devmpu == NULL) { mpu_port[dev] = -1; @@ -134,25 +116,10 @@ static int __devinit snd_card_ad1816a_pn }
pdev = acard->dev; - pnp_init_resource_table(cfg); - - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[2], port[dev], 16); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], fm_port[dev], 4); - if (dma1[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1[dev], 1); - if (dma2[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR PFX "AUDIO the requested resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { printk(KERN_ERR PFX "AUDIO PnP configure failure\n"); - kfree(cfg); return -EBUSY; }
@@ -162,20 +129,11 @@ static int __devinit snd_card_ad1816a_pn dma2[dev] = pnp_dma(pdev, 1); irq[dev] = pnp_irq(pdev, 0);
- if (acard->devmpu == NULL) { - kfree(cfg); + if (acard->devmpu == NULL) return 0; - } + pdev = acard->devmpu; - pnp_init_resource_table(cfg); - - if (mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); - if (mpu_irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); - - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR PFX "AUDIO the requested resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { printk(KERN_ERR PFX "MPU401 PnP configure failure\n"); @@ -186,7 +144,6 @@ static int __devinit snd_card_ad1816a_pn mpu_irq[dev] = pnp_irq(pdev, 0); }
- kfree(cfg); return 0; }
diff --git a/isa/als100.c b/isa/als100.c --- a/isa/als100.c +++ b/isa/als100.c @@ -63,20 +63,6 @@ MODULE_PARM_DESC(id, "ID string for als1 MODULE_PARM_DESC(id, "ID string for als100 based soundcard."); module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable als100 based soundcard."); -module_param_array(port, long, NULL, 0444); -MODULE_PARM_DESC(port, "Port # for als100 driver."); -module_param_array(mpu_port, long, NULL, 0444); -MODULE_PARM_DESC(mpu_port, "MPU-401 port # for als100 driver."); -module_param_array(fm_port, long, NULL, 0444); -MODULE_PARM_DESC(fm_port, "FM port # for als100 driver."); -module_param_array(irq, int, NULL, 0444); -MODULE_PARM_DESC(irq, "IRQ # for als100 driver."); -module_param_array(mpu_irq, int, NULL, 0444); -MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for als100 driver."); -module_param_array(dma8, int, NULL, 0444); -MODULE_PARM_DESC(dma8, "8-bit DMA # for als100 driver."); -module_param_array(dma16, int, NULL, 0444); -MODULE_PARM_DESC(dma16, "16-bit DMA # for als100 driver.");
struct snd_card_als100 { int dev_no; @@ -111,38 +97,20 @@ static int __devinit snd_card_als100_pnp const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->dev == NULL) { - kfree(cfg); + if (acard->dev == NULL) return -ENODEV; - } + acard->devmpu = pnp_request_card_device(card, id->devs[1].id, acard->dev); acard->devopl = pnp_request_card_device(card, id->devs[2].id, acard->dev);
pdev = acard->dev;
- pnp_init_resource_table(cfg); - - /* override resources */ - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port[dev], 16); - if (dma8[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma8[dev], 1); - if (dma16[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma16[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR PFX "AUDIO the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR PFX "AUDIO pnp configure failure\n"); - kfree(cfg); return err; } port[dev] = pnp_port_start(pdev, 0); @@ -152,13 +120,6 @@ static int __devinit snd_card_als100_pnp
pdev = acard->devmpu; if (pdev != NULL) { - pnp_init_resource_table(cfg); - if (mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); - if (mpu_irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "MPU401 the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) goto __mpu_error; @@ -176,11 +137,6 @@ static int __devinit snd_card_als100_pnp
pdev = acard->devopl; if (pdev != NULL) { - pnp_init_resource_table(cfg); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], fm_port[dev], 4); - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "OPL3 the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) goto __fm_error; @@ -195,7 +151,6 @@ static int __devinit snd_card_als100_pnp fm_port[dev] = -1; }
- kfree(cfg); return 0; }
diff --git a/isa/azt2320.c b/isa/azt2320.c --- a/isa/azt2320.c +++ b/isa/azt2320.c @@ -72,22 +72,6 @@ MODULE_PARM_DESC(id, "ID string for azt2 MODULE_PARM_DESC(id, "ID string for azt2320 based soundcard."); module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable azt2320 based soundcard."); -module_param_array(port, long, NULL, 0444); -MODULE_PARM_DESC(port, "Port # for azt2320 driver."); -module_param_array(wss_port, long, NULL, 0444); -MODULE_PARM_DESC(wss_port, "WSS Port # for azt2320 driver."); -module_param_array(mpu_port, long, NULL, 0444); -MODULE_PARM_DESC(mpu_port, "MPU-401 port # for azt2320 driver."); -module_param_array(fm_port, long, NULL, 0444); -MODULE_PARM_DESC(fm_port, "FM port # for azt2320 driver."); -module_param_array(irq, int, NULL, 0444); -MODULE_PARM_DESC(irq, "IRQ # for azt2320 driver."); -module_param_array(mpu_irq, int, NULL, 0444); -MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for azt2320 driver."); -module_param_array(dma1, int, NULL, 0444); -MODULE_PARM_DESC(dma1, "1st DMA # for azt2320 driver."); -module_param_array(dma2, int, NULL, 0444); -MODULE_PARM_DESC(dma2, "2nd DMA # for azt2320 driver.");
struct snd_card_azt2320 { int dev_no; @@ -121,43 +105,19 @@ static int __devinit snd_card_azt2320_pn const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; - acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->dev == NULL) { - kfree(cfg); + if (acard->dev == NULL) return -ENODEV; - }
acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL);
pdev = acard->dev; - pnp_init_resource_table(cfg); - - /* override resources */ - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port[dev], 16); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], fm_port[dev], 4); - if (wss_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[2], wss_port[dev], 4); - if (dma1[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1[dev], 1); - if (dma2[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "AUDIO the requested resources are invalid, using auto config\n");
err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR PFX "AUDIO pnp configure failure\n"); - kfree(cfg); return err; } port[dev] = pnp_port_start(pdev, 0); @@ -169,13 +129,6 @@ static int __devinit snd_card_azt2320_pn
pdev = acard->devmpu; if (pdev != NULL) { - pnp_init_resource_table(cfg); - if (mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); - if (mpu_irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "MPU401 the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) goto __mpu_error; @@ -191,7 +144,6 @@ static int __devinit snd_card_azt2320_pn mpu_port[dev] = -1; }
- kfree (cfg); return 0; }
diff --git a/isa/cmi8330.c b/isa/cmi8330.c --- a/isa/cmi8330.c +++ b/isa/cmi8330.c @@ -286,39 +286,21 @@ static int __devinit snd_cmi8330_pnp(int const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; acard->cap = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->cap == NULL) { - kfree(cfg); + if (acard->cap == NULL) return -EBUSY; - } + acard->play = pnp_request_card_device(card, id->devs[1].id, NULL); - if (acard->play == NULL) { - kfree(cfg); + if (acard->play == NULL) return -EBUSY; - }
pdev = acard->cap; - pnp_init_resource_table(cfg); - /* allocate AD1848 resources */ - if (wssport[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], wssport[dev], 8); - if (wssdma[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], wssdma[dev], 1); - if (wssirq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], wssirq[dev], 1); - - err = pnp_manual_config_dev(pdev, cfg, 0); - if (err < 0) - snd_printk(KERN_ERR "CMI8330/C3D (AD1848) PnP manual resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR "CMI8330/C3D (AD1848) PnP configure failure\n"); - kfree(cfg); return -EBUSY; } wssport[dev] = pnp_port_start(pdev, 0); @@ -327,23 +309,10 @@ static int __devinit snd_cmi8330_pnp(int
/* allocate SB16 resources */ pdev = acard->play; - pnp_init_resource_table(cfg); - if (sbport[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], sbport[dev], 16); - if (sbdma8[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], sbdma8[dev], 1); - if (sbdma16[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], sbdma16[dev], 1); - if (sbirq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], sbirq[dev], 1); - - err = pnp_manual_config_dev(pdev, cfg, 0); - if (err < 0) - snd_printk(KERN_ERR "CMI8330/C3D (SB16) PnP manual resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR "CMI8330/C3D (SB16) PnP configure failure\n"); - kfree(cfg); return -EBUSY; } sbport[dev] = pnp_port_start(pdev, 0); @@ -351,7 +320,6 @@ static int __devinit snd_cmi8330_pnp(int sbdma16[dev] = pnp_dma(pdev, 1); sbirq[dev] = pnp_irq(pdev, 0);
- kfree(cfg); return 0; } #endif diff --git a/isa/cs423x/cs4236.c b/isa/cs423x/cs4236.c --- a/isa/cs423x/cs4236.c +++ b/isa/cs423x/cs4236.c @@ -270,29 +270,9 @@ MODULE_DEVICE_TABLE(pnp_card, snd_cs423x MODULE_DEVICE_TABLE(pnp_card, snd_cs423x_pnpids);
/* WSS initialization */ -static int __devinit snd_cs423x_pnp_init_wss(int dev, struct pnp_dev *pdev, - struct pnp_resource_table *cfg) -{ - int err; - - pnp_init_resource_table(cfg); - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port[dev], 4); - if (fm_port[dev] != SNDRV_AUTO_PORT && fm_port[dev] > 0) - pnp_resource_change(&cfg->port_resource[1], fm_port[dev], 4); - if (sb_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[2], sb_port[dev], 16); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - if (dma1[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1[dev], 1); - if (dma2[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2[dev] < 0 ? 4 : dma2[dev], 1); - err = pnp_manual_config_dev(pdev, cfg, 0); - if (err < 0) - snd_printk(KERN_ERR IDENT " WSS PnP manual resources are invalid, using auto config\n"); - err = pnp_activate_dev(pdev); - if (err < 0) { +static int __devinit snd_cs423x_pnp_init_wss(int dev, struct pnp_dev *pdev) +{ + if (pnp_activate_dev(pdev) < 0) { printk(KERN_ERR IDENT " WSS PnP configure failed for WSS (out of resources?)\n"); return -EBUSY; } @@ -311,19 +291,9 @@ static int __devinit snd_cs423x_pnp_init }
/* CTRL initialization */ -static int __devinit snd_cs423x_pnp_init_ctrl(int dev, struct pnp_dev *pdev, - struct pnp_resource_table *cfg) -{ - int err; - - pnp_init_resource_table(cfg); - if (cport[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], cport[dev], 8); - err = pnp_manual_config_dev(pdev, cfg, 0); - if (err < 0) - snd_printk(KERN_ERR IDENT " CTRL PnP manual resources are invalid, using auto config\n"); - err = pnp_activate_dev(pdev); - if (err < 0) { +static int __devinit snd_cs423x_pnp_init_ctrl(int dev, struct pnp_dev *pdev) +{ + if (pnp_activate_dev(pdev) < 0) { printk(KERN_ERR IDENT " CTRL PnP configure failed for WSS (out of resources?)\n"); return -EBUSY; } @@ -333,21 +303,9 @@ static int __devinit snd_cs423x_pnp_init }
/* MPU initialization */ -static int __devinit snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev, - struct pnp_resource_table *cfg) -{ - int err; - - pnp_init_resource_table(cfg); - if (mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); - if (mpu_irq[dev] != SNDRV_AUTO_IRQ && mpu_irq[dev] >= 0) - pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); - err = pnp_manual_config_dev(pdev, cfg, 0); - if (err < 0) - snd_printk(KERN_ERR IDENT " MPU401 PnP manual resources are invalid, using auto config\n"); - err = pnp_activate_dev(pdev); - if (err < 0) { +static int __devinit snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev) +{ + if (pnp_activate_dev(pdev) < 0) { printk(KERN_ERR IDENT " MPU401 PnP configure failed for WSS (out of resources?)\n"); mpu_port[dev] = SNDRV_AUTO_PORT; mpu_irq[dev] = SNDRV_AUTO_IRQ; @@ -368,15 +326,8 @@ static int __devinit snd_card_cs4232_pnp static int __devinit snd_card_cs4232_pnp(int dev, struct snd_card_cs4236 *acard, struct pnp_dev *pdev) { - struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); - - if (!cfg) - return -ENOMEM; - if (snd_cs423x_pnp_init_wss(dev, acard->wss, cfg) < 0) { - kfree(cfg); + if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0) return -EBUSY; - } - kfree(cfg); cport[dev] = -1; return 0; } @@ -386,43 +337,33 @@ static int __devinit snd_card_cs423x_pnp struct pnp_card_link *card, const struct pnp_card_device_id *id) { - struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); - - if (!cfg) - return -ENOMEM; - acard->wss = pnp_request_card_device(card, id->devs[0].id, NULL); if (acard->wss == NULL) - goto error; + return -EBUSY; acard->ctrl = pnp_request_card_device(card, id->devs[1].id, NULL); if (acard->ctrl == NULL) - goto error; + return -EBUSY; if (id->devs[2].id[0]) { acard->mpu = pnp_request_card_device(card, id->devs[2].id, NULL); if (acard->mpu == NULL) - goto error; + return -EBUSY; }
/* WSS initialization */ - if (snd_cs423x_pnp_init_wss(dev, acard->wss, cfg) < 0) - goto error; + if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0) + return -EBUSY;
/* CTRL initialization */ if (acard->ctrl && cport[dev] > 0) { - if (snd_cs423x_pnp_init_ctrl(dev, acard->ctrl, cfg) < 0) - goto error; + if (snd_cs423x_pnp_init_ctrl(dev, acard->ctrl) < 0) + return -EBUSY; } /* MPU initialization */ if (acard->mpu && mpu_port[dev] > 0) { - if (snd_cs423x_pnp_init_mpu(dev, acard->mpu, cfg) < 0) - goto error; - } - kfree(cfg); - return 0; - - error: - kfree(cfg); - return -EBUSY; + if (snd_cs423x_pnp_init_mpu(dev, acard->mpu) < 0) + return -EBUSY; + } + return 0; } #endif /* CONFIG_PNP */
diff --git a/isa/dt019x.c b/isa/dt019x.c --- a/isa/dt019x.c +++ b/isa/dt019x.c @@ -56,18 +56,6 @@ MODULE_PARM_DESC(id, "ID string for DT-0 MODULE_PARM_DESC(id, "ID string for DT-019X based soundcard."); module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable DT-019X based soundcard."); -module_param_array(port, long, NULL, 0444); -MODULE_PARM_DESC(port, "Port # for dt019x driver."); -module_param_array(mpu_port, long, NULL, 0444); -MODULE_PARM_DESC(mpu_port, "MPU-401 port # for dt019x driver."); -module_param_array(fm_port, long, NULL, 0444); -MODULE_PARM_DESC(fm_port, "FM port # for dt019x driver."); -module_param_array(irq, int, NULL, 0444); -MODULE_PARM_DESC(irq, "IRQ # for dt019x driver."); -module_param_array(mpu_irq, int, NULL, 0444); -MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for dt019x driver."); -module_param_array(dma8, int, NULL, 0444); -MODULE_PARM_DESC(dma8, "8-bit DMA # for dt019x driver.");
struct snd_card_dt019x { struct pnp_dev *dev; @@ -95,36 +83,20 @@ static int __devinit snd_card_dt019x_pnp const struct pnp_card_device_id *pid) { struct pnp_dev *pdev; - struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; - acard->dev = pnp_request_card_device(card, pid->devs[0].id, NULL); - if (acard->dev == NULL) { - kfree (cfg); + if (acard->dev == NULL) return -ENODEV; - } + acard->devmpu = pnp_request_card_device(card, pid->devs[1].id, NULL); acard->devopl = pnp_request_card_device(card, pid->devs[2].id, NULL);
pdev = acard->dev; - pnp_init_resource_table(cfg); - - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port[dev], 16); - if (dma8[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma8[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "DT-019X AUDIO the requested resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR PFX "DT-019X AUDIO pnp configure failure\n"); - kfree(cfg); return err; }
@@ -135,15 +107,7 @@ static int __devinit snd_card_dt019x_pnp port[dev],irq[dev],dma8[dev]);
pdev = acard->devmpu; - if (pdev != NULL) { - pnp_init_resource_table(cfg); - if (mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); - if (mpu_irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "DT-019X MPU401 the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { pnp_release_card_device(pdev); @@ -162,11 +126,6 @@ static int __devinit snd_card_dt019x_pnp
pdev = acard->devopl; if (pdev != NULL) { - pnp_init_resource_table(cfg); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], fm_port[dev], 4); - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "DT-019X OPL3 the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { pnp_release_card_device(pdev); @@ -181,7 +140,6 @@ static int __devinit snd_card_dt019x_pnp fm_port[dev] = -1; }
- kfree(cfg); return 0; }
diff --git a/isa/es18xx.c b/isa/es18xx.c --- a/isa/es18xx.c +++ b/isa/es18xx.c @@ -2035,31 +2035,9 @@ MODULE_DEVICE_TABLE(pnp, snd_audiodrive_ MODULE_DEVICE_TABLE(pnp, snd_audiodrive_pnpbiosids);
/* PnP main device initialization */ -static int __devinit snd_audiodrive_pnp_init_main(int dev, struct pnp_dev *pdev, - struct pnp_resource_table *cfg) -{ - int err; - - pnp_init_resource_table(cfg); - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port[dev], 16); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], fm_port[dev], 4); - if (mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[2], mpu_port[dev], 2); - if (dma1[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1[dev], 1); - if (dma2[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - if (pnp_device_is_isapnp(pdev)) { - err = pnp_manual_config_dev(pdev, cfg, 0); - if (err < 0) - snd_printk(KERN_ERR PFX "PnP manual resources are invalid, using auto config\n"); - } - err = pnp_activate_dev(pdev); - if (err < 0) { +static int __devinit snd_audiodrive_pnp_init_main(int dev, struct pnp_dev *pdev) +{ + if (pnp_activate_dev(pdev) < 0) { snd_printk(KERN_ERR PFX "PnP configure failure (out of resources?)\n"); return -EBUSY; } @@ -2087,16 +2065,9 @@ static int __devinit snd_audiodrive_pnp( static int __devinit snd_audiodrive_pnp(int dev, struct snd_audiodrive *acard, struct pnp_dev *pdev) { - struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); - - if (!cfg) - return -ENOMEM; acard->dev = pdev; - if (snd_audiodrive_pnp_init_main(dev, acard->dev, cfg) < 0) { - kfree(cfg); + if (snd_audiodrive_pnp_init_main(dev, acard->dev) < 0) return -EBUSY; - } - kfree(cfg); return 0; }
@@ -2125,33 +2096,24 @@ static int __devinit snd_audiodrive_pnpc struct pnp_card_link *card, const struct pnp_card_device_id *id) { - struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); - - if (!cfg) - return -ENOMEM; acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->dev == NULL) { - kfree(cfg); + if (acard->dev == NULL) return -EBUSY; - } + acard->devc = pnp_request_card_device(card, id->devs[1].id, NULL); - if (acard->devc == NULL) { - kfree(cfg); + if (acard->devc == NULL) return -EBUSY; - } + /* Control port initialization */ if (pnp_activate_dev(acard->devc) < 0) { - kfree(cfg); snd_printk(KERN_ERR PFX "PnP control configure failure (out of resources?)\n"); return -EAGAIN; } snd_printdd("pnp: port=0x%llx\n", (unsigned long long)pnp_port_start(acard->devc, 0)); - if (snd_audiodrive_pnp_init_main(dev, acard->dev, cfg) < 0) { - kfree(cfg); + if (snd_audiodrive_pnp_init_main(dev, acard->dev) < 0) return -EBUSY; - } - kfree(cfg); + return 0; } #endif /* CONFIG_PNP */ diff --git a/isa/gus/interwave.c b/isa/gus/interwave.c --- a/isa/gus/interwave.c +++ b/isa/gus/interwave.c @@ -560,50 +560,27 @@ static int __devinit snd_interwave_pnp(i const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; iwcard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); - if (iwcard->dev == NULL) { - kfree(cfg); + if (iwcard->dev == NULL) return -EBUSY; - } + #ifdef SNDRV_STB iwcard->devtc = pnp_request_card_device(card, id->devs[1].id, NULL); - if (iwcard->devtc == NULL) { - kfree(cfg); + if (iwcard->devtc == NULL) return -EBUSY; - } #endif /* Synth & Codec initialization */ pdev = iwcard->dev; - pnp_init_resource_table(cfg); - if (port[dev] != SNDRV_AUTO_PORT) { - pnp_resource_change(&cfg->port_resource[0], port[dev], 16); - pnp_resource_change(&cfg->port_resource[1], port[dev] + 0x100, 12); - pnp_resource_change(&cfg->port_resource[2], port[dev] + 0x10c, 4); - } - if (dma1[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1[dev], 1); - if (dma2[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2[dev], 1); - if (dma2[dev] < 0) - pnp_resource_change(&cfg->dma_resource[1], 4, 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR "InterWave - Synth - the requested resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { - kfree(cfg); snd_printk(KERN_ERR "InterWave PnP configure failure (out of resources?)\n"); return err; } if (pnp_port_start(pdev, 0) + 0x100 != pnp_port_start(pdev, 1) || pnp_port_start(pdev, 0) + 0x10c != pnp_port_start(pdev, 2)) { - kfree(cfg); snd_printk(KERN_ERR "PnP configure failure (wrong ports)\n"); return -ENOENT; } @@ -620,21 +597,15 @@ static int __devinit snd_interwave_pnp(i #ifdef SNDRV_STB /* Tone Control initialization */ pdev = iwcard->devtc; - pnp_init_resource_table(cfg); - if (port_tc[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port_tc[dev], 1); - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR "InterWave - ToneControl - the requested resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { - kfree(cfg); snd_printk(KERN_ERR "InterWave ToneControl PnP configure failure (out of resources?)\n"); return err; } port_tc[dev] = pnp_port_start(pdev, 0); snd_printdd("isapnp IW: tone control port=0x%lx\n", port_tc[dev]); #endif - kfree(cfg); return 0; } #endif /* CONFIG_PNP */ diff --git a/isa/opl3sa2.c b/isa/opl3sa2.c --- a/isa/opl3sa2.c +++ b/isa/opl3sa2.c @@ -610,39 +610,8 @@ static int __devinit snd_opl3sa2_pnp(int static int __devinit snd_opl3sa2_pnp(int dev, struct snd_opl3sa2 *chip, struct pnp_dev *pdev) { - struct pnp_resource_table * cfg; - int err; - - cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); - if (!cfg) { - snd_printk(KERN_ERR PFX "cannot allocate pnp cfg\n"); - return -ENOMEM; - } - /* PnP initialization */ - pnp_init_resource_table(cfg); - if (sb_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], sb_port[dev], 16); - if (wss_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], wss_port[dev], 8); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[2], fm_port[dev], 4); - if (midi_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[3], midi_port[dev], 2); - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[4], port[dev], 2); - if (dma1[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1[dev], 1); - if (dma2[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - err = pnp_manual_config_dev(pdev, cfg, 0); - if (err < 0) - snd_printk(KERN_WARNING "PnP manual resources are invalid, using auto config\n"); - err = pnp_activate_dev(pdev); - if (err < 0) { - kfree(cfg); - snd_printk(KERN_ERR "PnP configure failure (out of resources?) err = %d\n", err); + if (pnp_activate_dev(pdev) < 0) { + snd_printk(KERN_ERR "PnP configure failure (out of resources?)\n"); return -EBUSY; } sb_port[dev] = pnp_port_start(pdev, 0); @@ -657,7 +626,6 @@ static int __devinit snd_opl3sa2_pnp(int pnp_device_is_pnpbios(pdev) ? "BIOS" : "ISA", sb_port[dev], wss_port[dev], fm_port[dev], midi_port[dev]); snd_printdd("%sPnP OPL3-SA: control port=0x%lx, dma1=%i, dma2=%i, irq=%i\n", pnp_device_is_pnpbios(pdev) ? "BIOS" : "ISA", port[dev], dma1[dev], dma2[dev], irq[dev]); - kfree(cfg); return 0; } #endif /* CONFIG_PNP */ diff --git a/isa/opti9xx/opti92x-ad1848.c b/isa/opti9xx/opti92x-ad1848.c --- a/isa/opti9xx/opti92x-ad1848.c +++ b/isa/opti9xx/opti92x-ad1848.c @@ -1690,53 +1690,19 @@ static int __devinit snd_card_opti9xx_pn const struct pnp_card_device_id *pid) { struct pnp_dev *pdev; - struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; chip->dev = pnp_request_card_device(card, pid->devs[0].id, NULL); - if (chip->dev == NULL) { - kfree(cfg); + if (chip->dev == NULL) return -EBUSY; - } + chip->devmpu = pnp_request_card_device(card, pid->devs[1].id, NULL);
pdev = chip->dev; - pnp_init_resource_table(cfg); - -#ifdef OPTi93X - if (port != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port + 4, 4); -#else - if (pid->driver_data != 0x0924 && port != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], port, 4); -#endif /* OPTi93X */ - if (irq != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq, 1); - if (dma1 != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1, 1); -#if defined(CS4231) || defined(OPTi93X) - if (dma2 != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2, 1); -#else -#ifdef snd_opti9xx_fixup_dma2 - snd_opti9xx_fixup_dma2(pdev); -#endif -#endif /* CS4231 || OPTi93X */ -#ifdef OPTi93X - if (fm_port > 0 && fm_port != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], fm_port, 4); -#else - if (fm_port > 0 && fm_port != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[2], fm_port, 4); -#endif - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR "AUDIO the requested resources are invalid, using auto config\n"); + err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR "AUDIO pnp configure failure: %d\n", err); - kfree(cfg); return err; }
@@ -1756,15 +1722,6 @@ static int __devinit snd_card_opti9xx_pn
pdev = chip->devmpu; if (pdev && mpu_port > 0) { - pnp_init_resource_table(cfg); - - if (mpu_port != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], mpu_port, 2); - if (mpu_irq != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], mpu_irq, 1); - - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR "AUDIO the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR "AUDIO pnp configure failure\n"); @@ -1775,7 +1732,6 @@ static int __devinit snd_card_opti9xx_pn mpu_irq = pnp_irq(pdev, 0); } } - kfree(cfg); return pid->driver_data; } #endif /* CONFIG_PNP */ diff --git a/isa/sb/es968.c b/isa/sb/es968.c --- a/isa/sb/es968.c +++ b/isa/sb/es968.c @@ -49,12 +49,6 @@ MODULE_PARM_DESC(id, "ID string for es96 MODULE_PARM_DESC(id, "ID string for es968 based soundcard."); module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable es968 based soundcard."); -module_param_array(port, long, NULL, 0444); -MODULE_PARM_DESC(port, "Port # for es968 driver."); -module_param_array(irq, int, NULL, 0444); -MODULE_PARM_DESC(irq, "IRQ # for es968 driver."); -module_param_array(dma8, int, NULL, 0444); -MODULE_PARM_DESC(dma8, "8-bit DMA # for es968 driver.");
struct snd_card_es968 { struct pnp_dev *dev; @@ -86,40 +80,23 @@ static int __devinit snd_card_es968_pnp( const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); int err; - if (!cfg) - return -ENOMEM; + acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->dev == NULL) { - kfree(cfg); + if (acard->dev == NULL) return -ENODEV; - }
pdev = acard->dev;
- pnp_init_resource_table(cfg); - - /* override resources */ - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port[dev], 16); - if (dma8[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma8[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "AUDIO the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR PFX "AUDIO pnp configure failure\n"); - kfree(cfg); return err; } port[dev] = pnp_port_start(pdev, 0); dma8[dev] = pnp_dma(pdev, 1); irq[dev] = pnp_irq(pdev, 0);
- kfree(cfg); return 0; }
diff --git a/isa/sb/sb16.c b/isa/sb/sb16.c --- a/isa/sb/sb16.c +++ b/isa/sb/sb16.c @@ -257,44 +257,21 @@ static int __devinit snd_card_sb16_pnp(i const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->dev == NULL) { - kfree(cfg); + if (acard->dev == NULL) return -ENODEV; - } + #ifdef SNDRV_SBAWE_EMU8000 acard->devwt = pnp_request_card_device(card, id->devs[1].id, acard->dev); #endif /* Audio initialization */ pdev = acard->dev;
- pnp_init_resource_table(cfg); - - /* override resources */ - - if (port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], port[dev], 16); - if (mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], mpu_port[dev], 2); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[2], fm_port[dev], 4); - if (dma8[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma8[dev], 1); - if (dma16[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma16[dev], 1); - if (irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR PFX "AUDIO the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR PFX "AUDIO pnp configure failure\n"); - kfree(cfg); return err; } port[dev] = pnp_port_start(pdev, 0); @@ -311,17 +288,6 @@ static int __devinit snd_card_sb16_pnp(i /* WaveTable initialization */ pdev = acard->devwt; if (pdev != NULL) { - pnp_init_resource_table(cfg); - - /* override resources */ - - if (awe_port[dev] != SNDRV_AUTO_PORT) { - pnp_resource_change(&cfg->port_resource[0], awe_port[dev], 4); - pnp_resource_change(&cfg->port_resource[1], awe_port[dev] + 0x400, 4); - pnp_resource_change(&cfg->port_resource[2], awe_port[dev] + 0x800, 4); - } - if ((pnp_manual_config_dev(pdev, cfg, 0)) < 0) - snd_printk(KERN_ERR PFX "WaveTable the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { goto __wt_error; @@ -339,7 +305,6 @@ __wt_error: awe_port[dev] = -1; } #endif - kfree(cfg); return 0; }
diff --git a/isa/wavefront/wavefront.c b/isa/wavefront/wavefront.c --- a/isa/wavefront/wavefront.c +++ b/isa/wavefront/wavefront.c @@ -104,21 +104,15 @@ snd_wavefront_pnp (int dev, snd_wavefron const struct pnp_card_device_id *id) { struct pnp_dev *pdev; - struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); int err;
- if (!cfg) - return -ENOMEM; - /* Check for each logical device. */
/* CS4232 chip (aka "windows sound system") is logical device 0 */
acard->wss = pnp_request_card_device(card, id->devs[0].id, NULL); - if (acard->wss == NULL) { - kfree(cfg); + if (acard->wss == NULL) return -EBUSY; - }
/* there is a game port at logical device 1, but we ignore it completely */
@@ -133,25 +127,19 @@ snd_wavefront_pnp (int dev, snd_wavefron
if (use_cs4232_midi[dev]) { acard->mpu = pnp_request_card_device(card, id->devs[2].id, NULL); - if (acard->mpu == NULL) { - kfree(cfg); + if (acard->mpu == NULL) return -EBUSY; - } }
/* The ICS2115 synth is logical device 4 */
acard->synth = pnp_request_card_device(card, id->devs[3].id, NULL); - if (acard->synth == NULL) { - kfree(cfg); + if (acard->synth == NULL) return -EBUSY; - }
/* PCM/FM initialization */
pdev = acard->wss; - - pnp_init_resource_table(cfg);
/* An interesting note from the Tropez+ FAQ:
@@ -165,23 +153,9 @@ snd_wavefront_pnp (int dev, snd_wavefron
*/
- if (cs4232_pcm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], cs4232_pcm_port[dev], 4); - if (fm_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[1], fm_port[dev], 4); - if (dma1[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[0], dma1[dev], 1); - if (dma2[dev] != SNDRV_AUTO_DMA) - pnp_resource_change(&cfg->dma_resource[1], dma2[dev], 1); - if (cs4232_pcm_irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->irq_resource[0], cs4232_pcm_irq[dev], 1); - - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR "PnP WSS the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR "PnP WSS pnp configure failure\n"); - kfree(cfg); return err; }
@@ -195,22 +169,9 @@ snd_wavefront_pnp (int dev, snd_wavefron
pdev = acard->synth; - pnp_init_resource_table(cfg); - - if (ics2115_port[dev] != SNDRV_AUTO_PORT) { - pnp_resource_change(&cfg->port_resource[0], ics2115_port[dev], 16); - } - - if (ics2115_port[dev] != SNDRV_AUTO_IRQ) { - pnp_resource_change(&cfg->irq_resource[0], ics2115_irq[dev], 1); - } - - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR "PnP ICS2115 the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR "PnP ICS2115 pnp configure failure\n"); - kfree(cfg); return err; }
@@ -226,15 +187,6 @@ snd_wavefront_pnp (int dev, snd_wavefron
pdev = acard->mpu;
- pnp_init_resource_table(cfg); - - if (cs4232_mpu_port[dev] != SNDRV_AUTO_PORT) - pnp_resource_change(&cfg->port_resource[0], cs4232_mpu_port[dev], 2); - if (cs4232_mpu_irq[dev] != SNDRV_AUTO_IRQ) - pnp_resource_change(&cfg->port_resource[0], cs4232_mpu_irq[dev], 1); - - if (pnp_manual_config_dev(pdev, cfg, 0) < 0) - snd_printk(KERN_ERR "PnP MPU401 the requested resources are invalid, using auto config\n"); err = pnp_activate_dev(pdev); if (err < 0) { snd_printk(KERN_ERR "PnP MPU401 pnp configure failure\n"); @@ -258,7 +210,6 @@ snd_wavefront_pnp (int dev, snd_wavefron ics2115_port[dev], ics2115_irq[dev]); - kfree(cfg); return 0; }
At Thu, 29 Nov 2007 02:10:33 +0100, Rene Herman wrote:
Hi Takashi.
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread).
Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets).
Signed-off-by: Rene Herman rene.herman@gmail.com
A good work. I'll merge this tomorrow to ALSA tree if no one raises objection now.
thanks,
Takashi
On Thu, 29 Nov 2007, Takashi Iwai wrote:
At Thu, 29 Nov 2007 02:10:33 +0100, Rene Herman wrote:
Hi Takashi.
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread).
Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets).
Signed-off-by: Rene Herman rene.herman@gmail.com
A good work. I'll merge this tomorrow to ALSA tree if no one raises objection now.
Do we have a nice way to manually assign ISA resources at system level? Note that not all combinations work for all ISA PnP soundcards and we had bug reports that automatic PnP system failed in some cases.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project
At Fri, 30 Nov 2007 10:52:26 +0100 (CET), Jaroslav Kysela wrote:
On Thu, 29 Nov 2007, Takashi Iwai wrote:
At Thu, 29 Nov 2007 02:10:33 +0100, Rene Herman wrote:
Hi Takashi.
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread).
Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets).
Signed-off-by: Rene Herman rene.herman@gmail.com
A good work. I'll merge this tomorrow to ALSA tree if no one raises objection now.
Do we have a nice way to manually assign ISA resources at system level? Note that not all combinations work for all ISA PnP soundcards and we had bug reports that automatic PnP system failed in some cases.
You can adjust it via sysfs.
Takashi
On Fri, 30 Nov 2007, Takashi Iwai wrote:
At Fri, 30 Nov 2007 10:52:26 +0100 (CET), Jaroslav Kysela wrote:
On Thu, 29 Nov 2007, Takashi Iwai wrote:
At Thu, 29 Nov 2007 02:10:33 +0100, Rene Herman wrote:
Hi Takashi.
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread).
Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets).
Signed-off-by: Rene Herman rene.herman@gmail.com
A good work. I'll merge this tomorrow to ALSA tree if no one raises objection now.
Do we have a nice way to manually assign ISA resources at system level? Note that not all combinations work for all ISA PnP soundcards and we had bug reports that automatic PnP system failed in some cases.
You can adjust it via sysfs.
Ok, then we need to document this way properly in our documentation before feature removal. Probably using 'install' commmand in modprobe.conf. Also note that user must probably know exact sysfs path (PnP ID) making PnP stuff more complicated in this case. It is different from current behaviour.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project
At Fri, 30 Nov 2007 13:25:22 +0100 (CET), Jaroslav Kysela wrote:
On Fri, 30 Nov 2007, Takashi Iwai wrote:
At Fri, 30 Nov 2007 10:52:26 +0100 (CET), Jaroslav Kysela wrote:
On Thu, 29 Nov 2007, Takashi Iwai wrote:
At Thu, 29 Nov 2007 02:10:33 +0100, Rene Herman wrote:
Hi Takashi.
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread).
Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets).
Signed-off-by: Rene Herman rene.herman@gmail.com
A good work. I'll merge this tomorrow to ALSA tree if no one raises objection now.
Do we have a nice way to manually assign ISA resources at system level? Note that not all combinations work for all ISA PnP soundcards and we had bug reports that automatic PnP system failed in some cases.
You can adjust it via sysfs.
Ok, then we need to document this way properly in our documentation before feature removal.
Yes, see Bjorn's previous post.
Probably using 'install' commmand in modprobe.conf. Also note that user must probably know exact sysfs path (PnP ID) making PnP stuff more complicated in this case. It is different from current behaviour.
Such a device requring the manual configuration is basically broken. It should be fixed, e.g. by adding a quirk to pnp driver.
Takashi
On Fri, 30 Nov 2007, Takashi Iwai wrote:
At Fri, 30 Nov 2007 13:25:22 +0100 (CET), Jaroslav Kysela wrote:
On Fri, 30 Nov 2007, Takashi Iwai wrote:
At Fri, 30 Nov 2007 10:52:26 +0100 (CET), Jaroslav Kysela wrote:
On Thu, 29 Nov 2007, Takashi Iwai wrote:
At Thu, 29 Nov 2007 02:10:33 +0100, Rene Herman wrote:
Hi Takashi.
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread).
Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets).
Signed-off-by: Rene Herman rene.herman@gmail.com
A good work. I'll merge this tomorrow to ALSA tree if no one raises objection now.
Do we have a nice way to manually assign ISA resources at system level? Note that not all combinations work for all ISA PnP soundcards and we had bug reports that automatic PnP system failed in some cases.
You can adjust it via sysfs.
Ok, then we need to document this way properly in our documentation before feature removal.
Yes, see Bjorn's previous post.
Probably using 'install' commmand in modprobe.conf. Also note that user must probably know exact sysfs path (PnP ID) making PnP stuff more complicated in this case. It is different from current behaviour.
Such a device requring the manual configuration is basically broken. It should be fixed, e.g. by adding a quirk to pnp driver.
Note that in some cases, it's not about a device, but about motherboard and device interoperability. I've seen some ISA motherboards with some unusable DMA channels.
Anyway, it's true that ISA PnP stuff is quite obsolete current days. If manual settings is supported and described, I've no objections to reduce code, too.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project
At Fri, 30 Nov 2007 14:32:53 +0100 (CET), Jaroslav Kysela wrote:
On Fri, 30 Nov 2007, Takashi Iwai wrote:
At Fri, 30 Nov 2007 13:25:22 +0100 (CET), Jaroslav Kysela wrote:
On Fri, 30 Nov 2007, Takashi Iwai wrote:
At Fri, 30 Nov 2007 10:52:26 +0100 (CET), Jaroslav Kysela wrote:
On Thu, 29 Nov 2007, Takashi Iwai wrote:
At Thu, 29 Nov 2007 02:10:33 +0100, Rene Herman wrote: > > Hi Takashi. > > This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In > 2.4 these were useful in providing an easy path to setting the resources, > but in 2.6 they retain function as a layering violation only. > > This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the > only remaining user of pnp_init_resource_table(), pnp_resource_change() and > pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in > the tree outide of drivers/pnp itself meaning it makes for more cleanup > potential inside the PnP layer. > > Thomas Renninger acked their removal from that side, you did from the ALSA > side (CC list just copied from that thread). > > Against current alsa-kernel HG. Many more potential cleanups in there, but > this _only_ removes the pnp_resource_change code. Compile tested against > current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few > offsets). > > Signed-off-by: Rene Herman rene.herman@gmail.com
A good work. I'll merge this tomorrow to ALSA tree if no one raises objection now.
Do we have a nice way to manually assign ISA resources at system level? Note that not all combinations work for all ISA PnP soundcards and we had bug reports that automatic PnP system failed in some cases.
You can adjust it via sysfs.
Ok, then we need to document this way properly in our documentation before feature removal.
Yes, see Bjorn's previous post.
Probably using 'install' commmand in modprobe.conf. Also note that user must probably know exact sysfs path (PnP ID) making PnP stuff more complicated in this case. It is different from current behaviour.
Such a device requring the manual configuration is basically broken. It should be fixed, e.g. by adding a quirk to pnp driver.
Note that in some cases, it's not about a device, but about motherboard and device interoperability. I've seen some ISA motherboards with some unusable DMA channels.
Anyway, it's true that ISA PnP stuff is quite obsolete current days. If manual settings is supported and described, I've no objections to reduce code, too.
OK, now it's merged to ALSA tree.
Rene, care to create a patch to add some documentation about this interface change? At best, add some notes to ALSA-Configuration.txt, IMO.
Thanks,
Takashi
On 30-11-07 14:32, Jaroslav Kysela wrote:
Anyway, it's true that ISA PnP stuff is quite obsolete current days. If manual settings is supported and described, I've no objections to reduce code, too.
Okay. I've just submitted a further upadet to ALSA-Configuration.txt and I'll look into being a bit more verbose about how to set resources in Documentation/pnp.txt and possibly defer users from ALSA-Configuration.txt there.
Thomas Renninger is making some haste with the deprecation of the removed functions by the way -- I just saw a patch of his entering my mailbox where he says he'd in fact like them deprecated in 2.6.24 already. The ALSA removal would not seem likely to be scheduled to go to 2.6.24 yet, so I guess that won't do?
I have no opinion on the schedule -- but Thomas, if you do, I guess you'd need to convince Jaroslav to withstand The Wrath Of Linus and ask him to push it. We can't have it deprecated (on the "spew warnings" level) with ALSA still using them in 2.6.24.
Rene.
On Fri, 2007-11-30 at 18:19 +0100, Rene Herman wrote:
On 30-11-07 14:32, Jaroslav Kysela wrote:
Anyway, it's true that ISA PnP stuff is quite obsolete current days. If manual settings is supported and described, I've no objections to reduce code, too.
Okay. I've just submitted a further upadet to ALSA-Configuration.txt and I'll look into being a bit more verbose about how to set resources in Documentation/pnp.txt and possibly defer users from ALSA-Configuration.txt there.
Thomas Renninger is making some haste with the deprecation of the removed functions by the way -- I just saw a patch of his entering my mailbox where he says he'd in fact like them deprecated in 2.6.24 already. The ALSA removal would not seem likely to be scheduled to go to 2.6.24 yet, so I guess that won't do?
I have no opinion on the schedule -- but Thomas, if you do, I guess you'd need to convince Jaroslav to withstand The Wrath Of Linus and ask him to push it. We can't have it deprecated (on the "spew warnings" level) with ALSA still using them in 2.6.24.
Why not? The intend of __deprecated is to throw some compile warnings? In this case it would warn on the official 2.6.24 on functions which are known to be reverted already for the next cycle (this should not hurt?), it's more for drivers building against kernel headers getting noticed as soon as possible...
If this is not added to 2.6.24, the funcs should live there for another kernel cycle just to not print some irrelevant warnings at compile time things are slowed down...
Thomas
This is also in vanilla and lives there for some time?: kernel/power/pm.c:205: warning: ‘pm_register’ is deprecated (declared at kernel/power/pm.c:64) kernel/power/pm.c:205: warning: ‘pm_register’ is deprecated (declared at kernel/power/pm.c:64) kernel/power/pm.c:206: warning: ‘pm_send_all’ is deprecated (declared at kernel/power/pm.c:180) kernel/power/pm.c:206: warning: ‘pm_send_all’ is deprecated (declared at kernel/power/pm.c:180)
and there were hundreds of pci_find_bus_...() or similar marked deprecated warnings some time ago (I doubt this was a suse kernel modification)...
On 30-11-07 18:39, Thomas Renninger wrote:
On Fri, 2007-11-30 at 18:19 +0100, Rene Herman wrote:
Thomas Renninger is making some haste with the deprecation of the removed functions by the way -- I just saw a patch of his entering my mailbox where he says he'd in fact like them deprecated in 2.6.24 already. The ALSA removal would not seem likely to be scheduled to go to 2.6.24 yet, so I guess that won't do?
I have no opinion on the schedule -- but Thomas, if you do, I guess you'd need to convince Jaroslav to withstand The Wrath Of Linus and ask him to push it. We can't have it deprecated (on the "spew warnings" level) with ALSA still using them in 2.6.24.
Why not? The intend of __deprecated is to throw some compile warnings? In this case it would warn on the official 2.6.24 on functions which are known to be reverted already for the next cycle (this should not hurt?),
It does. A clean build is not about esthetics but about quality. Warnings that are to be ignored hide warnings that are not to be, not just in the sense of the output but due to humans actively tuning out the noise after just a few. I'd hate for sound/isa to add to the noise.
it's more for drivers building against kernel headers getting noticed as soon as possible...
If this is not added to 2.6.24, the funcs should live there for another kernel cycle just to not print some irrelevant warnings at compile time things are slowed down...
This makes sense if someone told you that the deprecation period for exported symbols is one kernel cycle but who did?
Anyways, two things:
The number of out of tree users of these symbols is very close to zero and quite possibly if not likely _at_ zero after I've cleaned up the couple of half-hearted ALSA ISAPnP drivers that I keep in a few local branches here.
As such, and given that removing them apparently clears the path for a long overdue and welcome PnP cleanup, simply yanking them soon would get my ack.
Second, as said, speak to Jaroslav as well I guess.
This is also in vanilla and lives there for some time?: kernel/power/pm.c:205: warning: ‘pm_register’ is deprecated (declared at kernel/power/pm.c:64) kernel/power/pm.c:205: warning: ‘pm_register’ is deprecated (declared at kernel/power/pm.c:64) kernel/power/pm.c:206: warning: ‘pm_send_all’ is deprecated (declared at kernel/power/pm.c:180) kernel/power/pm.c:206: warning: ‘pm_send_all’ is deprecated (declared at kernel/power/pm.c:180)
Exactly, and serves as a perfect reminder of why noone should ever be allowed to deprecate anything until after removing all in tree users.
Rene.
On Wednesday 28 November 2007 06:10:33 pm Rene Herman wrote:
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
I think this is great and will certainly clean up the PNP interfaces.
But are you removing functionality that people need? I don't know anything about ALSA, but we have to assume that some BIOSes supply incorrect resource information. If you remove all these module parameters, is there still a way to workaround the BIOS defects?
Bjorn
On 29-11-07 17:20, Bjorn Helgaas wrote:
On Wednesday 28 November 2007 06:10:33 pm Rene Herman wrote:
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
I think this is great and will certainly clean up the PNP interfaces.
But are you removing functionality that people need? I don't know anything about ALSA, but we have to assume that some BIOSes supply incorrect resource information. If you remove all these module parameters, is there still a way to workaround the BIOS defects?
Yes, sure, by just echoing resource values into sysfs files as a direct replacement (ie, doing the same thing at the PnP layer directly) and possibly by adding quirks for any definite and standing issues. We already have a few of those in fact for SB16, AWE32 and CMI8330 chips, in drivers/pnp/quirks.c.
But the expected use is just no manual settings at all, same as with say PCI. I've always been a little disappointed at the ISAPnP bad rep. It's a fully sane bus as far as the interface is concerned.
And by the way, real-life issue with sound and PnP seems to be confined to older laptops with an onboard Cirrus CS423x advertised through PnPBIOS/ACPI and PnPBIOS/ACPI claiming the resources could not actually be changed, which the now removed code tried to do anyway. You were CCed on a report of that a while ago. Don't know if that went anywhere but if anything, this removal of the problematic code makes it better (probably fixes it fully in fact...).
Rene.
On 29-11-07 17:20, Bjorn Helgaas wrote:
On Wednesday 28 November 2007 06:10:33 pm Rene Herman wrote:
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
I think this is great and will certainly clean up the PNP interfaces.
But are you removing functionality that people need? I don't know anything about ALSA, but we have to assume that some BIOSes supply incorrect resource information. If you remove all these module parameters, is there still a way to workaround the BIOS defects?
Yes, sure, by just echoing resource values into sysfs files as a direct replacement (ie, doing the same thing at the PnP layer directly) and possibly by adding quirks for any definite and standing issues. We already have a few of those in fact for SB16, AWE32 and CMI8330 chips, in drivers/pnp/quirks.c.
But the expected use is just no manual settings at all, same as with say PCI. I've always been a little disappointed at the ISAPnP bad rep. It's a fully sane bus as far as the interface is concerned.
And by the way, real-life issue with sound and PnP seems to be confined to older laptops with an onboard Cirrus CS423x advertised through PnPBIOS/ACPI and PnPBIOS/ACPI claiming the resources could not actually be changed, which the now removed code tried to do anyway. You were CCed on a report of that a while ago. Don't know if that went anywhere but if anything, this removal of the problematic code makes it better (probably fixes it fully in fact...).
Rene.
On Thursday 29 November 2007 10:35:45 am Rene Herman wrote:
On 29-11-07 17:20, Bjorn Helgaas wrote:
On Wednesday 28 November 2007 06:10:33 pm Rene Herman wrote:
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only.
This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of "struct pnp_resource_table") in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer.
I think this is great and will certainly clean up the PNP interfaces.
But are you removing functionality that people need? I don't know anything about ALSA, but we have to assume that some BIOSes supply incorrect resource information. If you remove all these module parameters, is there still a way to workaround the BIOS defects?
Yes, sure, by just echoing resource values into sysfs files as a direct replacement (ie, doing the same thing at the PnP layer directly) and possibly by adding quirks for any definite and standing issues. We already have a few of those in fact for SB16, AWE32 and CMI8330 chips, in drivers/pnp/quirks.c.
OK, good.
Anyone who relies on the manual settings will have to change the way it's done, so maybe the changelog and documentation update should include some text along the lines of:
- this removes module parameters for ISAPNP ALSA resources - the drivers *should* work with no manual resource settings - if you need manual resource settings (usually to work around a broken BIOS), - please report the problem in the Drivers/PNP component at http://bugzilla.kernel.org/enter_bug.cgi and attach the dmesg log, /proc/{interrupts,iomem,ioports} contents, dmidecode output, and broken and working resource settings - work around the problem by echoing resource settings directly into the sysfs resource file, e.g., # cd /sys/devices/pnp0/00:06 # cat resources > /tmp/resources # <edit resource settings in /tmp/resources> # cat /tmp/resources > resources # modprobe <driver>
Bjorn
On 29-11-07 20:30, Bjorn Helgaas wrote:
OK, good.
Anyone who relies on the manual settings will have to change the way it's done, so maybe the changelog and documentation update should include some text along the lines of:
- this removes module parameters for ISAPNP ALSA resources
- the drivers *should* work with no manual resource settings
- if you need manual resource settings (usually to work around a broken BIOS),
Actually, the ALSA drivers with PnPBIOS support (snd-cs4232, snd-es18xx and snd-opl3sa2) do not in fact loose any parameters and the few known trouble spots there are using
modprobe snd-foo isapnp=0 port=...
as their workaround, bypassing all of PnP, and this still works completely the same as before.
I do not expect any trouble. A few users might have _mistakingly_ added parameters to an ISAPnP only (as in, not also PnPBIOS) driver due to googling up your generic bad-advice webforum that said that worked for someone with a heavy sounding nickname, but we can deal with that.
Moreover, as I've been experiencing on the ALSA list for a while now (where I've been somewhat responsive to ISA related issues) basically anything but PnPBIOS/ACPI ISA is mostly dead and as said, with an isapnp=0 in the drivers there which known issues are using, there's no difference.
Advice is always good, but I'd not put in the ALSA documentation (wrong place) and even in the changelog it sounds a bit overly alarming in my own opinion. The expected fall-out is... <crickets>...
Rene.
At Fri, 30 Nov 2007 01:49:00 +0100, Rene Herman wrote:
On 29-11-07 20:30, Bjorn Helgaas wrote:
OK, good.
Anyone who relies on the manual settings will have to change the way it's done, so maybe the changelog and documentation update should include some text along the lines of:
- this removes module parameters for ISAPNP ALSA resources
- the drivers *should* work with no manual resource settings
- if you need manual resource settings (usually to work around a broken BIOS),
Actually, the ALSA drivers with PnPBIOS support (snd-cs4232, snd-es18xx and snd-opl3sa2) do not in fact loose any parameters and the few known trouble spots there are using
modprobe snd-foo isapnp=0 port=...
as their workaround, bypassing all of PnP, and this still works completely the same as before.
I do not expect any trouble. A few users might have _mistakingly_ added parameters to an ISAPnP only (as in, not also PnPBIOS) driver due to googling up your generic bad-advice webforum that said that worked for someone with a heavy sounding nickname, but we can deal with that.
Moreover, as I've been experiencing on the ALSA list for a while now (where I've been somewhat responsive to ISA related issues) basically anything but PnPBIOS/ACPI ISA is mostly dead and as said, with an isapnp=0 in the drivers there which known issues are using, there's no difference.
Advice is always good, but I'd not put in the ALSA documentation (wrong place) and even in the changelog it sounds a bit overly alarming in my own opinion. The expected fall-out is... <crickets>...
Hm, but still some notes are needed for ALSA-Configuration.txt mentioning that the resource parameters like port, io, etc can be used only when isapnp=no on some drivers. The parameters are still there, so people may wonder if it has no use.
Takashi
On 30-11-07 10:07, Takashi Iwai wrote:
At Fri, 30 Nov 2007 01:49:00 +0100, Rene Herman wrote:
Actually, the ALSA drivers with PnPBIOS support (snd-cs4232, snd-es18xx and snd-opl3sa2) do not in fact loose any parameters and the few known trouble spots there are using
modprobe snd-foo isapnp=0 port=...
as their workaround, bypassing all of PnP, and this still works completely the same as before.
I do not expect any trouble. A few users might have _mistakingly_ added parameters to an ISAPnP only (as in, not also PnPBIOS) driver due to googling up your generic bad-advice webforum that said that worked for someone with a heavy sounding nickname, but we can deal with that.
Moreover, as I've been experiencing on the ALSA list for a while now (where I've been somewhat responsive to ISA related issues) basically anything but PnPBIOS/ACPI ISA is mostly dead and as said, with an isapnp=0 in the drivers there which known issues are using, there's no difference.
Advice is always good, but I'd not put in the ALSA documentation (wrong place) and even in the changelog it sounds a bit overly alarming in my own opinion. The expected fall-out is... <crickets>...
Hm, but still some notes are needed for ALSA-Configuration.txt mentioning that the resource parameters like port, io, etc can be used only when isapnp=no on some drivers. The parameters are still there, so people may wonder if it has no use.
Okay, something like this? Incremental...
By the way, eventually I'd in fact probably like to move some of the drivers that now still support legacy ISA over to PnP only. After all, chips such as the CMI8330, CS4232+, ES1869+ and OPL3SA2 _are_ PnP only chips.
Certainly for CS4232+ and ES1869+ that can't be done currently as we know people are in fact using isapnp=0 to work around PnPBIOS issues but from the previous report there it seemed that might actually just consist of the BIOS claiming no resource change is possible, which pnp_activate_dev (through pnp_autoconfig_dev) insist on anyway. This would be something to fix inside PnP instead...
Anyways, here's just a further Documentation update. You once told me to start new threads for patches, but that seems clumsy now... :-|
Rene.
diff --git a/Documentation/ALSA-Configuration.txt b/Documentation/ALSA-Configuration.txt --- a/Documentation/ALSA-Configuration.txt +++ b/Documentation/ALSA-Configuration.txt @@ -328,6 +328,10 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on C-Media CMI8330 ISA chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + wssport - port # for CMI8330 chip (WSS) wssirq - IRQ # for CMI8330 chip (WSS) wssdma - first DMA # for CMI8330 chip (WSS) @@ -382,6 +386,10 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on CS4232/CS4232A ISA chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - port # for CS4232 chip (PnP setup - 0x534) cport - control port # for CS4232 chip (PnP setup - 0x120,0x210,0xf00) mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable @@ -390,10 +398,10 @@ Prior to version 0.9.0rc4 options had a mpu_irq - IRQ # for MPU-401 UART (9,11,12,15) dma1 - first DMA # for CS4232 chip (0,1,3) dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable - isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards. This module does not support autoprobe - thus main port must be specified!!! Other ports are optional. + (if ISA PnP is not used) thus main port must be specified!!! Other ports are + optional.
The power-management is supported.
@@ -402,6 +410,10 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on CS4235/CS4236/CS4236B/CS4237B/ CS4238B/CS4239 ISA chips. + + isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available:
port - port # for CS4236 chip (PnP setup - 0x534) cport - control port # for CS4236 chip (PnP setup - 0x120,0x210,0xf00) @@ -411,7 +423,6 @@ Prior to version 0.9.0rc4 options had a mpu_irq - IRQ # for MPU-401 UART (9,11,12,15) dma1 - first DMA # for CS4236 chip (0,1,3) dma2 - second DMA # for CS4236 chip (0,1,3), -1 = disable - isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards. This module does not support autoprobe (if ISA PnP is not used) thus main port and control port must be @@ -600,13 +611,16 @@ Prior to version 0.9.0rc4 options had a
Module for ESS AudioDrive ES-18xx sound cards.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - port # for ES-18xx chip (0x220,0x240,0x260) mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default) fm_port - port # for FM (optional, not used) irq - IRQ # for ES-18xx chip (5,7,9,10) dma1 - first DMA # for ES-18xx chip (0,1,3) dma2 - first DMA # for ES-18xx chip (0,1,3) - isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards, ISA PnP and autoprobe (without MPU-401 port if native ISA PnP routines are not used). @@ -1230,15 +1244,19 @@ Prior to version 0.9.0rc4 options had a Module for Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32 and other sound cards based on AMD InterWave (tm) chip.
- port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260) - irq - IRQ # for InterWave chip (3,5,9,11,12,15) - dma1 - DMA # for InterWave chip (0,1,3,5,6,7) - dma2 - DMA # for InterWave chip (0,1,3,5,6,7,-1=disable) joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V) midi - 1 = MIDI UART enable, 0 = MIDI UART disable (default) pcm_voices - reserved PCM voices for the synthesizer (default 2) effect - 1 = InterWave effects enable (default 0); requires 8 voices + isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + + port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260) + irq - IRQ # for InterWave chip (3,5,9,11,12,15) + dma1 - DMA # for InterWave chip (0,1,3,5,6,7) + dma2 - DMA # for InterWave chip (0,1,3,5,6,7,-1=disable)
This module supports multiple cards, autoprobe and ISA PnP.
@@ -1249,16 +1267,20 @@ Prior to version 0.9.0rc4 options had a and other sound cards based on AMD InterWave (tm) chip with TEA6330T circuit for extended control of bass, treble and master volume.
+ joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V) + midi - 1 = MIDI UART enable, 0 = MIDI UART disable (default) + pcm_voices - reserved PCM voices for the synthesizer (default 2) + effect - 1 = InterWave effects enable (default 0); + requires 8 voices + isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260) port_tc - tone control (i2c bus) port # for TEA6330T chip (0x350,0x360,0x370,0x380) irq - IRQ # for InterWave chip (3,5,9,11,12,15) dma1 - DMA # for InterWave chip (0,1,3,5,6,7) dma2 - DMA # for InterWave chip (0,1,3,5,6,7,-1=disable) - joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V) - midi - 1 = MIDI UART enable, 0 = MIDI UART disable (default) - pcm_voices - reserved PCM voices for the synthesizer (default 2) - effect - 1 = InterWave effects enable (default 0); - requires 8 voices
This module supports multiple cards, autoprobe and ISA PnP.
@@ -1446,6 +1468,10 @@ Prior to version 0.9.0rc4 options had a
Module for Yamaha OPL3-SA2/SA3 sound cards.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - control port # for OPL3-SA chip (0x370) sb_port - SB port # for OPL3-SA chip (0x220,0x240) wss_port - WSS port # for OPL3-SA chip (0x530,0xe80,0xf40,0x604) @@ -1454,7 +1480,6 @@ Prior to version 0.9.0rc4 options had a irq - IRQ # for OPL3-SA chip (5,7,9,10) dma1 - first DMA # for Yamaha OPL3-SA chip (0,1,3) dma2 - second DMA # for Yamaha OPL3-SA chip (0,1,3), -1 = disable - isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards and ISA PnP. It does not support autoprobe (if ISA PnP is not used) thus all ports must be specified!!! @@ -1467,6 +1492,10 @@ Prior to version 0.9.0rc4 options had a Module for sound cards based on OPTi 82c92x and Analog Devices AD1848 chips. Module works with OAK Mozart cards as well.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - port # for WSS chip (0x530,0xe80,0xf40,0x604) mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330) fm_port - port # for OPL3 device (0x388) @@ -1481,6 +1510,10 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on OPTi 82c92x and Crystal CS4231 chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - port # for WSS chip (0x530,0xe80,0xf40,0x604) mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330) fm_port - port # for OPL3 device (0x388) @@ -1496,6 +1529,10 @@ Prior to version 0.9.0rc4 options had a
Module for sound cards based on OPTi 82c93x chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - port # for WSS chip (0x530,0xe80,0xf40,0x604) mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330) fm_port - port # for OPL3 device (0x388) @@ -1620,6 +1657,12 @@ Prior to version 0.9.0rc4 options had a SoundBlaster AWE 32 (PnP), SoundBlaster AWE 64 PnP
+ mic_agc - Mic Auto-Gain-Control - 0 = disable, 1 = enable (default) + csp - ASP/CSP chip support - 0 = disable (default), 1 = enable + isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + port - port # for SB DSP 4.x chip (0x220,0x240,0x260) mpu_port - port # for MPU-401 UART (0x300,0x330), -1 = disable awe_port - base port # for EMU8000 synthesizer (0x620,0x640,0x660) @@ -1627,9 +1670,6 @@ Prior to version 0.9.0rc4 options had a irq - IRQ # for SB DSP 4.x chip (5,7,9,10) dma8 - 8-bit DMA # for SB DSP 4.x chip (0,1,3) dma16 - 16-bit DMA # for SB DSP 4.x chip (5,6,7) - mic_agc - Mic Auto-Gain-Control - 0 = disable, 1 = enable (default) - csp - ASP/CSP chip support - 0 = disable (default), 1 = enable - isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards, autoprobe and ISA PnP.
@@ -1712,18 +1752,21 @@ Prior to version 0.9.0rc4 options had a
Module for Turtle Beach Maui, Tropez and Tropez+ sound cards.
+ use_cs4232_midi - Use CS4232 MPU-401 interface + (inaccessibly located inside your computer) + isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) + + with isapnp=0, the following options are available: + cs4232_pcm_port - Port # for CS4232 PCM interface. cs4232_pcm_irq - IRQ # for CS4232 PCM interface (5,7,9,11,12,15). cs4232_mpu_port - Port # for CS4232 MPU-401 interface. cs4232_mpu_irq - IRQ # for CS4232 MPU-401 interface (9,11,12,15). - use_cs4232_midi - Use CS4232 MPU-401 interface - (inaccessibly located inside your computer) ics2115_port - Port # for ICS2115 ics2115_irq - IRQ # for ICS2115 fm_port - FM OPL-3 Port # dma1 - DMA1 # for CS4232 PCM interface. dma2 - DMA2 # for CS4232 PCM interface. - isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
The below are options for wavefront_synth features: wf_raw - Assume that we need to boot the OS (default:no)
At Fri, 30 Nov 2007 18:07:27 +0100, Rene Herman wrote:
On 30-11-07 10:07, Takashi Iwai wrote:
At Fri, 30 Nov 2007 01:49:00 +0100, Rene Herman wrote:
Actually, the ALSA drivers with PnPBIOS support (snd-cs4232, snd-es18xx and snd-opl3sa2) do not in fact loose any parameters and the few known trouble spots there are using
modprobe snd-foo isapnp=0 port=...
as their workaround, bypassing all of PnP, and this still works completely the same as before.
I do not expect any trouble. A few users might have _mistakingly_ added parameters to an ISAPnP only (as in, not also PnPBIOS) driver due to googling up your generic bad-advice webforum that said that worked for someone with a heavy sounding nickname, but we can deal with that.
Moreover, as I've been experiencing on the ALSA list for a while now (where I've been somewhat responsive to ISA related issues) basically anything but PnPBIOS/ACPI ISA is mostly dead and as said, with an isapnp=0 in the drivers there which known issues are using, there's no difference.
Advice is always good, but I'd not put in the ALSA documentation (wrong place) and even in the changelog it sounds a bit overly alarming in my own opinion. The expected fall-out is... <crickets>...
Hm, but still some notes are needed for ALSA-Configuration.txt mentioning that the resource parameters like port, io, etc can be used only when isapnp=no on some drivers. The parameters are still there, so people may wonder if it has no use.
Okay, something like this? Incremental...
By the way, eventually I'd in fact probably like to move some of the drivers that now still support legacy ISA over to PnP only. After all, chips such as the CMI8330, CS4232+, ES1869+ and OPL3SA2 _are_ PnP only chips.
Certainly for CS4232+ and ES1869+ that can't be done currently as we know people are in fact using isapnp=0 to work around PnPBIOS issues but from the previous report there it seemed that might actually just consist of the BIOS claiming no resource change is possible, which pnp_activate_dev (through pnp_autoconfig_dev) insist on anyway. This would be something to fix inside PnP instead...
Well, I'm not sure about that. Certainly there are some users that use isapnp=no with explicit parameters.
Anyways, here's just a further Documentation update. You once told me to start new threads for patches, but that seems clumsy now... :-|
Thanks. It seems that people do care more on explanations about the removal of options. Could you add that, too? Just mention about sysfs as alternative way to change the parameters...
Thanks,
Takashi
On 30-11-07 17:27, Takashi Iwai wrote:
At Fri, 30 Nov 2007 18:07:27 +0100, Rene Herman wrote:
By the way, eventually I'd in fact probably like to move some of the drivers that now still support legacy ISA over to PnP only. After all, chips such as the CMI8330, CS4232+, ES1869+ and OPL3SA2 _are_ PnP only chips.
Certainly for CS4232+ and ES1869+ that can't be done currently as we know people are in fact using isapnp=0 to work around PnPBIOS issues but from the previous report there it seemed that might actually just consist of the BIOS claiming no resource change is possible, which pnp_activate_dev (through pnp_autoconfig_dev) insist on anyway. This would be something to fix inside PnP instead...
Well, I'm not sure about that. Certainly there are some users that use isapnp=no with explicit parameters.
Yes, currently, but as said, we might be able to al least make sure they don't _need_ to do that at the PnP layer after which it becomes somewhat debatable at least. But yes, sure, not now, once, maybe, perhaps, ...
Anyways, here's just a further Documentation update. You once told me to start new threads for patches, but that seems clumsy now... :-|
Thanks. It seems that people do care more on explanations about the removal of options. Could you add that, too? Just mention about sysfs as alternative way to change the parameters...
Yes. Documentation/pnp.txt wants to be a little more verbose after which ALSA documentation can refer to it. I'll cook something up...
Rene.
participants (6)
-
Bjorn Helgaas
-
Jaroslav Kysela
-
Rene Herman
-
Rene Herman
-
Takashi Iwai
-
Thomas Renninger