Article [#4188] Can not play audio on AD1981 board in trunk

[#4188] Can not play audio on AD1981 board in trunk

Submitted By: Vivi Li

Open Date

2008-06-23 08:58:25     Close Date

2008-07-01 22:56:05

Priority:

Medium     Assignee:

Cliff Cai

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

N/A

Processor:

N/A     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

    Toolchain version or rev.:

08r1-8

App binary format:

N/A     

Summary: Can not play audio on AD1981 board in trunk

Details:

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

root:/>

Case 1 ...PASS

Case 1 ...PASS

aplay wav^M

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

root:/>

--

Follow-ups

--- Cliff Cai                                                2008-06-27 07:46:58

I think you should select 2M uncache DMA buffer.

Cliff

--- Robin Getz                                               2008-06-27 10:17:34

Cliff:

- 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

area"

--- Cliff Cai                                                2008-06-30 03:25:23

Hi Robin,

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

memory size.

OK,I will add more detailed information.

Cliff 

--- Vivi Li                                                  2008-07-01 22:56:02

It's OK after I set 2M uncache DMA buffer.

Close it.

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

File Name     File Type     File Size     Posted By

No Files Were Found

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.