[Q] USB Audio, USB Host Mode (CM10) - AT&T, Rogers HTC One X, Telstra One XL

I've recently moved from HTC sense to CM10 and couldn't be happier!! My only issue now is trying to get USB Host Mode working, and then getting a USB DAC working for audio out.
From what I understand HTC Sense based roms support USB Host Mode, bot not sure about CM10 (my OTG cable is in the mail, so I should be able to work this out for myself eventually).
The big issue is USB Audio mode. Looking around the SGSIII and Nexus 7 (with a small mod) among others support USB Audio, but can't find any details about CM10 on the HOXL. I'm assuming it probably doesn't, in which case, can anyone point me in the direction of how it can be enabled... (I'm a total noob with building android kernels, but an experienced software dev , so willing to try or test).
The AOSP request thread for this functionality is located at:
h t t p://code.google.com/p/android/issues/detail?id=24614&sort=-stars&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

http://changelog.bbqdroid.org/#evita/cm10/next
https://github.com/cyanogenmod/andr...mmit/9a64b90c1230b0a6a91488244ef5f28ad807fb2e
That should get you started. Everything in gethub. Thanks for helping out.
Sent from my One X using xda premium

Finally got the chnace to try out USB Host Mode on stock CM10 and it works great. The HOXL doesn't seem to be able to power anything plugged into the USB socket, but I was able to get a mouse, keyboard, and memory stick working with a powered USB hub.
I also tried a USB DAC (only the DAC built into the Logitach keyboard), and noticed the logcat message:
10-26 19:26:33.216 V/WiredAccessoryObserver( 357): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=0, DEVPATH=/devices/virtual/switch/dock, SEQNUM=14558, ACTION=change, SWITCH_NAME=dock}
10-26 19:26:33.216 E/WiredAccessoryObserver( 357): Ignoring dock event as Audio routing disabled {SUBSYSTEM=switch, SWITCH_STATE=0, DEVPATH=/devices/virtual/switch/dock, SEQNUM=14558, ACTION=change, SWITCH_NAME=dock}
So things look a little promising.
Hopefully this weekend I'll get a chance to build a Fedora VM and start looking at updating the Kernel. It looks to be fairly straight forward, re-using code from the Nook kernel.
To save a ton of time, any other devs that are feeling generous, I can provide some update source files which I think should do the trick, just need them rolled into CM10 fork on Github and build. :angel:

Here is the last quote from H8rift on that matter.
I'm sooooooo close to USB otg that it is frustrating! It sees that there is a USB device plugged in but doesn't go the next step of mounting the drive or powering the peripheral.
Should get it figured out soon. Kernel work is temporarily halted as everyone has a lot going on this week at our respective day jobs. Hence why I felt I owed you guys at least an experimental build today .
(Me) thanks again for jumping in and helping.
Sent from my One X using xda premium

subarudroid said:
Here is the last quote from H8rift on that matter.
I'm sooooooo close to USB otg that it is frustrating! It sees that there is a USB device plugged in but doesn't go the next step of mounting the drive or powering the peripheral.
Should get it figured out soon. Kernel work is temporarily halted as everyone has a lot going on this week at our respective day jobs. Hence why I felt I owed you guys at least an experimental build today .
(Me) thanks again for jumping in and helping.
Sent from my One X using xda premium
Click to expand...
Click to collapse
Thanks for the update !
Any recent news about this ? I'm currently working on a USB audio device prototype and having my HOXL supporting USB Audio Class (playback+recording) as the USB host would mean the world to me. :fingers-crossed:

wagaf said:
Thanks for the update !
Any recent news about this ? I'm currently working on a USB audio device prototype and having my HOXL supporting USB Audio Class (playback+recording) as the USB host would mean the world to me. :fingers-crossed:
Click to expand...
Click to collapse
Unfortunately I had to rebuild my pc last weekend, so that has set things back a little. Hopefully I should be able to make some progress this weekend .
Usb audio playback should be fine, but note sure about the recording... We'll see how we go.

