aplayer output rate

  • Hello again,


    is it possible to play sounds in aplay, (or any other player) that are µlaw coded or pcm, with less than 44100Hz? We are struggling with performance problems as there are some other tasks beside the audio output.


    Best Christian

  • About µ-law I'm not sure. In fact it's the first time that I hear about this coding. Is this a special coding for PCM files?


    But other sample rates are of course OK. On the other hand playing the sound is mostly done by dedicated hardware, so the CPU load will not be much lower when using another data rate. Just the files are smaller.


    If it's about the file size: usually we also have madplay included in our rootfs, that can play MP3 files. At the moment I'm not sure if this is also true for PicoCOM4, but you can easily check if it is available. If not, just add it to your selected BuildRoot packages.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • It is a very nice codec for voice output. We decided to use it because we started our development on picocom2 with 32MB of flash. And our device is voice guided in several languages. So it was nice that we can compress the PCM up to 1:20 and more.


    The other problem is that we use Java on our device and there is no direct access to amixer to change volume, so we scale the signal sending to a named pipe. And the named pipe is playbacked by aplay. But I was not able to convert a PCM or µlaw to something with less than 44100Hz played by aplay.


    We convert with sox, e.g. sox welcome-message.wav -t au -r 16000 -e mu-law test.au to convert the PCM to 16kHz µlaw.




    Can you provide a wav file with less than 44100Hz?


    Best Christian

  • Hello,


    we did some more research on that problem and found a strange block in sound/soc/samsung/s3c24xx_picocom4.c which is obviously a copy of sound/soc/samsung/s3c24xx_simtec.c



    could this be the reason for the problem? How to determine a prescaler (psr) for low kHz sampling rates?
    Sorry but this problem could be a show stopper for our product. BTW 8kHz worked fine on the picocom2.


    Best Christian