• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Android » Android forum » Audio codec problem in dm365evm for Android 2.3
Share
Android
  • Forum
Options
  • Subscribe via RSS

Audio codec problem in dm365evm for Android 2.3

Audio codec problem in dm365evm for Android 2.3

This question is answered
Rohit Shanbhag
Posted by Rohit Shanbhag
on Feb 23 2012 01:35 AM
Intellectual975 points

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 ok
ALSA 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

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Pankaj Bharadiya
    Posted by Pankaj Bharadiya
    on Feb 23 2012 02:15 AM
    Expert4390 points

    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!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Feb 23 2012 04:37 AM
    Intellectual975 points

    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 := true
    BUILD_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' 1
    amixer: 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' 3
    amixer: Unable to find simple control 'Headset',0

    # alsa_amixer set 'Analog' 0
    amixer: 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 REGARDS
    ROHIT Y SHANBHAG
    BANGALORE








    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pankaj Bharadiya
    Posted by Pankaj Bharadiya
    on Feb 23 2012 05:23 AM
    Expert4390 points

    Hi Rohit,

    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.

    Regards,

    Pankaj Bharadiya

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Feb 23 2012 07:10 AM
    Intellectual975 points

    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

    THANKS AND REGARDS

    ROHIT Y SHANBHAG

    BANGALORE

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pankaj Bharadiya
    Posted by Pankaj Bharadiya
    on Feb 23 2012 08:14 AM
    Expert4390 points

    Hi Rohit,

    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.
     
    Regards,
    Pankaj Bharadiya

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Feb 29 2012 00:14 AM
    Intellectual975 points

    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 configuration

    TARGET_NO_BOOTLOADER := true
    TARGET_NO_KERNEL := true
    TARGET_PROVIDES_INIT_RC := true
    TARGET_NO_RADIOIMAGE := true
    USE_CAMERA_STUB := true
    BOARD_USES_GENERIC_AUDIO := true
    BOARD_USES_ALSA_AUDIO := true
    BUILD_WITH_ALSA_UTILS := true

    ifeq ($(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 := false
    endif

    #BUILD_WITH_FULL_STAGEFRIGHT := true

    #BUILD_PV_VIDEO_ENCODERS := 1

    #BOARD_USES_OMAP3_LIGHTS := true


    # Setup some runtime system properties.
    TARGET_BOARD_PLATFORM := TI
    TARGET_BOOTLOADER_BOARD_NAME := dm365evm
    TARGET_CPU_ABI  := armeabi

    #HARDWARE_OMX := true

    ifdef HARDWARE_OMX
    OMX_JPEG := true
    OMX_VENDOR := ti
    OMX_VENDOR_INCLUDES := \
       hardware/ti/omx/system/src/openmax_il/omx_core/inc \
       hardware/ti/omx/image/src/openmax_il/jpeg_enc/inc
    OMX_VENDOR_WRAPPER := TI_OMX_Wrapper
    BOARD_OPENCORE_LIBRARIES := libOMX_Core
    BOARD_OPENCORE_FLAGS := -DHARDWARE_OMX=1
    endif

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    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.mp3
    Playing 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 0
    D/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 support
    I/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

    THANKS AND REGARDS

    ROHIT Y SHANBHAG
    BANGALORE

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Feb 29 2012 00:36 AM
    Genius9760 points

    Rohit Shanbhag

    BOARD_USES_GENERIC_AUDIO := true
    BOARD_USES_ALSA_AUDIO := true
    BUILD_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.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Feb 29 2012 00:51 AM
    Intellectual975 points

    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 .

    THANKS AND REGARDS

    ROHIT Y SHANBHAG

    BANGALORE


    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Mar 02 2012 01:49 AM
    Intellectual975 points

    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 ?

    THANKS AND REGARDS

    ROHIT Y SHANBHAG

    BANGALORE

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Mar 02 2012 02:11 AM
    Genius9760 points

    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.

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Arun Joseph
    Posted by Arun Joseph
    on Mar 02 2012 02:17 AM
    Verified Answer
    Verified by Rohit Shanbhag
    Intellectual2370 points

    Hi Rohit,

    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 := true
    BOARD_USES_ALSA_AUDIO := true
    BUILD_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.

    Regards,

    Arun

    If this post answers your query, consider clicking the Verify Answer button.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Mar 05 2012 02:42 AM
    Intellectual975 points

    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.

    THANKS AND REGARDS

    ROHIT Y SHANBHAG

    BANGALORE

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Arun Joseph
    Posted by Arun Joseph
    on Mar 05 2012 03:06 AM
    Verified Answer
    Verified by Rohit Shanbhag
    Intellectual2370 points

    Hi Rohit,

    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>

    Regards,

    Arun

    If this post answers your query, consider clicking the Verify Answer button.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Mar 05 2012 03:36 AM
    Intellectual975 points

    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

    ROHIT Y SHANBHAG

    BANGALORE

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohit Shanbhag
    Posted by Rohit Shanbhag
    on Mar 05 2012 06:51 AM
    Intellectual975 points
    Hi Arun THANKS FOR THE QUICK REPLY AND YES WE GOT SOUND ON DM365 android. But we have a minor issue ! we have made all the volume (ringtone , media and notification high), still we get very low sound in headphone ! How to trace this ? i looked in the alsa code in external and hardware folder of main directory. but i am unable to find the solution. Kindly reply for this ! THANKS AND REGARDS ROHIT Y SHANBHAG BANGALORE
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use