Android sound

cancel
Showing results for 
Search instead for 
Did you mean: 

Android sound

Jump to solution
3,253 Views
alxdc
Contributor III

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?

Labels (3)
0 Kudos
1 Solution
173 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
6 Replies
173 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello, alxdc,

     Please run command "stop media" on console, then use "alsa_aplay sound.wav" to play sound file !

Regards,

Weidong

0 Kudos
173 Views
alxdc
Contributor III

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.

0 Kudos
173 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

0 Kudos
173 Views
alxdc
Contributor III

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

0 Kudos
174 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
173 Views
alxdc
Contributor III

I had already followed this steps but the variable suported_devices was wrong configured.

Thank you very much Weidong.

0 Kudos