MeLe A2000: Difference between revisions

From Lundman Wiki
No edit summary
mNo edit summary
Line 1: Line 1:
== Hikari TV ひかりTV ==
=== MeLE A2000 ===


After going through the typical/annoying Japanese signup protocol of;
=== Mele file storage ===


# calling, handing over name and address
http://www.lundman.net/ftp/mele/
# they send you a form, so that you write name and address
# so they can give you the service


I got the tuner in the mail ok, as well as the "setup number". There was also a NTT flets COP code I needed, so I called NTT to get that.


Lots of channels, and the tuner is all in Japanese, but pretty easy to navigate. As always, it is a little sluggish when using the GUI, changing channels and so on. About the same as the satellite and cable STBs I have used before. One would hope they'd made it faster over the years though.
=== v1.3BETA firmware ===


These are things I want to find an answer for:
Mele_HTPC_0929_BETA_V1.3.rar
Mele_HTPC_0929_BETA_V1.3.ddimg.bz2


* Hackable? Can I get in, if so, can I add English myself? only port 20000 open so far. (upnp?)
* Quick channel list. I want a fast way to get to a more scrollable channel list. Right now you either get full guide (slow) or large icons (slow), or deep in the menus (slow)
* Quick channels, can I set my preferred channels on the number keys, and quick jump? Looks like I can, but it sure don't work.
* Output is 1080i, why not 1080p.
* Can I get it to work with XBMC and remove tuner? (IPV6 etc)




== Mini review ==
=== v1.2 firmware ===


I have used the service for a little bit now. I did not really understand the difference in the two packages you sign up for;
Mele_HTPC_120907_Ver1.2.rar


* TV:  This is the equivalent of SkyPerfect satellite, or cable. You get the channels, and can watch them when your program is on. EPG guides, and scheduled recording.
* Video: This is the OnDemand service, where you look around to find something to watch, then just watch it. Whole seasons are usually available.


You can also "connect" your tuner with the HikariTV web page, and view EPG guides on the computer to schedule recordings of shows, as well as, searching for shows. That is worth doing, as shifting through guides, on the tuner itself, is slow and tedious.
=== Status ===


Some shows will not have English. This is very strange. For example, BBC's "Sherlock" Season 1 has both subbed and dubbed. But the Season 2 one-week special only had dubbed version. It is really a crime to do that.
Current status with the Mele A2000, Allwinner A10.


For some reason, Comedy shows appear completely absent from the Video service. One would expect at least something like Friends, My Name is Earl, Community, Big Bang Theory, Scrubs, The Office. And I don't mean *specifically* those shows, but any 30mins comedy shows just does not exist.
Official release: Android 4 ICS, 4.0.8.
Kernel: 3.0.31+


Everything TV is sorted under Drama. Be it Bones, CSI, Fringe, 24, Dexter... All Drama. I guess since there is no Comedy genre.
'''Positive:'''
* Video playback 1080p
* MKV playback
* TS playback
* YouTube
* Android market and Games (Angry Birds etc)


I have no issues with it being over my Internet connection. But I do tend to turn off the tuner when I am not watching tv, as I am aware it is using the network.
'''Negative:'''
* <s>Network Streaming</s> Fixed. NIC has been patched to allow smooth 1080p steaming
* Audio. The settings; '''CODEC''' no sound, but probably on RCA. '''HDMI''' choppy sound, unusable. If made to work, only '''stereo''' on HDMI. '''SPDIF''' not working, does not turn on. (No red light)
* Bitstreaming; Unconfirmed since SPDIF is not functional. But can the hardware bitstream TrueHD, and DTS-MA ?
* 10bit video does not play (not supported by hardware, CPU too slow for software)
* AVI/XviD does not play (not supported by hardware, CPU too slow for software)


Currently, it is no good for mediaplayer. But if all you want is a toy to play youtube, some android games, and only stereo sound, it is definitely capable.


I am happy to stay with this service for the time being. However, I will be looking for a better STB. If something faster (CPU), or in English, or even XBMC support, becomes available it will be worth exploring.


=== Android 4 ICS wired NIC patch ===


I have been working on trying to improve the '''wemac''' NIC driver in the Mele A2000 Allwinner A10 hardware, which will stutter when playing 720p/1080p over network. The current patch makes it much better, such that I think it is usable now. There is a '''mynewerimage.img''' image in the storage area, that you can '''dd''' to the '''nandc''' device. I will work on submitting the patch upstream.


For example, if you boot miniand image:


# modprobe nand    # nand.ko on my storage area too
# wget http://lundman.net/ftp/mele/mynewerimage.img
# dd if=/dev/nandc of=mele_nandc_backup.bin bs=65536
# dd if=mynewerimage.img of=/dev/nandc bs=65536
# sync
# reboot -f


And take out the SD card to boot Android again. If you do this using Android, the device node is /dev/block/nandc


=== Android 4 ICS official Mele image ===


The official Mele Android ICS image is out, called '''Mele_HTPC_Android_4.0_V1.rar''' which you need to use PhoenixCard to "burn". Once installed, you can use '''audiopatch1.3.apk''' to enable some sound features. Otherwise it seems quite similar to A10 firmware.


