[MOD] USB Audio Support

Search This thread

jacknorris

Senior Member
Nov 8, 2010
55
83
I don't know how to get the info you need AND have the DAC connected at the same time?

Yep, the right side of the screenshot shows the Ultimatum ROM which is TW and USB-DAC works natively on it.

Hmm, maybe something like this app will let me connect the DAC and then run my ADB commands wirelessly. I'll work on it in a few minutes.

https://play.google.com/store/apps/...central&utm_medium=blog&utm_campaign=bloglink

Really sorry about that haha, totally forgot that you were using adb over usb! Thanks for updated information. No need for another other logs yet.

Okay I'll try that next. I even installed paranoidandroid no luck. Will try that one next

Sent from my Nexus 7

Let me know how you get on, the Nexus 7 is the easiest to get working.
 
  • Like
Reactions: nnotis

Nosferatu.

Senior Member
Dec 20, 2011
2,255
765
Tampa, Florida
Got a link for that kernel please?

Sent from my HTC One X using Tapatalk 2

really dude? Read the first post it's RIGHT THERE.


Really sorry about that haha, totally forgot that you were using adb over usb! Thanks for updated information. No need for another other logs yet.



Let me know how you get on, the Nexus 7 is the easiest to get working.

didn't work using the kernel in the original post. I'm restoring back to LiquidROM in the mean time. plug in the USB DAC and I just lose all audio. Would having AC!D Audio Engine v5.0 be causing any issues?
 
Last edited:

CynicalMushroom

Senior Member
Dec 1, 2012
129
41
Great news for AT&T Galaxy S3 fans!!!

While CyanogenMod 10.1 does not work yet for some reason, I was able to flash a different AOSP based ROM which DOES work!!!

Liquidsmooth ROM works after flashing Jack's patch!!!! Hotplugging and all! Thank you, JACK!!!!
Liquidsmooth looks almost identical to CM10.1. I've never used it before so it's new to me.

Here is the ROM:
http://xdaforums.com/showthread.php?t=2080247

And I flashed Ktoonsez 4.2 kernel and USB-DAC still works!
http://xdaforums.com/showthread.php?t=1756776



I also tried CM10.1 and AOKP 4.2 but neither of those worked.
Another thing to note is that Liquidsmooth is the only one that asked me to provide superuser permissions for ADB. CM10.1 and AOKP never asked me to do this.

Well that's strange. Not only did I get a prompt by SU when trying to adb using CM10.1, but Liquidsmooth is CM based. Wonder why LS works but not CM, hmmm...

OT: Liquidsmooth is one of the best AOSP roms out there. IMO better than CM (at least on the older android versions), there's a reason it's called Liquidsmooth ;D
 

spthacker

Senior Member
Jun 24, 2012
627
137
Suffolk
Sorry all my bad, read the thread from beginning to end, but missed the links for the kernel downloads :eek:

Sent from my HTC One X using Tapatalk 2
 

mmedmalik

Member
Jan 10, 2013
7
1
Sorry all my bad, read the thread from beginning to end, but missed the links for the kernel downloads :eek:

Sent from my HTC One X using Tapatalk 2

It's on the first page, in the first post under downloads

---------- Post added at 12:28 PM ---------- Previous post was at 12:21 PM ----------

Hi All,

I have a Plantronics Entera HW121N-USB-M USB headset i use on my laptop. I was wondering if this guide would enable me use this headset on my Nexus 7.

TIA
 

jacknorris

Senior Member
Nov 8, 2010
55
83
Great news for AT&T Galaxy S3 fans!!!

While CyanogenMod 10.1 does not work yet for some reason, I was able to flash a different AOSP based ROM which DOES work!!!

Liquidsmooth ROM works after flashing Jack's patch!!!! Hotplugging and all! Thank you, JACK!!!!
Liquidsmooth looks almost identical to CM10.1. I've never used it before so it's new to me.

Here is the ROM:
http://xdaforums.com/showthread.php?t=2080247

And I flashed Ktoonsez 4.2 kernel and USB-DAC still works!
http://xdaforums.com/showthread.php?t=1756776



I also tried CM10.1 and AOKP 4.2 but neither of those worked.
Another thing to note is that Liquidsmooth is the only one that asked me to provide superuser permissions for ADB. CM10.1 and AOKP never asked me to do this.

Excellent news! I have actually identified the problem with CM10/10.1 and will write a patch for it after work tonight.
I will submit the patches to AOSP/CyanogenMod once a few more people have successfully tested the patch and the bugs are ironed out.

It's on the first page, in the first post under downloads

---------- Post added at 12:28 PM ---------- Previous post was at 12:21 PM ----------

