Thursday, May 02, 2013

How to resolve the USB-Ethernet device un-registration on Android.



         On Our OMAP4 board, we were enabling the USB-Ethernet functionality. We were using the SMSC Ethernet drivers. The 'eth0' interface was getting registered succesfully , but immediately the interface was getting removed off.

  Root Cause : It seems like , android intentionally removing the Ultra Fast Medias from the system.
  In one of the init.rc file, this below piece of code was creating the havoc.

# Remove the Ultra Fast Media Card Reader on EHCI bus
# write /sys/bus/usb/devices/1-1.1/remove 1

TLV320AIC3104 Audio Playback on 3.0.31 kernel.


We have migrated from 3.0.21 kernel to 3.0.31 kernel version.

One of the main issue we have observed is in audio playback. On previous version (3.0.21) the audio playback was working fine. But on 3.0.31 it was failing.

  Root Cause : We are using the TLV320AIC3104 audio codec chip on our OMAP4 board.
 Observation was 'Always the DIN pin was down' But the MCLK, BCLK and WCLK clocks were fine.

  In devices.c file (arch/arm/mach-omap2) omap_init_mcpdm() function, the CLOCKS were getting reset .

I Am not sure why this clock resetting was required in 3.0.31. I has posted an query to TI E2E forum on why the clock resetting was required.
http://e2e.ti.com/support/omap/f/849/p/258490/917666.aspx#917666

How to resolve the OTG Malfunctioning when adb service is started.


   On Our OMAP4 board, we have enabled the OTG (On The Go) functionality .

   It has been enabled in both Master mode and Slave mode.

   Master Mode  : Connect USB mouse to the OTG port on the board. The Board will recognize the USB mouse. In this case, the board is acting as a master and the usb mouse as a slave one.

   Slave Mode  : Connect the OMAP4 board on to the PC.  PC recognizes the board. PC acts as a host device and the board acts as a slave one.

  While Enabling the OTG functionality, we bumped into a problem where in which the OTG functionality was getting failed .

  Root Cause : In init.rc file, we use to start the ADB service which was causing the reset of OTG functionality.

  Comment out the below lines from init.rc file , which has helped in resolving this issue.

#set the adb properties which will help in installing the applications.
#    setprop service.adb.tcp.port 5555
#    stop adbd
#    start adbd

OTG Links
 1) http://en.wikipedia.org/wiki/USB_On-The-Go