• 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 » Enabling USB headset on android running on OMAP3EVM
Share
Android
  • Forum
Options
  • Subscribe via RSS

Forums

Enabling USB headset on android running on OMAP3EVM

This question is not answered
Govind Singh Parmar
Posted by Govind Singh Parmar
on Apr 24 2012 07:55 AM
Prodigy30 points

Hi,

I am trying to enable USB Headset on OMAP3EVM rev G. I am using instruction from android gingerbread 2.3.4 devkit 2.1. I have connected Zebronic usb headset to EHCI host on OMAP3evm board.According to logs headset is detected by board.

But,on running a mp3 file on music application I am not able to hear any sound from headphone. Logs are following....

# [ 341.253234] usb 1-2.1: new full speed USB device using ehci-omap and address 5
[ 341.379882] usb 1-2.1: New USB device found, idVendor=0d8c, idProduct=000c
[ 341.387145] usb 1-2.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 341.394866] usb 1-2.1: Product: C-Media USB Headphone Set
[ 341.452545] input: C-Media USB Headphone Set as /devices/platform/ehci-omap.0/usb1/1-2/1-2.1/1-2.1:1.3/input/input5
[ 341.466186] generic-usb 0003:0D8C:000C.0003: input: USB HID v1.00 Device [C-Media USB Headphone Set ] on usb-ehci-omap.0-2.1/input3

# cat /proc/asound/cards
0 [omap3evm ]: - omap3evm
omap3evm
1 [default ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-ehci-omap.0-2.1, full speed
#

Can anybody have the solution.Thanks in advance.

Android 2.3.4 alsa OMAP3EVM
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Apr 25 2012 00:15 AM
    Genius9580 points

    USB Audio is not supported with TI Android DevKit. However you might be able to use it by modifying the ALSA HAL, since as per your logs the device is supported in the kernel.

    You can refer to the porting guides for more information http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides#Audio

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

    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.
  • Govind Singh Parmar
    Posted by Govind Singh Parmar
    on Apr 26 2012 01:49 AM
    Prodigy30 points

    Hi Vishveshwar,

      Thanks for reply.

    I have tried line-in and line-out headset jack its speakers were working fine I was able to listen audio.Since microphone was  (non-preamplified) input so it was not recording sound directly.Thats why i want to enable usb headset.

    I have referred the link that you have given http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides#Audio .

    This link says hardware for default out device is hw 0:0 whereas BT SCO device is hw 0:1  and after looking following logs 

    # alsa_aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: omap3evm [omap3evm], device 0: TWL4030 twl4030-hifi-0 []
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: omap3evm [omap3evm], device 1: WL1271BT wl1271bt-1 []
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    #

    It seems that hardware for my usb headset will be hw 1:0 (card 1,device 0). So I changed  

    ALSAControl control("hw:00");
    to
    ALSAControl control("hw:10"); in alsa_module.cpp file and after rebuilding I have replaced alsa.omap3evm.so. 
    But still there no sound is coming from usb headset on playing an audio file on mediaplayer or on commandline.
    1. Do I need to change something else ? or 
    2. Do I have to create new handle for usb headphone in alsa_handle_t _defaults[] ,if yes, then what will be the buffer size for usb headphone as it is  bufferSize  : DEFAULT_SAMPLE_RATE / 5 for OMAP3_OUT_SCO and bufferSize  : DEFAULT_SAMPLE_RATE / 11, for OMAP3_OUT_DEFAULT ?
    Please help.
    
    

     alsa_handle_t _defaults[]

    alsa OMAP3EVM usb headphone
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Govind Singh Parmar
    Posted by Govind Singh Parmar
    on Apr 26 2012 05:09 AM
    Prodigy30 points

    Hi,

    One more thing I have tried "alsa_arecord -v -f cd | alsa_aplay -v" command to know the parameters during  the usb headset attached.

    output of above command is :

    # alsa_arecord -v -f cd | alsa_aplay -v
    Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    Plug PCM: Hardware PCM card 0 'omap3evm' device 0 subdevice 0
    Its setup is:
    stream : CAPTURE
    access : RW_INTERLEAVED
    format : S16_LE
    subformat : STD
    channels : 2
    rate : 44100
    exact rate : 44100 (44100/1)
    msbits : 16
    buffer_size : 27560
    period_size : 5512
    period_time : 124988
    tstamp_mode : NONE
    period_step : 1
    avail_min : 5512
    period_event : 0
    start_threshold : 1
    stop_threshold : 27560
    silence_threshold: 0
    silence_size : 0
    boundary : 1806172160
    Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    Plug PCM: Hardware PCM card 0 'omap3evm' device 0 subdevice 0
    Its setup is:
    stream : PLAYBACK
    access : RW_INTERLEAVED
    format : S16_LE
    subformat : STD
    channels : 2
    rate : 44100
    exact rate : 44100 (44100/1)
    msbits : 16
    buffer_size : 27560
    period_size : 5512
    period_time : 124988
    tstamp_mode : NONE
    period_step : 1
    avail_min : 5512
    period_event : 0
    start_threshold : 27560
    stop_threshold : 27560
    silence_threshold: 0
    silence_size : 0
    boundary : 1806172160
    ^Z[1] + Stopped alsa_arecord -v -f cd | alsa_aplay -v

    the bold lines in this output are showing pluged hardware is card 0 'omap3evm' device 0 

    while the output of alsa_aplay shows default device is 

    card 1: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    then why omap3evm is being used for playing?

    and how to change it to  usb headphone (card 1, device 0) ?

    Thanks in advance for your reply.

    Regards

    Govind Singh Parmar

    Android 2.3.4 alsa OMAP3EVM usb headphone
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
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