Hi All,

I have a Plantronics Entera HW121N-USB-M USB headset i use on my laptop. I was wondering if this guide would enable me use this headset on my Nexus 7.

TIA
You would have to give it a try I would think. It all depends on if the headset is a class compliant USB audio device.
 
Last edited:
  • Like
Reactions: nnotis and CZ Eddie

djthread

Senior Member
Jul 30, 2010
95
5
Detroit
I am sitting here like a pig in *expletive* with my RSA Intruder and JH13 custom IEMs making sweet, sweet music from my i747 (S3).

I love you, mr. norris.

---------- Post added 26th January 2013 at 12:17 AM ---------- Previous post was 25th January 2013 at 11:54 PM ----------

There is a bit of skipping (gaps), though, particularly when DSub is downloading music from my Subsonic server. (Awesome app, btw. I just figured out how to make it stream pure flac.) It's overall very solid and resistant to skips. I tried to bump the nice of DSub with "Mr. Nice Guy - App Prioritizer" ... but it didn't have much of any affect... It might just be too much I/O. Actually forget I said any of that, this is awesome.

This is exactly the android tweak I've been waiting years for. Thank you so much for bringing it to us, jacknorris!

Where's your donate button?
 
Last edited:

nnotis

Senior Member
Jan 24, 2012
110
23
Seattle
www.nicknotis.com
I want to report that this patch worked perfectly on my i9300 S3 running Paranoid 2.5 with Siyah 1.8.9.

Let me second what djthread said in the previous post about a pig.
 

wollax

Senior Member
Aug 23, 2011
743
172
Florence
OnePlus 9 Pro
R: [MOD] USB Audio Support

I want to report that this patch worked perfectly on my i9300 S3 running Paranoid 2.5 with Siyah 1.8.9.

Let me second what djthread said in the previous post about a pig.

That is really interesting .... you applied this patch and now you can play with any music player through a usb dac/amp ????

Please explain better :eek::eek::eek::eek:

Sent from my GT-I9300 using xda app-developers app
 

karistep

Member
Aug 18, 2008
25
0
I cannot make it works on nexus 7 stock rom 4.2.1 and timurs kernel.

Patch apply (not volume patch)

Sound is ok on the nexus
I plug usb dac fiio e17 then sound stop from nexus hp. Sound becomes at max. Nothing on the dac (dac and cable has been fully tested before using usb recorder).

Poweramp does not want to read song anymore. Youtube freeze.

After unplug usb no more sound from hp.

Sometimes nexus 7 freeze after pluging usb dac.
 

jacknorris

Senior Member
Nov 8, 2010
55
83
I cannot make it works on nexus 7 stock rom 4.2.1 and timurs kernel.

Patch apply (not volume patch)

Sound is ok on the nexus
I plug usb dac fiio e17 then sound stop from nexus hp. Sound becomes at max. Nothing on the dac (dac and cable has been fully tested before using usb recorder).

Poweramp does not want to read song anymore. Youtube freeze.

After unplug usb no more sound from hp.

Sometimes nexus 7 freeze after pluging usb dac.

I will try and replicate this today, although I do not have a FiiO E17.


That is really interesting .... you applied this patch and now you can play with any music player through a usb dac/amp ????

Please explain better :eek::eek::eek::eek:

Sent from my GT-I9300 using xda app-developers app

You are correct, this patch effectively routes all audio from any app out via a USB dac.
 
  • Like
Reactions: wollax

karistep

Member
Aug 18, 2008
25
0
I test again, sound only works on e17 if you let it plug at startup on usb port.

