Hi,
I am running Navigation application, I am not able to hear the sound on this. It is looking for ALSA-Lib which I have selected in the LTIB-drivers.
Navigation is my application. It is not part of the LTIB.
I get following error when I run the navigation application.
Error opening PCM playback device: -6, No such device or address
Retrying..
ALSA lib pcm.c:2166:(snd_pcm_open_conf) symbol _snd_pcm_plug_open is not defined
inside [builtin]
This is the output of $ cat /proc/asound/cards
root@freescale /mnt/usb$ cat /proc/asound/cards
0 [imx3stack ]: SGTL5000 - imx-3stack
imx-3stack (SGTL5000)
1 [imx3stackspdif ]: mxc spdif - imx-3stack-spdif
imx-3stack-spdif (mxc spdif)
I am attaching viewer.c(application file) and audio.c(alsa driver configuration)
Please let me where I am going wrong. Also I am attaching alsa-lib.spec file.
Kindly help.
Regards,
Swamy
Original Attachment has been moved to: 538-audio.c
Original Attachment has been moved to: 539-alsalib.spec
Original Attachment has been moved to: 537-viewer.c
Hi Daiane Angolini,
I made the following changes as you said...But no luck..
retVal = snd_pcm_open( &pcm_playback, playback_device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
to
retVal = snd_pcm_open( &pcm_playback, playback_device, SND_PCM_STREAM_PLAYBACK, 0);
The Navigation device which I have is a USB device. Do I need to configure the USB device for Audio...something like that in LTIB?
Please suggest.
Regards,
Swamy
Hi Daiane Angolini,
Thanks for the reply. I am on vacation this Monday. I shall try out this on Tuesday in office and let you know.
Regarding the commented line, I was just trying by giving default instead of playback_device. However it did not work for me, hence I commented back and retained the original code.
//retVal = snd_pcm_open( &pcm_playback, "default", SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
Regards,
Swamy
From your audio.c:
retVal = snd_pcm_open( &pcm_playback, playback_device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
//retVal = snd_pcm_open( &pcm_playback, "default", SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
if (retVal != 0)
{
From aplay's source code: (alsa-utils-1.0.11rc2/aplay/aplay.c)
err = snd_pcm_open(&handle, pcm_name, stream, open_mode);
if (err < 0) {
error(_("audio open error: %s"), snd_strerror(err));
return 1;
}
pcm_name is "default" (Why your "default" line is comment out?)
and open_mode is SND_PCM_NONBLOCK only in case you specify it from command line, otherwise it's 0, can you try with 0?
Hi Daiane Angolini,
Yes I am using IMX53 SMD.
Yes, If I try the "aplay" command independently, the sound works for me
root@freescale /mnt/usb$ aplay -D hw:0,0 xpstartu.wav
Playing WAVE 'xpstartu.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Stere
Please suggest
Regards,
Swamy
Does sound works with aplay?
You are using iMX53 SMD, isn´t it?