I still haven't solved the problem I desrcibed below. I could really use some help on this. Does anyone have any ideas on this one? I'm getting desperate.....



Hi all,

I am using alsa 0.9.2 on my system, and I have an on-board intel8x0 Analog Devices 1881A SoundMax codec. In my alsa.conf file I have an automatic rate conversion plugin defined as follows:

pcm.intel8x0{
        type hw
        card 0
}

pcm.good_format{
        type plug
        slave{
                pcm intel8x0
                format S16_LE
                channels 2
                rate 44100
        }
}

To test out this plugin, I compiled the 0.9.2 versions of aplay and amixer. I was able to run amixer and un-mute Master and PCM with no problems. I then ran aplay using the plugin with the following syntax:
./aplay -D good_format <wav file>
In doing this, I was able to attain my goal of being able to play a wav file with any combination of available sample rates, bit rates, and mono/stereo.


However, I did notice something unusual. Each time I ran aplay using the above pcm plugin, I lost 4k of available memory. To find the memory leak culprit, I unloaded all alsa modules and took a snapshot of available memory with 'free'. I then loaded all alsa modules, set the mixer, ran aplay with good_format 5 times, and then unloaded the modules. The 20k of memory that was lost from running aplay 5 times was not returned to the system. This points to the memory leak being in the alsa kernel modules.

As a first sanity check I checked my 'free', loaded the modules, set the mixer, and then unloaded the modules. All memory used for the mixer was returned to the system as expected.

As a second sanity check, I ran the above test substituting the default pcm device (./aplay -D intel8x0 <wav file>) instead of the plugin. There was no memory loss seen after each use of aplay, and all allocated memory was returned to the system as expected.

I have been looking long and hard to find the source of this issue, and I am running out of ideas. Has anyone seen this? Is there really a memory leak in the alsa kernel modules when using an intel8x0 pcm plugin? Or am I doing something wrong? Thanks in advance for your help!

----- Chris Pechie

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to