=== Networking ===
For those not using Windows, I also made a '''dd''' image: '''Mele_HTPC_Android_4.0_V1.ddimg.bin.bz2''' [http://lundman.net/ftp/mele/Mele_HTPC_Android_4.0_V1.ddimg.bin.bz2] Just dd the whole thing to your raw device.


I had a fair bit of trouble getting HikariTV to work well. It would sometimes start glitching like crazy, I thought it was the wifi router, or maybe the two switches connected in chain.
=== Android 4 IceCreamSandwich ===


But eventually it turns out the be the Win7 PC going into hibernation (sleep). The switch appears to think it still should get multicast packets (wake on lan is on) and something goes weird there. Shutdown has no side effects.
'''Update: the non-beta release of ICS4 came out (for the A10, not Mele's release), which has settings/display, and lets you chose resolution '''


For Unix and clones:
wget http://www.lundman.net/ftp/mele/homlet_4.0_v1.0_20120609_dd.img.lzma
7z x homlet_4.0_v1.0_20120609_dd.img.lzma
sudo dd if=homlet_4.0_v1.0_20120609_dd.img of=/dev/sdX bs=1M
sync


Where you need to replace X in /dev/sdX by the correct letter for your SD card reader.
Now insert the SD card in your Mele, and wait until the LED stops blinking, remove the SD card and restart the device. Et voila!
(Read more: [http://www.cnx-software.com/2012/06/18/mele-a1000a2000-android-4-0-image-released/#ixzz1ylfoeKQc]) See I kept the paste URL cos I'm nice! :)




=== NEC Aterm WR9500N ===


I picked up an Aterm WR9500N Wifi router. Fairly easy to setup, defaults were all good. Testing HikariTV with this router now.
There is also an audiopatch for the ICS4 image to get sound to work. Copy over '''audiopatch1.2.apk''' (adb, or physical media) to your ICS4, install and run.


Not convinced it makes any difference for me. Audio appears not to work still.


It appears the contents on audiopatch1.2 is pretty much just libswa.so. Not entirely sure what it thinks to do with it, but if I do a '''find''' from root, there is no such library, before and after running patch.


=== Buffalo ===
I copied the file by hand:


I signed up for HikariTV recently, to see what that is like to use. I went for the "double" tuner rental.
busybox cp /data/data/com.android.audiopatch/files/libswa.so /system/lib/


Initially I was using an old Buffalo G54 wifi router. It could technically handle it, but all wifi communication stopped when watching tv.
and I get sound playing videos with some audio formats now. Like, TV MKV releases.


I went and picked up a WZR-450HP. You have to enable the "Movie engine" and then IPV6 option. Then HikariTV worked.
=== Mele A2000 ===


However, I noticed you could only watch for 2-3 minutes, then channels would go blocky, corrupt and generally be unplayable. Some channels did not play at all.
I purchased a MeLE A2000 from Tom over at [http://www.aliexpress.com/product-fm/546571245-Mele-A2000-TV-box-Allwinner-A10-hackable-device-wholesalers.html aliexpress], and been playing around with it as well. First I wanted to install ICS4, to do that I downloaded the '''android_4.0.img''' file from the 'net. Alas, there is a large volume of confusing information on what to do with this.


It turns out that you can set the "multicast rate", for which the default is "11 mbps", on the Buffalo WIFI router.
[http://www.lundman.net/ftp/mele/ http://www.lundman.net/ftp/mele/]
[https://www.wuala.com/zercosz/Mele%20A2000/Firmware/?key=ThisIsFC2012 https://www.wuala.com/zercosz/Mele%20A2000/Firmware/?key=ThisIsFC2012]


However, with HD channels, it is sending at about 8-16mbps. I changed the "multicast rate" to 22mbps and it is currently working well.
For the MeLE A2000, I also downloaded '''PhoenixCardV303(win7)''' and installed that in my VirtualBox Win7 system, forwarded the OSX USB drive and told it to install '''android_4.0.img'''.


[https://www.wuala.com/zercosz/Mele%20A2000/Utilidades%20Mele/?key=ThisIsFC2012 https://www.wuala.com/zercosz/Mele%20A2000/Utilidades%20Mele/?key=ThisIsFC2012]
[http://www.lundman.net/ftp/mele/ http://www.lundman.net/ftp/mele/]


After that, I inserted the SD card into Mele, and rebooted.


=== Wifi router connecting to Internet ===
The power LED will blink RED + BLUE for a while, then power LED will turn off.


First, we need to look at how my Internet router connects to my ISP, and gets the IPv6 addresses worked out.
Take out SDcard, and reboot MeLE. It will now boot ICS, but only on HDMI@720p.


  21:52:24.001512 PPPoE PADO [Service-Name] [Host-Uniq 0xC0207000] [AC-Name "e13nttsjk-sseu000600"] [AC-Cookie 0xEDC32D9D4F9BF6471CE374XXXXXXXX]
I can confirm BubbleUPNP + 2160pPlayer will play 1080p MKVs over network. Nice!
 
 
=== Google Market/Play ===
 
I installed one of the Terminal programs, and told adb to use TCP (haven't bothered to open my mele yet). Using adb and the instructions found [http://www.slatedroid.com/topic/30855-scripts-allwinner-a10-tablets-google-play-script/ allwinner a10 scripts] I loaded Google Market/Play to the mele.
 
 
 
=== Changing resolution ===
 
This refers to the Beta ICS4. Probably is not useful any more, but I will leave it here for reference.
 
Changing resolution can be done by modifying the boot time scripts that the A10 uses. Usually done on a separate boot partition. For example, the Mele image has the files:
 
mount /dev/mmcblk0p1 /mnt
ls -l /mnt/
evb.bin
 
git clone https://github.com/amery/sunxi-tools
  cd sunxi-tools
make
./bin2fex /mnt/evb.bin > evb.fex   
 
Edit the file any odd way you want, changing '''screen0_output_type''' and '''screen0_output_mode'''. See modes here: [https://github.com/amery/linux-allwinner/blob/allwinner-v3.0-android-v2/include/linux/drv_display_sun4i.h#L132]
 
./fex2bin evb.fex > /mnt/evb.bin
 
 
If you are running the Android 4 (ICS) Beta that was released, to change the resolution to HDMI 1080p, you can do this. Using either a terminal program on Android (ConnectionBot for example) or the USB Console (if connected).
 
On the mele root shell
setprop service.adb.tcp.port 5555
stop adbd
start adbd
netstat -na      # Check that it is listening on port 5555
 
On remote adb machine
adb connect 192.168.xxx.xxx    # Put in the Mele's IP
adb shell
adb> mount -t vfat /dev/block/nanda /mnt/obb
adb> exit
adb push script-HDMI-1080p60.bin /mnt/obb/
adb shell
adb> cd /mnt/obb
adb> busybox cp script-HDMI-1080p60.bin script.bin
 
If you don't want to edit the script file yourself, you can download my prepared one:
[http://www.lundman.net/ftp/mele/script-HDMI-1080p60.bin script-HDMI-1080p60.bin]
 
=== U-boot ===
 
Since I added ZFS to u-boot for CuBox, and also patched in Samsungs EXT4 patches, I built hno's u-boot to test.
 
https://github.com/lundman/uboot-allwinner/tree/zfs
 
wget http://lundman.net/ftp/mele/sunxi-spl.bin
dd if=sunxi-spl.bin of=/dev/sdc bs=1024 seek=8        # Obviously, '''sdc''' is my SDcard, change device to applicable.
   
   
  21:52:24.001514 PPPoE PADR [Service-Name] [AC-Cookie 0xEDC32D9D4F9BF6471CE3748XXXXXXX] [Host-Uniq 0xC0207000]
  wget http://lundman.net/ftp/mele/u-boot.bin
dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32          # Obviously, '''sdc''' is my SDcard, change device to applicable.
 
U-Boot 2012.04.01-g39085db-dirty (May 29 2012 - 02:29:31) Allwinner Technology
   
   
  21:52:24.003509 PPPoE PADO [Service-Name] [Host-Uniq 0xC020B000] [AC-Name "e13nttsjk-sseu000600"] [AC-Cookie 0xEDC32D9D4F9BF6471CE374XXXXXXXX]
  CPU:   SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
MMC:  SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
   
   
  21:52:24.007258 PPPoE PADS [Service-Name] [AC-Cookie 0xEDC32D9D4F9BF6471CE3748XXXXXXXXX] [Host-Uniq 0xC020B000] [AC-System-Error "AC: Cannot open PPPoE session."]
  sun4i#zfsload
zfsload - load binary file from a ZFS filesystem
 
sun4i#zfsload mmc 0:2 0x48000000 /boot/@/uImage
Loading file "/boot/@/uImage" from mmc device 0:2 xxa2
zfs fsname = '/boot/' snapname='<NULL>' filename = '/uImage'
4230340 bytes read
   
   
  21:52:24.040243 PPPoE [ses 0xe0cd] CHAP, Challenge (0x01), id 1, Value 31db80a80bb6d5efcXXXXXXXXXX, Name e13nttsjk-sseu000600
  sun4i#bootm 0x48000000
## Booting kernel from Legacy Image at 48000000 ...
  Image Name:  Linux-3.0.8+
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:   4230276 Bytes = 4 MiB
  Load Address: 40008000
  Entry Point:  40008000
  Verifying Checksum ... OK
  Loading Kernel Image ... OK
  OK
   
   
  21:52:24.040244 PPPoE  [ses 0xe0cd] CHAP, Response (0x02), id 1, Value 0123d23e6f2464c4b0e81XXXXXXXXXXX, Name MYPPPOE-ACCOUNT-HERE
  Starting kernel ...
   
   
  21:52:24.115199 PPPoE [ses 0xe0cd] CHAP, Success (0x03), id 1, Msg
  DRAM: 512[    0.000000] Initializing cgroup subsys cpuset
 
 
=== Android Kernel ===
 
I wanted to replace the ICS4 kernel with my own, for the nic fixes. These are the steps I took:
 
git clone https://github.com/amery/linux-allwinner
  git branch lichee-3.0.8-sun4i
make sun4i_crane_defconfig
   
   
  21:52:24.115201 PPPoE [ses 0xe0cd] IPCP, Conf-Request (0x01), id 1, length 12
Check that .config has
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
 
The wemac nic was panicing on boot everytime, until I changed this:
 
drivers/net/sun4i/sun4i_wemac.c
#define PHY_POWER 0  /* was 1 */
 
make uImage
 
From android, I used ConnectBot to make a copy of the 'boot' partition, nandc.
 
adb shell
adb> dd if=/dev/block/nandc of=/mnt/sdcard/nandc bs=65536
adb pull /mnt/sdcard/nandc
 
Then split it up into kernel and ramfs, you can find split_bootimg.pl my storage area (url above)
 
# ./split_bootimg.pl nandc
Page size: 2048 (0x00000800)
Kernel size: 8410564 (0x008055c4)
Ramdisk size: 975609 (0x000ee2f9)
Second size: 0 (0x00000000)
  Board name:  
Command line:  
Writing nandc-kernel ... complete.
Writing nandc-ramdisk.gz ... complete.
 
The idea is to make a new kernel, that looks roughly the same as nandc-kernel, and re-use the nandc-ramdisk.gz
 
Once the compile has finished, we make a new image. According to the nandc ANDROID! header, the base address for Mele is 0x40000000
 
# mkbootimg --base 40000000 --kernel arch/arm/boot/Image --ramdisk ../nandc-ramdisk.gz -o ../mynewimage.img
 
Now I boot into Miniand image on SD card, use my nand.ko to load the device for /dev/nand*. You can find my Miniand kernel '''uImage''' and '''nand.ko''' in the storage area too. The default Miniand kernel did not come with nand driver.
 
# modprobe nand.ko
# dd if=mynewimage.img of=/dev/nandc bs=2048
# sync
  # reboot
 
and remove the SD card to boot Android. If you want to undo, and go back to ICS4, put '''nandc''' file instead of '''mynewimage.img''' in the '''dd''' line above.
 
=== Mele's Wired Network Interface ===
 
The wired nic in the Mele is a '''wemac''' from Davidcom. It is unfortunately quite poor. You will get decent 100MB speeds from it, but it uses the CPU. If you do any transfers while trying to watch video (including watching video over network) it will stutter for 1080p. Interestingly if you use SD, or USB while watching, it has no problem.
 
The WIFI driver sits on the USB bus and is not affected by this.
 
Using a USBEthernet dongle (I tried an Apple brand) also works without issues.
 
 
=== ZFS on Android ===
 
I have already ported ZFS to ARM, so that should just work if you compile ZFS with your kernel. But I also wanted to see if I can get ZFS to work with Android. The modules do load ok, but execution does not work:
 
# cd /mnt/sdcard/
# insmod spl.ko && insmod zavl.ko&&insmod znvpair.ko&&insmod zunicode.ko&&insmod zcommon.ko&&insmod zfs.ko&&insmod zpios.ko&&cp zpool /mnt/obb/&&chmod 755 /mnt/obb/zpool
# cd /mnt/obb
# strace -f ./zpool create melepool /dev/block/sda1   
open("/dev/block/sda1", O_WRONLY|O_EXCL|O_LARGEFILE) = 6
write(6, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
fdatasync(6)                            = 0
close(6)                               = 0
open("/melepool", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = -1 ENOENT (No such file or directory)
ioctl(3, ITE_GPIO_IN
 
and it hangs.
 
 
=== djmount for Android ===
 
So one option is to have a mediaplayer with UPNP ability, like that of BubbleUPNP or PlugPlayer. However, both of these do poorly with Mele's remote control. With Bubble you can not click on Directories to enter them, but have to Mouse-Mode in/out to do so.
 
So one option is to mount all UPNP devices as a directory. Since Mele's kernel already comes with FUSE, I compiled '''djmount''' for it (patched version with >2GB size fixed).
 
% adb push djmount /mnt/obb
% adb shell
# cd /mnt/obb
# chmod 755 djmount
# ./djmount  -o allow_other /mnt/sdcard/Pictures                # No reason to pick "Pictures" I just wanted an existing directory
# ls -l Pictures/                               
-r--r--r-- root    root          49 2000-01-01 20:00 devices
dr-xr-xr-x root    root              2000-01-01 20:00 llink-daemon UPNP Media Server (MediaServer) : 1
   
   
  21:52:24.115202 PPPoE  [ses 0xe0cd] IPCP, Conf-Request (0x01), id 1, length 24
  # ls -l Pictures/llink-daemon\ UPNP\ Media\ Server\ \ \(MediaServer\)\ \:\ 1/
   
  dr-xr-xr-x root    root              2000-01-01 20:00 DVD
  21:52:24.115443 PPPoE [ses 0xe0cd] IPCP, Conf-Ack (0x02), id 1, length 12
  dr-xr-xr-x root    root              2000-01-01 20:00 Game of Thrones
   
  dr-xr-xr-x root    root              2000-01-01 20:00 Music
  21:52:24.120439 PPPoE  [ses 0xe0cd] IPCP, Conf-Nack (0x03), id 1, length 24
  dr-xr-xr-x root    root              2000-01-01 20:00 Video
  -r--r--r-- root    root    14010368 2000-01-01 20:00 movie.m4v
21:52:24.120440 PPPoE  [ses 0xe0cd] IPCP, Conf-Request (0x01), id 2, length 24
 
And indeed, if you use the File browser in ICS4, you can just enter that directory, and play any video. Note that '''djmount''' is pretty slow on listing directories, and I think we might want to look at speeding that up if we are to use it long term. Also, increase the cache timeout from 60s to something much higher, like 10 minutes.
21:52:24.125186 PPPoE  [ses 0xe0cd] IPCP, Conf-Ack (0x02), id 2, length 24
21:52:25.138142 PPPoE  [ses 0xe0cd] LCP, Echo-Request (0x09), id 1, length 14
21:52:25.138145 PPPoE  [ses 0xe0cd] LCP, Echo-Reply (0x0a), id 1, length 14
21:52:26.015923 01:80:c2:00:00:01 > ff:ff:ff:ff:ff:ff, ethertype Unknown (0x8874), length 64:
21:52:26.392931 IP6 :: > ff02::1:ffe4:fc46: ICMP6, neighbor solicitation, who has fe80::7e6d:62ff:fee4:fc46, length 24
21:52:26.569326 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48


  21:52:26.762023 PPPoE  [ses 0xe0cd] IP 81.83.244.9.53902 > 119.245.192.67.60153: UDP, length 103
# 9.244.83.81.in-addr.arpa. 18000 IN      PTR    d5153F409.access.telenet.be.  # huh. why?
        0x0020:  006f 78b9 6431 3a61 6432 3a69 6432 303a        .ox.d1:ad2:id20:
        0x0040:  c3a4 7f1e 363a 7461 7267 6574 3230 3aae        ....6:target20:.
        0x0060:  ab42 7865 313a 7139 3a66 696e 645f 6e6f        .Bxe1:q9:find_no
        0x0070:  6465 313a 7434 3a0f 094c 1431 3a76 343a        de1:t4:..L.1:v4:
21:52:27.566529 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
21:52:28.015820 01:80:c2:00:00:01 > ff:ff:ff:ff:ff:ff, ethertype Unknown (0x8874), length 64:
21:52:35.246344 IP6 fe80::207:7dff:feac:f5c6 > ff02::1: ICMP6, router advertisement, length 64
21:53:17.310526 IP6 fe80::ce08:e0ff:fed9:7911 > ff02::1: ICMP6, neighbor advertisement, tgt is 2001:c90:8205:d578:ce08:e0ff:fed9:7911, length 32
# That was STB getting its IPv6 address.


=== Reverse Engineering ===


I contacted HikariTV to see if I am allowed to write my own client to play HikariTV, as I think it can be done better than current STB. They replied that they had no OpenSource information at the moment. We know the STB runs Linux/2.6.20.19-ce3tsb-20091202, so it must exist somewhere.
=== PS3EYE WebCam ===


Unless NEC is breaking GNU license.
I wanted to see if the PS3 Eye would work with Mele, and Skype.


Anyway, this is what the bootup process appears to do:
Video:
The STB is 192.168.0.5
Router is 192.168.0.1


  20:53:04.315831 IP6 fe80::216:97ff:fe95:8e35 > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
  # insmod gspca_main.ko                               
  20:53:05.657104 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:97:95:8e:35, length 300
  # insmod gspca_ov534.ko videomode=13     
20:53:06.179867 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:97:95:8e:35, length 548
20:53:06.352013 IP6 fe80::216:97ff:fe95:8e35 > ff02::2: ICMP6, router solicitation, length 16
20:53:06.702548 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:97:95:8e:35, length 548
20:53:07.056167 IP6 :: > ff02::1:ff95:8e35: ICMP6, neighbor solicitation, who has 2001:c90:8205:d578:216:97ff:fe95:8e35, length 24
20:53:07.478168 IP 192.0.123.254 > 224.0.0.22: igmp v3 report, 1 group record(s)
20:53:07.494903 IP 192.168.0.5.32771 > 239.255.255.250.1900: UDP, length 128
20:53:07.598341 IP 192.168.0.5.32771 > 239.255.255.250.1900: UDP, length 128 M-SEARCH schemas-upnp-org:device:MediaServer:1.
20:53:07.952127 IP 192.0.123.254 > 224.0.0.22: igmp v3 report, 1 group record(s)


[whole section of the STB connecting to my UPNP MediaServers ]
That makes the camera work with Skype and '''Zoom Camera''' app. When I tried one of the 640x480 modes it just hangs, so currently it is 320x240@60.


20:53:17.602871 IP6 fe80::216:97ff:fe95:8e35.546 > ff02::1:2.547: dhcp6 inf-req
Audio:
20:53:17.611364 IP6 fe80::207:7dff:feac:f5c6.547 > fe80::216:97ff:fe95:8e35.546: dhcp6 reply


20:53:18.300043 IP6 2001:c90:8205:d578:216:97ff:fe95:8e35.32772 > 2001:c90:0:5::1.53: 18087+ AAAA? cdn.iptvf.jp. (30)
No idea. The device shows:
20:53:18.331268 IP6 2001:c90:0:5::1.53 > 2001:c90:8205:d578:216:97ff:fe95:8e35.32772: 18087 1/7/13 AAAA 2001:c90:ff:200::2 (454)
20:53:18.401223 IP6 2001:c90:8205:d578:216:97ff:fe95:8e35.42115 > 2001:c90:ff:200::2.80: Flags [S], seq 2269209492, win 5760, options [mss 1440,sackOK,TS val 4294689247 ecr 0,nop,wscale 3], length 0
20:53:18.407219 IP6 2001:c90:ff:200::2.80 > 2001:c90:8205:d578:216:97ff:fe95:8e35.42115: Flags [S.], seq 1769509420, ack 2269209493, win 4320, options [mss 1440,nop,wscale 0,nop,nop,TS val 4291528675 ecr 4294689247,sackOK,eol], length 0
20:53:18.407476 IP6 2001:c90:8205:d578:216:97ff:fe95:8e35.42115 > 2001:c90:ff:200::2.80: Flags [.], ack 1, win 720, options [nop,nop,TS val 4294689254 ecr 4291528675], length 0
20:53:18.448949 IP6 2001:c90:8205:d578:216:97ff:fe95:8e35.42115 > 2001:c90:ff:200::2.80: Flags [P.], seq 1:113, ack 1, win 720, options [nop,nop,TS val 4294689295 ecr 4291528675], length 112
GET /cdn.comp HTTP/1.1
Host: cdn.iptvf.jp
User-Agent: IptvSvcClient/1.2 (00004C;IS1050;02;04;001697958E35)


  20:53:18.457439 IP6 2001:c90:ff:200::2.80 > 2001:c90:8205:d578:216:97ff:fe95:8e35.42115: Flags [P.], seq 1:1105, ack 113, win 4432, options [nop,nop,TS val 4291528724 ecr 4294689295], length 1104
  # cat /proc/asound/cards                             
HTTP/1.1 200 OK
  0 [sun4icodec    ]: sun4i-CODEC - sun4i-CODEC
  Date: Wed, 12 Sep 2012 11:53:18 GMT
                      sun4i-CODEC Audio Codec
  Server: Apache
  1 [sun4isndhdmi  ]:  - sun4i-sndhdmi
  Last-Modified: Wed, 25 Jul 2012 01:53:46 GMT
                      sun4i-sndhdmi
  ETag: "11a0023-36a-bfd83e80"
  2 [CameraB409241  ]: USB-Audio - USB Camera-B4.09.24.1
Accept-Ranges: bytes
                      OmniVision Technologies, Inc. USB Camera-B4.09.24.1 at usb-sw-ehci-1.3, high sp
  Content-Length: 874
3 [sun4isndspdif  ]: - sun4i-sndspdif
Content-Type: text/xml; charset=utf-8
                      sun4i-sndspdif
  <?xml version="1.0" encoding="UTF-8"?>
  <cdn_main>
    <header>
      <cdn_serial>2012072500</cdn_serial>
    </header>
    <cdn_name>NttEastFlets</cdn_name>
    <switch_control_flag>0</switch_control_flag>
    <sntp>
        <sntp_server>ntp.flets.net</sntp_server>
        <time_polarity>1</time_polarity>
        <time_delay>0900</time_delay>
    </sntp>
        <platform_list>
                <platform>
                        <network_id>7780</network_id>
                        <platform_name>ひかりTV</platform_name>
                        <pf_url>http://www.plala.iptvf.jp/fdn-e/</pf_url>
                        <pf_serial>2012072500</pf_serial>
                </platform>
        </platform_list>
        <bs_ip_broadcaster_list>
                <bs_ip_broadcaster>
                        <bs_ip_broadcaster_name>BS_IP</bs_ip_broadcaster_name>
                        <bs_ip_broadcaster_url>http://www.plala.iptvf.jp/fdn-e/bs/</bs_ip_broadcaster_url>
                        <bs_ip_broadcaster_serial>2010092100</bs_ip_broadcaster_serial>
                </bs_ip_broadcaster>
        </bs_ip_broadcaster_list>
    </cdn_main>


Connects to NTP to set the time.
And we get the device nodes:


  20:53:19.657050 IP6 2001:c90:8205:d578:216:97ff:fe95:8e35.32772 > 2001:c90:0:5::1.53: 27997+ AAAA? www.plala.iptvf.jp. (36)
  # ls -l /dev/snd/
  20:53:19.679535 IP6 2001:c90:0:5::1.53 > 2001:c90:8205:d578:216:97ff:fe95:8e35.32772: 27997 1/7/13 AAAA 2001:c90:6e00:2301::a001 (460)
crw-rw---- system  audio    116,  0 2012-07-03 14:12 controlC0
  20:53:19.706270 IP6 2001:c90:8205:d578:216:97ff:fe95:8e35.40379 > 2001:c90:6e00:2301::a001.80: Flags [S], seq 3608112181, win 5760, options [mss 1440,sackOK,TS val 4294690552 ecr 0,nop,wscale 3], length 0
crw-rw---- system  audio    116,  32 2012-07-03 14:12 controlC1
  GET /fdn-e/data_broadcast.csv HTTP/1.1
crw-rw---- system  audio    116,  64 2012-07-03 14:12 controlC2
  Host: www.plala.iptvf.jp
crw-rw---- system  audio    116,  96 2012-07-03 14:12 controlC3
  User-Agent: IptvSvcClient/1.2 (00004C;IS1050;02;04;001697958E35)
  crwxrwxrwx system  system  116,  24 2012-07-03 14:12 pcmC0D0c
crwxrwxrwx system  system  116,  16 2012-07-03 14:12 pcmC0D0p
crw-rw---- system  audio    116,  48 2012-07-03 14:12 pcmC1D0p
  crw-rw---- system  audio    11688 2012-07-03 14:12 pcmC2D0c
  crw-rw---- system  audio    116, 112 2012-07-03 14:12 pcmC3D0p
  crw-rw---- system  audio    116,  33 2012-07-03 14:12 timer


HTTP/1.1 200 OK
But no idea how to tell Android to use the USB device as the main microphone.
Date: Wed, 12 Sep 2012 11:53:19 GMT
Server: Apache/2.2.14 (Unix) DAV/2
Last-Modified: Thu, 07 Jul 2011 01:02:39 GMT
ETag: "624047-2c-4a77045f989c0"
Accept-Ranges: bytes
Content-Length: 44
Content-Type: text/csv
101,30592
102,30592
103,30592
152,30592


  GET /fdn-e/hdpf_tcx.xml HTTP/1.1
  # setprop usb.audio.cap.device pcmC0D0c
  Host: www.plala.iptvf.jp
  # setprop media.audio.in.mode usb
User-Agent: IptvSvcClient/1.2 (00004C;IS1050;02;04;001697958E35)


HTTP/1.1 200 OK
Neither of those work.
Date: Wed, 12 Sep 2012 11:53:19 GMT
Server: Apache/2.2.14 (Unix) DAV/2
Last-Modified: Tue, 24 Jul 2012 23:22:26 GMT
ETag: "89689-bccf-4c59ba2a27080"
Accept-Ranges: bytes
Content-Length: 48335
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<HDPF_TCX>
  <ServiceArea>fdn-e</ServiceArea>
  <Version>1207250822</Version>
  <IPVersion>ipv6</IPVersion>
  <MLDVersion>version2</MLDVersion>
  <NumOfTS>82</NumOfTS>
    <TSList>
      <TS>
        <TSId>0065</TSId>
        <MediaPortNumber>20012</MediaPortNumber>
        <GroupAddress>ff38::100</GroupAddress>
        <SourceAddress>2001:0c90:6e00:ff21::2:3</SourceAddress>
        <NumOfFEC>1</NumOfFEC>
        <FECList>
          <FEC>
            <FECMode>01</FECMode>
            <FECModeInfo>0A0A</FECModeInfo>
          </FEC>
        </FECList>
        <MaximumTSBitRate>9</MaximumTSBitRate>
        <NumOfService>1</NumOfService>
        <ServiceList>
          <Service>
            <ServiceName>
            ひかりチャンネル1
            </ServiceName>
            <ServiceId>0065</ServiceId>
            <LicenseId>0103000003000000</LicenseId>
            <TierBitMask>0000000000001000</TierBitMask>
            <ServiceType>01</ServiceType>
          </Service>
        </ServiceList>
      </TS>
      <TS>
        <TSId>006D</TSId>
            <MediaPortNumber>10244</MediaPortNumber>
            <GroupAddress>ff38::100</GroupAddress>
            <SourceAddress>2001:0c90:6e00:ff21::1:61</SourceAddress>
            <NumOfFEC>1</NumOfFEC>
            <FECList>
              <FEC>
                <FECMode>01</FECMode>
                <FECModeInfo>0A0A</FECModeInfo>
              </FEC>
            </FECList>
            <MaximumTSBitRate>7</MaximumTSBitRate>
            <NumOfService>1</NumOfService>
            <ServiceList>
              <Service>
                <ServiceName>BBCワールド</ServiceName>
                <ServiceId>0354</ServiceId>
etc

Revision as of 03:13, 10 October 2012

MeLE A2000

Mele file storage

http://www.lundman.net/ftp/mele/


v1.3BETA firmware

Mele_HTPC_0929_BETA_V1.3.rar Mele_HTPC_0929_BETA_V1.3.ddimg.bz2


v1.2 firmware

Mele_HTPC_120907_Ver1.2.rar


Status

Current status with the Mele A2000, Allwinner A10.

Official release: Android 4 ICS, 4.0.8. Kernel: 3.0.31+

Positive:

  • Video playback 1080p
  • MKV playback
  • TS playback
  • YouTube
  • Android market and Games (Angry Birds etc)

Negative:

  • Network Streaming Fixed. NIC has been patched to allow smooth 1080p steaming
  • Audio. The settings; CODEC no sound, but probably on RCA. HDMI choppy sound, unusable. If made to work, only stereo on HDMI. SPDIF not working, does not turn on. (No red light)
  • Bitstreaming; Unconfirmed since SPDIF is not functional. But can the hardware bitstream TrueHD, and DTS-MA ?
  • 10bit video does not play (not supported by hardware, CPU too slow for software)
  • AVI/XviD does not play (not supported by hardware, CPU too slow for software)

Currently, it is no good for mediaplayer. But if all you want is a toy to play youtube, some android games, and only stereo sound, it is definitely capable.


Android 4 ICS wired NIC patch

I have been working on trying to improve the wemac NIC driver in the Mele A2000 Allwinner A10 hardware, which will stutter when playing 720p/1080p over network. The current patch makes it much better, such that I think it is usable now. There is a mynewerimage.img image in the storage area, that you can dd to the nandc device. I will work on submitting the patch upstream.

For example, if you boot miniand image:

# modprobe nand     # nand.ko on my storage area too
# wget http://lundman.net/ftp/mele/mynewerimage.img
# dd if=/dev/nandc of=mele_nandc_backup.bin bs=65536
# dd if=mynewerimage.img of=/dev/nandc bs=65536
# sync
# reboot -f

And take out the SD card to boot Android again. If you do this using Android, the device node is /dev/block/nandc

Android 4 ICS official Mele image

The official Mele Android ICS image is out, called Mele_HTPC_Android_4.0_V1.rar which you need to use PhoenixCard to "burn". Once installed, you can use audiopatch1.3.apk to enable some sound features. Otherwise it seems quite similar to A10 firmware.

For those not using Windows, I also made a dd image: Mele_HTPC_Android_4.0_V1.ddimg.bin.bz2 [1] Just dd the whole thing to your raw device.

Android 4 IceCreamSandwich

Update: the non-beta release of ICS4 came out (for the A10, not Mele's release), which has settings/display, and lets you chose resolution

For Unix and clones:

wget http://www.lundman.net/ftp/mele/homlet_4.0_v1.0_20120609_dd.img.lzma
7z x homlet_4.0_v1.0_20120609_dd.img.lzma
sudo dd if=homlet_4.0_v1.0_20120609_dd.img of=/dev/sdX bs=1M
sync

Where you need to replace X in /dev/sdX by the correct letter for your SD card reader. Now insert the SD card in your Mele, and wait until the LED stops blinking, remove the SD card and restart the device. Et voila! (Read more: [2]) See I kept the paste URL cos I'm nice! :)


There is also an audiopatch for the ICS4 image to get sound to work. Copy over audiopatch1.2.apk (adb, or physical media) to your ICS4, install and run.

Not convinced it makes any difference for me. Audio appears not to work still.

It appears the contents on audiopatch1.2 is pretty much just libswa.so. Not entirely sure what it thinks to do with it, but if I do a find from root, there is no such library, before and after running patch.

I copied the file by hand:

busybox cp /data/data/com.android.audiopatch/files/libswa.so /system/lib/

and I get sound playing videos with some audio formats now. Like, TV MKV releases.

Mele A2000

I purchased a MeLE A2000 from Tom over at aliexpress, and been playing around with it as well. First I wanted to install ICS4, to do that I downloaded the android_4.0.img file from the 'net. Alas, there is a large volume of confusing information on what to do with this.

http://www.lundman.net/ftp/mele/ 
https://www.wuala.com/zercosz/Mele%20A2000/Firmware/?key=ThisIsFC2012

For the MeLE A2000, I also downloaded PhoenixCardV303(win7) and installed that in my VirtualBox Win7 system, forwarded the OSX USB drive and told it to install android_4.0.img.

https://www.wuala.com/zercosz/Mele%20A2000/Utilidades%20Mele/?key=ThisIsFC2012
http://www.lundman.net/ftp/mele/ 

After that, I inserted the SD card into Mele, and rebooted.

The power LED will blink RED + BLUE for a while, then power LED will turn off.

Take out SDcard, and reboot MeLE. It will now boot ICS, but only on HDMI@720p.

I can confirm BubbleUPNP + 2160pPlayer will play 1080p MKVs over network. Nice!


Google Market/Play

I installed one of the Terminal programs, and told adb to use TCP (haven't bothered to open my mele yet). Using adb and the instructions found allwinner a10 scripts I loaded Google Market/Play to the mele.


Changing resolution

This refers to the Beta ICS4. Probably is not useful any more, but I will leave it here for reference.

Changing resolution can be done by modifying the boot time scripts that the A10 uses. Usually done on a separate boot partition. For example, the Mele image has the files:

mount /dev/mmcblk0p1 /mnt
ls -l /mnt/
evb.bin
git clone https://github.com/amery/sunxi-tools
cd sunxi-tools
make
./bin2fex /mnt/evb.bin > evb.fex    

Edit the file any odd way you want, changing screen0_output_type and screen0_output_mode. See modes here: [3]

./fex2bin evb.fex > /mnt/evb.bin


If you are running the Android 4 (ICS) Beta that was released, to change the resolution to HDMI 1080p, you can do this. Using either a terminal program on Android (ConnectionBot for example) or the USB Console (if connected).

On the mele root shell

setprop service.adb.tcp.port 5555
stop adbd
start adbd
netstat -na       # Check that it is listening on port 5555

On remote adb machine

adb connect 192.168.xxx.xxx    # Put in the Mele's IP
adb shell
adb> mount -t vfat /dev/block/nanda /mnt/obb
adb> exit
adb push script-HDMI-1080p60.bin /mnt/obb/
adb shell
adb> cd /mnt/obb
adb> busybox cp script-HDMI-1080p60.bin script.bin

If you don't want to edit the script file yourself, you can download my prepared one: script-HDMI-1080p60.bin

U-boot

Since I added ZFS to u-boot for CuBox, and also patched in Samsungs EXT4 patches, I built hno's u-boot to test.

https://github.com/lundman/uboot-allwinner/tree/zfs
wget http://lundman.net/ftp/mele/sunxi-spl.bin
dd if=sunxi-spl.bin of=/dev/sdc bs=1024 seek=8        # Obviously, sdc is my SDcard, change device to applicable.

wget http://lundman.net/ftp/mele/u-boot.bin
dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32          # Obviously, sdc is my SDcard, change device to applicable.
U-Boot 2012.04.01-g39085db-dirty (May 29 2012 - 02:29:31) Allwinner Technology 

CPU:   SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

sun4i#zfsload
zfsload - load binary file from a ZFS filesystem
sun4i#zfsload mmc 0:2 0x48000000 /boot/@/uImage
Loading file "/boot/@/uImage" from mmc device 0:2 xxa2
zfs fsname = '/boot/' snapname='<NULL>' filename = '/uImage'
4230340 bytes read

sun4i#bootm 0x48000000
## Booting kernel from Legacy Image at 48000000 ...
  Image Name:   Linux-3.0.8+
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:    4230276 Bytes = 4 MiB
  Load Address: 40008000
  Entry Point:  40008000
  Verifying Checksum ... OK
  Loading Kernel Image ... OK
OK

Starting kernel ...

DRAM: 512[    0.000000] Initializing cgroup subsys cpuset


Android Kernel

I wanted to replace the ICS4 kernel with my own, for the nic fixes. These are the steps I took:

git clone https://github.com/amery/linux-allwinner
git branch lichee-3.0.8-sun4i
make sun4i_crane_defconfig

Check that .config has

CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set

The wemac nic was panicing on boot everytime, until I changed this:

drivers/net/sun4i/sun4i_wemac.c
#define PHY_POWER 0   /* was 1 */
make uImage

From android, I used ConnectBot to make a copy of the 'boot' partition, nandc.

adb shell
adb> dd if=/dev/block/nandc of=/mnt/sdcard/nandc bs=65536
adb pull /mnt/sdcard/nandc

Then split it up into kernel and ramfs, you can find split_bootimg.pl my storage area (url above)

# ./split_bootimg.pl nandc
Page size: 2048 (0x00000800)
Kernel size: 8410564 (0x008055c4)
Ramdisk size: 975609 (0x000ee2f9)
Second size: 0 (0x00000000)
Board name: 
Command line: 
Writing nandc-kernel ... complete.
Writing nandc-ramdisk.gz ... complete.

The idea is to make a new kernel, that looks roughly the same as nandc-kernel, and re-use the nandc-ramdisk.gz

Once the compile has finished, we make a new image. According to the nandc ANDROID! header, the base address for Mele is 0x40000000

# mkbootimg --base 40000000 --kernel arch/arm/boot/Image --ramdisk ../nandc-ramdisk.gz -o ../mynewimage.img

Now I boot into Miniand image on SD card, use my nand.ko to load the device for /dev/nand*. You can find my Miniand kernel uImage and nand.ko in the storage area too. The default Miniand kernel did not come with nand driver.

# modprobe nand.ko
# dd if=mynewimage.img of=/dev/nandc bs=2048
# sync
# reboot

and remove the SD card to boot Android. If you want to undo, and go back to ICS4, put nandc file instead of mynewimage.img in the dd line above.

Mele's Wired Network Interface

The wired nic in the Mele is a wemac from Davidcom. It is unfortunately quite poor. You will get decent 100MB speeds from it, but it uses the CPU. If you do any transfers while trying to watch video (including watching video over network) it will stutter for 1080p. Interestingly if you use SD, or USB while watching, it has no problem.

The WIFI driver sits on the USB bus and is not affected by this.

Using a USBEthernet dongle (I tried an Apple brand) also works without issues.


ZFS on Android

I have already ported ZFS to ARM, so that should just work if you compile ZFS with your kernel. But I also wanted to see if I can get ZFS to work with Android. The modules do load ok, but execution does not work:

# cd /mnt/sdcard/
# insmod spl.ko && insmod zavl.ko&&insmod znvpair.ko&&insmod zunicode.ko&&insmod zcommon.ko&&insmod zfs.ko&&insmod zpios.ko&&cp zpool /mnt/obb/&&chmod 755 /mnt/obb/zpool
# cd /mnt/obb
# strace -f ./zpool create melepool /dev/block/sda1    
open("/dev/block/sda1", O_WRONLY|O_EXCL|O_LARGEFILE) = 6
write(6, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
fdatasync(6)                            = 0
close(6)                                = 0
open("/melepool", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = -1 ENOENT (No such file or directory)
ioctl(3, ITE_GPIO_IN

and it hangs.


djmount for Android

So one option is to have a mediaplayer with UPNP ability, like that of BubbleUPNP or PlugPlayer. However, both of these do poorly with Mele's remote control. With Bubble you can not click on Directories to enter them, but have to Mouse-Mode in/out to do so.

So one option is to mount all UPNP devices as a directory. Since Mele's kernel already comes with FUSE, I compiled djmount for it (patched version with >2GB size fixed).

% adb push djmount /mnt/obb
% adb shell
# cd /mnt/obb
# chmod 755 djmount
# ./djmount  -o allow_other /mnt/sdcard/Pictures                # No reason to pick "Pictures" I just wanted an existing directory
# ls -l Pictures/                                 
-r--r--r-- root     root           49 2000-01-01 20:00 devices
dr-xr-xr-x root     root              2000-01-01 20:00 llink-daemon UPNP Media Server (MediaServer) : 1

# ls -l Pictures/llink-daemon\ UPNP\ Media\ Server\ \ \(MediaServer\)\ \:\ 1/
dr-xr-xr-x root     root              2000-01-01 20:00 DVD
dr-xr-xr-x root     root              2000-01-01 20:00 Game of Thrones
dr-xr-xr-x root     root              2000-01-01 20:00 Music
dr-xr-xr-x root     root              2000-01-01 20:00 Video
-r--r--r-- root     root     14010368 2000-01-01 20:00 movie.m4v

And indeed, if you use the File browser in ICS4, you can just enter that directory, and play any video. Note that djmount is pretty slow on listing directories, and I think we might want to look at speeding that up if we are to use it long term. Also, increase the cache timeout from 60s to something much higher, like 10 minutes.


PS3EYE WebCam

I wanted to see if the PS3 Eye would work with Mele, and Skype.

Video:

# insmod gspca_main.ko                                
# insmod gspca_ov534.ko videomode=13       

That makes the camera work with Skype and Zoom Camera app. When I tried one of the 640x480 modes it just hangs, so currently it is 320x240@60.

Audio:

No idea. The device shows:

# cat /proc/asound/cards                              
0 [sun4icodec     ]: sun4i-CODEC - sun4i-CODEC
                     sun4i-CODEC  Audio Codec
1 [sun4isndhdmi   ]:  - sun4i-sndhdmi
                     sun4i-sndhdmi
2 [CameraB409241  ]: USB-Audio - USB Camera-B4.09.24.1
                     OmniVision Technologies, Inc. USB Camera-B4.09.24.1 at usb-sw-ehci-1.3, high sp
3 [sun4isndspdif  ]:  - sun4i-sndspdif
                     sun4i-sndspdif

And we get the device nodes:

# ls -l /dev/snd/
crw-rw---- system   audio    116,   0 2012-07-03 14:12 controlC0
crw-rw---- system   audio    116,  32 2012-07-03 14:12 controlC1
crw-rw---- system   audio    116,  64 2012-07-03 14:12 controlC2
crw-rw---- system   audio    116,  96 2012-07-03 14:12 controlC3
crwxrwxrwx system   system   116,  24 2012-07-03 14:12 pcmC0D0c
crwxrwxrwx system   system   116,  16 2012-07-03 14:12 pcmC0D0p
crw-rw---- system   audio    116,  48 2012-07-03 14:12 pcmC1D0p
crw-rw---- system   audio    116,  88 2012-07-03 14:12 pcmC2D0c
crw-rw---- system   audio    116, 112 2012-07-03 14:12 pcmC3D0p
crw-rw---- system   audio    116,  33 2012-07-03 14:12 timer

But no idea how to tell Android to use the USB device as the main microphone.

# setprop usb.audio.cap.device pcmC0D0c
# setprop media.audio.in.mode usb

Neither of those work.