All of lore.kernel.org
 help / color / mirror / Atom feed
* Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track
@ 2012-08-10  4:25 Fabio Estevam
  2012-08-10 11:00 ` Dong Aisheng
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2012-08-10  4:25 UTC (permalink / raw)
  To: Dong Aisheng, Lauri Hintsala; +Cc: alsa-devel, Mark Brown, Shawn Guo

Hi,

Running 3.6-rc1 on a mx28evk I get the following error with this wav format:

root@freescale /home$ aplay k3b_error1.wav
Playing WAVE 'k3b_error1.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
[  303.640000] asoc: machine hw_params failed: -22
aplay: set_params:959: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  U8
SUBFORMAT:  STD
SAMPLE_BITS: 8
FRAME_BITS: 8
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 1000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 4000
TICK_TIME: 0

Haven't started debugging yet, but if anyone sees something obvious,
please let me know.

This same file plays correctly on mx31/mx27/mx51/mx6q boards.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track
  2012-08-10  4:25 Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track Fabio Estevam
@ 2012-08-10 11:00 ` Dong Aisheng
  2012-08-10 11:31   ` Mark Brown
  2012-08-10 12:52   ` Fabio Estevam
  0 siblings, 2 replies; 6+ messages in thread
From: Dong Aisheng @ 2012-08-10 11:00 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Shawn Guo, alsa-devel, Mark Brown, Lauri Hintsala

On Fri, Aug 10, 2012 at 12:25:13PM +0800, Fabio Estevam wrote:
> Hi,
> 
> Running 3.6-rc1 on a mx28evk I get the following error with this wav format:
> 
> root@freescale /home$ aplay k3b_error1.wav
> Playing WAVE 'k3b_error1.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
> [  303.640000] asoc: machine hw_params failed: -22
It failed at here:
/* Sgtl5000 sysclk should be >= 8MHz and <= 27M */
if (mclk < 8000000 || mclk > 27000000)
	return -EINVAL;

Since sgtl5000 on slave mode, the mclk can only be 256*fs, 384*fs, 512*fs,
the maximum mclk of 8Khz 4096000(512 * 8000) < 8Mhz, it does not meet
the minimum clock requirement of mclk.
It looks like hw limitation on slave mode.

Will spend some time double check if any solution for this later.
If anyone else know it, please share the comments.

Regards
Dong Aisheng

> aplay: set_params:959: Unable to install hw params:
> ACCESS:  RW_INTERLEAVED
> FORMAT:  U8
> SUBFORMAT:  STD
> SAMPLE_BITS: 8
> FRAME_BITS: 8
> CHANNELS: 1
> RATE: 8000
> PERIOD_TIME: 125000
> PERIOD_SIZE: 1000
> PERIOD_BYTES: 1000
> PERIODS: 4
> BUFFER_TIME: 500000
> BUFFER_SIZE: 4000
> BUFFER_BYTES: 4000
> TICK_TIME: 0
> 
> Haven't started debugging yet, but if anyone sees something obvious,
> please let me know.
> 
> This same file plays correctly on mx31/mx27/mx51/mx6q boards.
> 
> Regards,
> 
> Fabio Estevam
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track
  2012-08-10 11:00 ` Dong Aisheng
@ 2012-08-10 11:31   ` Mark Brown
  2012-08-10 11:51     ` Dong Aisheng
  2012-08-10 12:52   ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Brown @ 2012-08-10 11:31 UTC (permalink / raw)
  To: Dong Aisheng; +Cc: alsa-devel, Shawn Guo, Fabio Estevam, Lauri Hintsala

On Fri, Aug 10, 2012 at 07:00:05PM +0800, Dong Aisheng wrote:

> Since sgtl5000 on slave mode, the mclk can only be 256*fs, 384*fs, 512*fs,
> the maximum mclk of 8Khz 4096000(512 * 8000) < 8Mhz, it does not meet
> the minimum clock requirement of mclk.
> It looks like hw limitation on slave mode.

> Will spend some time double check if any solution for this later.
> If anyone else know it, please share the comments.

The CODEC driver ought to be setting a constraint for this if there's no
way it can support 8kHz in slave mode.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track
  2012-08-10 11:31   ` Mark Brown
@ 2012-08-10 11:51     ` Dong Aisheng
  0 siblings, 0 replies; 6+ messages in thread
From: Dong Aisheng @ 2012-08-10 11:51 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Shawn Guo, Fabio Estevam, Lauri Hintsala

On Fri, Aug 10, 2012 at 07:31:09PM +0800, Mark Brown wrote:
> On Fri, Aug 10, 2012 at 07:00:05PM +0800, Dong Aisheng wrote:
> 
> > Since sgtl5000 on slave mode, the mclk can only be 256*fs, 384*fs, 512*fs,
> > the maximum mclk of 8Khz 4096000(512 * 8000) < 8Mhz, it does not meet
> > the minimum clock requirement of mclk.
> > It looks like hw limitation on slave mode.
> 
> > Will spend some time double check if any solution for this later.
> > If anyone else know it, please share the comments.
> 
> The CODEC driver ought to be setting a constraint for this if there's no
> way it can support 8kHz in slave mode.
> 
Yes, it's true.
I will check it when have time.

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track
  2012-08-10 11:00 ` Dong Aisheng
  2012-08-10 11:31   ` Mark Brown
@ 2012-08-10 12:52   ` Fabio Estevam
  2012-08-10 13:04     ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2012-08-10 12:52 UTC (permalink / raw)
  To: Dong Aisheng; +Cc: Shawn Guo, alsa-devel, Mark Brown, Lauri Hintsala

On 8/10/12, Dong Aisheng <b29396@freescale.com> wrote:
> On Fri, Aug 10, 2012 at 12:25:13PM +0800, Fabio Estevam wrote:
>> Hi,
>>
>> Running 3.6-rc1 on a mx28evk I get the following error with this wav
>> format:
>>
>> root@freescale /home$ aplay k3b_error1.wav
>> Playing WAVE 'k3b_error1.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
>> [  303.640000] asoc: machine hw_params failed: -22
> It failed at here:
> /* Sgtl5000 sysclk should be >= 8MHz and <= 27M */
> if (mclk < 8000000 || mclk > 27000000)
> 	return -EINVAL;
>
> Since sgtl5000 on slave mode, the mclk can only be 256*fs, 384*fs, 512*fs,
> the maximum mclk of 8Khz 4096000(512 * 8000) < 8Mhz, it does not meet
> the minimum clock requirement of mclk.
> It looks like hw limitation on slave mode.

I can play this file on a mx51evk and mx6qsabrelite boards, which also
uses a sgtl5000.

So it looks like a mxs issue, right?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track
  2012-08-10 12:52   ` Fabio Estevam
@ 2012-08-10 13:04     ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2012-08-10 13:04 UTC (permalink / raw)
  To: Dong Aisheng; +Cc: Shawn Guo, alsa-devel, Mark Brown, Lauri Hintsala

On 8/10/12, Fabio Estevam <festevam@gmail.com> wrote:

> I can play this file on a mx51evk and mx6qsabrelite boards, which also
> uses a sgtl5000.

Ok, these boards have sgtl5000 in master mode.

Only on mx28evk we have sgtl5000 in slave mode.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-10 12:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-10  4:25 Error with "Unsigned 8 bit, Rate 8000 Hz, Mono" track Fabio Estevam
2012-08-10 11:00 ` Dong Aisheng
2012-08-10 11:31   ` Mark Brown
2012-08-10 11:51     ` Dong Aisheng
2012-08-10 12:52   ` Fabio Estevam
2012-08-10 13:04     ` Fabio Estevam

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.