[BOUNTY] USB Dock Music & Phone Audio - AOSP - Bounty: $711 - WORKS ON LIQUID 4.2.2

Search This thread

CZ Eddie

Senior Member
Sep 27, 2011
6,397
2,442
Austin, TX
Thanks :good:. One more question, it does work on my TW kernel right (the music stuff), so I at least know I have a good kernel base?

Your kernel works great!
It took me awhile to find the right ROM/kernel combo. I didn't realize the newer TW ROM's were incompatible. But I flashed JB Frosty and your JB Kernel and USB audio output when docked worked flawlessly! :good:
 

Attachments

  • Screenshot_2012-10-17-20-32-42.jpg
    Screenshot_2012-10-17-20-32-42.jpg
    28.5 KB · Views: 306
  • Screenshot_2012-10-17-20-32-50.jpg
    Screenshot_2012-10-17-20-32-50.jpg
    32.6 KB · Views: 309

atmospher1c

Senior Member
Jun 15, 2012
62
4
i will donate $25 to this cause!! please PM me if someone gets it working, i will likely not check back in this thread.

edit: in the interest of aiding whichever developer decides to take up this bounty, i would suggest looking at the GLaDOS custom kernel for the Nexus 7. It achieves USB audio output support for external DACs via the usage of modules. http://rootzwiki.com/topic/14685-kernel27-jul-glados-v20-for-jb/ it was added in v1.29, and there is a link to his source code. this feature could also be modeled off of Samsung's TouchWiz ROM/kernel solution.
 
Last edited:
  • Like
Reactions: CZ Eddie

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,386
2,073
F(x)tec Pro1-X
Google Pixel 6 Pro
Hmm, methinks we might need an app, or at least a modified settings apk. ;D
I will have to look into the mic+dock audio thing, it looks like the current audio routing in the kernel would only allow for dock w/o mic.
 
  • Like
Reactions: CZ Eddie

Kendr1ck

Senior Member
Apr 28, 2007
51
0
[BOUNTY]

First screenshot attached = AOKP and CyanogenMOD ROM that doesn't have the audio output when docked option. Or the option is greyed out.
Second screenshot attached = Stock ROM that DOES have this option.

What ROM did you take the AOKP/Cyanogenmod screenshot with? I am running one of the more recent nightlies from CM10 and I don't even have a "Dock" settings option.
 

CZ Eddie

Senior Member
Sep 27, 2011
6,397
2,442
Austin, TX
What ROM did you take the AOKP/Cyanogenmod screenshot with? I am running one of the more recent nightlies from CM10 and I don't even have a "Dock" settings option.

I'm an AOKP fan. So the screenshot was from Task & Ktoonsez AOKP ROM & Kernel combo. Those guys do great work, you should check out their stuff if you ever get a chance.
I haven't run CM since I discovered AOKP. Both are great, but AOKP just gives me some extra UI features that I really dig.
 

CZ Eddie

Senior Member
Sep 27, 2011
6,397
2,442
Austin, TX
Really interested in this, more interested in spreading awareness of the possible applications.

What kind of ideas do you have about this?
I considered posting a link to this thread in the Sprint, Verizon, T-Mobile and European SIII forums. Wasn't sure if that would be crossing any forum guidelines though. We could definitely use a show of hands. Most of the folks interested in this are not stalking the "General" forum. I rarely come here myself, spending most of my time in Q&A and Original Development and Accessories subforums instead.
 

Risingsunn

Member
Jul 26, 2009
22
4
My Friend not only is this a cross carrier issue, it's a cross ROM issue, every non-Samsung based ROM (CM, AOSP, AOKP,MIUI) is lacking this feature. AND it is also a cross phone issue! I had this feature on my GS2 until I changed from Samsung to AOKP ROMs. I lived without it, and was so hoping to get it back when I upgraded to the GS3, but to my dismay when I got the GS3 and installed the AOKP ROM I loved I discoverred that it was missing on it too!! So spread awareness that there are lots of people on all these phones, that would LOVE to have this feature back! Just look through any of the threads on these ROMs and you will see people asking if this is working yet.
 

luckychef28

