All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards
       [not found] <1309804915-27544-1-git-send-email-fabio.estevam@freescale.com>
@ 2011-07-04 19:23 ` Mark Brown
  2011-07-05 21:56   ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-07-04 19:23 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel, lrg, kernel

On Mon, Jul 04, 2011 at 03:41:55PM -0300, Fabio Estevam wrote:

> sgtl5000 1-000a: sgtl5000 revision 17                                           
> sgtl5000 1-000a: asoc: failed to probe CODEC sgtl5000.1-000a: -22               
> asoc: failed to instantiate card sgtl5000: -22                                  

Have you looked to see where the error is coming from?

> +	ret = snd_soc_dai_set_sysclk(codec_dai, SGTL5000_LRCLK,
> +						params_rate(params), 0);
> +
> +	if (ret) {
> +		pr_err("%s: failed setting codec sysclk\n", __func__);
> +		return ret;
> +	}

Fix this in the CODEC driver, copying this code into the machine drivers
is clearly not useful.

> +static int __init imx_sgtl5000_init(void)
> +{
> +	int ret;
> +
> +	imx_sgtl5000_snd_device = platform_device_alloc("soc-audio", -1);
> +	if (!imx_sgtl5000_snd_device)
> +		return -ENOMEM;

We're not accepting new drivers using soc-audio, you should use a
regular platform device and register the card with snd_soc_register_card().

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

* Re: [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards
  2011-07-04 19:23 ` [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards Mark Brown
@ 2011-07-05 21:56   ` Fabio Estevam
  2011-07-05 23:25     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2011-07-05 21:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, alsa-devel, lrg, kernel

Hi Mark,

On Mon, Jul 4, 2011 at 4:23 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Mon, Jul 04, 2011 at 03:41:55PM -0300, Fabio Estevam wrote:
>
>> sgtl5000 1-000a: sgtl5000 revision 17
>> sgtl5000 1-000a: asoc: failed to probe CODEC sgtl5000.1-000a: -22
>> asoc: failed to instantiate card sgtl5000: -22
>
> Have you looked to see where the error is coming from?

Yes, now I see that the error comes from the sgtl5000 driver and it
is related to the regulator. Will submit a patch for this later after
I get audio to work.

Now the codec is registered properly:
asoc: sgtl5000 <-> imx-ssi.0 mapping ok

,but aplay is failing:

root@freescale /home$ aplay tone.wav
Playing WAVE 'tone.wav' : Signed 16 bit Little Endian, Rate 44
100 Hz, Stereo
asoc: platform imx-pcm-audio.0 hw params failed
aplay: set_params:959: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (92879 92880)
PERIOD_SIZE: 4096
PERIOD_BYTES: 16384
PERIODS: 4
BUFFER_TIME: (371519 371520)
BUFFER_SIZE: 16384
BUFFER_BYTES: 65536
TICK_TIME: 0

I am starting to debug this now, but if you have any suggestions,
please let me know.

Thanks,

Fabio Estevam

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

* Re: [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards
  2011-07-05 21:56   ` Fabio Estevam
@ 2011-07-05 23:25     ` Mark Brown
  2011-07-06 16:07       ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-07-05 23:25 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, lrg, kernel

On Tue, Jul 05, 2011 at 06:56:45PM -0300, Fabio Estevam wrote:

> ,but aplay is failing:

> root@freescale /home$ aplay tone.wav
> Playing WAVE 'tone.wav' : Signed 16 bit Little Endian, Rate 44
> 100 Hz, Stereo
> asoc: platform imx-pcm-audio.0 hw params failed
> aplay: set_params:959: Unable to install hw params:

So the error message says that imx-pcm-audio.0 hw_params() doesn't
support the format you're trying to play.  You should check the code to
see why it's returning an error.

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

* Re: [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards
  2011-07-05 23:25     ` Mark Brown
@ 2011-07-06 16:07       ` Fabio Estevam
  2011-07-06 16:39         ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2011-07-06 16:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, alsa-devel, lrg, kernel

On Tue, Jul 5, 2011 at 8:25 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Jul 05, 2011 at 06:56:45PM -0300, Fabio Estevam wrote:
>
>> ,but aplay is failing:
>
>> root@freescale /home$ aplay tone.wav
>> Playing WAVE 'tone.wav' : Signed 16 bit Little Endian, Rate 44
>> 100 Hz, Stereo
>> asoc: platform imx-pcm-audio.0 hw params failed
>> aplay: set_params:959: Unable to install hw params:
>
> So the error message says that imx-pcm-audio.0 hw_params() doesn't
> support the format you're trying to play.  You should check the code to
> see why it's returning an error.

The error is coming from  dma_request_channel inside imx_ssi_dma_alloc
function in
sound/soc/imx-pcm-dma-mx2.c:


iprtd->dma_chan = dma_request_channel(mask, filter, iprtd);
	if (!iprtd->dma_chan)
		return -EINVAL;

Sascha,

Would you have any suggestion as to wht the dma_request_channel fails?

Thanks,

Fabio Estevam
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards
  2011-07-06 16:07       ` Fabio Estevam
@ 2011-07-06 16:39         ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2011-07-06 16:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, alsa-devel, lrg, kernel

On Wed, Jul 6, 2011 at 1:07 PM, Fabio Estevam <festevam@gmail.com> wrote:
...
> The error is coming from  dma_request_channel inside imx_ssi_dma_alloc
> function in
> sound/soc/imx-pcm-dma-mx2.c:
>
>
> iprtd->dma_chan = dma_request_channel(mask, filter, iprtd);
>        if (!iprtd->dma_chan)
>                return -EINVAL;
>
> Sascha,
>
> Would you have any suggestion as to wht the dma_request_channel fails?

Ok, no more dma_request_channel failure now and aplay can run (, but
no sound yet).

It ends the playback with:
aplay: pcm_write:1262: write error: Input/output error

Will keep debugging it.

Regards,

Fabio Estevam
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2011-07-06 16:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1309804915-27544-1-git-send-email-fabio.estevam@freescale.com>
2011-07-04 19:23 ` [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards Mark Brown
2011-07-05 21:56   ` Fabio Estevam
2011-07-05 23:25     ` Mark Brown
2011-07-06 16:07       ` Fabio Estevam
2011-07-06 16:39         ` 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.