diff options
author | Christoph Schulz <develop@kristov.de> | 2005-06-03 02:28:31 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-06-22 06:28:06 -0400 |
commit | 375389288ae55754bd7d009a30f2bb0453a5b369 (patch) | |
tree | 198c9b17940512130428d0be56d4e836865cff43 /sound/isa/cs423x | |
parent | 5ac0fab95c09497bed24640eb3f09893127d6d65 (diff) |
[ALSA] cs4236-irq-handling-fix.patch
CS4236+ driver
Background: The card/chipset supports an external MIDI interrupt. By
default, this interrupt isn't used (because the isapnp mechanism chooses a
configuration without an assigned interrupt). If the user wishes to
explicitly select an interrupt via the mpu_irq parameter for such a
configured device, it doesn't work: The driver always shows:
isapnp MPU: port=0x330, irq=-1
(note the 'irq=-1')
Problem: The driver only allows to set the irq if pnp_irq_valid returns
true for this particular pnp device. This, however, is only true if an
interrupt has already been assigned (pnp_valid_irq returns true if the flag
IORESOURCE_IRQ is set and IORESOURCE_UNSET is not set). If no interrupt
has been assigned so far, IORESOURCE_UNSET is set and pnp_irq_valid returns
false, thereby inhibiting the selection of a valid irq.
Solution: Don't check for a valid (= already assigned) irq at the point of
calling pnp_resource_change.
Tested successfully on Linux 2.6.11.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/isa/cs423x')
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index e745a54e00a1..39f4eff44f5c 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -349,8 +349,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard, | |||
349 | pnp_init_resource_table(cfg); | 349 | pnp_init_resource_table(cfg); |
350 | if (mpu_port[dev] != SNDRV_AUTO_PORT) | 350 | if (mpu_port[dev] != SNDRV_AUTO_PORT) |
351 | pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); | 351 | pnp_resource_change(&cfg->port_resource[0], mpu_port[dev], 2); |
352 | if (mpu_irq[dev] != SNDRV_AUTO_IRQ && mpu_irq[dev] >= 0 && | 352 | if (mpu_irq[dev] != SNDRV_AUTO_IRQ && mpu_irq[dev] >= 0) |
353 | pnp_irq_valid(pdev, 0)) | ||
354 | pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); | 353 | pnp_resource_change(&cfg->irq_resource[0], mpu_irq[dev], 1); |
355 | err = pnp_manual_config_dev(pdev, cfg, 0); | 354 | err = pnp_manual_config_dev(pdev, cfg, 0); |
356 | if (err < 0) | 355 | if (err < 0) |