* How to get alsa 0.9.3 working with 2.4 kernels on Alpha
@ 2003-05-09 9:47 Wouter Rademaker
2003-05-18 22:41 ` Kelledin
0 siblings, 1 reply; 3+ messages in thread
From: Wouter Rademaker @ 2003-05-09 9:47 UTC (permalink / raw)
To: 'Axp-list@redhat.com'
I got Alsa 0.9.3a finally working with kernel 2.2.24 with only " #include
<asm/pgtable.h> " in highmem.h
What other hacks are needed with kernel 2.4.20 to get it working on a ALPHA.
My guesses are
1. The hack above
2. Something with this lines in adriver.h :
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 3)
#define need_resched() (current->need_resched)
#endif
Because of this error :
/lib/modules/2.4.20/build/include/linux/sched.h:946:
arguments given to macro `need_resched'
Commenting out or changing the KERNEL_VERSION to (2, 4, 3) works
3. Something to solve this error:
memory_wrapper.c: In function `snd_compat_vmalloc_to_page':
memory_wrapper.c:41: `mem_map' undeclared (first use in this function)
memory_wrapper.c:41: (Each undeclared identifier is reported only once
memory_wrapper.c:41: for each function it appears in.)
memory_wrapper.c:28: warning: `page' might be used uninitialized in
this function
make[1]: *** [memory_wrapper.o] Error 1
make: *** [compile] Error 1
Probably can't he find the declaration of mem_map, but I can't find it
either.
Are the fist two hacks right or is there a better way and how to solve the
third?
I'm using a 164SX ALPHA with Debian Woody
Wouter Rademaker
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to get alsa 0.9.3 working with 2.4 kernels on Alpha
2003-05-09 9:47 Wouter Rademaker
@ 2003-05-18 22:41 ` Kelledin
0 siblings, 0 replies; 3+ messages in thread
From: Kelledin @ 2003-05-18 22:41 UTC (permalink / raw)
To: axp-list; +Cc: Wouter Rademaker
[-- Attachment #1: Type: text/plain, Size: 2371 bytes --]
(Sorry I'm replying so late; I've been single-mindedly immersed
in fixing an XFS bug.)
On Friday 09 May 2003 04:47 am, Wouter Rademaker wrote:
> 2. Something with this lines in adriver.h :
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 3)
> #define need_resched() (current->need_resched)
> #endif
> Because of this error :
> /lib/modules/2.4.20/build/include/linux/sched.h:946:
Recent kernels (such as 2.4.20) define a need_resched() function
in <linux/sched.h>. Apparently, alsa-driver is creating a macro
to compensate for kernel versions where this function supposedly
does not exist or is not useful for its purposes.
alsa-driver apparently thinks kernel 2.5.3 is the earliest
version with a useful need_resched() function. It's pretty much
right as far as 2.4.x goes--the need_resched() function in
2.4.20 really doesn't do anything more than return
current->need_resched. The unlikely() macro makes it look like
it does something more, but the unlikely() macro is currently
just a straight drop-through.
Nevertheless, defining the need_resched() macro in the presence
of a need_resched() function apparently confuses gcc/alpha
(gcc/i386 doesn't complain). Thus the problem you're having.
So commenting out the lines above would work for 2.4.20, although
it would add the (minor) expense of yet another function call.
It would likely break other kernel versions, though. A more
proper fix would be in the patch attached below, which
apparently works for 0.9.2, 0.9.3, and 0.9.3a.
> 3. Something to solve this error:
> memory_wrapper.c: In function
> `snd_compat_vmalloc_to_page': memory_wrapper.c:41: `mem_map'
> undeclared (first use in this function) memory_wrapper.c:41:
> (Each undeclared identifier is reported only once
> memory_wrapper.c:41: for each function it appears in.)
> memory_wrapper.c:28: warning: `page' might be used
> uninitialized in this function
> make[1]: *** [memory_wrapper.o] Error 1
> make: *** [compile] Error 1
> Probably can't he find the declaration of mem_map, but I
> can't find it either.
Including <linux/sched.h> and <linux/mm.h> seems to solve it.
Sadly, since my LX164 has no soundcard, I can't actually test all
this beyond compilation. :(
--
Kelledin
"If a server crashes in a server farm and no one pings it, does
it still cost four figures to fix?"
[-- Attachment #2: alsa-driver-0.9.3a-kernel2420.patch --]
[-- Type: text/x-diff, Size: 2265 bytes --]
diff -Naur alsa-driver-0.9.3a/alsa-kernel/isa/sb/emu8000_patch.c alsa-driver-0.9.3a-linux2420/alsa-kernel/isa/sb/emu8000_patch.c
--- alsa-driver-0.9.3a/alsa-kernel/isa/sb/emu8000_patch.c 2002-08-12 03:43:46.000000000 -0500
+++ alsa-driver-0.9.3a-linux2420/alsa-kernel/isa/sb/emu8000_patch.c 2003-05-18 15:50:53.000000000 -0500
@@ -233,7 +233,7 @@
/* we may take too long time in this loop.
* so give controls back to kernel if needed.
*/
- if (need_resched()) {
+ if (ALSA_NEED_RESCHED()) {
if (current->state != TASK_RUNNING)
set_current_state(TASK_RUNNING);
schedule();
diff -Naur alsa-driver-0.9.3a/alsa-kernel/isa/sb/emu8000_pcm.c alsa-driver-0.9.3a-linux2420/alsa-kernel/isa/sb/emu8000_pcm.c
--- alsa-driver-0.9.3a/alsa-kernel/isa/sb/emu8000_pcm.c 2003-02-10 05:53:49.000000000 -0600
+++ alsa-driver-0.9.3a-linux2420/alsa-kernel/isa/sb/emu8000_pcm.c 2003-05-18 15:50:53.000000000 -0500
@@ -424,7 +424,7 @@
*/
#define CHECK_SCHEDULER() \
do { \
- if (need_resched()) {\
+ if (ALSA_NEED_RESCHED()) {\
if (current->state != TASK_RUNNING)\
set_current_state(TASK_RUNNING);\
schedule();\
diff -Naur alsa-driver-0.9.3a/include/adriver.h alsa-driver-0.9.3a-linux2420/include/adriver.h
--- alsa-driver-0.9.3a/include/adriver.h 2003-04-27 09:49:58.000000000 -0500
+++ alsa-driver-0.9.3a-linux2420/include/adriver.h 2003-05-18 15:50:53.000000000 -0500
@@ -105,7 +105,9 @@
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 3)
-#define need_resched() (current->need_resched)
+#define ALSA_NEED_RESCHED() (current->need_resched)
+#else
+#define ALSA_NEED_RESCHED() (need_resched())
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4)
#include <linux/fs.h>
diff -Naur alsa-driver-0.9.3a/pci/vx222/vx222_ops.c alsa-driver-0.9.3a-linux2420/pci/vx222/vx222_ops.c
--- alsa-driver-0.9.3a/pci/vx222/vx222_ops.c 2003-03-21 11:41:57.000000000 -0600
+++ alsa-driver-0.9.3a-linux2420/pci/vx222/vx222_ops.c 2003-05-18 15:50:53.000000000 -0500
@@ -376,7 +376,7 @@
if (put_xilinx_data(chip, port, 8, data) < 0)
return -EINVAL;
/* don't take too much time in this loop... */
- if (need_resched()) {
+ if (ALSA_NEED_RESCHED()) {
if (current->state != TASK_RUNNING)
set_current_state(TASK_RUNNING);
schedule();
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: How to get alsa 0.9.3 working with 2.4 kernels on Alpha
@ 2003-05-23 7:09 Wouter Rademaker
0 siblings, 0 replies; 3+ messages in thread
From: Wouter Rademaker @ 2003-05-23 7:09 UTC (permalink / raw)
To: 'Kelledin', 'axp-list@redhat.com'
> -----Oorspronkelijk bericht-----
> Van: Kelledin [mailto:kelledin+AXP@skarpsey.dyndns.org]
> Verzonden: donderdag 22 mei 2003 1:52
> Aan: Wouter Rademaker
> Onderwerp: Re: How to get alsa 0.9.3 working with 2.4 kernels on Alpha
>
>
> On Wednesday 21 May 2003 04:29 am, Wouter Rademaker wrote:
> > > Including <linux/sched.h> and <linux/mm.h> seems to solve
> > > it.
> >
> > in adriver.h ?
>
> I put it in acore/memory_wrapper.c
>
did it, works
> > Remaining (harmless?) compilation errors:
> >
> > misc.c: In function `work_caller':
> > misc.c:249: warning: implicit declaration of function `kfree'
> > misc.c: In function `snd_compat_schedule_work':
> > misc.c:256: warning: implicit declaration of function
> > `kmalloc' misc.c:256: warning: initialization makes pointer
> > from integer without a cast
.......
>
> kmalloc() and
> kfree() are in linux/slab.h though--try including that in the
> affected source files.
>
did it, works
> > errors when doing "modprobe -v snd-emu10k1" :
> >
> > /lib/modules/2.4.20/kernel/sound/acore/snd-page-alloc.o:
> > unresolved symbol plat_node_data
> > /lib/modules/2.4.20/kernel/sound/acore/snd-page-alloc.o:
> > insmod /lib/modules/2.4.20/kernel/sound/acore/snd-page-alloc.o
> > failed
> > /lib/modules/2.4.20/kernel/sound/acore/snd-page-alloc.o:
> > insmod snd-emu10k1 failed
>
> Now this is odd. It sounds like your running kernel doesn't
> match the kernel ALSA was built against.
You were right. I have built a new clean vanilla kernel and a new (0.9.3c)
ALSA and now it loads,
but when I try to use it with a program like alsaplayer I get this error:
ALSA lib pcm_hw.c:324:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS
failed: Cannot allocate memory
Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (23219 23220)
PERIOD_SIZE: 1024
PERIOD_BYTES: 4096
PERIODS: 8
BUFFER_TIME: (185759 185760)
BUFFER_SIZE: 8192
BUFFER_BYTES: 32768
TICK_TIME: 976
failed to configure output device...trying OSS
error setting sample_rate
failed to configure output device...trying OSS
And sfxload gives this error:
pci_map_single failed:could not allocate dma page tables
Met Vriendelijke Zwerversgroeten
Wouter Rademaker
Snel-post: egel@scoutnet.nl
\ / \ /
>O< >O<
*{_} {_}*
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-23 7:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-23 7:09 How to get alsa 0.9.3 working with 2.4 kernels on Alpha Wouter Rademaker
-- strict thread matches above, loose matches on Subject: below --
2003-05-09 9:47 Wouter Rademaker
2003-05-18 22:41 ` Kelledin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox