hi andy, let me know the period size of the AudioHardware you are using.
if it is 2048 frames / write. then 8 buffers each of 4 Kb can be used only four times for a stereo , 2 bytes per sample , stream. if you check in mediaplayer services , to avoid buffer underrun condition , they have increased the buffer count to 12 , inturn which will be using 24 buffers per track. regards, bas. On Mon, Feb 9, 2009 at 11:46 AM, Andy Quan <[email protected]> wrote: > Bas, > Thank you for your information. Could you please let me know where is the > allocation of 24 buffers in mediaplayer service? I can't find it... :( > > > On 2/9/09, baskar rajagopal <[email protected]> wrote: >> >> Hi Andy, >> >> check the below >> >> 1. How much memory you are allocating for a client? In the original code >> they might allocate 1Mb of memory in the client heap - i.e., for 32 tracks >> and 8 buffer each of 4Kb size. If you are using only one track you can >> reduce this memory allocation. >> >> 2. In the current desing , even though it is mentioned 8 buffers of 4 Kb >> size per track , but from the mediaplayer services it is made as 24 buffers >> of 4 Kb per track ( this is for emulator ) , if you are using for target , >> you can make it as 8 buffers per track. >> >> >> regards, >> bas. >> >> >> On Sun, Feb 8, 2009 at 4:34 PM, Andy Quan <[email protected]> wrote: >> >>> Hi, >>> I am working on android multimedia on an ARMv5TE compatible chip with >>> hardware SIMD acceleration (CPU 600Mhz, 32K I$/D$, no L2$, 130Mhz external >>> DDR, 128MB DRAM). With some performance calibration codes, I find that >>> "audio flinger" thread costs around 50Mhz - 60Mhz when music player is >>> playing any 44Khz - 48Khz sample rate stereo audio (single track). This is >>> much higher beyond my expectation (20Mhz - 30Mhz). >>> >>> In my understanding, major cost of audio flinger should be resampling, >>> mixing, alsa rendering and some data copy. >>> 1. And I have confirmed that my testing case does not require resampling, >>> that is, a simple mixing and rendering will lead to the end. >>> 2. I have confirmed that on this platform alsa rendering does not need so >>> many cycles as I observed. >>> >>> Anybody can help me understand why this audio flinger thread costs so >>> many Mhz? Or did I misunderstand anything? I guess I did not catch the >>> bottleneck of this audio flinger:) >>> >>> BTW, my code base is based on the one by the end of last year, so I am >>> not sure if there is any performance related update in the current release. >>> >>> -- >>> Thanks, >>> Andy >>> >>> >>> >>> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
