]> git.baikalelectronics.ru Git - kernel.git/commit
[ALSA] cs4236-irq-handling-fix.patch
authorChristoph Schulz <develop@kristov.de>
Fri, 3 Jun 2005 06:28:31 +0000 (08:28 +0200)
committerJaroslav Kysela <perex@suse.cz>
Wed, 22 Jun 2005 10:28:06 +0000 (12:28 +0200)
commit4366e2b531ff98364f32d9c265ac6dad2aafead6
tree198c9b17940512130428d0be56d4e836865cff43
parent2bd99246b2ec8afd72b6beba85d352d90bc72cb9
[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>
sound/isa/cs423x/cs4236.c