New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Droid 4: make audio calls work in all normal scenarios #584
Comments
Thanks for reporting. I assume that the earpiece does not work for you as well? |
right, but it worked great will playing audio from file. |
I think this a known issue currently, I believe @IMbackK had some patches that might make some of the other components work for calls, but this is something we have to fix in the kernel. (We're still working on making the phone and conversation app behave, and work well with audio routing) |
yes this is a known issue/bug in the droid 4's kernel. |
@IMbackK this issue/bug also prevent the use of bluetooth headphones during calls? |
yes this issue prevents any and all outputs except the speakerphone working, and even that only works if the register state happens to line up when the call is entered, ie speakerphone is also really broken. The problem is also not understanding why this happens in hardware, setting up the device for a call on any output incl. bluetooth is extremely simple with just a couple of registers needed as all the needed audio operations and filters are implemented in hardware with no cpu involvement on d4, but the current droid 4 audio driver is implemented in a framework in the kernel not suited to cases like the d4 where audio may be setup go from some device to some other device with no cpu involvement. |
to descibe this a bit more So the combination of the generic graph-card and cpcap-codec that together assemble to be the audio driver on mapphones use the asoc framework to save power asoc has dapm, in dapm every hw device (ie dai, amp, mixer, switch, whatever) is a node, nodes can be connected to eatch other and audio flows to/from dais to/from output nodes thrugh the nodes. when a dai is active all the nodes downstream of it or upstream of it are powerd on. The framework dose not let you power on nodes for any other reason. while for instance playing music through the speaker the you can start at Speaker Left PGA and work your way up the chain, note that as soon as you break the chain all the downstream nodes will be powered off. When you go into a voice call, the chain is correctly reconfigured and you will note that now the voice if is at the base of the chain. This register controls what output device output amp is connected to. If you look at the MC13783 datasheet it looks like the register would work like a mixer that allows you activate any outputs you want, but in reality cpcap has stict requirements on what are valid bit patterns. you can only have 2 associated bits set to activate amps for a left and right channel and having no bits set is also not valid. Anyhow if you patch the kernel to allow writes on regmaps and set CPCAP_REG_RXCOA appropriately while in a call the call audio will work absolutely fine in every way. |
I think we should build a kernel that allows writing the registers for now, we can just have it in -devel only. I'd really like to test some call audio. |
Ok, on my kernel I can now see the register values:
Reading the code, writing it could be done like (note: untested!):
I don't know this works and what value I should write, so that's to be figured out next... |
I guess the correct value ought to be |
I could try to help with a graph-card-driver fork if the work is shared somewhere, but I'll probably have more questions. :) |
|
Looks like the register doesn't change when playing music on any output:
|
|
|
So things to do now, I think:
See if with this module, sphone phone call work nicely |
|
So what's left to make this work in a hackish (but stable) way:
I've been making calls for weeks now on my droid 4, and it's been pretty good. (some local changes are required atm) |
The non-hacky path would involve mailing the kernel folks and figuring out how we can get alsa dapm to behave. |
I think this is mostly fixed in -devel, right? |
Yes, thanks. |
Succeed to use headphone during calls. |
Great to hear, I don't think bluetooth audio works yet for calls. |
please dont close this untill a proper (ie non hacky) kenrel implementation is found. in practice it is true that it works atm from a users perspective |
can't use headphone during calls.
The text was updated successfully, but these errors were encountered: