[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ALSA Driver for Sparc DBRI chips

On Mon, Nov 22, 2004 at 10:07:22PM +0100, Hendrik Sattler wrote:
> Am Sonntag, 21. November 2004 12:34 schrieb Martin Habets:
> > I have been working on an ALSA driver for the DBRI/CS4215 chip
> > combo found in Sparc machines. It is a port of the 2.5 OSS driver.
> >
> > Things are starting to work, but since this is my first major
> > undertaking I'm looking for your comments. Ask early, ask often...
> > At this point I expect playback to work to all possible outputs (there
> > is some clipping on 16 bit formats). I have not been able to get recording
> > output in a file, though it does seem to catch data.
> >
> > So I look for anything from coding style to design issues to spelling to
> > 'it worked' to 'I get an error' to the-meaning-of-the-universe.
> > Just keep the phasers on stun, please :)
> I have some problems compiling alsa-drivers-1.0.7 on sparc32. I get errors 
> like:
> /lib/modules/2.4.27-1-sparc32/build/include/asm/ptrace.h:74:29: 
> asm/asm_offsets.h: Datei oder Verzeichnis nicht gefunden
> I have kernel-headers-2.4.27-1 installed (and kernel-image-2.4.27-1 is 
> running).
> What can I do about this? The asm_offsets.h file does only seem to exist in:
> # find .. -name asm_offsets.h
> ../kernel-headers-2.4.27-1/include/asm-alpha/asm_offsets.h
> ../kernel-headers-2.4.27-1/include/asm-sparc64/asm_offsets.h
> Is this a kernel-headers package problem?

I think so. In my asm-sparc/ptrace.h I have this at line 74:
 * The asm_offsets.h is a generated file, so we cannot include it.
 * It may be OK for glibc headers, but it's utterly pointless for C code.
 * The assembly code using those offsets has to include it explicitly.
/* #include <asm/asm_offsets.h> */

In my 2.6.8 kernel build I do have asm/asm_offsets.h with at the top:
 * This file was generated by arch/sparc/Makefile
and then a bunch of AOFF_* defines.

My recommendation would be either to upgrade kernel-headers, or just comment
out the include.

> > At: http://www.mph.eclipse.co.uk/pub/linux/dbri
> > you'll find these files:
> > - dbri.c  Source code of the driver
> > - Alsa.patch  Patch against Alsa-driver 1.0.7rc1, without the driver
> >    code itself (pick up dbri.c and put it in
> >    alsa-kernel/sparc).
> That patch is incomplete: alsa-driver/acinclude.m4 needs to be modified and 
> aclocal and autoconf must be run afterwards, so that the configure option
> --with-cards=sun-dbri
> is usable. Just take AMD7930 as example and make a simple copy and modify.

Actually, acinclude.m4 is generated by 'make all-deps' (which should also
recompile util/mod-deps). This should have been triggered by the Kconfig
and mod-deps.c changes. I'm afraid this area is a bit of black magic to me.
I'll update the README to add building instructions.

> > - Alsa-build.patch Patched to make Alsa build for sparc drivers. This
> >    code is already in the current Alsa version, so you
> >    may not need it.
> Maybe you should remove that file. It does not work with alsa-source package 
> in Debian an upstream is at 1.0.7 to which that patch does not apply.

Thanks, I'm not familiar with Debian's alsa-source package but will have a
look at it.
I am not sure what alsa version exactly the build patches went in. I'll
clarify it is not needed on 1.0.7. I am sure it is needed on 1.0.7rc1 (and

> I'd really like to test this but first I have to fix the problem above. Maybe 
> someone can give me a hint...
> I use the configure options
> --with-sequencer=yes --with-oss=yes --with-cards=sun-amd7930,sun-dbri
> HS
> -- 
> Mein GPG-Key ist auf meiner Homepage verf?gbar: http://www.hendrik-sattler.de
>         oder ?ber pgp.net
> PingoS - Linux-User helfen Schulen: http://www.pingos.org


Reply to: