* Hammerfall (hdsp) initialization problem
@ 2004-07-23 18:32 Jean-Marc Valin
2004-07-24 8:05 ` Tim Blechmann
0 siblings, 1 reply; 10+ messages in thread
From: Jean-Marc Valin @ 2004-07-23 18:32 UTC (permalink / raw)
To: alsa-devel
Hi,
I'm having problems getting the snd-hdsp driver to load. I have a PCMCIA
adaptor for an RME Hammerfall card and whenever I insert it, I get this
(dmesg):
PCI: Enabling device 0000:03:00.0 (0080 -> 0082)
RME Hammerfall DSP: no buffers available
RME Hammerfall DSP: probe of 0000:03:00.0 failed with error -12
Actually, sometimes it loads fine and sometimes it doesn't. I noticed
that the sooner I insert the card (after boot), the more likely the
module is to load (though it's never 100%). I'm running a 2.6.7 kernel
(don't know what version of the drivers come with it) with the swsusp2
patches and preempt enabled. I don't think it changes anything, but I
have two non-standard config options: PAGE_OFFSET=0xb000000 (support for
1G of mem without the 4G overhead) and HZ=100.
I'm running this on a Dell D600 laptop (Pentium-M 1.6 GHz) with 1GB RAM.
Jean-Marc
--
Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
Universite de Sherbrooke
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-23 18:32 Hammerfall (hdsp) initialization problem Jean-Marc Valin
@ 2004-07-24 8:05 ` Tim Blechmann
2004-07-25 5:48 ` Jean-Marc Valin
0 siblings, 1 reply; 10+ messages in thread
From: Tim Blechmann @ 2004-07-24 8:05 UTC (permalink / raw)
To: Jean-Marc Valin; +Cc: alsa-devel
> Actually, sometimes it loads fine and sometimes it doesn't. I noticed
> that the sooner I insert the card (after boot), the more likely the
> module is to load (though it's never 100%). I'm running a 2.6.7 kernel
> (don't know what version of the drivers come with it) with the swsusp2
> patches and preempt enabled. I don't think it changes anything, but I
> have two non-standard config options: PAGE_OFFSET=0xb000000 (support
> for 1G of mem without the 4G overhead) and HZ=100.
that's a known problem with the hdsp driver, a lot of continuous memory
has to be allocated, which can more likely be done on a freshly booted
machine ...
the best solution: keep the cardbus interface plugged into the slot all
the time ... if you start the computer, the memory will be allocated
cheers... tim
--
mailto:TimBlechmann@gmx.de ICQ: 96771783
After one look at this planet any visitor from outer space
would say "I want to see the manager."
William S. Burroughs
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-24 8:05 ` Tim Blechmann
@ 2004-07-25 5:48 ` Jean-Marc Valin
2004-07-25 11:16 ` Thomas Charbonnel
2004-07-27 13:43 ` Takashi Iwai
0 siblings, 2 replies; 10+ messages in thread
From: Jean-Marc Valin @ 2004-07-25 5:48 UTC (permalink / raw)
To: Tim Blechmann; +Cc: alsa-devel
> that's a known problem with the hdsp driver, a lot of continuous memory
> has to be allocated, which can more likely be done on a freshly booted
> machine ...
> the best solution: keep the cardbus interface plugged into the slot all
> the time ... if you start the computer, the memory will be allocated
Actually, I suspect there's more than that. I've tried running a program
that malloc()'s 1 GB of memory (the amount of RAM I have), writes to it
and then free()'s it, so there's lots of memory available after that.
Still doesn't work (and obviously there's lots of continuous memory
available).
Jean-Marc
--
Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
Université de Sherbrooke
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id\x10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-25 5:48 ` Jean-Marc Valin
@ 2004-07-25 11:16 ` Thomas Charbonnel
2004-07-27 13:47 ` Takashi Iwai
2004-07-27 13:43 ` Takashi Iwai
1 sibling, 1 reply; 10+ messages in thread
From: Thomas Charbonnel @ 2004-07-25 11:16 UTC (permalink / raw)
To: Jean-Marc Valin; +Cc: Tim Blechmann, alsa-devel
> > that's a known problem with the hdsp driver, a lot of continuous memory
> > has to be allocated, which can more likely be done on a freshly booted
> > machine ...
> > the best solution: keep the cardbus interface plugged into the slot all
> > the time ... if you start the computer, the memory will be allocated
>
> Actually, I suspect there's more than that. I've tried running a program
> that malloc()'s 1 GB of memory (the amount of RAM I have), writes to it
> and then free()'s it, so there's lots of memory available after that.
> Still doesn't work (and obviously there's lots of continuous memory
> available).
>
> Jean-Marc
The problem is that for the preallocation to work, the card has to be
inserted and recognized (the preallocation code scans for the pci vendor
and device ids), so this is a cardbus specific issue. If the card is not
inserted when the preallocation is run, then it will default at probing
time to the standard snd_dma_alloc_pages which is more and more likely
to fail as your uptime rises. The only solution would be to preallocate
the memory anyway, but most user won't need this. Takashi, how about a
kernel/compile time option forcing preallocation for cardbus hdsp owners
?
Thomas
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-25 5:48 ` Jean-Marc Valin
2004-07-25 11:16 ` Thomas Charbonnel
@ 2004-07-27 13:43 ` Takashi Iwai
1 sibling, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-07-27 13:43 UTC (permalink / raw)
To: Jean-Marc Valin; +Cc: Tim Blechmann, alsa-devel
At Sun, 25 Jul 2004 01:48:08 -0400,
Jean-Marc Valin wrote:
>
> > that's a known problem with the hdsp driver, a lot of continuous memory
> > has to be allocated, which can more likely be done on a freshly booted
> > machine ...
> > the best solution: keep the cardbus interface plugged into the slot all
> > the time ... if you start the computer, the memory will be allocated
>
> Actually, I suspect there's more than that. I've tried running a program
> that malloc()'s 1 GB of memory (the amount of RAM I have), writes to it
> and then free()'s it, so there's lots of memory available after that.
> Still doesn't work (and obviously there's lots of continuous memory
> available).
The memory used by the kernel is different from the user-space
memory.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-25 11:16 ` Thomas Charbonnel
@ 2004-07-27 13:47 ` Takashi Iwai
2004-07-27 16:07 ` Jean-Marc Valin
0 siblings, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2004-07-27 13:47 UTC (permalink / raw)
To: Thomas Charbonnel; +Cc: Jean-Marc Valin, Tim Blechmann, alsa-devel
At Sun, 25 Jul 2004 13:16:29 +0200,
Thomas Charbonnel wrote:
>
>
> > > that's a known problem with the hdsp driver, a lot of continuous memory
> > > has to be allocated, which can more likely be done on a freshly booted
> > > machine ...
> > > the best solution: keep the cardbus interface plugged into the slot all
> > > the time ... if you start the computer, the memory will be allocated
> >
> > Actually, I suspect there's more than that. I've tried running a program
> > that malloc()'s 1 GB of memory (the amount of RAM I have), writes to it
> > and then free()'s it, so there's lots of memory available after that.
> > Still doesn't work (and obviously there's lots of continuous memory
> > available).
> >
> > Jean-Marc
>
> The problem is that for the preallocation to work, the card has to be
> inserted and recognized (the preallocation code scans for the pci vendor
> and device ids), so this is a cardbus specific issue. If the card is not
> inserted when the preallocation is run, then it will default at probing
> time to the standard snd_dma_alloc_pages which is more and more likely
> to fail as your uptime rises. The only solution would be to preallocate
> the memory anyway, but most user won't need this. Takashi, how about a
> kernel/compile time option forcing preallocation for cardbus hdsp owners
> ?
The problem is that you have to know the PCI pointer to call
dma_alloc_coherent() correctly beforehand. Otherwise you'll get only
ZONE_DMA under 16MB region.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-27 13:47 ` Takashi Iwai
@ 2004-07-27 16:07 ` Jean-Marc Valin
2004-07-27 16:30 ` Takashi Iwai
0 siblings, 1 reply; 10+ messages in thread
From: Jean-Marc Valin @ 2004-07-27 16:07 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Thomas Charbonnel, Tim Blechmann, alsa-devel
> The problem is that you have to know the PCI pointer to call
> dma_alloc_coherent() correctly beforehand. Otherwise you'll get only
> ZONE_DMA under 16MB region.
Still, there must be *something* that can be done, no? What are other
OSs doing about that? I mean, the card manual doesn't say "if you insert
this card after boot, it won't work", so I don't see why ALSA
fundamentally couldn't support hot-plugging cards.
Jean-Marc
--
Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
Université de Sherbrooke
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id\x10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-27 16:07 ` Jean-Marc Valin
@ 2004-07-27 16:30 ` Takashi Iwai
2004-07-27 19:26 ` Paul Davis
2004-07-30 13:01 ` Takashi Iwai
0 siblings, 2 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-07-27 16:30 UTC (permalink / raw)
To: Jean-Marc Valin; +Cc: Thomas Charbonnel, Tim Blechmann, alsa-devel
At Tue, 27 Jul 2004 12:07:06 -0400,
Jean-Marc Valin wrote:
>
> > The problem is that you have to know the PCI pointer to call
> > dma_alloc_coherent() correctly beforehand. Otherwise you'll get only
> > ZONE_DMA under 16MB region.
>
> Still, there must be *something* that can be done, no? What are other
> OSs doing about that? I mean, the card manual doesn't say "if you insert
> this card after boot, it won't work", so I don't see why ALSA
> fundamentally couldn't support hot-plugging cards.
Of course hotplug is supported (how can you read above in such a way?)
The question is only the memory preallocation for the cardbus device.
hdsp driver and/or memalloc.c should be changed to handle properly the
buffer preservation after replugging. Most likely the pci device
pointer is changed after replug. Can anyone check whether pci_dev
pointer is changed at each time?
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-27 16:30 ` Takashi Iwai
@ 2004-07-27 19:26 ` Paul Davis
2004-07-30 13:01 ` Takashi Iwai
1 sibling, 0 replies; 10+ messages in thread
From: Paul Davis @ 2004-07-27 19:26 UTC (permalink / raw)
To: Takashi Iwai
Cc: Jean-Marc Valin, Thomas Charbonnel, Tim Blechmann, alsa-devel
>Jean-Marc Valin wrote:
>>
>> > The problem is that you have to know the PCI pointer to call
>> > dma_alloc_coherent() correctly beforehand. Otherwise you'll get only
>> > ZONE_DMA under 16MB region.
>>
>> Still, there must be *something* that can be done, no? What are other
>> OSs doing about that? I mean, the card manual doesn't say "if you insert
>> this card after boot, it won't work", so I don't see why ALSA
actually, the manual for other OS'es *does* say that, at least it does
for the non-hotplugged devices like the original digi9652. i have
always assumed that the same problem would exist for hot-pluggable
devices too.
--p
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Hammerfall (hdsp) initialization problem
2004-07-27 16:30 ` Takashi Iwai
2004-07-27 19:26 ` Paul Davis
@ 2004-07-30 13:01 ` Takashi Iwai
1 sibling, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-07-30 13:01 UTC (permalink / raw)
To: Jean-Marc Valin; +Cc: Thomas Charbonnel, Tim Blechmann, alsa-devel
At Tue, 27 Jul 2004 18:30:15 +0200,
I wrote:
>
> At Tue, 27 Jul 2004 12:07:06 -0400,
> Jean-Marc Valin wrote:
> >
> > > The problem is that you have to know the PCI pointer to call
> > > dma_alloc_coherent() correctly beforehand. Otherwise you'll get only
> > > ZONE_DMA under 16MB region.
> >
> > Still, there must be *something* that can be done, no? What are other
> > OSs doing about that? I mean, the card manual doesn't say "if you insert
> > this card after boot, it won't work", so I don't see why ALSA
> > fundamentally couldn't support hot-plugging cards.
>
> Of course hotplug is supported (how can you read above in such a way?)
> The question is only the memory preallocation for the cardbus device.
>
> hdsp driver and/or memalloc.c should be changed to handle properly the
> buffer preservation after replugging. Most likely the pci device
> pointer is changed after replug. Can anyone check whether pci_dev
> pointer is changed at each time?
Ok, I now simplified the middle layer code for buffer allocation.
Now the HDSP buffer should be preserved during replugging and the same
buffer should be reused.
I don't attach here the patch since it's a relatively massive change.
Please check the cvs tree later after sync'ed.
(Or wait for 1.0.6-rc release, scheduled soon later)
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-07-30 13:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-23 18:32 Hammerfall (hdsp) initialization problem Jean-Marc Valin
2004-07-24 8:05 ` Tim Blechmann
2004-07-25 5:48 ` Jean-Marc Valin
2004-07-25 11:16 ` Thomas Charbonnel
2004-07-27 13:47 ` Takashi Iwai
2004-07-27 16:07 ` Jean-Marc Valin
2004-07-27 16:30 ` Takashi Iwai
2004-07-27 19:26 ` Paul Davis
2004-07-30 13:01 ` Takashi Iwai
2004-07-27 13:43 ` Takashi Iwai
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.