Subject: Re: ml403 ac97 driver

From: Qin Lin <[email-masked]>
Date: Mon, 30 Jul 2007 21:22:52 -0700 (PDT)

HI ALL
I have compile the driver and test it with the help of Joachim.

1.add the lm4550 driver to kernel source
(someboby may can add them as a patch to kernel source)

#cp -r ml403_ac97cr $(KERNEL)/sound/drivers/
#vi $(KERNEL)/sound/drivers/Makefile
=add=
obj-$(CONFIG_SND_ML403_AC97)	+=ml403_ac97cr/
#vi $(KERNEL)/sound/drivers/
=add=
config SND_ML403_AC97
        tristate "ml403 ac97 codec(LM4550)"
        depends on SND
        select SND_AC97_CODEC
        help
          ml403 ac97 codec added by Joachim
          enjoy it !

#vi $(KERNEL)/sound/drivers/ml403_ac97cr/Makefile
obj-$(CONFIG_SND_ML403_AC97) += ml403_ac97cr.o

#make xconfig 
you can see the ml403_ac97cr in SOUND ALSA 

2.cross-compile alsa-lib
I use ELDK4.0 to install cross compile in XILINX ML403.
$echo $CROSS_COMPILE
 ppc_4xx-
$export CC=${CROSS_COMPILE}gcc
$export CPP=${CROSS_COMPILE}cpp
$export CXX=${CROSS_COMPILE}g++
$export LDD=${CROSS_COMPILE}ldd
$export AR=${CROSS_COMPILE}ar
$export LD=${CROSS_COMPILE}ld
$export RANLIB=${CROSS_COMPILE}ranlib
$export STRIP=${CROSS_COMPILE}strip
$cd ${ALSA-LIB-SOURCE}
$./configure --host=ppc-4xx-linux --target=ppc  --prefix=/usr
$make install  DESTDIR=${ALSA}

ps:ALSA lib will be install in path ${ALSA}/usr.Here use prefix=/usr is
important,do not change to another 
path. Otherwise in the target board alsa will not find the config file by
default.You can use DESTDIR to set the lib path .

3.cross-compile alsa-utils
$export CC=${CROSS_COMPILE}gcc
$export CPP=${CROSS_COMPILE}cpp
$export CXX=${CROSS_COMPILE}g++
$export LDD=${CROSS_COMPILE}ldd
$export AR=${CROSS_COMPILE}ar
$export LD=${CROSS_COMPILE}ld
$export RANLIB=${CROSS_COMPILE}ranlib
$export STRIP=${CROSS_COMPILE}strip
$export CFLAGS="-I${ALSA}/usr/include  -L${ALSA}/usr/lib"

$cd ${ALSA-UTILS-SOURCE}
$./configure --host=ppc-4xx-linux --target=ppc  --prefix=/usr --disable-nls 
$make install  DESTDIR=${ALSA}

ps:use --disable-nls,otherwise there is an error about LC_ALL not defined.

3.copy the ${ALSA}/usr/* to the target rootfile /usr/  ,so you can use the
alsa utils.

4.insmod the drive module and create device node ,use 
#aplay music.wav
to test the drive.
-- 
View this message in context: http://www.nabble.com/Re%3A-ml403-ac97-driver-tf4164866.html#a11918008
Sent from the linuxppc-embedded mailing list archive at Nabble.com.