I am working in a sabresd based board with Android 4.0.4. self compiled. The problem is the sound, the card is detected in the kernel level, and in the serial terminal with "alsa_aplay sound.wav" the file sounds by the sgtl5000 audio card, but in the system nothing is ringing. What is missing?
Solved! Go to Solution.
Hello,alxdc,
OK, I understand your meaning. In android HAL, We support "WM8958/WM8962/SPDIF/HDMI AUDIO", but not sgtl5000 in present android BSP, you will have to add corresponding code to android HAL: myandroid/hardware/imx/alsa/tinyalsa_hal.c, We provided a document to guide customer how to add a new codec to android HAL.
Please see :
How to port new audio codec into Android.docx
Regards,
Weidong
Hello, alxdc,
Please run command "stop media" on console, then use "alsa_aplay sound.wav" to play sound file !
Regards,
Weidong
Hi Weidong,
first of all, thanks for your fast answer, but I think that I have explained wrong.
I have sound when I execute "alsa_aplay sound.wav" without problems, but into the Android system when I try to play a file in the browser or when I change the Sound settings (volumen, ringtone...) I can hear anything.
I have tried the "stop media" and the full system hangs, but I still can get sound when I execute the 'alsa_aplay' command.
Thanks.
Hello,alxdc,
OK, when android system is running, media server is taking up all media resources, So if we test audio on command line, we have to run "stop media" at first, then use ALSA command to test sound driver. but now for android system, media will be hanged, when we finish testing, we can run "start media" to restore media server.
Now, Could you describe the audio issue you met in detail again ? Let me see !
Reargds,
Weidong
Hello Weidong,
then the problem should be in the media server, if I stop (or not) the "media" I can use the "alsa_aplay sound.was" and I have sound output through the sound card, but when I try to play something into the Android system, I do not have sound output. How can I configure the media server? Because it is clear that the card is detected, and the driver is working.
With the: cat /proc/asound/cards this is the output.
0 [sgtl5000audio ]: sgtl5000-audio - sgtl5000-audio
sgtl5000-audio
1 [imxhdmisoc ]: imx-hdmi-soc - imx-hdmi-soc
imx-hdmi-soc
I also tried without a HDMI monitor as the result is the same.
Greetings.
axl
Hello,alxdc,
OK, I understand your meaning. In android HAL, We support "WM8958/WM8962/SPDIF/HDMI AUDIO", but not sgtl5000 in present android BSP, you will have to add corresponding code to android HAL: myandroid/hardware/imx/alsa/tinyalsa_hal.c, We provided a document to guide customer how to add a new codec to android HAL.
Please see :
How to port new audio codec into Android.docx
Regards,
Weidong
I had already followed this steps but the variable suported_devices was wrong configured.
Thank you very much Weidong.