But after remove, no nore sound anywhere.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    Nexus 7 USB Audio Support

    I originally started looking into this as part of my Nexus 7 car project. Rebooting just to get USB audio working conflicted with my goal of being able to "dock and forget". It took a bit of experimenting and debugging but it's finally working
    wink2.png


    This program should enable USB audio support on your Nexus 7 - that means you are able to plug and unplug a USB sound card without having to reboot in order for it to work. Other devices should also work but I have not been able to fully test.

    It works by downloading your devices services.jar which is then extracted and de-odexed if required. The necessary classes are then patched and a new services.jar is packaged up, re-odexed, re-signed and finally re-uploaded to your device. The previous method replaced the entire services.jar which turned out to be a really bad idea!

    As always please let me know of any issues you stumble upon. The patching software was written quickly so there will most likely be bugs!

    Instructions


    1. Obtain a full backup of your device. This patch is experimental.
    2. Ensure your device is ADB enabled, rooted and has busybox installed.
    3. Make sure your PC has Java and .NET 4 installed.
    4. Download usb-audio-patcher below and extract to a folder.
    5. Run usb-audio-patcher.exe, the software will guide you through the rest of the process.
    6. Flash a kernel with USB audio support. Nexus 7 Wifi kernels can be found below although any kernel with USB audio support will work.

    Downloads

    Software
    [Windows] usb-audio-patcher-1.1.zip.

    Kernels
    [N7 CM10 / Stock 4.1.2] cm-10-n7-wifi-usb-audio-kernel.zip
    [N7 CM10.1 / Stock 4.2.1] cm-10.1-n7-wifi-usb-audio-kernel.zip
    [Timurs N7 Kernel] http://rootzwiki.com...ment-usb-audio/

    Misc
    [Volume Control] n7-volume-control-patch.zip - Allow media volume control when USB audio device is connected.
    8
    Working USB DAC solution for KitKat!

    Here's a small New Year present to all audio lovers!

    This patcher was originally developed by JackNorris and was later modified by _crue_ - many thanks!
    However, 4.4.zip patch disabled headphone functionality. So I ripped contents of WiredAccessoryManager from Timur's USB-ROM and updated 4.2 and 4.4 zips with them.

    Results:

    1. USB DAC hotplug works!
    2. Switching between internal speakers and DAC - works!
    3. Once headphones are plugged in, sound switches from speakers or DAC to them - works!
    4. No volume control for USB DAC - this requires another patch for AudioPolicyManagerBase.cpp before ROM compilation (http://xdaforums.com/showthread.php?t=2222374&page=93 post #928 - again, all credits to JackNorris). I do not have the environment to build my own ROM...

    It's strange that FineVolumeControl app is able to control DAC volume.

    As of now, it's a partial success, but hope is not lost! Please look for 1st post in this thread for instructions.

    Tested with Oxydo v15 version 1 (BTW, v1 boot failure can be caused by different SEPOLICY binary in CM11 and AOSP ROMs, binary from latest CM11 kernel works even if installed in AOSP kernel ramdisk) and CM11 nightly from 12/25.

    Credits:

    To JackNorris and _crue_ for the patcher
    To Timur Mehrvarz for his tremendous development work on USB ROM.

    Happy New Year!

    P.S. Additional info (as per recommendation from redeyedjedi)

    Java JRE 1.6 (16u45 recommended) must be installed (included SMALI binaries might not work with Java 1.7), as well as .NET v4 or v4.5

    Hotplug on boot does not work (not an issue for me) no matter which options I adjust under /sys/kernel/usbhost - I must unplug OTG cable from Nexus first.
    However, if I boot without OTG cable, then connect it without DAC and only later connect the DAC, it is detected properly.
    If I boot with OTG Y-cable (with power connected to it) and plug the DAC after boot completion it is detected properly.
    It seems that initial DAC detection routine in the kernel is affected by OTG charging patch (as Timur stated a while ago). There might be something else in his ROM to force initial DAC detection. I played with Timur's kernel during my 4.2.2 days and it did not detect DAC on boot as well when using stock ROM.
    If I boot with stock CM11 kernel, DAC is detected on boot, hotplug works, but no OTG charging (and I need it for USB peripherals)
    And there's still a volume control issue...:(

    WARNING: It seems that this patch will only work on CM11-based ROMs! It can render AOSP ROMs (such as Purity) unbootable! Please use with caution!
    8
    Just a quick update to let you guys know that I will be posting a new simpler patch method soon which will also include the option to enable volume control. I'm hoping to finish things off tonight/tomorrow.
    6
    Thanks so much for your help, if you could make a flashable version as sadly my android knowledge is somewhat limited :highfive:

    I have a flashable version already.....its what I run. just need to upload to devhost.....got a reply from showp so its all good. give me a bit....I might even be able to from my tablet......otherwise itll be tomorrow cause im not home.



    OK.......its rude to hijack a thread.....so I will take the time in the next days to do a proper thread. I'm also on my personal tablet and this particular build has 100mb of modules you don't need but it will work just fine. So please.... Save any questions for a bit till I get a chance on my desktop to do this right.

    Just install...... Apply this Ops mod....... And enjoy.! http://d-h.st/QhW
    5
    I'll submit the required patches to CM at the weekend (I promise :p) that should at least get things going for CM based ROMs.

    I am also hoping to release something based on the Xposed framework for people who either don't have a CM based ROM or don't want to change/update. Using Xposed should make the patch more compatible and stable across devices, it will also allows patching the fixed volume limitation when a USB DAC is connected. The volume patch is extremely simple when built into a ROM but it becomes tricky when patching at runtime.