DACcer said:
Unfortunately I had to rebuild my pc last weekend, so that has set things back a little. Hopefully I should be able to make some progress this weekend .
Usb audio playback should be fine, but note sure about the recording... We'll see how we go.
Click to expand...
Click to collapse
Awesome.. I would be happy to test & give feedback.
I tried the last experimental build today with various USB devices & a USB OTG cable.
Some did worked well (mouses, keyboards), but I tried with a standard Logitech handset and it didn't worked. Actually the headset has volume +/- buttons that actually worked (using the HID driver I guess), but no audio was actually going to the headset (it was playing on the speakers as usual). And no recording.
For comparison, the same headset do works for playback on stock GS3, but not for recording.
The device I currently work on, based on a TI c5535 and the connected audio framework, does only support USB Audio Device Class 1.0, which is supported by Windows and standard Linux but apparently not by the GS3... Would also be awesome to see it supported on Android.

DACcer said:
Finally got the chnace to try out USB Host Mode on stock CM10 and it works great. The HOXL doesn't seem to be able to power anything plugged into the USB socket, but I was able to get a mouse, keyboard, and memory stick working with a powered USB hub.
I also tried a USB DAC (only the DAC built into the Logitach keyboard), and noticed the logcat message:
10-26 19:26:33.216 V/WiredAccessoryObserver( 357): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=0, DEVPATH=/devices/virtual/switch/dock, SEQNUM=14558, ACTION=change, SWITCH_NAME=dock}
10-26 19:26:33.216 E/WiredAccessoryObserver( 357): Ignoring dock event as Audio routing disabled {SUBSYSTEM=switch, SWITCH_STATE=0, DEVPATH=/devices/virtual/switch/dock, SEQNUM=14558, ACTION=change, SWITCH_NAME=dock}
So things look a little promising.
Hopefully this weekend I'll get a chance to build a Fedora VM and start looking at updating the Kernel. It looks to be fairly straight forward, re-using code from the Nook kernel.
To save a ton of time, any other devs that are feeling generous, I can provide some update source files which I think should do the trick, just need them rolled into CM10 fork on Github and build. :angel:
Click to expand...
Click to collapse
i have a fiio e7 and an OTG cable if you need someone to help test. i really want the audio out to work.

number13man said:
i have a fiio e7 and an OTG cable if you need someone to help test. i really want the audio out to work.
Click to expand...
Click to collapse
That'd be great, I'm thinking of purchasing a Fiio e17, so if I can get it working for the e7, that's a good start.
wagaf, hopefully we can get it working for the USB Audio 1.0 as well, I know bugger all about the different standards at this stage, but hopefully they're largely command level changes.
I'll update here towards the end of the weekend with any progress. Playing with github etc. for the first time, so a bit of a learning curve.

Yes, USB AC 2.0 is very close to 1.0 and any correct implementations should be backward compatible.
Another request (I know I ask a lot) would be to support any standard sample rate reported by the usb device. For instance if the device only supports 16kHz, or 48kHz, a 44.1kHz song would be re-sampled to 48kHz be played.
I mention this because the iDevices that support USB Audio requires 44.1 and 48kHz to both be supported, and the Galaxy S III is only able to playback at 44.1kHz, even if standard Linux is totally able to re-sample depending on supported sample rate.

Update:
Steep learning curve, but I finally got my first working kernel deployed to my phone today . Having said that, the kernel doesn't quite perform as expected.... my computer now recognizes the phone as a 'toneport gx' external dac instead of a HTC XL.
I initially started kernel dev on my HP Touchpad as warm up, and did manage to get things going there, but the HTC has been a bit more of a challenge for some reason.

