Wired Headset Buttons Not Working on Locked Screen [Moto G Power][Android 10 Stock] - Moto G Power Questions & Answers

I posted this to PowerAmp forums, but thought I'd post here too... Is anyone else having this issue?
Issue: Wired headset media controls do NOT function properly when screen is locked AND dark (off). Controls (generally) work fine when the phone screen is on (even if screen is locked).
I have attempted a wide variety of fixes, including a factory reset/flash of the phone, reinstalling Poweramp, various setting changes in Poweramp (keep notification, wakelock), allowing background app (battery optimization off), etc.
All is normal when the screen is not locked... Log below of a "pause" action followed by a "play" action when working as expected:
Code:
==================
11:04:48.413 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34307806 playerState=1
==================
11:04:48.426 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34307806 playerState=1
==================
11:04:49.036 PlayerService TOGGLE_PLAY_PAUSE
from PSMediaButtonReceiver pausePlaying
==================
11:04:51.839 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34311245 playerState=2
==================
11:04:51.859 PlayerService RESUME
from PSMediaButtonReceiver resumePlaying
==================
11:04:51.870 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34311246 playerState=1
Things get crazy when taking the same "pause" and "play" actions once the power button is pressed to lock the screen (and turn it off). Button press/release is the same, but the subsequent actions are not:
Code:
==================
11:06:48.336 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34427741 playerState=1
==================
11:06:48.343 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34427741 playerState=1
==================
11:06:48.502 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:48.502 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:06:48.966 PlayerService TOGGLE_PLAY_PAUSE
from PSMediaButtonReceiver resumePlaying
==================
11:06:50.996 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:50.996 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:06:51.011 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:06:54.704 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:55.775 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:06:55.903 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:07:01.297 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34440695 playerState=2
==================
11:07:01.366 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34440695 playerState=2
==================
11:07:01.441 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:01.622 PlayerService RESUME
from PSMediaButtonReceiver resumePlaying
==================
11:07:04.164 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:04.164 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:07:04.173 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:07:07.565 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:08.621 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:08.746 HeadsetPlugReceiver headset event
connection BT=false am mode=0
==================
11:07:14.606 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_DOWN name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34454018 playerState=2
==================
11:07:14.644 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_HEADSETHOOK ACTION_UP name=trinket-moto-snd-card Button Jack source=0x101 virt=false repeat=0 actionTime=34454018 playerState=2
==================
11:07:14.767 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:14.904 PlayerService RESUME
from PSMediaButtonReceiver resumePlaying
==================
11:07:17.269 HeadsetPlugReceiver headset event
disconnection BT=false am mode=0 no_keep_notif_on_dscn=false
==================
11:07:17.269 HeadsetPlugReceiver cmd_player_pause_playing
==================
11:07:17.280 HeadsetPlugReceiver headset event
connection BT=false am mode=0
This issue is happening on a new phone... a Moto G Power (2020) with Android 10
Code:
Version Info ======================
Build: v3-build-884-arm64-play full verified
Store: Play
Unlocker: build-302
Arch: 64
Skin: ActivityTheme_Black
Device: motorola moto g power sofia sofia sofia_retail [arm64-v8a, armeabi-v7a, armeabi]
Installer: com.android.vending (22.4.25-21 [0] [PR] 337959405)
Android: 10 motorola/sofia_retail/sofia:10/QPMS30.80-51-8/c3480:user/release-keys en_US
I don't think this is a bug particular to Poweramp. I confirmed the same behavior occurs in Pulsar.

I just installed the latest update. No improvement. Problem may be worse because it happens with screen on and screen locked. This is some really funky behavior.
I also verified the issue exists in Safe Mode. So, it must be a programming error in the base code.

BTW, this same headset works perfectly on a Moto G5s Plus. So, I don't know if this is just weird Android 10 behavior or Moto G Power specific problem.

Plugin your wired headset, Turn off google assistant devices

Related

[Q] Headphones too loud ! Any hacks ?

