* Re: [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards
[not found] <20070412195523.GC5324@sygehus.dk>
@ 2007-04-20 17:27 ` Rene Herman
2007-04-20 20:00 ` Rask Ingemann Lambertsen
0 siblings, 1 reply; 7+ messages in thread
From: Rene Herman @ 2007-04-20 17:27 UTC (permalink / raw)
To: Rask Ingemann Lambertsen; +Cc: Adam Belay, alsa-devel
On 04/12/2007 09:55 PM, Rask Ingemann Lambertsen wrote:
> - 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 1
Ports 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards
2007-04-20 17:27 ` [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards Rene Herman
@ 2007-04-20 20:00 ` Rask Ingemann Lambertsen
2007-04-22 16:27 ` Rene Herman
0 siblings, 1 reply; 7+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-04-20 20:00 UTC (permalink / raw)
To: Rene Herman; +Cc: Adam Belay, alsa-devel
On Fri, Apr 20, 2007 at 07:27:25PM +0200, Rene Herman wrote:
>
> 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
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.
--
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards
2007-04-20 20:00 ` Rask Ingemann Lambertsen
@ 2007-04-22 16:27 ` Rene Herman
2007-04-23 18:52 ` Rask Ingemann Lambertsen
0 siblings, 1 reply; 7+ messages in thread
From: Rene Herman @ 2007-04-22 16:27 UTC (permalink / raw)
To: Rask Ingemann Lambertsen; +Cc: Adam Belay, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]
On 04/20/2007 10:00 PM, Rask Ingemann Lambertsen wrote:
> On Fri, Apr 20, 2007 at 07:27:25PM +0200, Rene Herman wrote:
>> 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.
> 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.
[-- Attachment #2: jazz16pnp-irq9.diff --]
[-- Type: text/plain, Size: 840 bytes --]
commit ff9c54ec792041f6f7f45d5abceb5af47a71a2f7
Author: Rene Herman <rene.herman@gmail.com>
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...
diff --git a/drivers/pnp/jazz16pnp.c b/drivers/pnp/jazz16pnp.c
index b71381b..020b6bb 100644
--- a/drivers/pnp/jazz16pnp.c
+++ b/drivers/pnp/jazz16pnp.c
@@ -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))
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards
2007-04-22 16:27 ` Rene Herman
@ 2007-04-23 18:52 ` Rask Ingemann Lambertsen
2007-04-26 12:55 ` Rene Herman
0 siblings, 1 reply; 7+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-04-23 18:52 UTC (permalink / raw)
To: Rene Herman; +Cc: Adam Belay, alsa-devel
On Sun, Apr 22, 2007 at 06:27:44PM +0200, Rene Herman wrote:
>
> 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.
> 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:
--- linux-2.6.20.6-clean/drivers/pnp/driver.c 2007-02-04 19:44:54.000000000 +0100
+++ linux-2.6.20.6-ril/drivers/pnp/driver.c 2007-04-15 10:10:35.000000000 +0200
@@ -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;
--
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards
2007-04-23 18:52 ` Rask Ingemann Lambertsen
@ 2007-04-26 12:55 ` Rene Herman
2007-04-26 13:00 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Rene Herman @ 2007-04-26 12:55 UTC (permalink / raw)
To: Rask Ingemann Lambertsen; +Cc: Adam Belay, alsa-devel
On 04/23/2007 08:52 PM, Rask Ingemann Lambertsen wrote:
> On Sun, Apr 22, 2007 at 06:27:44PM +0200, Rene Herman wrote:
>> 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.
> 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards
2007-04-26 12:55 ` Rene Herman
@ 2007-04-26 13:00 ` Takashi Iwai
2007-04-26 15:11 ` Rene Herman
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2007-04-26 13:00 UTC (permalink / raw)
To: Rene Herman; +Cc: Adam Belay, alsa-devel
At Thu, 26 Apr 2007 14:55:03 +0200,
Rene Herman wrote:
>
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards
2007-04-26 13:00 ` Takashi Iwai
@ 2007-04-26 15:11 ` Rene Herman
0 siblings, 0 replies; 7+ messages in thread
From: Rene Herman @ 2007-04-26 15:11 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Adam Belay, abelay, alsa-devel
On 04/26/2007 03:00 PM, Takashi Iwai wrote:
>> 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-04-26 15:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070412195523.GC5324@sygehus.dk>
2007-04-20 17:27 ` [PATCH] PnP: Protocol for Media Vision Jazz16 sound cards Rene Herman
2007-04-20 20:00 ` Rask Ingemann Lambertsen
2007-04-22 16:27 ` Rene Herman
2007-04-23 18:52 ` Rask Ingemann Lambertsen
2007-04-26 12:55 ` Rene Herman
2007-04-26 13:00 ` Takashi Iwai
2007-04-26 15:11 ` Rene Herman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.