All of lore.kernel.org
 help / color / mirror / Atom feed
From: Craig McQueen <craig.mcqueen@beamcommunications.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Low sample rates for SGTL5000 on i.MX28
Date: Fri, 14 Nov 2014 09:36:51 +1100	[thread overview]
Message-ID: <54653283.5070404@beamcommunications.com> (raw)
In-Reply-To: <CAOMZO5BAaL8cP+7NetvNyEiGfokiyLWdpXw3r=AJspLj1dfzxw@mail.gmail.com>


On 13/11/14 23:32, Fabio Estevam wrote:
> On Thu, Nov 13, 2014 at 4:34 AM, Craig McQueen
> <craig.mcqueen@beamcommunications.com> wrote:
>> I'm testing the 3.18 kernel for i.MX28 EVK, which has an SGTL5000 CODEC. I
>> notice that audio cannot be output at 8 kHz or 11.025 kHz, although the
>> SGTL5000 data sheet table 8 indicates this should be possible.
>>
>> If I try to play or record at 8 kHz or 11.025 kHz, I get an error message:
>>
>>      # aplay test_8k.wav
>>      [ 6168.910201] mxs_evk_startup: Skipped programming wolfson codec
> Is this really a mainline kernel? I don't see any 'mxs_evk_startup' in mainline.

You're right, I cut-and-pasted that from my original work on a custom 
audio driver on a 3.14 kernel. Sorry about that. But still, I get the 
same error on the 3.18-rc4 kernel. Here is a sample:

     # aplay -D hw:0,0 stereo_8k.wav
     Playing WAVE 'stereo_8k.wav' : Signed 16 bit Little Endian, Rate 
8000 Hz, Stereo
     [ 3718.857813] sgtl5000 0-000a: Invalid mclk frequency: 4.096MHz
     [ 3718.865460] mxs-sgtl5000 sound: ASoC: machine hw_params failed: -22
     aplay: set_params:1297: Unable to install hw params:
     ACCESS:  RW_INTERLEAVED
     FORMAT:  S16_LE
     SUBFORMAT:  STD
     SAMPLE_BITS: 16
     FRAME_BITS: 32
     CHANNELS: 2
     RATE: 8000
     ...

>>      Playing WAVE 'test_8k.wav' : Signed 16 bit Little Endian, Rate 8000 Hz,
>> Mono
>>      [ 6168.941211] sgtl5000 0-000a: Invalid mclk frequency: 4.096MHz
>>      [ 6168.947047] mxs-sgtl5000 sound.11: ASoC: machine hw_params failed:
>> -22
>>      aplay: set_params:1145: Unable to install hw params:
>>      ...
>>
>> For an 8 kHz sample rate, I get
>>
>>      Invalid mclk frequency: 4.096MHz
> I am not able to reproduce this bug here. I can play 8kHz file on the mx28evk:
>
> root@freescale /home$ aplay mono_8k.wav
> Playing WAVE 'mono_8k.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono

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.

-- 
Craig McQueen

  reply	other threads:[~2014-11-13 22:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13  6:34 Low sample rates for SGTL5000 on i.MX28 Craig McQueen
2014-11-13 12:32 ` Fabio Estevam
2014-11-13 22:36   ` Craig McQueen [this message]
2014-11-13 23:34     ` Fabio Estevam
2014-11-14  0:29       ` Fabio Estevam
2014-11-14  0:59         ` Fabio Estevam
2014-11-14  2:53           ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54653283.5070404@beamcommunications.com \
    --to=craig.mcqueen@beamcommunications.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=festevam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.