Hi Android developers
I ported android 2.3 on dm365evm, am equipped with all the services(internet,video,usb keyboard) except audio.
ISSUE1: I am unable to play any format audio files on dm365evm.
FYI : I had compiled the kernel 2.3.32 by enabling all sound driver and codec support related to dm365evm , and even i am getting this below messages while kernel loading
------------------------------------------------------------------
ALSA: Restoring mixer settings...
asoc: tlv320aic3x <-> davinci-i2s mapping okALSA device list: #0: DaVinci EVM (tlv320aic3x)
----------------------------------------------------------------
Also , if i boot my uImage with the linux RFS , then i am able to get play the audio file by using aplay <file>.
But only when i boot same Uiamge with the android RFS(gingerbread), then m not able to hear any audio.
QUERY1: Is their anything which ineed to add support from the driver side?
can anyone help me on this ?
THANKS AND REGARDS
ROHIT Y SHANBHAG
BANGALORE
Hi Rohit,
You probably need to modifiy Android HAL as per your driver.
Please refer to below porting guide. It may give you some pointers.
http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides#Audio
Regards,
Pankaj Bharadiya
PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question. Thanks!
Hi Pankaj
Thanks again for the quick reply as always :)
Well here is some observation : Kindly spend some minutes on this :
As in the document :
I carried out the steps said in document for testing the alsa support .
==================================================================================================
1) ALSA framework as HAL we need to build Rowboat with following options in BoardConfig.mk (This is done sucessfully)
BOARD_USES_ALSA_AUDIO := trueBUILD_WITH_ALSA_UTILS := true=================================================================================================
=================================================================================================
2)In kernel driver configuration , Sound card support and device support is been enabled.ALSA for SoC audio support also enabled. --- ALSA for SoC audio support <*> SoC Audio for the TI DAVINCI chip <*> SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM < > Build all ASoC CODEC drivers Its been told to enable McBSP support , but for dm365 system type , i dont find any McBSP support.=================================================================================================
3) As told , i created the link by running the following command from Android prompt.
ln -s /system/bin/alsa_aplay /system/bin/alsa_arecord -------------> and it worked .=================================================================================================
4)ALso by thinking the Audio capture channels AUXL and AUXR are by default disabled for DM365evm ASoC driver , i tried to enable this by following and it gave me this result : alsa_amixer cset name='Analog Left AUXL Capture Switch' 1amixer: Cannot find the given element from control default
alsa_amixer cset name='Analog Right AUXR Capture Switch' 1
amixer: Cannot find the given element from control default
5) I Run the following 'alsa_amixer' commands to fix the volume settings: I even think , its codecs are been muted by the driver !!# alsa_amixer set 'Headset' 3amixer: Unable to find simple control 'Headset',0# alsa_amixer set 'Analog' 0amixer: Unable to find simple control 'Analog',0 =================================================================================================
6)List down all the Audio devices available on target(DM365evm) are :# alsa_aplay -l**** List of PLAYBACK Hardware Devices ****card 0: EVM [DaVinci EVM], device 0: AIC3X tlv320aic3x-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
=================================================================================================Sould i try to modify the alsa_handle_t _defaults[] or some other solution is their for this settings to set?
Kindly reply me about this , so that i can proceed further.THANKS AND REGARDSROHIT Y SHANBHAGBANGALORE
Kernel configuration and Alsa mixer controls mentioned in porting guide is specific to AM37x based devices.
Please configure kernel and set mixer controls according to your driver.
Please post logcat output so that we can look into this further.
Hi Pankaj ,
Attached is teh logcat . Kindly go through it and need the idea to overcome this alsa issue .
Anyhow , i am exploring on codes in detail.
4405.audio_1.txt
I see following log in your logcat. I think audio path is going through audio stub and not the HAL.
W/AudioHardwareInterface( 1837): Using stubbed audio hardware. No sound will be produced.D/AudioHardwareInterface( 1837): setMode(NORMAL)I/CameraService( 1837): CameraService started (pid=1837)I/AudioFlinger( 1837): AudioFlinger's thread 0xc620 ready to
Please make sure that
BOARD_USES_GENERIC_AUDIO := true
line is commented in your BoardConfig.mk file.
Good Morning Pankaj,
As per your previous post, We uncommented " BOARD_USES_GENERIC_AUDIO := true " in our BoardConfig.mk,
1) This is the BoardConfig.mk <FYR>
---------------------------------------------------------------------------------------------------------------------------------------------------------
# DM365EVM configurationTARGET_NO_BOOTLOADER := trueTARGET_NO_KERNEL := trueTARGET_PROVIDES_INIT_RC := trueTARGET_NO_RADIOIMAGE := trueUSE_CAMERA_STUB := trueBOARD_USES_GENERIC_AUDIO := trueBOARD_USES_ALSA_AUDIO := trueBUILD_WITH_ALSA_UTILS := trueifeq ($(strip $(DSP_PATH)),) BUILD_WITHOUT_PV := true # If using 2.6.32 kernel then set USES_TI_WL1271 :=true # else if using 2.6.37 kernel then set USES_TI_WL1271_COMPAT := true #USES_TI_WL1271 := true#USES_TI_WL1271_COMPAT := true else BUILD_WITHOUT_PV := falseendif#BUILD_WITH_FULL_STAGEFRIGHT := true#BUILD_PV_VIDEO_ENCODERS := 1#BOARD_USES_OMAP3_LIGHTS := true# Setup some runtime system properties.TARGET_BOARD_PLATFORM := TITARGET_BOOTLOADER_BOARD_NAME := dm365evmTARGET_CPU_ABI := armeabi#HARDWARE_OMX := trueifdef HARDWARE_OMXOMX_JPEG := trueOMX_VENDOR := tiOMX_VENDOR_INCLUDES := \ hardware/ti/omx/system/src/openmax_il/omx_core/inc \ hardware/ti/omx/image/src/openmax_il/jpeg_enc/incOMX_VENDOR_WRAPPER := TI_OMX_WrapperBOARD_OPENCORE_LIBRARIES := libOMX_CoreBOARD_OPENCORE_FLAGS := -DHARDWARE_OMX=1endif
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
So, with this as our BoardConfig .mk, we build the RFS and Booted successfully.
Thus Problem remain same.
W/AudioHardwareInterface( 1837): Using stubbed audio hardware. No sound will be produced.D/AudioHardwareInterface( 1837): setMode(NORMAL)I/CameraService( 1837): CameraService started (pid=1837) I/AudioFlinger( 1837): AudioFlinger's thread 0xc630 ready to run I/SamplingProfilerIntegration( 1836): Profiler is disabled.
-------------------------------------------------------------------------------------------
2)From command line console
# alsa_aplay -l **** List of PLAYBACK Hardware Devices **** card 0: EVM [DaVinci EVM], device 0: AIC3X tlv320aic3x-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
------------------------------------------------------------------------------------------
We even tried playing a mp3 and wav format file result as below
#alsa_aplay teri_meri_flute_high.mp3Playing raw data 'teri_meri_flute_high.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
< We could hear some noise , till we kill the process>
When we tried to play the same file from GUI , AUDIO OUTPUT WAS NOT THERE
3) We also noticed in logcat :
I/SystemServer( 1864): Audio Service D/AudioHardwareInterface( 1837): setMode(NORMAL) W/AudioPolicyManagerBase( 1837): setPhoneState() setting same state 0D/dalvikvm( 1864): GC_CONCURRENT freed 568K, 50% free 3598K/7111K, external 716K/1038K, paused 13ms+22ms I/SystemServer( 1864): Headset Observer W/HeadsetObserver( 1864): This kernel does not have wired headset supportI/SystemServer( 1864): Dock Observer W/DockObserver( 1864): This kernel does not have dock station support I/SystemServer( 1864): USB Observer W/UsbObserver( 1864): This kernel does not have USB configuration switch support E/UsbObserver( 1864): E/UsbObserver( 1864): java.lang.NullPointerException E/UsbObserver( 1864): at com.android.server.UsbObserver.init(UsbObserver.java:131)E/UsbObserver( 1864): at com.android.server.UsbObserver.<init>(UsbObserver.java:65) E/UsbObserver( 1864): at com.android.server.ServerThread.run(SystemServer.java:402)
----------------------------------------------------------------------------------------------
Is this the exact issue which is causing for no audio output ! ?
if yes , then kindly suggest us modification should be done in kernel .
<FYR , Kindly find the detail logcat with the attached document. >
4744.logcat.txt
ROHIT Y SHANBHAGBANGALORE
Rohit ShanbhagBOARD_USES_GENERIC_AUDIO := trueBOARD_USES_ALSA_AUDIO := trueBUILD_WITH_ALSA_UTILS := true
You need to comment out or delete BOARD_USES_GENERIC_AUDIO := true to get android to use alsa.
--------------------------------------------------------------------------------------------------------- Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
HI Bhat,
We have tried by commenting "BOARD_USES_GENERIC_AUDIO := true"
In BoardConfig.mk file , thus we didnt found any audio output.
On posting this issue , we were told to uncomment this part and to try.
FYR : Kindly refer our previous post .
HI Pankaj / Bhat
"WAITING FOR REPLY"
my Observation on reading many blogs related to android sound !
1) Audio players read /system/etc/asound.conf to get the hardware info.
I was not having these files, so may be player is sending output stream and am not able to recieve it?
So player is working fine(it navigates when i play the song/video) but I was not getting any sound.
2)Where can i find the asound.conf for dm365 ?
Is this responsible for no audio ?
From some TI post , i found , we need to change the The file hardware/ti/omap3/modules/alsa/alsa_module.cpp to reflect the amixer changes.
I am not getting what to change in this particular code ?can anyone suggest on this ?
Refer to http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides#Android_Audio_HAL_Configuration
You need to ensure that the audio HAL is properly configuring the audio setup necessary as per your kernel capabilities. The above link gives the ALSA settings for omap3evm. The ALSA settings for your device may be different and so you need to modify the HAL accordingly.
I understand that your music app shows audio playback, and no sound is produced.
This could be because the audio stub is still enabled. More over you are able to listen audio with aplay.
Make sure that you have the following lines in your BoardConfig.mk file.
#BOARD_USES_GENERIC_AUDIO := trueBOARD_USES_ALSA_AUDIO := trueBUILD_WITH_ALSA_UTILS := true
Also, you need to do a clean build after the above lines are changed. Then only the new andorid-alsa libraries will be built into the file system.
Arun
If this post answers your query, consider clicking the Verify Answer button.
Hi Arun,
Thanks for your reply!
well, i changed the BoardConfig.mk file and commented BOARD_USES_GENERIC_AUDIO := true, clean it and build the sources again .
but still there is no improvement in sound output!
Can you please tell, why this issue is raised up ?
logs are :
W/AudioHardwareInterface( 1807): Using stubbed audio hardware. No sound will be produced.D/AudioHardwareInterface( 1807): setMode(NORMAL)I/CameraService( 1807): CameraService started (pid=1807)I/AudioFlinger( 1807): AudioFlinger's thread 0xc5d0 ready to run
detailed log is been attached below :
7558.02_march_android_sound_rfs.txt
Kindly reply on thsi and suggest some trick to come out of thsi issue.
At this point of time I assume that you have alsa_aplay working. Also you have the lines I suggested in your BoardConfig.mk.
Can you check whether you have the alsa.<target platform>.so present in your /system/lib/hw folder?
If not you need to generate one by compiling
/data/pm/sources/2.3.4_release/hardware/ti/omap3/modules/alsa for your platform.
Also you need to add this library in <evm>.mk in device/ti/<evm>
Hi arun ,
1) Yes, alsa_aplay is working , that too only i can play .wav file from command line .
2)Also, i have commented line said , in BoardConfig.mk , cleaned and build.
3)Yes , in /system/lib/hw , their is no alsa.dm365.so found !
so you mean to say , i need to alter the alsa_module.cpp file and build it again right ?
Thanks for clue !
will work on it now
REGARDS