Senior Member
Aug 8, 2008
289
70
Amherst, MA
Oddly enough, I remember in early AOSP builds (I think jellybro?) that Sound Dock Redirector worked. Then it just stopped for some unknown reason.
 

CZ Eddie

Senior Member
Sep 27, 2011
6,397
2,442
Austin, TX
Oddly enough, I remember in early AOSP builds (I think jellybro?) that Sound Dock Redirector worked. Then it just stopped for some unknown reason.

Part of what we want (usb music audio when docked) has already been done for some phones:

http://xdaforums.com/showthread.php?t=1473201

I'd be happy to at least get that. :D
Icing on the top would be phone audio also of course.

If anyone wants me to get involved in developing for the GSIII, just let me know and I'll be happy to risk my phone for testing. And even send you a dock to keep!
 

ktoonsez

Inactive Recognized Developer
Nov 3, 2011
16,265
43,223
Tempe
Part of what we want (usb music audio when docked) has already been done for some phones:

http://xdaforums.com/showthread.php?t=1473201

I'd be happy to at least get that. :D
Icing on the top would be phone audio also of course.

If anyone wants me to get involved in developing for the GSIII, just let me know and I'll be happy to risk my phone for testing. And even send you a dock to keep!

Remember not to get side tracked on the kernel code, as we discussed, my kernel already does this stuff on my Touchwiz version and all that same code from TW is in my AOSP kernels too. The key here is to make the AOSP ROMs use this kenrel capability :good:
 
  • Like
Reactions: CZ Eddie and noy-z

luckychef28

Senior Member
Aug 8, 2008
289
70
Amherst, MA
Remember not to get side tracked on the kernel code, as we discussed, my kernel already does this stuff on my Touchwiz version and all that same code from TW is in my AOSP kernels too. The key here is to make the AOSP ROMs use this kenrel capability :good:

So the kernel is sound which is great. I remember some time ago a Dev or two mentioning that every time they tried to implement this it broke something more important in their ROM, eventually falling to a "we'll try and get to that once EVERYTHING ELSE is set". As I said before, very early versions were able to get it working if you used the redirector app,but that capability disappeared along the way. Phone audio, in my opinion, is a long shot as they phone has never been capable. Why, Samsung? Why?

Does anyone know what gets messed up when trying to implement this?
 

wes008

New member
Mar 24, 2011
3
2
I don't know if this would be easier to do, but if we could have this not in docked mode as well as docked, having a portable hi-fi audio setup would be easier, rather than carrying a dock around.
 

CZ Eddie

Senior Member
Sep 27, 2011
6,397
2,442
Austin, TX
can anyone clarify whether "dock USB audio" includes just a normal USB DAC?

I don't know, I have not yet researched DAC's.

Is this what they are working on at the moment?

http://review.cyanogenmod.com/#/c/25274/

