fix for bt audio goes to max while docked - EVO 4G Android Development

Ok, now I realize that most folks wanted the max volume when docked. Unfortunately for me, this causes a great deal of distortion. If, I back the BT Audio volume down to a bit less than 2/3rds no distortion and everything is peachy.
With the old dock I had, it was powered separately, and Tasker took care of setting the volume nicely.
Well that dock broke so I found an OEM Evo dock on Ebay. Unfortunately, it maxes out the volume.
Well I think I found the culprit.
Code:
float AudioPolicyManager::computeVolume(int stream, int index, audio_io_handle_t output, uint32_t device)
{
// [I]force volume on A2DP output to maximum if playing through car dock speakers[/I]
// as volume is applied on the car dock and controlled via car dock keys.
#ifdef WITH_A2DP
if (output == mA2dpOutput &&
mForceUse[AudioSystem::FOR_DOCK] == AudioSystem::FORCE_BT_CAR_DOCK) {
return 1.0;
}
#endif
The problem is that I don't have all the includes to build just audiopolicymanager.cpp
So if someone could point me to what I need to compile it without this bit of code, or if you are feeling kind and could compile it, I would be appreciative.

Related

Mute instead of pause?

I have a bluetooth headset (Backbeat 903, i think) that has a hardware pause/play button. The button works just as intended for the stock music player, as well RadioTime (the app I use it for the most). The problem is, after pausing the radio in RadioTime, it can take several minutes to un-pause, since it's got to reconnect to the feed and then buffer. I was wondering how hard it would be to remap the play/pause button to just mute/unmute. I realize the app would be eating up bandwidth when muted, but I'm not worried about that.
Any advice would be appreciated!
Billy
Have you tried taking the Backbeat out of your ear instead of hitting the pause button?
Cloned2 said:
Have you tried taking the Backbeat out of your ear instead of hitting the pause button?
Click to expand...
Click to collapse
LOL, yeah. I just have to do a lot of short pause/mute breaks. That, and I want to make sure I can always hear it ringing and message alerts through the headset.
Billy
Perhaps you'll have to ask the application developers if there is anything that can be done. I would imagine that the applications are receiving some broadcast to stop the music, if they could allow you to change the response, that would work. Or you'd have to change the device firmware of the blue tooth. Other than that, I'm not sure if anything can be done to modify the android system to detect the signal as a different signal.
But than again, I'm not the most informed of people around here.
I'd bug the developer until they put something in for you.. All they'd have to do is throw a little
if (ANDROID_ID == "you")
{
if(volume == "0")
{
volume.set(volume)
}else{
string volume = previous volume;
volume = 0
}else{
pause
}
Yeah, its really that simple, unless you have that one droid that gives everyone the same android id.
Even then, I don't think most developers would bother, unless they were me.

Trick to force DAC into "external device" mode with no extender

Hi guys,
Hope im posting this at correct place.
If not please suggest a new location.
Anyhow...
I have the b&o H6 headphones. Love them puppies but they are pretty darn hard to drive.
I read somewhere that if you're cable has a mic/remote controller on it, the v20 won't recognize it as high gain no matter of the impedance.
But, if you hold the answer/play button on the remote while inserting the jack into the v20. Hold it pressed down for 2 seconds after and voila..it is recognized as 'external audio device' which also produce high gain.
Please check if that works with other headphones and lets me know.
Oh and dont forget to credit
On my Sennheiser Monemtum 2.0s, it's just in Aux Mode, but it does make a huge difference in output. "An external audio device is connected." I had to hold down play and volume down.
I have the free set of b&o headphones and i too get external device mode. Sounds great. Had to adjust viper settings but sounds amazing. What once was around 35 volume is as low as 15.
Thanks for this great find!!!
It really works. will aux mode . But remember this is just aux mode. Only 25% (high gain is much stronger than approximately + 50%)
a good idea if you have a headset which is remote.
even if the play / up or down/ play buttons to keep. about 2-3 sec.(Even before the insertion press and hold)
It provides about 25% + gain. (In the high gain mode to normal mode power 50-75% +)
If you are not the headphones with remote control.
You can first place a pre-extender jack plugged into the phone, and then plug in the headphone to the extender. Aux position.
Unfortunately, such acts only half a credit for you But it is very clever idea
(( But the title is misleading slightly. Because it would rightly so: Trick to force ,,Aux,, mode with no extender
High Gain mode (two adapter required)
Connected together( extender+75 ohm adaptor)than to be inserted into the phone . (The phone will be HighGain position), then pull out the impedance adaptors increased. The extender will remain. (The phone still remains high position), this is the trick. !! and then you can plug in headphones to less than 50 ohms on the Extender. ((This + 50% gain compared to the Aux mode. ))
And we enjoy
Yeah works good find!
Sent from my LG-H990 using XDA-Developers Legacy app
So glad it works for you guys ?
I thought aux mode=high gain.
But that is high enough for my ears.
Cheers guys.
V20 all the way
stemplar007 said:
It really works. will aux mode . But remember this is just aux mode. Only 25% (high gain is much stronger than approximately + 50%)
a good idea if you have a headset which is remote.
even if the play / up or down/ play buttons to keep. about 2-3 sec.(Even before the insertion press and hold)
It provides about 25% + gain. (In the high gain mode to normal mode power 50-75% +)
If you are not the headphones with remote control.
You can first place a pre-extender jack plugged into the phone, and then plug in the headphone to the extender. Aux position.
Unfortunately, such acts only half a credit for you But it is very clever idea
(( But the title is misleading slightly. Because it would rightly so: Trick to force ,,Aux,, mode with no extender
High Gain mode (two adapter required)
Connected together( extender+75 ohm adaptor)than to be inserted into the phone . (The phone will be HighGain position), then pull out the impedance adaptors increased. The extender will remain. (The phone still remains high position), this is the trick. !! and then you can plug in headphones to less than 50 ohms on the Extender. ((This + 50% gain compared to the Aux mode. ))
And we enjoy
Click to expand...
Click to collapse
While in the OP i mentioned 'aux mode', i kept the title with 'high gain mode' to make the it clearer.
"Trick to force aux mode" sound weak ?
Ninjafrog84 said:
While in the OP i mentioned 'aux mode', i kept the title with 'high gain mode' to make the it clearer.
"Trick to force aux mode" sound weak
Click to expand...
Click to collapse
My friend would be nice if to erase the High Gain.
Aux transcribed onto. It is therefore misleading.
Title changed ?
Ninjafrog84 said:
Title changed
Click to expand...
Click to collapse
thanks . It became a little better
but not aux ..
I still like to know how these earbuds goes in to high gain mode once in awhile. If you can ever get them to go high gain mode. They sound amazing.i only had them do it 3 times total. Makes you not want to unplug them.
Sent from my LG-H910 using Tapatalk

Lg V20 High Gain/Aux Trick .( more +25-75% Gain ).Without root easily ..

Same as for V10 as well. A little tricky to Extender to stay indoors. I apologize if you've had this board, but I have not found, but the root method.
But you do not need root and do not lose your warranty. ( In addition, I have me a H990Ds.
What I can not even root. )
Virtually fooled the amplifier. With the headphones less than 50 ohms, a much stronger, more dynamic are all about.
As if bound in headphone amplifier. 3 positions
1. normal audio headphones under 50 ohms
2.only extender= aux (+ 25% power)
3.Extender and adapter 75 ohms = high gain (50-600 ohms) (+50 % !! power ) In this position it will be as strong as FiioX7.
the maximum amplifier module)
Aux mode :
1. If you only extender on the phone. Aux position will be.
Then, when we put on the headphones (below 50 Ohms), the Extender. It remains aux position to get more reinforcements. Approx. + 25%.
2 . if you have a headset which is remote.
even if the play / up or down/ play buttons to keep. about 2-3 sec.(Even before the insertion press and hold)
It provides about 25% + gain. (( Thanks for the idea: Ninjafrog84 ))
High Gain mode (two adapter required)
Connected together( extender+75 ohm adaptor)than to be inserted into the phone . (The phone will be HighGain position), then pull out the impedance adaptors increased. The extender will remain. (The phone still remains high position), this is the trick. !! and then you can plug in headphones to less than 50 ohms on the Extender.
And we enjoy .. High Gain, but be careful in your ears.
((( Over 50 ohms headphones will be automatically high position, there should not be any magic. ))
two adapters to be added.
this
: http://www.ebay.com/itm/DUNU-3-5mm-to-3-5mm-Impedance-Adapter-Plug-For-Hi-Fi-player-AMP-DAC-Earphone-/380932180092?var=&hash=item58b153c87c:m:mTYTIMVVhRj3Y73N82lrXLg
and
that :
http://www.ebay.com/itm/New-L-Shape-Right-Angle-3-5mm-Male-To-Female-Stereo-Plug-Adapter-Connector-HFUS-/390645010934?hash=item5af441d1f6:g:AyQAAOxy-NVSDu1a
Here is a page with photos HeadFi I illustrated how to do it : ( post #2071 )
http://www.head-fi.org/t/816024/lg-v20-sound-quality/2070#post_13224924
http://www.head-fi.org/t/816024/lg-v20-sound-quality/2070#post_13222940
Nota Bene : (( The High Gain the advantage of a stronger voice for: LG, according to all four DAC is activated.
If High Res plays music from the DAC. ,,Or,,
Also, if a high-impedance device is connected to the phone.
Nevertheless, not every player can send the output of high-quality music ..
But the noise 4 DAC lower , however, a great advantage.
In case of lower-quality music, and either normal (below 50ohm) headphones. Only one DAC operates.
(Hence the noise cancellation is less)
Because of the efficiency of batteries.))
That is why I, and hear it as well.
Not only is this strong in High Gain.
It's cleaner and nicer. (Be it a placebo?) But to hear the difference.
looks very interesting, thanks
anyone who has already tried this??
If you have headphones with volume control, try holding play and/or a volume when you plug in your headphones and holding it for a few seconds as the DAC boots. I had success getting my V20 to output to my cans in AUX mode. It's louder than standard, but I haven't seen or heard the think in high impedance mode, so I cannot compare.
It really works. will aux mode
a good idea if you have a headset which is remote.
even if the play / up or down/ play buttons to keep. about 2-3 sec.(Even before the insertion press and hold)
It provides about 25% + gain. (In the high gain mode to normal mode power 50-75% +)
If you are not the headphones with remote control.
You can first place a pre-extender jack plugged into the phone, and then plug in the headphone to the extender. Aux position.
I got the 75ohm adapter, the aux extension cable but even then i get the regular aux mode only on my phone. The aux is connected to the car, should that make a difference?
Hyper4mance2k said:
If you have headphones with volume control, try holding play and/or a volume when you plug in your headphones and holding it for a few seconds as the DAC boots. I had success getting my V20 to output to my cans in AUX mode. It's louder than standard, but I haven't seen or heard the think in high impedance mode, so I cannot compare.
Click to expand...
Click to collapse
Pretty awesome trick! My HF5s just have a mic button. Holding that down when plugging in tricks DAC into AUX mode.
Never thought to do that with all my time with both V10 and V20...
On my V10 I used to use the Alsa mixer app from play store. It does require root, but you could target the ESS DAC and change the value from 0 up to 72, where 0 was high impedence mode.
Sent from my LG-H918 using Tapatalk
Thanks. For people connecting-disconnecting often, it's maybe a better idea to use a cable extension (instead of the L shape adapter from first link above) + (same) 75ohm impedance adapter, so that you do not put excessive force on the smartphone headphone jack.
Something like : http://www.ebay.com/itm/3-5mm-Stere...hash=item3acd23adfe:m:md2cHJh1G0yaqDuvjymVvBw or http://www.ebay.com/itm/3-5mm-Right...409283?hash=item41bc61f003:g:QdMAAOSwD0lUkU2t

Px5 Static Noise From Speakers (Sourced from LCD Screen!)

I have a MTCD/MTCE head unit from Witson(MX) and i'm using the latest Malaysk rom and Mcu(1.75) for my unit.
I can hear a low pitched static noise from speakers when car is silent. It's not loud, but i can hear it. I just realised source of this static is LCD screen. If I decrease brightness of LCD or completely shutdown LCD the static noise came from speaker stops. The sound is even changing with respect to colors on LCD.
My question is: I don't want to return my unit. Can someone with technical knowledge say me how can i solve this problem? Should i install some kind of filter on speaker cables? Should i ground case of the unit or Lcd?
I have the same noise, I didn’t do anything about it because I never have a situation without listening to something. When I drive it’s impossible to hear it.
Sent from my iPhone using Tapatalk
Interesting. I have the same noise but haven’t figured out what causes it. I’ll check your LCD theory tomorrow.
a) I have PCB mounted quadlock (VW) on rear of HU
b) i have factory fitted amp in skoda superb ii (VW quadlock - not RCAs used)
c) with aftermarket HU, the amp is turned on when the key is in ignition position and not controlled by canbus like with original
** this is have a very faint hiss from the unbalanced line input being on without a source, but is not the noise we are referring to here **
d) noise is not present if i put back Chinese WinCE HU or original RNS315
e) there is no noise during initial boot screen, or car logo or even during loading of Car Loader AG (inc with HA rom) from cold boot
f) shortly after the Loader screen, the +/- volume keys become active - this is when the noise starts (motor running or not - the noise is the same)
g) if you put the car in reverse prior to turning on, you see white lines about 1cm apart before the vol +/- is activated.
h) once the volume is activated, the noise includes a clicking of about 150-180 bpm (the white lines on the reverse camera flicker to this beat as well)
i) using factory settings/touch keys to config pwr key for short press screen off / long press pwr off and the screen off does not affect noise.
j) changing the factory settings/other/amp gain from 0 to -12db or -15db lowers the noise gain but requires increase volume to overcome the noise.
k) the noise varies and fluctuates with changes in the menu e.g. scrolling and display e.g. download % counter changes
l) the noise varies and fluctuates with touches to the touch screen
m) the noise does not change in amplitude with changes to the system volume control
I have seen a thread where it is suggested, that the interference is coming from the LCD screen and can be verified by turning the screen off - see g) above
** the other thing i am suspicious about is the grounding. I am connected through Quadlock, but trying to power via the Quadlock on a bench doesn't work. Only via
the white connector with the RCAs. says to me something funny going on with either the power or ground wiring. **
Based on all the above, it seems fairly clear that the issue is either the LCD/CPU or some other RF component inducing the noise into the system. i.e. design fault.
I don't have an oscilloscope so can't probe if the noise is on the LCD cables or being induced by the screen RFI without shielding.
Simple test might be to remove the front screen (while still plugged in) and extend the cable moving the screen as far as possible, possible place a metal sheet behind the screen and in front of the unit, to see if the noise changes.. That would at least tell if it is a shielding problem with the screen.
i am surprised there is no solution to this so far, as it is commonly reported among various brands of the PX5 Android boxes.
I am going away, so wont be able to look at this for a few weeks, but would like to hear from anybody who is game to try removing the screen from the case initially.
gwaitsi said:
a) I have PCB mounted quadlock (VW) on rear of HU
b) i have factory fitted amp in skoda superb ii (VW quadlock - not RCAs used)
c) with aftermarket HU, the amp is turned on when the key is in ignition position and not controlled by canbus like with original
** this is have a very faint hiss from the unbalanced line input being on without a source, but is not the noise we are referring to here **
d) noise is not present if i put back Chinese WinCE HU or original RNS315
e) there is no noise during initial boot screen, or car logo or even during loading of Car Loader AG (inc with HA rom) from cold boot
f) shortly after the Loader screen, the +/- volume keys become active - this is when the noise starts (motor running or not - the noise is the same)
g) if you put the car in reverse prior to turning on, you see white lines about 1cm apart before the vol +/- is activated.
h) once the volume is activated, the noise includes a clicking of about 150-180 bpm (the white lines on the reverse camera flicker to this beat as well)
i) using factory settings/touch keys to config pwr key for short press screen off / long press pwr off and the screen off does not affect noise.
j) changing the factory settings/other/amp gain from 0 to -12db or -15db lowers the noise gain but requires increase volume to overcome the noise.
k) the noise varies and fluctuates with changes in the menu e.g. scrolling and display e.g. download % counter changes
l) the noise varies and fluctuates with touches to the touch screen
m) the noise does not change in amplitude with changes to the system volume control
I have seen a thread where it is suggested, that the interference is coming from the LCD screen and can be verified by turning the screen off - see g) above
** the other thing i am suspicious about is the grounding. I am connected through Quadlock, but trying to power via the Quadlock on a bench doesn't work. Only via
the white connector with the RCAs. says to me something funny going on with either the power or ground wiring. **
Based on all the above, it seems fairly clear that the issue is either the LCD/CPU or some other RF component inducing the noise into the system. i.e. design fault.
I don't have an oscilloscope so can't probe if the noise is on the LCD cables or being induced by the screen RFI without shielding.
Simple test might be to remove the front screen (while still plugged in) and extend the cable moving the screen as far as possible, possible place a metal sheet behind the screen and in front of the unit, to see if the noise changes.. That would at least tell if it is a shielding problem with the screen.
i am surprised there is no solution to this so far, as it is commonly reported among various brands of the PX5 Android boxes.
I am going away, so wont be able to look at this for a few weeks, but would like to hear from anybody who is game to try removing the screen from the case initially.
Click to expand...
Click to collapse
It's not the LCD, at least on my unit. The noise is much higher if I connect a flash memory to one of the USB connectors. I can hear the noise as Android is reading the memory content. I think the noise from the digital domain is getting to the analog path somehow. Would be interesting to install some power filters for the analog part or play with the grounding. May do it later if I can find some free time... I do have an oscilloscope but I don't have the time for the research yet...
G0bl1n said:
It's not the LCD, at least on my unit. The noise is much higher if I connect a flash memory to one of the USB connectors. I can hear the noise as Android is reading the memory content. I think the noise from the digital domain is getting to the analog path somehow. Would be interesting to install some power filters for the analog part or play with the grounding. May do it later if I can find some free time... I do have an oscilloscope but I don't have the time for the research yet...
Click to expand...
Click to collapse
I found it easier to track down with a signal tracer, i.e. a probe connected to an audio amp and headphones.
xdamember2 said:
I found it easier to track down with a signal tracer, i.e. a probe connected to an audio amp and headphones.
Click to expand...
Click to collapse
I removed the main board from my unit. Bottom layer on the PCB is filled with a ground plane but has many connections cutting through it. I'm wondering if they have a dedicated ground plane as a middle layer. If they don't it's possible there are ground loops which can cause the noice. I will try to add some wires to improve the grounding. Will update when I have any info.
i can hear static too but from my little speaker that produces the parking sensors and indicators sounds.. when the unit seems to be processing i can also hear some. Let us know later @G0bl1n.
Hello, I have the noise when the car radio is connected to wifi or bluetooth
Guys...check your Wifi angena on the back....it makes this annoying noise. Change wifi antenat to external on the cable.....it fixes issue 100%
BoNt3k said:
Guys...check your Wifi angena on the back....it makes this annoying noise. Change wifi antenat to external on the cable.....it fixes issue 100%
Click to expand...
Click to collapse
Can someone else confirm this solution please? It's very difficult to dissamble the head unit from my car.
traxformania said:
Can someone else confirm this solution please? It's very difficult to dissamble the head unit from my car.
Click to expand...
Click to collapse
Did you find any solution? I have the same problem
Any updates on this? I'm experiencing the same issue when the LCD screen is bring used... Eben noting a significant difference between noise when a live wallpaper vs a plain wallpaper is being used. Would in line magnets in the power and ground source help? Any progress? This is really frustrating
Jonnymooshoo said:
Any updates on this? I'm experiencing the same issue when the LCD screen is bring used... Eben noting a significant difference between noise when a live wallpaper vs a plain wallpaper is being used. Would in line magnets in the power and ground source help? Any progress? This is really frustrating
Click to expand...
Click to collapse
Not sure if it's the screen itself or the electronics on the board controlling the screen. If I ever get more time on my hands what I would love to do is try extending the ribbon cable on the screen so I could remove it away from the unit and see what that does for noise. If it works then you could always dash mount the screen and stick the unit under your seat... or what ever. Haven't had the time though.
Anyway, there have been a lot of threads and posts on noise with people trying all sorts of stuff to stop it and I haven't seen a foolproof method yet.
One thing which seems to work for those using external amps is to use the speaker level outs and convert down as opposed to using the rca outs. Another thing which seems to work is to adjust the gain on the external amp down until the noise is no longer heard. You do obviously lose a bit of volume headroom though.

New head unit install has static noise

I have just installed an Erisen 7591-HA (PX5) into my 2010 Golf Gti and I am getting static and digital processing sounds through my speakers.
If I mute the head unit there is no static or other sounds.
The digital processing noise happens when playing music via usb and Spotify when selecting the next track.
This is my first Android head deck and I am really disappointed.
Sound is going through an Alpine PDX-F6 amp.
I have tried disconnecting the radio plug and removing the head unit from the dash but no change still has static and processing sounds.
Sound issues remain if the engine is off it makes no difference.
Static and digital sounds do not increase with volume, it remains the same no matter what volume it is at unless the head unit is muted.
Good quality RCA and speaker cable was used.
Any help would be greatly appreciated.
I have the same issue with a Belsee unit I installed last week. Do you have a line-level filter in your harness? I have a theory that the line-level filter that's included in mine is unnecessary, as it's coming straight off where the RCA outs would normally be (and those are line level already, right?).
tonyarnold said:
I have the same issue with a Belsee unit I installed last week. Do you have a line-level filter in your harness? I have a theory that the line-level filter that's included in mine is unnecessary, as it's coming straight off where the RCA outs would normally be (and those are line level already, right?).
Click to expand...
Click to collapse
No I do not have a line level filter on mine.
I have tried using an RCA GROUND LOOP ISOLATOR but this done nothing.
Below is a link to the sound I am getting from the head unit, you will see it only makes the sounds when volume is not muted.
https://www.youtube.com/watch?v=0vhT7AavZbg
Same issue on my PX5 KGL unit, not tested with filters or similar...
I read somewhere that the LED color-changing caused interference - and I noticed that you have yours setup that way. Have you tried setting a static color? Also, make sure all of your wiring is clean and try to keep any speaker wires away from any power wires (although that is more applicable to an external app setup).
Can you hear the noise at all while music is actually playing? Obviously, it would be better if it wasn't there are all, but if you can't hear it normally (only hear it when nothing is playing), then I wouldn't sweat it too much. All you can do is make sure that your wiring is clean and maybe try adjusting the LED settings and the "pre-amp" settings under the factory menu (maybe see if reducing the "System" setting under "Voice" helps reduce it). Once you try using things like ground-loop isolaters, etc, then there is a chance that the music fidelity is reduced even more.
jtrosky said:
I read somewhere that the LED color-changing caused interference - and I noticed that you have yours setup that way. Have you tried setting a static color? Also, make sure all of your wiring is clean and try to keep any speaker wires away from any power wires (although that is more applicable to an external app setup).
Can you hear the noise at all while music is actually playing? Obviously, it would be better if it wasn't there are all, but if you can't hear it normally (only hear it when nothing is playing), then I wouldn't sweat it too much. All you can do is make sure that your wiring is clean and maybe try adjusting the LED settings and the "pre-amp" settings under the factory menu (maybe see if reducing the "System" setting under "Voice" helps reduce it). Once you try using things like ground-loop isolaters, etc, then there is a chance that the music fidelity is reduced even more.
Click to expand...
Click to collapse
Yeah have tried all the above and nothing changes.
The sound quality is poor also with higher ranges being really scratchy.
I am sure the unit would be fine if not using a higher end amp and just running the speakers off the head unit, I have read a few posts online and on youtube that the RCA output signal can be really poor with certain brands.
I just sent the unit back today for a full refund and will now be buying a brand name such as Alpine, Pioneer etc etc

Categories

Resources