Commit graph

4 commits

Author SHA1 Message Date
telepathine 35966292e8 LG8n: InCallService: Map AOSP gain step range to MTK one
MTK has 15 volume steps, we have whatever is set in vc_call_vol_steps.
Mapping our range to theirs allows reaching higher volume levels.

A log curve is used to make gain transitions less abrupt at higher volumes.

Change-Id: I5f0e6467ba9fd0779d7e4abbf9f258b0b42224e4
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:40:08 +08:00
LinkBoi00 f8d0b72323 LG8n: app: MtkInCallService: Adjust gain values in all situations
Signed-off-by: LinkBoi00 <linkdevel@protonmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:39:52 +08:00
bengris32 ea1e552263 LG8n: InCallService: Bugfixes and refactor
* Refactor and cleanup code
* Use proper way of getting audioDevice with getPort().type()
* Stop mixing up values between AudioSystem and AudioManager,
  as values between AudioManager (java) and AudioSystem (native)
  could change and become different from eachother.

Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I2311ed02b88148b71b374b19aaaf458f82f23824
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:39:37 +08:00
bengris32 84d2411127 LG8n: Introduce Mediatek In-Call Service
* My attempt at fixing in call gain control on MediaTek devices.

* It attempts to replicate what the stock MediaTek framework does
  when controlling the volume of the earpiece speaker, since MTK's
  audio HAL is not able to set the gain of the speaker from the
  values sent by AOSP framework.

[LinkBoi00] Rebrand to Mediatek In-Call Service

Change-Id: I43f727f6fb73a0d38457a41a8361653d1d00e220
Signed-off-by: LinkBoi00 <linkdevel@protonmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:39:11 +08:00