Skip to contentSkip to conversation

2.5.4 sound module problem

DISCUSSION John Weber 4 participants 4 messages Feb 13, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

John Weber

author
#1 lore raw
Quoted 8 lines · Alan
Quoted 4 lines · Albert Cranford

Not sure if this was the same message I received. but here is the patch I used to get around my sound problem in 2.5.4.

Are you sure this is correct? include/asm/io.h seems to indicate that i/o addresses for PCI may not map correctly. The sound card I am using is PCI, not ISA.

You should not use isa_virt_to_bus. IIRC someone on this list worried about this exact thing happening.

Quoted 1 line

Documentation/DMA-mapping.txt says that virt_to_bus is completly depreciated and nothing should be using it. Well, grepping the kernel source shows that quite a bit still uses it.

This is on the kernel janitor TODO, and we (janitors) will be tackling this shortly. But your instinct is right, virt_to_bus shouldn't be everywhere.

Quoted 1 line

What it looks like, on first glance, is that virt_to_bus was changed for pci devices to give this error message. (Since that symbol goes nowhere.) That effects a number of things, not just sound. (A whole bunch of cardbus drivers I would guess...)

This is correct. It has been a policy to use pci_alloc_consistent instead of kmalloc/getfreepages and virt_to_bus, 2.5 is enforcing it now.

It is boring work to change this in many drivers, but I don't know any better so I think it quite fun to go in and help :). I'll start sending patches to the relevant maintainers shortly.

By the way, anyone know who the maintainer is for the persistent DMA buffer code?

Signature · 3 lines
(o- j o h n   e   w e b e r
//\  http://www.linuxhq.com/people/weber/
v_/_ [email protected]
#2 lore raw
In reply to a message not in the archive
Quoted 6 lines · John Weber
Quoted 5 lines · Alan
Quoted 3 lines · Albert Cranford

Not sure if this was the same message I received. but here is the patch I used to get around my sound problem in 2.5.4.

Quoted 6 lines
Quoted 3 lines

Are you sure this is correct? include/asm/io.h seems to indicate that i/o addresses for PCI may not map correctly. The sound card I am using is PCI, not ISA.

You should not use isa_virt_to_bus. IIRC someone on this list worried about this exact thing happening.

Glad I checked before adding the patch... ]:>

Quoted 7 lines
Quoted 3 lines

Documentation/DMA-mapping.txt says that virt_to_bus is completly depreciated and nothing should be using it. Well, grepping the kernel source shows that quite a bit still uses it.

This is on the kernel janitor TODO, and we (janitors) will be tackling this shortly. But your instinct is right, virt_to_bus shouldn't be everywhere.

IMHO 2.5.4 is pretty broken until that gets fixed. the list is pretty long as well.

Quoted 7 lines
Quoted 4 lines

What it looks like, on first glance, is that virt_to_bus was changed for pci devices to give this error message. (Since that symbol goes nowhere.) That effects a number of things, not just sound. (A whole bunch of cardbus drivers I would guess...)

This is correct. It has been a policy to use pci_alloc_consistent instead of kmalloc/getfreepages and virt_to_bus, 2.5 is enforcing it now.

By breaking sound (in dmabuf and sound modules), cardbus (lots of places), and who knows what else.

"grep -r virt_to_bus | less" shows jut how bad it is going to be...

Quoted 3 lines

It is boring work to change this in many drivers, but I don't know any better so I think it quite fun to go in and help :). I'll start sending patches to the relevant maintainers shortly.

Thanks.

It just makes me wonder if anyone actually compiled this and ran it before it was released.

Back to 2.4.x land for a while i guess... (At least on this machine.)

#3 lore raw
Quoted 1 line · Alan

On Tuesday 12 February 2002 21:03, John Weber wrote:

<snip>

Quoted 7 lines
Quoted 2 lines

This is correct. It has been a policy to use pci_alloc_consistent instead of kmalloc/getfreepages and virt_to_bus, 2.5 is enforcing it now.

By breaking sound (in dmabuf and sound modules), cardbus (lots of places), and who knows what else.

"grep -r virt_to_bus | less" shows jut how bad it is going to be...

I checked, there are 1069 occurrences.

Miles

#4 lore raw
In reply to Alan
Quoted 5 lines
Quoted 2 lines

This is correct. It has been a policy to use pci_alloc_consistent instead of kmalloc/getfreepages and virt_to_bus, 2.5 is enforcing it now.

By breaking sound (in dmabuf and sound modules), cardbus (lots of places), and who knows what else.

It needed breaking. In order to get the drivers portable they need to be using the DMA API. It shouldn't take too long for the common drivers to get converted. For much of the sound layer it doesnt matter since the ALSA code will replace a lot of the older sound stuff.

Alan