I'm giggity. Thank you.
Looks like we may owe some $$$ to Araemo if he's able to get this added to CM10!!! He's working on it, it looks like. Waiting for approval. This means they need to make sure it doesn't break anything else.
Does anyone know if this WOULD go into the ATT CM10 nightlies if it's approved? Or is this for a different phone build?
dock2.jpg
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Hi everyone.

    I'm currently working on this along with Araemo and bbelos. None of us even realized there was a bounty for this before today. You can track our patches here:
    http://review.cyanogenmod.com/#/c/25281/
    http://review.cyanogenmod.com/#/c/25274/
    http://review.cyanogenmod.com/#/c/25279/

    Just to give you an update of where we are at. It basically works, but we are trying to decide how to handle phone call audio. I think what we are going to do is have the speakerphone toggle jump between using the dock, and using the speakerphone speaker. Currently, we can do one or the other, but only in the code. The toggle isn't doing anything yet. Once that's all done, we still have to get it verified and approved.

    So, hopefully none of you have to wait much longer. It is nice to use my car dock again. :laugh:
    5
    [BOUNTY] USB Dock Music & Phone Audio - AOSP - Bounty: $711 - WORKS ON LIQUID 4.2.2

    EDIT AS OF 5/5/2012: Hahah, just as soon as I finally update the thread, it's now working again. AS OF 5/5/2013, ANALOG USB AUDIO IS WORKING ON 4.2.2 AOSP LiquidSmooth, release 5/5/2013 "Official", linked below:

    http://xdaforums.com/showthread.php?t=2039995



    EDIT AS OF 5/4/2013: THIS FEATURE IS NO LONGER WORKING ON NORTH AMERICAN 4.2.2 AOSP PHONES

    EDIT AS OF 11/15/2012: THIS FEATURE IS NOW WORKING ON ALL NORTH AMERICAN MODELS. THANK YOU CYANOGENMOD TEAM!!!!

    ****Please make your bounty donations to the CyanogenMOD team. You'll find the donate button at the bottom of their website:

    http://www.cyanogenmod.org/


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

    [BOUNTY] Enable USB Dock Audio out with Call Routing for CM10/AOKP - Currently $711.00
    If you want to put money into the pot, just let me know and I'll add your name/amount to this thread. You hold onto your money until it's time to donate to the dev(s).

    Why we want this:

    --Car Stereo buffs like to dock our phones and use the better sounding USB audio out to our car stereos.
    --Home sound buffs would like to be able to do the same.

    FACT #1: When working properly, the USB audio sounds WAY better/cleaner than Bluetooth.

    FACT #2: CyanogenMod/AOKP may never get the APT-X codec for HD quality bluetooth. And Bluetooth is occasionally flakey anyways (for different users).

    What is needed is for a Dev to enable audio output to external speakers when docked. And for the call audio to be re-directed to external also. And for the call audio ringing to be able to start at low volume and ramp up from there, so it doesn't blast anyone's ears out.


    One Dev who has already accomplished part of what we want (but for a different phone):
    http://xdaforums.com/showthread.php?t=1473201


    I was contacted recently by the iBolt car dock engineers. This is something they would like to get going also. So if you're a dev and want to tap into their resources, I can give you their contact info. Just to clarify, they did not request that I put up this thread. This is all my own doing.

    I use the iBolt Dock:
    http://xdaforums.com/showthread.php?t=1806888&highlight=ibolt

    And I use Car Home Ultra which works fantastic as a dock app:
    https://play.google.com/store/apps/...51bGwsMSwxLDMsInNwaW5uaW5naGVhZC5jYXJob21lIl0.



    If you don't care about USB audio out when docked, then please don't post in this thread. I'd like to keep it clean for just the folks who care about USB audio. :)


    CURRENT BOUNTY CONTRIBUTORS:


    1. Anonymous audio lover = $500
    2. CZ Eddie = $50 ---PAID
    3. atmospher1c = $25
    4. MethodX = $20
    5. luckychef28 = $15
    6. junglizste = $15 ---PAID
    7. crash822 = $10 --PAID
    8. Raul77 = $10
    9. shanghei = $10
    10. mRahmani = $10
    11. noy-z = $10 --PAID
    12. fish3191 = $10 --PAID
    13. BlackDino = $10
    14. baublitz = $5
    15. wes008 = $5 --PAID
    16. aaronshaw = $5
    17. Quasimodem = $1

    First screenshot attached = AOKP and CyanogenMOD ROM that doesn't have the audio output when docked option. Or the option is greyed out.
    Second screenshot attached = Stock ROM that DOES have this option.
    5
    Hey guys,

    Just providing an update. 2 out of the 3 patches we need for this to work have been merged. The last patch we need merged is here: http://review.cyanogenmod.org/#/c/25274/

    Once that's in, you'll have a toggle under 'Sound'' that will allow you to turn on dock audio.

    I can't really give a timeline on when that will be merged, since it is entirely out of our control. All we can do is pester people higher up to take a look and get it merged. We all appreciate your patience.

    -Kyle
    4
    Guys, you can have Bluetooth or USB. Unfortunately there is no possibility to have both work at the same time.

    1) If you are listening to USB docked music, then you cannot have bluetooth turned on also. Because then you don't get any audio out of the USB (even on stock ROM).
    Wrong..

    The moment you turn bluetooth on your phone, it will disable all audio from the USB output. Heck, it even disables the internal speaker on the phone.
    Nope. Turning bluetooth on does not do this.

    Connecting a bluetooth A2DP sink does this. Now, when you turn on bluetooth, if your car supports A2DP, it probably auto-connects, and does this to you. However, in the bluetooth menu in android, under the settings for the paired device, you can disable 'media audio' for that device in the phone. Now, if you connect a bluetooth device that supports both Headset audio and media audio.. the phone only actually connects to the headset audio profile, leaving your media audio routing as if there was nothing connected to bluetooth. (My bluetooth earpiece 'supports' a2dp - but it's poor quality and mono, why would I want to use it?)

    2) Even if you could get both USB and bluetooth to work at the same time, let's say you're listening to USB music on your phone to your car stereo and take an incoming call, then what is going to tell your car stereo to automatically switch from AUX to Bluetooth? Nothing.
    Why wouldn't it? Bluetooth media audio (A2DP) is a completely different bluetooth service from bluetooth handsfree profile or headset profile. Your car stereo probably supports both A2DP and Handsfree Profile. If it didn't support Handsfree profile, you wouldn't be able to take calls through it. Handsfree profile allows the phone to indicate that there is an incoming call, and to activate the handsfree device when the call is answered. So.. bluetooth would tell your car stereo, as it is supposed to.

    Sorry bluetooth lovers, it just won't work. :)
    Let's try to keep this thread uncluttered and on topic. Many of us are subscribing to the thread.
    Well, hope you learned something with your subscription. :)

    Excuse a newbie question here...

    So are we looking for a solution for a particular dock (the iBolt or OEM version) or should this solution work for any USB input? My car stereo only has USB input (iPod, thumb drive, or usb hard drive) and I'm looking for a solution where I can plug the micro-USB into my SGS3 and the USB into the stereo and have it seen like a usb drive (or, even better, like an iPod where I can use the audio streaming apps on my phone).

    Is that what this is intended to address?

    Appreciate the feedback,
    phlepper

    This is for the samsung OEM docks (And work-alikes) that use a 619 kOhm resistor between MicroUSB pins 4 and 5 to trigger 'car dock' mode, and have the data pins of the MicroUSB connector connected to the right/left channels of the audio jack/cable.

    This does not hook up to a USB data port - the data pins are re-purposed to carry analogue audio instead of a digital signal. So you would use an OEM dock that lets you plug an 'aux cable' from the dock to your car stereo.. or you could make yourself soemething like this and plug the usb plug into your charger, and the 3.5mm jack into your aux-in.

    Bluetooth call audio is working still - with our patches, bluetooth devices still take priority for call audio, so those of you using it that way are still fine.

    However, we're trying to get this in CM10 proper, which means we are trying not to make anything work worse than it does currently. IE, if we made it so you couldn't use speakerphone in the dock, it'd be a regression, and I bet there are those who would see that as an issue. It should be fully fixable, but you gotta give us time to figure out how. :)

    On an aside, this thread educated me about the downsides to A2DP streaming from CM10. I'm really disappointed that the quality is so bad - I thought it passed 16bit/44.1khz PCM over bt, not some horribly lossy mess. I want to start looking into that next - I don't really like having a dock in the way in my car, so I've been looking into an A2DP-capable receiver, but I don't want the quality to be horrible.. but I am curious, does anyone know if CM supports the mid-level codecs bluez supports? Apt-X is one high-quality codec, but A2DP defines MP3 or AAC coding is allowed as well, both of which it looks like BlueZ supports (Howerver, no Bluetooth A2DP device is required to support MP3, AAC, or Apt-X, just "SBC", which is the ****ty codec) - I wonder if it's really just up to what codecs your device supports?
    3
    in your opinion how difficult would it be to provide the USB audio functionality (for use with external DACs) that is present in the TouchWiz ROM?

    As far as I'm aware, that should work without issue in CM10... but I've never tested any USB-OTG functionality (I have no USB-OTG adapters), so I don't know that for sure. Are you saying that you've tested it, and it doesn't work?

    Edit: Give it a try with the latest nightly, if you could.. it looks to me like it might just work right now. in which case, I HOPE our fix for dock audio doesn't break it.. but from some quick googling, it looks like it might have some code overlap that might cause us grief.