PnP: Protocol for Media Vision Jazz16 sound cards
Quoted 4 lines · Rask Ingemann Lambertsen
- Add code to detect and PnP protocol to manage Media Vision Jazz16 sound cards.
Tested with a Jazz16 based sound card and Linux 2.6.20.6.
Just got around to giving this a spin again and unfortunately the preffered options code isn't working for me:
rene@5bt1:~$ cat /sys/bus/pnp/devices/02\:01/options
Dependent: 01 - Priority preferred
port 0x220-0x220, align 0x0, size 0x10, 10-bit address decoding
port 0x330-0x330, align 0x0, size 0x2, 10-bit address decoding
port 0x388-0x388, align 0x0, size 0x4, 10-bit address decoding
irq 5 High-Edge
irq 2/9 High-Edge
dma 1 8-bit compatible
Dependent: 02 - Priority acceptable
port 0x210-0x260, align 0xf, size 0x10, 10-bit address decoding
port 0x300-0x330, align 0xf, size 0x2, 10-bit address decoding
port 0x388-0x388, align 0x0, size 0x4, 10-bit address decoding
irq 3,5,7,2/9,10,15 High-Edge
irq 3,5,7,2/9,10,15 High-Edge
dma 1,3,5,7 8-bit&16-bit compatible
Dependent: 03 - Priority acceptable
port 0x210-0x260, align 0xf, size 0x10, 10-bit address decoding
port 0x300-0x330, align 0xf, size 0x2, 10-bit address decoding
port 0x388-0x388, align 0x0, size 0x4, 10-bit address decoding
irq 3,5,7,2/9,10,15 High-Edge
dma 1,3,5,7 8-bit&16-bit compatible
rene@5bt1:~$ cat /sys/bus/pnp/devices/02\:01/resources
state = disabled
rene@5bt1:~$ su -c "modprobe snd-jazz16"
rene@5bt1:~$ cat /sys/bus/pnp/devices/02\:01/resources
state = active
io 0x210-0x21f
io 0x300-0x301
io 0x388-0x38b
irq 5
irq 7
dma 1Ports 210 and 300 are first from the acceptables, not the preferreds and the irq 7 is also not preffered for MPU. Yes, ports 220, 330 and irq 9 are free.
Looking back through what I sent earlier, I see I sent you a wrong patch then so I'm not sure anymore what I tested and I don't have time to look at it now. Thought I'd let you know though.
Rene.
Quoted 4 lines · Rene Herman
Just got around to giving this a spin again and unfortunately the preffered options code isn't working for me:
Quoted 8 lines
rene@5bt1:~$ cat /sys/bus/pnp/devices/02\:01/options Dependent: 01 - Priority preferred port 0x220-0x220, align 0x0, size 0x10, 10-bit address decoding port 0x330-0x330, align 0x0, size 0x2, 10-bit address decoding port 0x388-0x388, align 0x0, size 0x4, 10-bit address decoding irq 5 High-Edge irq 2/9 High-Edge dma 1 8-bit compatible
Do you have a PCI device like this one? /sbin/lspci -v:
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
Flags: medium devsel, IRQ 9
I don't know who to blame, but I know of no way of moving that device off
of IRQ 9. It may also just be a bug in the PCI code, because lspci -v -b gives:
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
Flags: medium devsel
I.e. no IRQ as seen from the bus.
Signature · 1 line
Rask Ingemann Lambertsen
Quoted 8 lines · Rask Ingemann Lambertsen
Quoted 1 line · Rene Herman
Just got around to giving this a spin again and unfortunately the preffered options code isn't working for me:
Do you have a PCI device like this one?
/sbin/lspci-v:00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
Flags: medium devsel, IRQ 9
Mmm, yes, I do. Was on an Intel 430VX chipset with a PIIX3 last time and on a 430TX with the PIIX4 this time.
Quoted 2 lines
I don't know who to blame, but I know of no way of moving that device off of IRQ 9.
Indeed; it seems to be a well-known problem.
The Intel 430TX and 440BX (which also uses the PIIX4 if I'm not mistaken) were hugely popular chipsets in the later generation of boards that still had ISA slots and given that noone will deperately want the MPU-401 IRQ assigned; how would you feel about the attached? Just adds the preffered options minus the MPU IRQ as the first acceptable. Works for me...
I ran the driver through a complete test again. Playback, capture (from line, CD and mic), the OPL3 synth and MPU-401 out- and input (both with and without the MPU-401 IRQ) and all work fine. Feel free to add my signed-off to the ALSA part.
As to the PnP part; other than that IRQ9 thing everything also working fine and if you think the attached is ugly; I don't much care. I still have the possible objection with the BIOS maybe needing to know about the card anyway so it can route the IRQ to ISA (and the slight discomfort about Jazz16 code in drivers/pnp). But next iteration can be final.
If Adam still isn't commenting by then, let's just feed it through Andrew Morton and LKML.
Rene.
commit ff9c54ec792041f6f7f45d5abceb5af47a71a2f7
Author: Rene Herman <[email protected]> Date: Sat Apr 21 09:07:44 2007 +0200
IRQ 9 is unavailable on PIIX4 boards -- the MPU-401 UART can do without an IRQ as well...
drivers/pnp/jazz16pnp.c +5 -0
@@ -233,6 +233,11 @@ static int __init jazz16pnp_add_sb(void) jazz16pnp_pref_dmas, 1)) goto out_no_sboption;if (!jazz16pnp_easy_option (sbdev,PNP_RES_PRIORITY_ACCEPTABLE , + jazz16pnp_pref_ports,3 , + jazz16pnp_pref_irqs,1 , + jazz16pnp_pref_dmas,1 )) + goto out_no_sboption; +if (!jazz16pnp_easy_option (sbdev,PNP_RES_PRIORITY_ACCEPTABLE , jazz16pnp_ports,3 , jazz16pnp_irqs,2 , jazz16pnp_dmas,1 ))
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 6 lines · Rene Herman
The Intel 430TX and 440BX (which also uses the PIIX4 if I'm not mistaken) were hugely popular chipsets in the later generation of boards that still had ISA slots and given that noone will deperately want the MPU-401 IRQ assigned; how would you feel about the attached? Just adds the preffered options minus the MPU IRQ as the first acceptable. Works for me...
Fine with me. Maybe the MPU IRQ should be omitted alltogether? You tell
me.
Thanks for the testing you've done.
Quoted 1 line
As to the PnP part; other than that IRQ9 thing everything also working fine
Aren't you having problems loading the module after a resource allocation
failure? I find that I need this additional patch to be able to retry:
drivers/pnp/driver.c +2 -2
@@ -96,13 +96,13 @@if (!(pnp_drv->flags &PNP_DRIVER_RES_DO_NOT_CHANGE )) { error =pnp_activate_dev (pnp_dev);if (error <0 ) -return error; + goto fail; } }else if ((pnp_drv->flags &PNP_DRIVER_RES_DISABLE ) ==PNP_DRIVER_RES_DISABLE ) { error =pnp_disable_dev (pnp_dev);if (error <0 ) -return error; + goto fail; } error =0 ;if (pnp_drv->probe) {
Without it, the device stays attached to the driver. What happens is
pnp_attach_device (device, driver); error = pnp_activate_dev(device); if (error < 0) return error; ... fail: pnp_detach_device (device, driver); return error;
Signature · 1 line
Rask Ingemann Lambertsen
Quoted 11 lines · Rask Ingemann Lambertsen
Quoted 6 lines · Rene Herman
The Intel 430TX and 440BX (which also uses the PIIX4 if I'm not mistaken) were hugely popular chipsets in the later generation of boards that still had ISA slots and given that noone will deperately want the MPU-401 IRQ assigned; how would you feel about the attached? Just adds the preffered options minus the MPU IRQ as the first acceptable. Works for me...
Fine with me. Maybe the MPU IRQ should be omitted alltogether? You tell me.
"Using the hardware to its fullest potential" should probably be called the preferred option. I mean, what's the fun of playing with this old hardware if we're not going to use it fully? :)
So as submitted (or nothing at all but if we suppose the driver will be seeing practical use, guarding against that PIIX4 seems best) is nicest I feel.
Quoted 2 lines
Aren't you having problems loading the module after a resource allocation failure? I find that I need this additional patch to be able to retry:
I've had to remove the jazz16 again for a bit and I haven't tested an allocation failure yet. That looks to be an "obvious fix" though. Now all we need is a PnP maintainer...
Rene.
At Thu, 26 Apr 2007 14:55:03 +0200,
Quoted 7 lines · Rene Herman
Quoted 3 lines
Aren't you having problems loading the module after a resource allocation failure? I find that I need this additional patch to be able to retry:
I've had to remove the jazz16 again for a bit and I haven't tested an allocation failure yet. That looks to be an "obvious fix" though. Now all we need is a PnP maintainer...
I'd suggest to post LKML once, then. If you get no negative feedback, let's try to push together with ALSA patch.
Takashi
Quoted 6 lines · Takashi Iwai
Quoted 3 lines
I've had to remove the jazz16 again for a bit and I haven't tested an allocation failure yet. That looks to be an "obvious fix" though. Now all we need is a PnP maintainer...
I'd suggest to post LKML once, then. If you get no negative feedback, let's try to push together with ALSA patch.
I have one other email address for Adam Belay (added to CC). Let's see if that one's active...
Rene.