Samsung Galaxy S2 - CyanogenMod 7.1.0
Hi there,
the volume on my headphones is way too loud. Even with all of Cyanogen's DSP rulers set to -10 (dB ??) and with media volume to lowest.
On stock ROM, I had the same issue, although not as bad. The reason are my headphones, which are far too loud.
I had to use Aneq Equalizer (from the androidmarket, all rulers to -15 dB) which worked alright. Yet on CyanogenMod, it seems there is a conflict between Aneq Equalizer and DSP.
I was wondering, if there is a way to tune down headphone (and only) volume on a system / audio driver level ?
Does anyone has any Ideas / Workarounds besides getting new headphones or taping them with duck tape ?
Thanks
Mr.Raptor
You could try this: https://market.android.com/details?id=com.cb.volumePlus&hl=en. Are they still loud when you turn the volume down to the lowest?
Ain't working for me.
What VolumeControlPlus, Audiomanager, etc do is: they let you manage your system's sound via profiles. Unfortunately, even a media volume of 1/15 is way too loud here.
I need something that brings the whole volume range down.
I have played a bit with the
Code:
alsa_amixer Headphone
commands. Yet I wasn't successful.
alsa_amixer
Hmm
Code:
# alsa_amixer sset Headphone 2
gets me were I want to be
Code:
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 2 [6%] [-28.00dB] [on]
Front Right: Playback 2 [6%] [-28.00dB] [on]
# alsa_amixer sget Headphone
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 2 [6%] [-28.00dB] [on]
Front Right: Playback 2 [6%] [-28.00dB] [on]
As soon as I touch the volume controls, it jumps back to 15 ( and stays there)
Code:
# alsa_amixer sget Headphone
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 15 [48%] [-8.00dB] [on]
Front Right: Playback 15 [48%] [-8.00dB] [on]
Anyone any idea ?
same problem here
the only app, that helps here, is supercurio's VoodooSound.
Unfortunately, it is not available for the SGS2.
The new Siyah Kernel makes VoodooSound obsolete now.
Yet, I do not know, if these patches it will be available on the SGS2.
Till now, it is only available on the SGS3.

[Q] TianHe h920+ and wired headset controls

I recently purchased the TianHe h920+, a Chinese phone that seems to be nearly the exact same as the Mlais MX58 pro, among others. My issue is that my wired one button headset does not work properly with controlling my device. Long presses do not launch Google Now, and two/three repeated presses do not active next song/previous song with music players. This headset works fine with my old Samsung Captivate, so it's not the headset's problem, but the phone's.
After some digging, I installed the KeyTest app, and it turns out that two key presses are registered when the button is pressed down, scanCodes 88 and 164. scanCoe 88 apears first, followed by a registering of scanCode 164 after a second or two. Holding down the button first triggers scanCode 88, and occasionally scanCode 166. However, the little counter for "repeatCount" does not tick up, unlike when I hold down the capactive back or menu keys, or the volume rocker. After much more digging, I finally found the key layout file that the phone uses, and was able to remap 164 from MEDIA_PLAY_PAUSE to MEDIA_NEXT, which in turn let me use the Headset Button Controller app.
But the problems don't end there. Even after commenting out scanCode 88 with a "#", Android still recognizes that scanCode 88 is pressed when the button is pushed down, and this interrupts the repeated key presses, as well as press and hold functions of Headset Button Controller. Anyone have any ideas?

[Q] Question regarding entries in snd_soc_msm_2x

I've been studying/editing/testing volume entries in this file to remove speakerphone whine, but at the same time keep the loudspeaker volume nice and high, which has worked superbly after a couple of days trial and error. I have a question for anyone more familiar with the technical ins and outs of the Enable/Disable entries.
Here's an example of an entry:
Code:
EnableSequence
'SLIM_0_RX Channels':0:Øne
'RX1 MIX1 INP1':0:RX1
'EAR PA Gain':0:POS_2_DB
'DAC1 Switch':1:1
'RX1 Digital Volume':1:75
EndSequence
DisableSequence
'RX1 MIX1 INP1':0:ZERO
'DAC1 Switch':1:0
EndSequence
Why is it sometimes that the volume entries aren't always added to the DisableSequence? In another entry/section it would look like this:
Code:
DisableSequence
'RX1 MIX1 INP1':0:ZERO
'DAC1 Switch':1:0
'RX1 Digital Volume':1:0
EndSequence
I know, this is the dullest question ever, but I've studied the file over the past couple of days and noticed these inconsistencies, so I'm curious as to exactly what's going on.

Rewind with bluetooth headset (Sony SBH20)

Hi,
Do you know a way to rewind a song with a bluetooth headset button?
I have a Sony SBH20 Bluetooth headset. It has a buttons allowing to : Play/Pause, Next/Previous track, Volume Up/Down
but no possibility to Rewind the current music being played.
I am not interested in Next/Previous track, all I want is Rewind, how is it possible to get this on a bluetooth headset button?
Regards, Chris
I have discovered that 'Smart Bluetooth Headset Free' is not working because there is no voice dial trigger on the bluetooth headset SBH20.

Switch volume and next buttons on bluetooth headphones

Getting a bluetooth headphone which has 2 buttons for volume control. To change track (next) , volume button has to be pressed for 2 seconds.
Volume up: Press Vol +
Next track: Press and hold Vol +
Possible to switch these actions with an app ? Nokia 6.1 - no root.

Categories

Resources