* Re: ml403 ac97 driver
[not found] ` <2ec96d6e0707280204k50efb707q99a824c37f539309@mail.gmail.com>
@ 2007-07-29 8:48 ` Joachim Förster
2007-07-29 12:50 ` aq
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Joachim Förster @ 2007-07-29 8:48 UTC (permalink / raw)
To: qin lin; +Cc: linuxppc-embedded
Hi qin lin,
On Sat, 2007-07-28 at 17:04 +0800, qin lin wrote:
> I have add the driver to kernel as a module in ml403.When i insmod
> the module ,there are warnings followed here:
> [ 250.795594] snd-ml403_ac97cr: write access to codec register 0x26
> with bad value 0x800f / 32783!
> [ 250.911545] snd-ml403_ac97cr: write access to codec register 0x26
> with bad value 0xf / 15!
> [ 251.015576] snd-ml403_ac97cr: write access to codec register 0x2a
> with bad value 0x2801 / 10241!
> [ 251.127524] snd-ml403_ac97cr: write access to codec register 0x2a
> with bad value 0x3801 / 14337!
>
> And i check the warring find the warnings should be from function
> snd_ml403_ac97cr_codec_write() ,i have check the lm4550 codec
> datasheet to make sure the mask is what you have written.
These warnings are ok. Codec register 0x26 is the "PowerDown
Status/Control" register and the ALSA AC97 layer tries to write ones to
the lower 4 bits (which are AFAIK read only bits). LM4550 register 0x2a
has only one valid bit (lowest), but ALSA tries to write to a not
existing bit. So my driver masks out these bits.
The warnings show the invalid numbers ALSA wants to write to these
registers.
> What confused me is that where call the fuction
> snd_ml403_ac97cr_codec_write in the module_init program, would you
> mind if you point it for me?
Well, the function alsa_card_ml403_ac97cr_init() is registered as the
module_init function. It registers the driver and the device to the
kernel via platform_driver/device_register(). As a consequence the
kernel will call the registered probe() function called
snd_ml403_ac97cr_probe(). Among other things, the function called
snd_ml403_ac97cr_mixer() is invoked. Finally this function registers a
mixer device and the codec_read() and codec_write() functions with the
ALSA AC97 layer. While registering the ALSA AC97 layer calls the read
and write functions several times - a kind of initialization sequence.
That's the usual structure of an ALSA driver - not that simple - I
know :-) .
> There is another problem trouble me .I find a simple test program to
> check the codec playback work .But all it said that it cannot find
> the pcm file.Would you mind if you suggest something or paste what you
> have do to mknod the device?
Oh, I forgot to mention that in the README file. I used the "snddevices"
script found in ALSA's alsa-driver package (form version 1.0.13, but
version shouldn't matter).
> # ./test_sound.out /dev/snd/pcmC0D0
> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown
> PCM /dev/snd/pcmC0D0
> cannot open audio device /dev/snd/pcmC0D0 (No such file or directory)
Hmmm, try to create the device files with the script from above and see
if that happens again ...
BTW: (After having created the device files) you can also use aplay
(alsa-utils package) for testing. Where did you find "test_sound"?
Joachim
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ml403 ac97 driver
2007-07-29 8:48 ` ml403 ac97 driver Joachim Förster
@ 2007-07-29 12:50 ` aq
2007-07-30 5:40 ` Qin Lin
2007-07-31 11:49 ` BUG-REPORT " Qin Lin
2 siblings, 0 replies; 9+ messages in thread
From: aq @ 2007-07-29 12:50 UTC (permalink / raw)
To: linuxppc-embedded
Joachim:
Thanks for your information. I will try it sooner.
The test program is A Minimal Playback Program from website:=20
http://equalarea.com/paul/alsa-audio.html
PS:Besides that test program i also used aplay to test codec ,the result is
no different.=20
qin lin
Joachim F=C3=B6rster wrote:
>=20
> Hi qin lin,
>=20
> On Sat, 2007-07-28 at 17:04 +0800, qin lin wrote:
>> I have add the driver to kernel as a module in ml403.When i insmod=20
>> the module ,there are warnings followed here:
>> [ 250.795594] snd-ml403_ac97cr: write access to codec register 0x26
>> with bad value 0x800f / 32783!=20
>> [ 250.911545] snd-ml403_ac97cr: write access to codec register 0x26
>> with bad value 0xf / 15!
>> [ 251.015576] snd-ml403_ac97cr: write access to codec register 0x2a
>> with bad value 0x2801 / 10241!
>> [ 251.127524] snd-ml403_ac97cr: write access to codec register 0x2a
>> with bad value 0x3801 / 14337!=20
>>=20
>> And i check the warring find the warnings should be from function
>> snd_ml403_ac97cr_codec_write() =EF=BC=8Ci have check the lm4550 codec
>> datasheet to make sure the mask is what you have written.
>=20
> These warnings are ok. Codec register 0x26 is the "PowerDown
> Status/Control" register and the ALSA AC97 layer tries to write ones to
> the lower 4 bits (which are AFAIK read only bits). LM4550 register 0x2a
> has only one valid bit (lowest), but ALSA tries to write to a not
> existing bit. So my driver masks out these bits.
> The warnings show the invalid numbers ALSA wants to write to these
> registers.
>=20
>> What confused me is that where call the fuction
>> snd_ml403_ac97cr_codec_write in the module_init program, would you
>> mind if you point it for me?=20
>=20
> Well, the function alsa_card_ml403_ac97cr_init() is registered as the
> module_init function. It registers the driver and the device to the
> kernel via platform_driver/device_register(). As a consequence the
> kernel will call the registered probe() function called
> snd_ml403_ac97cr_probe(). Among other things, the function called
> snd_ml403_ac97cr_mixer() is invoked. Finally this function registers a
> mixer device and the codec_read() and codec_write() functions with the
> ALSA AC97 layer. While registering the ALSA AC97 layer calls the read
> and write functions several times - a kind of initialization sequence.
> That's the usual structure of an ALSA driver - not that simple - I
> know :-) .
>=20
>> There is another problem trouble me .I find a simple test program to
>> check the codec playback work .But all it said that it cannot find
>> the pcm file.Would you mind if you suggest something or paste what you
>> have do to mknod the device?=20
>=20
> Oh, I forgot to mention that in the README file. I used the "snddevices"
> script found in ALSA's alsa-driver package (form version 1.0.13, but
> version shouldn't matter).
>=20
>> # ./test_sound.out /dev/snd/pcmC0D0
>> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown
>> PCM /dev/snd/pcmC0D0=20
>> cannot open audio device /dev/snd/pcmC0D0 (No such file or directory)
>=20
> Hmmm, try to create the device files with the script from above and see
> if that happens again ...
> BTW: (After having created the device files) you can also use aplay
> (alsa-utils package) for testing. Where did you find "test_sound"?
>=20
> Joachim
>=20
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
--=20
View this message in context: http://www.nabble.com/Re%3A-ml403-ac97-driver=
-tf4164866.html#a11851202
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ml403 ac97 driver
2007-07-29 8:48 ` ml403 ac97 driver Joachim Förster
2007-07-29 12:50 ` aq
@ 2007-07-30 5:40 ` Qin Lin
2007-07-30 7:33 ` Joachim Förster
2007-07-31 11:49 ` BUG-REPORT " Qin Lin
2 siblings, 1 reply; 9+ messages in thread
From: Qin Lin @ 2007-07-30 5:40 UTC (permalink / raw)
To: linuxppc-embedded
Hi Joachim
I re-coross-compile alsa-lib and alsa-utils and install them in /usr on
board ,but the result is really no different .Would you mind if you point
out what i forget to do ?=20
# insmod ac97_bus.ko
# insmod snd-ac97-codec.ko
# insmod ml403_ac97cr.ko
[ 79.529114] ml403_ac97cr: remap controller memory region to 0xc500e000
done
[ 79.611803] ml403_ac97cr: request (playback) irq 7 done
[ 79.674236] ml403_ac97cr: request (capture) irq 6 done
[ 79.784291] snd-ml403_ac97cr: write access to codec register 0x26 with
bad value 0x800f / 32783!
[ 79.900247] snd-ml403_ac97cr: write access to codec register 0x26 with
bad value 0xf / 15!
[ 80.004284] snd-ml403_ac97cr: write access to codec register 0x2a with
bad value 0x2801 / 10241!
[ 80.116228] snd-ml403_ac97cr: write access to codec register 0x2a with
bad value 0x3801 / 14337!
# ./snddevices .........//use alsa-driver-1.0.14=20
creating device nod script
Creating mixer?...done.
Creating sequencer...done.
Creating midi0?...done.
Creating dsp?...done.
Creating audio?...done.
Creating sndstat...done.
Creating music...done.
Creating dmmidi?...done.
Creating dmfm?...done.
Creating amixer?...done.
Creating adsp?...done.
Creating amidi?...done.
Creating admmidi?...done.
rm: /dev/snd: is a directory
Creating snd/control?...done.
Creating snd/seq...done.
Creating snd/timer...done.
Creating snd/hw??...done.
Creating snd/midi??...done.
Creating snd/pcm??p...done.
Creating snd/pcm??c...done.
Creating aload?...done.
Creating aloadSEQ...done.
# ls -l /dev/snd
crw-rw-rw- 1 root root 116, 0 Jan 1 00:01 controlC0
crw-rw-rw- 1 root root 116, 4 Jan 1 00:01 hwC0D0
crw-rw-rw- 1 root root 116, 5 Jan 1 00:01 hwC0D1
crw-rw-rw- 1 root root 116, 6 Jan 1 00:01 hwC0D2
crw-rw-rw- 1 root root 116, 7 Jan 1 00:01 hwC0D3
crw-rw-rw- 1 root root 116, 24 Jan 1 00:01 pcmC0D0c
crw-rw-rw- 1 root root 116, 16 Jan 1 00:01 pcmC0D0p
crw-rw-rw- 1 root root 116, 1 Jan 1 00:01 seq
crw-rw-rw- 1 root root 116, 33 Jan 1 00:01 timer
# cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
14 sound
29 fb
116 alsa
128 ptm
136 pts
254 keyboard
# cat /proc/asound/devices
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer
# aplay -D /dev/snd/pcmC0D0p
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
# ./test_sound.out /dev/snd/pcmC0D0p=20
ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
cannot open audio device /dev/snd/pcmC0D0p (No such file or directory)
.............test_sound.out is A Minimal Playback Program from =20
http://equalarea.com/paul/alsa-audio.html
thanks for your help!
Qin Lin
Joachim F=C3=B6rster wrote:
>=20
> Hi qin lin,
>=20
> On Sat, 2007-07-28 at 17:04 +0800, qin lin wrote:
>> I have add the driver to kernel as a module in ml403.When i insmod=20
>> the module ,there are warnings followed here:
>> [ 250.795594] snd-ml403_ac97cr: write access to codec register 0x26
>> with bad value 0x800f / 32783!=20
>> [ 250.911545] snd-ml403_ac97cr: write access to codec register 0x26
>> with bad value 0xf / 15!
>> [ 251.015576] snd-ml403_ac97cr: write access to codec register 0x2a
>> with bad value 0x2801 / 10241!
>> [ 251.127524] snd-ml403_ac97cr: write access to codec register 0x2a
>> with bad value 0x3801 / 14337!=20
>>=20
>> And i check the warring find the warnings should be from function
>> snd_ml403_ac97cr_codec_write() =EF=BC=8Ci have check the lm4550 codec
>> datasheet to make sure the mask is what you have written.
>=20
> These warnings are ok. Codec register 0x26 is the "PowerDown
> Status/Control" register and the ALSA AC97 layer tries to write ones to
> the lower 4 bits (which are AFAIK read only bits). LM4550 register 0x2a
> has only one valid bit (lowest), but ALSA tries to write to a not
> existing bit. So my driver masks out these bits.
> The warnings show the invalid numbers ALSA wants to write to these
> registers.
>=20
>> What confused me is that where call the fuction
>> snd_ml403_ac97cr_codec_write in the module_init program, would you
>> mind if you point it for me?=20
>=20
> Well, the function alsa_card_ml403_ac97cr_init() is registered as the
> module_init function. It registers the driver and the device to the
> kernel via platform_driver/device_register(). As a consequence the
> kernel will call the registered probe() function called
> snd_ml403_ac97cr_probe(). Among other things, the function called
> snd_ml403_ac97cr_mixer() is invoked. Finally this function registers a
> mixer device and the codec_read() and codec_write() functions with the
> ALSA AC97 layer. While registering the ALSA AC97 layer calls the read
> and write functions several times - a kind of initialization sequence.
> That's the usual structure of an ALSA driver - not that simple - I
> know :-) .
>=20
>> There is another problem trouble me .I find a simple test program to
>> check the codec playback work .But all it said that it cannot find
>> the pcm file.Would you mind if you suggest something or paste what you
>> have do to mknod the device?=20
>=20
> Oh, I forgot to mention that in the README file. I used the "snddevices"
> script found in ALSA's alsa-driver package (form version 1.0.13, but
> version shouldn't matter).
>=20
>> # ./test_sound.out /dev/snd/pcmC0D0
>> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown
>> PCM /dev/snd/pcmC0D0=20
>> cannot open audio device /dev/snd/pcmC0D0 (No such file or directory)
>=20
> Hmmm, try to create the device files with the script from above and see
> if that happens again ...
> BTW: (After having created the device files) you can also use aplay
> (alsa-utils package) for testing. Where did you find "test_sound"?
>=20
> Joachim
>=20
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
--=20
View this message in context: http://www.nabble.com/Re%3A-ml403-ac97-driver=
-tf4164866.html#a11858308
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ml403 ac97 driver
2007-07-30 5:40 ` Qin Lin
@ 2007-07-30 7:33 ` Joachim Förster
2007-07-30 8:28 ` Qin Lin
0 siblings, 1 reply; 9+ messages in thread
From: Joachim Förster @ 2007-07-30 7:33 UTC (permalink / raw)
To: linuxppc-embedded
Hi Qin Lin,
On Sun, 2007-07-29 at 22:40 -0700, Qin Lin wrote:
> # insmod ac97_bus.ko
> # insmod snd-ac97-codec.ko
> # insmod ml403_ac97cr.ko
> [ 79.529114] ml403_ac97cr: remap controller memory region to 0xc500e000
> done
> [ 79.611803] ml403_ac97cr: request (playback) irq 7 done
> [ 79.674236] ml403_ac97cr: request (capture) irq 6 done
> [ 79.784291] snd-ml403_ac97cr: write access to codec register 0x26 with
> bad value 0x800f / 32783!
> [ 79.900247] snd-ml403_ac97cr: write access to codec register 0x26 with
> bad value 0xf / 15!
> [ 80.004284] snd-ml403_ac97cr: write access to codec register 0x2a with
> bad value 0x2801 / 10241!
> [ 80.116228] snd-ml403_ac97cr: write access to codec register 0x2a with
> bad value 0x3801 / 14337!
Completely fine.
> # ls -l /dev/snd
> crw-rw-rw- 1 root root 116, 0 Jan 1 00:01 controlC0
> crw-rw-rw- 1 root root 116, 4 Jan 1 00:01 hwC0D0
> crw-rw-rw- 1 root root 116, 5 Jan 1 00:01 hwC0D1
> crw-rw-rw- 1 root root 116, 6 Jan 1 00:01 hwC0D2
> crw-rw-rw- 1 root root 116, 7 Jan 1 00:01 hwC0D3
> crw-rw-rw- 1 root root 116, 24 Jan 1 00:01 pcmC0D0c
> crw-rw-rw- 1 root root 116, 16 Jan 1 00:01 pcmC0D0p
> crw-rw-rw- 1 root root 116, 1 Jan 1 00:01 seq
> crw-rw-rw- 1 root root 116, 33 Jan 1 00:01 timer
Ok, should suffice. [In my case snddevices made many other device
files.]
> # aplay -D /dev/snd/pcmC0D0p
> ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
Well, I think the way you specify the device is wrong. AFAIK the -D
option only accepts names which are defined in an ALSA configuration
file (.asoundrc & friends).
Furthermore: Did you try without any device (without -D option)? The
defaults should make ALSA pick the first available sound device. At
least, while I was testing, I didn't have to specify any device.
BTW: You need to specify the (.wav) file you want to play:
# aplay music.wav
Otherwise you won't here anything ;-). Read "man aplay" !
> # ./test_sound.out /dev/snd/pcmC0D0p
> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
> cannot open audio device /dev/snd/pcmC0D0p (No such file or directory)
Ditto. But I haven't had a look into test_sound source yet, but it might
be the same issue.
Joachim
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ml403 ac97 driver
2007-07-30 7:33 ` Joachim Förster
@ 2007-07-30 8:28 ` Qin Lin
2007-07-31 4:22 ` Qin Lin
0 siblings, 1 reply; 9+ messages in thread
From: Qin Lin @ 2007-07-30 8:28 UTC (permalink / raw)
To: linuxppc-embedded
hi Joachim
i have hearing the music . Thanks. just use=20
#aplay music.wav=20
Before that i recompile the alsa-lib again. change configure options
later i will paste the whole commands so as anybody can reference it .
Joachim F=C3=B6rster wrote:
>=20
> Hi Qin Lin,
>=20
> On Sun, 2007-07-29 at 22:40 -0700, Qin Lin wrote:
>> # insmod ac97_bus.ko
>> # insmod snd-ac97-codec.ko
>> # insmod ml403_ac97cr.ko
>> [ 79.529114] ml403_ac97cr: remap controller memory region to 0xc500e00=
0
>> done
>> [ 79.611803] ml403_ac97cr: request (playback) irq 7 done
>> [ 79.674236] ml403_ac97cr: request (capture) irq 6 done
>> [ 79.784291] snd-ml403_ac97cr: write access to codec register 0x26 wit=
h
>> bad value 0x800f / 32783!
>> [ 79.900247] snd-ml403_ac97cr: write access to codec register 0x26 wit=
h
>> bad value 0xf / 15!
>> [ 80.004284] snd-ml403_ac97cr: write access to codec register 0x2a wit=
h
>> bad value 0x2801 / 10241!
>> [ 80.116228] snd-ml403_ac97cr: write access to codec register 0x2a wit=
h
>> bad value 0x3801 / 14337!
>=20
> Completely fine.
>=20
>> # ls -l /dev/snd
>> crw-rw-rw- 1 root root 116, 0 Jan 1 00:01 controlC0
>> crw-rw-rw- 1 root root 116, 4 Jan 1 00:01 hwC0D0
>> crw-rw-rw- 1 root root 116, 5 Jan 1 00:01 hwC0D1
>> crw-rw-rw- 1 root root 116, 6 Jan 1 00:01 hwC0D2
>> crw-rw-rw- 1 root root 116, 7 Jan 1 00:01 hwC0D3
>> crw-rw-rw- 1 root root 116, 24 Jan 1 00:01 pcmC0D0c
>> crw-rw-rw- 1 root root 116, 16 Jan 1 00:01 pcmC0D0p
>> crw-rw-rw- 1 root root 116, 1 Jan 1 00:01 seq
>> crw-rw-rw- 1 root root 116, 33 Jan 1 00:01 timer
>=20
> Ok, should suffice. [In my case snddevices made many other device
> files.]
>=20
>> # aplay -D /dev/snd/pcmC0D0p
>> ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0=
p
>=20
> Well, I think the way you specify the device is wrong. AFAIK the -D
> option only accepts names which are defined in an ALSA configuration
> file (.asoundrc & friends).
> Furthermore: Did you try without any device (without -D option)? The
> defaults should make ALSA pick the first available sound device. At
> least, while I was testing, I didn't have to specify any device.
>=20
> BTW: You need to specify the (.wav) file you want to play:
> # aplay music.wav
> Otherwise you won't here anything ;-). Read "man aplay" !
>=20
>> # ./test_sound.out /dev/snd/pcmC0D0p=20
>> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0=
p
>> cannot open audio device /dev/snd/pcmC0D0p (No such file or directory)
>=20
> Ditto. But I haven't had a look into test_sound source yet, but it might
> be the same issue.
>=20
> Joachim
>=20
>=20
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
>=20
--=20
View this message in context: http://www.nabble.com/Re%3A-ml403-ac97-driver=
-tf4164866.html#a11859770
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ml403 ac97 driver
2007-07-30 8:28 ` Qin Lin
@ 2007-07-31 4:22 ` Qin Lin
2007-07-31 7:50 ` Joachim Förster
0 siblings, 1 reply; 9+ messages in thread
From: Qin Lin @ 2007-07-31 4:22 UTC (permalink / raw)
To: linuxppc-embedded
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ml403 ac97 driver
2007-07-31 4:22 ` Qin Lin
@ 2007-07-31 7:50 ` Joachim Förster
0 siblings, 0 replies; 9+ messages in thread
From: Joachim Förster @ 2007-07-31 7:50 UTC (permalink / raw)
To: linuxppc-embedded
Hi Qin Lin,
On Mon, 2007-07-30 at 21:22 -0700, Qin Lin wrote:
> 1.add the lm4550 driver to kernel source
> (someboby may can add them as a patch to kernel source)
In fact, in the last few days, I worked on my driver, made changes
according to Grant Likely's list of comments (see the thread where I
announced the driver). And right now, I'm preparing a patch against the
official kernel tree. So, I'll post a patch soon myself - just view more
days.
Joachim
^ permalink raw reply [flat|nested] 9+ messages in thread
* BUG-REPORT Re: ml403 ac97 driver
2007-07-29 8:48 ` ml403 ac97 driver Joachim Förster
2007-07-29 12:50 ` aq
2007-07-30 5:40 ` Qin Lin
@ 2007-07-31 11:49 ` Qin Lin
2007-08-09 17:01 ` Joachim Förster
2 siblings, 1 reply; 9+ messages in thread
From: Qin Lin @ 2007-07-31 11:49 UTC (permalink / raw)
To: linuxppc-embedded
HI Joachim
When i used the aplay to test the drive first time,it played well. But
after restart the board
it is not well again.
Qin Lin
# aplay yonggan.wav
Playing WAVE 'yonggan.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Stereo
[ 258.518119] Kernel stack overflow in process c039ec00, r1=c3e0bf50
#strace aplay yonggan.wav
......................
stat64("/usr/share/alsa/alsa.conf", {st_mode=S_IFREG|0644, st_size=7701,
...}) = 0
open("/dev/snd/controlC0", O_RDONLY) = 3
close(3) = 0
open("/dev/snd/controlC0", O_RDWR) = 3
ioctl(3, USBDEVFS_CONTROL, 0x7f9a25b8) = 0
ioctl(3, 0x41785501, 0x7f9a2560) = 0
close(3) = 0
open("/dev/snd/controlC0", O_RDONLY) = 3
close(3) = 0
open("/dev/snd/controlC0", O_RDWR) = 3
ioctl(3, USBDEVFS_CONTROL, 0x7f9a2808) = 0
ioctl(3, 0x80045532, 0x7f9a2838) = 0
open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK) = 4
close(3) = 0
ioctl(4, AGPIOC_ACQUIRE or APM_IOC_STANDBY, 0x7f9a2718) = 0
fcntl64(4, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
ioctl(4, AGPIOC_INFO, 0x7f9a2688) = 0
ioctl(4, AGPIOC_RELEASE or APM_IOC_SUSPEND, 0x7f9a2690) = 0
mmap(NULL, 4096, PROT_READ, MAP_SHARED, 4, 0x80000000) = 0x30018000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0x81000000) =
0x30019000
fcntl64(4, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl64(4, F_SETFL, O_RDWR) = 0
ioctl(4, AGPIOC_ACQUIRE or APM_IOC_STANDBY, 0x7f9a2c60) = 0
rt_sigaction(SIGINT, {0xfdabf30, [INT], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0xfdabf30, [TERM], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGABRT, {0xfdabf30, [ABRT], SA_RESTART}, {SIG_DFL}, 8) = 0
open("yonggan.wav", O_RDONLY|O_LARGEFILE) = 3
read(3, "RIFF$VR\0WAVEfmt \20\0\0\0\1\0\2\0", 24) = 24
read(3, "D\254", 2) = 2
read(3, "\0\0\20\261\2\0\4\0\20\0", 10) = 10
read(3, "data\\TR\0", 8) = 8
write(2, "Playing WAVE \'yonggan.wav\' : ", 29Playing WAVE 'yonggan.wav' : )
= 29
write(2, "Signed 16 bit Little Endian, ", 29Signed 16 bit Little Endian, ) =
29
write(2, "Rate 44100 Hz, ", 15Rate 44100 Hz, ) = 15
write(2, "Stereo", 6Stereo) = 6
write(2, "\n", 1
) = 1
ioctl(4, 0xc25c4110, 0x7f9a2518) = 0
ioctl(4, 0xc25c4110, 0x7f9a21b0) = 0
ioctl(4, 0xc25c4110, 0x7f9a21b0) = 0
ioctl(4, 0xc25c4110, 0x7f9a2518) = 0
ioctl(4, 0xc25c4110, 0x7f9a21b0) = 0
ioctl(4, 0xc25c4110, 0x7f9a21b0) = 0
ioctl(4, 0xc25c4110, 0x7f9a2518) = 0
ioctl(4, 0xc25c4110, 0x7f9a2298) = 0
ioctl(4, 0xc25c4110, 0x7f9a1f30) = 0
ioctl(4, 0xc25c4110, 0x7f9a1f30) = 0
ioctl(4, 0xc25c4110, 0x7f9a2298) = 0
ioctl(4, 0xc25c4110, 0x7f9a2298[ 213.220781] Kernel stack overflow in
process c039c030, r1=c0395f50
--
View this message in context: http://www.nabble.com/Re%3A-ml403-ac97-driver-tf4164866.html#a11922613
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG-REPORT Re: ml403 ac97 driver
2007-07-31 11:49 ` BUG-REPORT " Qin Lin
@ 2007-08-09 17:01 ` Joachim Förster
0 siblings, 0 replies; 9+ messages in thread
From: Joachim Förster @ 2007-08-09 17:01 UTC (permalink / raw)
To: linuxppc-embedded
Hi Qin Lin,
sorry for my late answer.
On Tue, 2007-07-31 at 04:49 -0700, Qin Lin wrote:
> When i used the aplay to test the drive first time,it played well. But
> after restart the board
> it is not well again.
Well, I don't think the problem occurs due to the restart of your
board ...
> # aplay yonggan.wav
> Playing WAVE 'yonggan.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
> Stereo
> [ 258.518119] Kernel stack overflow in process c039ec00, r1=c3e0bf50
... but unfortunately I can't tell how such an error results from the
driver. Are you able to reproduce it?
Since the driver "works", I never got such an error nor another kernel
panic/error.
[The only thing that comes to my mind is the very high interrupt volume,
because of the very small size (32 byte) of the playback FIFO (of the
AC97 controller) => hardware issue. But, since interrupts are _disabled_
during execution of interrupt handlers, I am sure that this cannot be
the source of the problem.]
Joachim
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-08-09 17:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <28652204.1477431184843737431.JavaMail.nabble@isper.nabble.com>
[not found] ` <1184918815.5886.13.camel@localhost>
[not found] ` <2ec96d6e0707280204k50efb707q99a824c37f539309@mail.gmail.com>
2007-07-29 8:48 ` ml403 ac97 driver Joachim Förster
2007-07-29 12:50 ` aq
2007-07-30 5:40 ` Qin Lin
2007-07-30 7:33 ` Joachim Förster
2007-07-30 8:28 ` Qin Lin
2007-07-31 4:22 ` Qin Lin
2007-07-31 7:50 ` Joachim Förster
2007-07-31 11:49 ` BUG-REPORT " Qin Lin
2007-08-09 17:01 ` Joachim Förster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).