DACcer said:
Update:
Steep learning curve, but I finally got my first working kernel deployed to my phone today . Having said that, the kernel doesn't quite perform as expected.... my computer now recognizes the phone as a 'toneport gx' external dac instead of a HTC XL.
I initially started kernel dev on my HP Touchpad as warm up, and did manage to get things going there, but the HTC has been a bit more of a challenge for some reason.
Click to expand...
Click to collapse
you may want to contact flar2 (that's his http://forum.xda-developers.com/showthread.php?t=1967897) or Rohan32 http://forum.xda-developers.com/showthread.php?t=1892108
good luck with this project, it's exciting...

Crappyvate said:
you may want to contact flar2 (that's his http://forum.xda-developers.com/showthread.php?t=1967897) or Rohan32 http://forum.xda-developers.com/showthread.php?t=1892108
good luck with this project, it's exciting...
Click to expand...
Click to collapse
Hey, any luck with USB Audio on the OneX? I have CM 10.1 installed on it with an OTG cable, but it doesn't seem to work.
Nothing happen when I plug a DAC. Any luck on your side?

Related

The slow USB transfer speeds with ICS... and JB too?

Anyone able to hint at whether or not we could finally get a proper fix for the incredibly slow USB transfer rates with ICS on the Nexus S when Jelly Bean arrives in the next few weeks (hopefully)?
I know the general advice is "Just reboot into CWM and do the transfers there..." but honestly that gets a bit frustrating. I bought Wifi File Transfer Pro during a sale for $.99 and it's functional but, even that's somewhat slow to me (average 3-6MB/s). I have no idea what Flash-RAM is inside this device, I'm guessing since the Nexus S is made by Samsung (even though it's 18+ months old now) and they'd more than likely use their own high grade Flash-RAM it should be more than capable of writing at close to that speed as well.
Under CWM's storage mode the transfers are in the 10-15MB range so that's good, but...
Has anyone ever actually discovered why the USB transfers are so horridly slow on ICS on the Nexus S, or is it a situation where most people just shrug their shoulders and say "That's how it goes..." and that's that?
Just curious... love the device, it's my new main one as I recently dumped my HD2 to pay some bills. If it's specifically related to a busted kernel (3.x) then there's nothing that can be done about it I suppose, unless someone at Google has some clue as to what's going on.
Sure would be nice to plug in and get the speed this device is capable of instead of plugging in, rebooting to recovery, going into CWM storage mode, doing a transfer, then rebooting back out into ICS again.
I know it's been asked before but there's never been an actual answer to why it's happening, let alone a potential fix for it.
If it IS an issue with the 3.x kernel(s), doesn't that imply that Jelly Bean won't do much to address it and we'll still be stuck in the slow lane?
Thanks...
EDIT:
Found this JB port from steven776 from the SDK: http://forum.xda-developers.com/showpost.php?p=28113909&postcount=258
Installed it and it's running fine but but but... nothing changed as far as the USB transfer rates are concerned. I know it's not the "official" build of JB coming for the Nexus S but, even so, this doesn't bode well for a fix for this issue once and for all.
Well, the slow transfer speed bothers me a lot too, but I never thought of transferring the file using CWM, so thanks for the tip :good:
I cant offer any magic solutions or explanation for why its slow but maybe you could clear up a couple of things:
1) are you using a USB 2.0 cable or is it possible that it is only a 1.0?
2) the devices you are connecting your phone too (i.e PC, laptop) are they USB 2.0 capable?
3) check to see if your operating system's power management settings and make sure that there isn't anything slowing it down there
If you feel any better these are the speeds that I get, no matter what ROM im using (steve's JB port included) and I too have been underwhelmed by it.
pocketspeaking said:
I cant offer any magic solutions or explanation for why its slow but maybe you could clear up a couple of things:
1) are you using a USB 2.0 cable or is it possible that it is only a 1.0?
2) the devices you are connecting your phone too (i.e PC, laptop) are they USB 2.0 capable?
3) check to see if your operating system's power management settings and make sure that there isn't anything slowing it down there
If you feel any better these are the speeds that I get, no matter what ROM im using (steve's JB port included) and I too have been underwhelmed by it.
Click to expand...
Click to collapse
Well for me I'm connected to a USB 2.0 port, I have no issues regarding from power management as that should have no affect.
But writing anything to the phone its very slow like anywhere from 300kbs to 1MB/s. But copying/writing from the phone to PC is always going to be faster I'm getting on avg. 14 to 18MB/s.
Sent from my Nexus S 4G using xda premium
me too
That's also bother me a long time and can't find any solution yet.
Nexus S JB is still slow
Hi, I have just updated to the official Jelly Bean update and can confirm that the USB problem is still present. I think I had read somewhere that the problem is in the kernel?
Any fix for this yet? Still annoying to go into cwm to transfer big files.. Thanks.
Go to clockworkmod and use then mount USB storage, you will get about 4mb/s
Accidentally sent from my Samsung Galaxy Note 2
melvinchng said:
Go to clockworkmod and use then mount USB storage, you will get about 4mb/s
Accidentally sent from my Samsung Galaxy Note 2
Click to expand...
Click to collapse
I believe this has to do with the transfer protocol used and your Kernel. Which kernel are you using, are you stock, rooted, or romed, and have you played with the MTP/FTP settings?
MTP Works fine
Hi,
Using Marmite Kernel 7.1.4CM on CM10 and JellyShot 0.1 I noticed that MTP Transfer is actually a lot faster than USB Transfer.
I had the same issue with slow transfer on ics and jb. with MTP its gone.

USB Device Not Recognized

All of a sudden I can charge but laptop won't recognize Infuse - any idea how to fix? It's not a cable or port or computer problem. I've tried on multiple machines with cords and various ports.
I just installed Unofficial CM10 JB 8/11 and have had this problem for the past few days.
Any idea how to fix? Not sure if it's the rom or what? Thanks!
Uh oh... sounds like you have my old problem with my infuse.... the usb controller may have died, usb port should be fine however. I had a pro unbrick my infuse because it was bricked and wuldnt connect to anything (mobiletechvideos) and he figured out that something usb was broken. For free he replaced the hub but still didnt work. He had to perform jtag to get it working (extremely complicated, requires taking the phone apart). He said it would be a lot easier and cheaper to just get a new phone hopefully your situation is different but goodluck, just saying whats happened to me, and some others have reported it happening.
Sent from my SGH-I997 using xda app-developers app

[Q] Orthos Docking Problem

I saw a user ask this on the dev forum, but since I just decided to stop trolling and register, they do not allow me to post, although I have flashed a million roms, and if I can survive the Dell Streak, I can get around with my Skyrocket.
Anywho, I am noticing that when I connect my USB to the computer it does not allow me to connect the phone to the computer via USB to explore in there. My coworker is my partner in crime in the way of flashing and he has the same issue.
Is this an AOKP JB problem, is it just something with Majick's build? I have not had this issue with any of his or Sean's roms before. Also BT audio does not stream to my car receiver. In Majick's past builds it was fine same with Sean's, weird part it connects to stream music, and my deck recognizes my phone as an audio player, but its like a signal never gets pushed. This is not a huge deal since the phone works over BT at least and that is my biggest concern. Any help or a mod pushing this over to the Dev section would be greatly appreciated.
I have had that problem with other aokp Roms so I believe it's a aokp problem, but orthos connects to my computer fine, maybe aokp Roms are picky lol, I fixed the problem on other Roms by reinstalling the drivers
Sent from my SGH-I727 using xda premium
The problem's been reported on AOKP as well, and Autoplay might have something to do with it.
Are you getting a massive wakelock from MediaScannerService, by chance?
Toiletduck83 said:
I saw a user ask this on the dev forum, but since I just decided to stop trolling and register, they do not allow me to post, although I have flashed a million roms, and if I can survive the Dell Streak, I can get around with my Skyrocket.
Anywho, I am noticing that when I connect my USB to the computer it does not allow me to connect the phone to the computer via USB to explore in there. My coworker is my partner in crime in the way of flashing and he has the same issue.
Is this an AOKP JB problem, is it just something with Majick's build? I have not had this issue with any of his or Sean's roms before. Also BT audio does not stream to my car receiver. In Majick's past builds it was fine same with Sean's, weird part it connects to stream music, and my deck recognizes my phone as an audio player, but its like a signal never gets pushed. This is not a huge deal since the phone works over BT at least and that is my biggest concern. Any help or a mod pushing this over to the Dev section would be greatly appreciated.
Click to expand...
Click to collapse
Mine shows up as a device on my machine automatically. Not sure why
Doesn't show up as drives exactly. But a device named i727 appears and I can open both cards while still mounted on phone
--
Sent from my Rocket! Running Orthus One

USB Audio

I recently purchased a headphone amp/dac and am trying to use it with my phone. Is there a ROM/kernel that has full USB host capabilities. I am struggling to get the amp/dac to work with my phone. I can see the device in an app called USB host controller but the problem is that there is no audio being output over USB. Does anyone have any suggestions on how to fix this or if I can?
Update: I can get audio with USB audio tester, but I can not seem to get any music to play over USB
Are you on a Jellybean ROM, that has MTP mode for USB? I've read from other users here that MTP breaks USB audio on some car stereo head units, so this might be the same issue.
I have tried CleanROM, the Sense 5 port, and Vanilla Rootbox. None of them have worked thus far. They see the device but for some reason are not sending audio. I am unaware whether the roms have MTP mode.
laz0r said:
I have tried CleanROM, the Sense 5 port, and Vanilla Rootbox. None of them have worked thus far. They see the device but for some reason are not sending audio. I am unaware whether the roms have MTP mode.
Click to expand...
Click to collapse
Vanilla rootbox does not. I can't remember if sense 5 does but it probably does. Cleanrom surely does. So you know the problem is probably not MTP if it doesn't work on Vanilla rootbox.
I plugged it straight into an HTC One and it worked right off the bat. There is obviously something preventing it from working but whether it is kernel or ROM related I have no idea.
Try ruuing to stock and test. Msake sure youre s-off before ruuing
Sent from my Sony Tablet S using xda app-developers app
Did anyone found any solution for custom roms?
USB Audio works fine in stock but I'd like to use cyanogen-based rom. Maybe someone knows is there any plans to realize this feature in foreseeable future?
mpx5 said:
Did anyone found any solution for custom roms?
USB Audio works fine in stock but I'd like to use cyanogen-based rom. Maybe someone knows is there any plans to realize this feature in foreseeable future?
Click to expand...
Click to collapse
This is the fourth top starred feature request http://code.google.com/p/android/is...rs&colspec=ID Type Status Owner Summary Stars

[Q] [SOLVED] tab2 7", mouse via USB OTG, what rom/kernel?

Hello, I had a tab2 7" more than a year ago. I remember using mouse and other usb otg devices on it.
Then I sold it. I can't remember what rom was on it.
I remember usb otg notifications worked, telling something like "mouse is connected" etc
Now I got another one, it has custom rom installed but usb otg isn't working and was trying to figure out the new ROMs.
I tried lots of latest roms with no luck.
Kitkat ones are great, run smooth, but when I try to connect a mouse it doesn't work.
Then I read that on CM based roms native usb otg isn't working. One can browse usb pens with apps, but no luck with other devices.
I don't care about storage, I need mouse/keyb and other input devices working.
Do someone use USB mouse or keyboard? What rom/kernel?
I'm starting to think it could be ICS since it was soo much time ago?
Thanks,
Robert
rc87 said:
Hello, I had a tab2 7" more than a year ago. I remember using mouse and other usb otg devices on it.
Then I sold it. I can't remember what rom was on it.
I remember usb otg notifications worked, telling something like "mouse is connected" etc
Now I got another one, it has custom rom installed but usb otg isn't working and was trying to figure out the new ROMs.
I tried lots of latest roms with no luck.
Kitkat ones are great, run smooth, but when I try to connect a mouse it doesn't work.
Then I read that on CM based roms native usb otg isn't working. One can browse usb pens with apps, but no luck with other devices.
I don't care about storage, I need mouse/keyb and other input devices working.
Do someone use USB mouse or keyboard? What rom/kernel?
I'm starting to think it could be ICS since it was soo much time ago?
Thanks,
Robert
Click to expand...
Click to collapse
Mine is working perfectly smooth with Sungsonic ROM and Next Kernel.:good::good:
bbugger said:
Mine is working perfectly smooth with Sungsonic ROM and Next Kernel.:good::good:
Click to expand...
Click to collapse
WIRED ONES?
I know bluetooth ones work. I need to know about wired.
thx
bbugger said:
Mine is working perfectly smooth with Sungsonic ROM and Next Kernel.:good::good:
Click to expand...
Click to collapse
Thank you. With that combo I was able to diagnose a fault in the otg cable.
Repaired it and it works, now I'll try the other roms.
Both usb wired mouse and storage works perfectly with Sungsonic ROM v7 and Next Kernel 2.1.6
:good:
everything works fine on 4.4.x too. The fault was the damn usb otg cable.

Categories

Resources