[alsa-devel] Low sample rates for SGTL5000 on i.MX28

Fabio Estevam festevam at gmail.com
Fri Nov 14 01:29:34 CET 2014


On Thu, Nov 13, 2014 at 9:34 PM, Fabio Estevam <festevam at gmail.com> wrote:
> On Thu, Nov 13, 2014 at 8:36 PM, Craig McQueen
> <craig.mcqueen at beamcommunications.com> wrote:
>
>> If you're playing a mono file successfully, then you must be going through
>> an ALSA plugin that does some sort of rate/format/channel conversion. That
>> depends on what's in asoundrc. Please try it with the -D hw:0,0 parameter
>> and a stereo file.
>
> That's interesting: I can play your three wav files if I run "aplay
> file.wav" on mx28evk.
>
> However, if I pass -D hw:0,0 I get different results:
>
> aplay -D hw:0,0 stereo_16k.wav
> Playing WAVE 'stereo_16k.wav' : Signed 16 bit Little Endian, Rate
> 16000 Hz, Stereo
>
> also works, but:
>
> root at freescale /home$  aplay -D hw:0,0 stereo_8k.wav
> Playing WAVE 'stereo_8k.wav' : Signed 16[ 1023.301833] sgtl5000 0-000a: Invalid
> mclk frequency: 4.096MHz
>  bit Little Endian, Rate[ 1023.309341] mxs-sgtl5000 sound: ASoC: machine hw_para
> ms failed: -22
>  8000 Hz, Stereo
> aplay: set_params:1123: Unable to install hw params:
> ACCESS:  RW_INTERLEAVED
> FORMAT:  S16_LE
> SUBFORMAT:  STD
> SAMPLE_BITS: 16
> FRAME_BITS: 32
> CHANNELS: 2
> RATE: 8000
> PERIOD_TIME: 125000
> PERIOD_SIZE: 1000
> PERIOD_BYTES: 4000
> PERIODS: 4
> BUFFER_TIME: 500000
> BUFFER_SIZE: 4000
> BUFFER_BYTES: 16000
> TICK_TIME: 0
>
> Not sure why 'aplay -D hw:0,0 stereo_8k.wav' works and 'aplay
> stereo_8k.wav' succeeds.

Ok, so the 'aplay stereo_8k.wav' is converting the rate to 44.1kHz, so
that's why it does not fail.


More information about the Alsa-devel mailing list