Re: [alsa-devel] [RFC] ASoC: Add machine driver for i.MX SGTL500 based boards
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().
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
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.
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
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
participants (2)
-
Fabio Estevam
-
Mark Brown