[#4188] Can not play audio on AD1981 board in trunk
Submitted By: Vivi Li
2008-06-23 08:58:25 Close Date
Closed Fixed In Release:
Found In Release:
N/A Silicon Revision:
Is this bug repeatable?:
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
Summary: Can not play audio on AD1981 board in trunk
In trunk, on bf537-stamp with AD1981 built-in driver, play audio failed.
root:/> arecord -t wav -c 2 -f S16_LE -r 8000 -d 5 wav^M
Recording WAVE 'wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo^M
Case 1 ...PASS
Case 1 ...PASS
Failed to allocate memory for tx dma buf^M
asoc: platform prepare error^M
ALSA lib ../../../alsa-lib-1.0.12/src/pcm/pcm_direct.c:985:(snd_pcm_direct_initialize_slave) unable to install hw params^M
ALSA lib ../../../alsa-lib-1.0.12/src/pcm/pcm_dmix.c:876:(snd_pcm_dmix_open) unable to initialize slave^M
aplay: main:550: audio open error: Cannot allocate memory^M
--- Cliff Cai 2008-06-27 07:46:58
I think you should select 2M uncache DMA buffer.
--- Robin Getz 2008-06-27 10:17:34
- how is it possible that to play an audio file, needs 2 Meg of memory?
- can you make the error message more clear:How about something like:
"Failed to allocate 512k of memory for tx dma buf - increase uncached
--- Cliff Cai 2008-06-30 03:25:23
it doesn't mean it need 2M memmory,maybe just need more than 1M memory,since we
introduce 2 extra intermediate buffer(RX/TX)for implementing mmap and AC97 even
need more memory to construct ac97 frame.
For ad1980/1,currently we report to upper driver that we can allocate up to
128k memory for one PCM stream,the driver works in AC97 mode,so we need to
allocate 128*sizeof(ac97_frame)/4 for DMA.That means we need memory with size
640k(RX and TX,2*(128*10/4))If the driver is in mmap mode,we need to double that
OK,I will add more detailed information.
--- Vivi Li 2008-07-01 22:56:02
It's OK after I set 2M uncache DMA buffer.
File Name File Type File Size Posted By
No Files Were Found