• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[rom][unofficial] AICP_Q-15.0 [android-10.0.0_r46]

Search This thread

Master_T

Senior Member
May 11, 2011
530
1,332
I'm trying this rom, everything seems to work fine, except for one thing: I can't change the volume with the headphones volume buttons, they just do nothing.... can anyone else confirm this or is it just me? (the headphones volume buttons were working fine on miui)
 

tegazinho

Senior Member
Dec 17, 2015
84
9
I'm trying this rom, everything seems to work fine, except for one thing: I can't change the volume with the headphones volume buttons, they just do nothing.... can anyone else confirm this or is it just me? (the headphones volume buttons were working fine on miui)

All good here, can adjust volume, using 3.5mm headphones. I can try with my bluetooth TWS later if you want. Maybe check if you have right firmware.
 

Master_T

Senior Member
May 11, 2011
530
1,332
All good here, can adjust volume, using 3.5mm headphones. I can try with my bluetooth TWS later if you want. Maybe check if you have right firmware.

I've tried to use the "Key Tester" app on the play store, and both the "volume up" and "volume down" buttons on the headset are recognized as "KEYCODE_UNKNOWN".
So, basically the buttons are being read but not recognized by the ROM... anyone has any solutions for this? I've already trieds clearing data and also flashed the recommended firmware, but no luck.
 

solved

Senior Member
Jun 3, 2010
539
122
Germany, Berlin
www.tetracorp.eu
What kind of headphones yre you using? did u tried to try different ones?

i mean, i'm using TaoTronics BT Headphones and the volume buttons are working (but only if a audio app is running like spotify or soundcloud, they are not changing the android volume - without an music app running)
 

Master_T

Senior Member
May 11, 2011
530
1,332
What kind of headphones yre you using? did u tried to try different ones?

i mean, i'm using TaoTronics BT Headphones and the volume buttons are working (but only if a audio app is running like spotify or soundcloud, they are not changing the android volume - without an music app running)

I'm using wired headphones, Xiaomi In-Ear Pro 2. I've tested them on another device and the volume button work there. I've also tested a pair of different headphones (Xiaomi Piston 3) on my 9T with this rom, and they don't work. So it's definetely not a headphones problem, but a ROM/Kernel problem.... if anyone has an alternative kernel to suggest I'll try it.
 

Master_T

Senior Member
May 11, 2011
530
1,332
Well, I've figured it out, or at least a workaround!

I installed the KeyEvent Display app from the Play Store, which gives you the scan codes for the keys you're pressing. By using it, I found out that the headset "volume down" button has key code 114, and "volume up" has code 115.

So, I've used a root-enabled file manager and had a look at the keylayout file for the audio jack, which is located at:
Code:
/system/usr/keylayout/sm6150-idp-snd-card_Button_Jack.kl

The original file looks like this:

Code:
key 226 HEADSETHOOK
key 257 VOLUME_UP
key 258 VOLUME_DOWN

as you can see, the volume up and volume down keys have different codes than the ones I detected earlier with the app!
So I added the "alternative" key codes to the file, like this:

Code:
key 226 HEADSETHOOK
key 257 VOLUME_UP
key 258 VOLUME_DOWN
key 115 VOLUME_UP
key 114 VOLUME_DOWN

and restarted the phone, now it works perfectly!

I don't know why I seem to be the only one with this issue though, weird... and I don't know if I should suggest the author to add those codes to the keyfile :confused:
 

VladSor

Senior Member
Sep 8, 2017
750
1,629
Well, I've figured it out, or at least a workaround!

I installed the KeyEvent Display app from the Play Store, which gives you the scan codes for the keys you're pressing. By using it, I found out that the headset "volume down" button has key code 114, and "volume up" has code 115.

So, I've used a root-enabled file manager and had a look at the keylayout file for the audio jack, which is located at:
Code:
/system/usr/keylayout/sm6150-idp-snd-card_Button_Jack.kl

The original file looks like this:

Code:
key 226 HEADSETHOOK
key 257 VOLUME_UP
key 258 VOLUME_DOWN

as you can see, the volume up and volume down keys have different codes than the ones I detected earlier with the app!
So I added the "alternative" key codes to the file, like this:

Code:
key 226 HEADSETHOOK
key 257 VOLUME_UP
key 258 VOLUME_DOWN
key 115 VOLUME_UP
key 114 VOLUME_DOWN

and restarted the phone, now it works perfectly!

I don't know why I seem to be the only one with this issue though, weird... and I don't know if I should suggest the author to add those codes to the keyfile :confused:

Thanks!
 
  • Like
Reactions: Master_T

FlorianReicht

Member
Jun 20, 2019
42
12
I'm looking for a ROM where the Devs are active (especially concerning security-updates)
Reading through here it seems like I found an even stronger privacy focused ROM than LOS.
I'm currently on latest China stable FW. Can I keep it since it newer than the recommended?
Please correct me if I'm wrong, kind regards
 

hulkyboi

Senior Member
Apr 13, 2016
93
23
I'm looking for a ROM where the Devs are active (especially concerning security-updates)
Reading through here it seems like I found an even stronger privacy focused ROM than LOS.
I'm currently on latest China stable FW. Can I keep it since it newer than the recommended?
Please correct me if I'm wrong, kind regards
Try picsel inexperience+. Thread is active and ROM is so smooth my brain can't handle it.
 

Top Liked Posts