52 Commits

Author SHA1 Message Date
Tomasz Wasilczyk
523a206aa2 gts4lv-common: audio-impl: Don't use String8::empty
With the current definition, it's an alias of default constructor. This
has very different meaning from std::string empty, especially that
static method String8::empty can still be called from instance context.

One of such bugs are present in in ParametersUtil.

Bug: 295394788
Test: make checkbuild
Change-Id: I9116a0c42a6a9e94116eaaaa0fd60568db428838
2024-12-31 11:31:17 +00:00
Tomasz Wasilczyk
660441d184 gts4lv-common: audio-impl: Don't depend on String8 cast to C string
Bug: 295394788
Test: m checkbuild
Change-Id: I73acbfad6da4f18566f6b11889e83679deeaa2b8
2024-03-11 18:02:52 +00:00
Tomasz Wasilczyk
40a2c5b983 gts4lv-common: audio-impl: Migrate String8|16.setTo to assignment operator
Bug: 295394788
Test: make checkbuild
Change-Id: Ic98514f48399115046029e68883408090f0cd0db
2024-03-11 18:02:40 +00:00
Tomasz Wasilczyk
3e6237ca53 gts4lv-common: audio-impl: Use String8/16 c_str
Bug: 295394788
Test: make checkbuild
Change-Id: I9cba2d925dc1e5363927ba336b0ca2c43207ddad
2024-03-11 18:02:30 +00:00
Andy Hung
5701d20bdf gts4lv-common: audio: Set minimum Binder access priority
Use setMinSchedulerPolicy to enforce minimum thread priority
when accessing the audio HAL to ANDROID_PRIORITY_AUDIO

Test: instrumented
Bug: 261496726
Change-Id: I700b04d3060e9405b1445206882a6131cea0d045
2023-10-23 20:32:09 +02:00
Sujin Panicker
cad1e3c412 gts4lv-common: audio: Add wired headset mic support for voip_tx
Add wired headset mic support for voip_tx

Change-Id: I3128ba52b12e4a2a545db78b7fe1b644f98ce3b6
2023-01-22 13:05:09 +01:00
Anver sadhique
6091d05278 gts4lv-common: audio: Add usb_surround_sound input profile for usb capture
Use usb_surround_sound input profile for usb capture to avoid
scenario of re-using an already opened input session during
concurrent capture. Otherwise for second capture which
does not support hifi-reocrd and use case can fail.

Change-Id: Ic02a25e2643c1d8c008dee4c63cbcd8c4cb8eb4c
2023-01-22 13:04:58 +01:00
Shalini Manjunatha
46f8bd54c5 gts4lv-common: audio: Add built-in/Back mic and remove TelePhony Rx from primary input
Built-in mic and Built-In Back Mic aren't in supported devices
list of primary input, Add them to primary input sources to
reuse input to avoid to open extra input stream in AHAL
Also remove Telephony Rx to make in call record use case through
different front end pcm device when sva enabled to solve concurrency
capture issue

Change-Id: I8a036423da689a4de9abe767a0b6a595b4e068f1
2023-01-22 13:04:29 +01:00
Alexander Martinz
29af7d019f gts4lv-common: audio: fix VTS
Using "dynamic" is invalid according to xml schema
"audio_policy_configuration_V6_0.xsd".

Test: atest VtsHalAudioV6_0TargetTest
Test: atest VtsHalAudioEffectV6_0TargetTest

Change-Id: Ic1660f0d593f83e5568a4ad678383e600e27b793
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2022-11-02 17:28:47 +00:00
Aaron Kling
5a8425481c gts4lv-common: Remove references to a2dp module
APM would fail to parse the config anyway:

  E DevicesFactoryHAL: loadAudioInterface couldn't load audio hw module audio.a2dp (No such file or directory)
  W DevicesFactoryHalHidl: The specified device name is not recognized: "a2dp"
  E AudioFlinger: loadHwModule() error -22 loading module a2dp
  W APM_AudioPolicyManager: could not open HW module a2dp

Change-Id: Iaa1be881cfe8f8474cef0ba46e1b0a62b59e14be
2022-10-22 17:25:19 +01:00
LuK1337
82119cd095 gts4lv-common: audio: Add afe-proxy hack for wfd
Sadly, prebuilt audio HAL doesn't seem to handle it on its own.

Change-Id: I911bd909decdffa2b065c32971f94881e74f094e
2022-10-12 19:27:56 +02:00
LuK1337
801c75a611 gts4lv-common: Rebase custom audio impl
Based of: android-13.0.0_r3

Change-Id: I22e67b1245d8c890b5f72340d456b5f89045b8b6
2022-09-19 17:38:01 +01:00
Tim Zimmermann
d5f5e0f073 gts4lv-common: Set SEC specific BT SCO sample rate audio param
This lets us convert AOSP's bt_wbs to SEC's g_sco_samplerate.

Change-Id: I78d5d36044421daf99b8a13aa417060a3cf959a3
2022-07-30 12:45:35 +02:00
LuK1337
ad571dceec gts4lv-common: Go back to prebuilt audio
This likely fixes most audio related issues we have:
* low volumes in certain usecases
* missing echo cancellation
* ...

Change-Id: I69f8ab947dfc11cc5042969ac0facd8368ac55b3
2022-07-30 12:45:35 +02:00
Tim Zimmermann
69b115916d gts4lv-common: Add swdap audio effect
Change-Id: I46b547f01b8d52cb6fc867bcc9389b979cc19fa6
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2022-03-12 15:12:44 +00:00
LuK1337
c6e01b439c gts4lv-common: Rebase custom audio impl
Change-Id: I001081defa9815d97471e6ff88a17a8b0bd10555
2021-12-21 20:55:33 +00:00
Steven Moreland
f38105c987 gts4lv-common: Audio HAL - fix UAFs
Bug: 185259758
Test: N/A
Change-Id: I5ec70b098a00746108e10ab39e966607d78c84ae
Merged-In: I5ec70b098a00746108e10ab39e966607d78c84ae
(cherry picked from commit a8ac7cf706be7a77589070ea7c62f8e1b94ce316)
(cherry picked from commit 7283cbe8cbb250fc42f0358d4ca4c94f3c32b344)
2021-10-16 21:04:14 +02:00
Lakshman Chaluvaraju
239be0dc87 gts4lv-common: audio: Enable Stereo channel support for voip over audio path
Add changes to support stereo channel configuration
for voip over audio path.

Change-Id: Ib454d24a4017d3f91d429d47c52d4f86e5a18e97
2021-05-23 23:46:14 +01:00
Anver sadhique
8c9d1f81a2 gts4lv-common: configs: Enable incall music and add incall music profile
add incall music profile in audio policy configuration
to provide incall music support from APM

Change-Id: I2acf185acea558082aba93f9287e464d9e14729e
2021-05-23 23:46:14 +01:00
Bruno Martins
de98277c56 gts4lv-common: Update all the things to R
* Declare support for low latency audio
* Reenable TARGET_USES_ALIGNED_YCBCR_HEIGHT flag since Samsung
  camera blobs require that again (yikes!)
* Regenerate config.fs file using config-fs-gen from lineage
  scripts repo
* Require Android 11 FW
* Update vendor security patch date
* Update PRODUCT_PACKAGES according to changes in vintf manifest/blobs
* Sync audio/media/wifi/other configs with stock
* Sync vendor.prop with stock
* Align sepolicy with changes in blobs

Change-Id: I4461309730a34af975302737ae091b53edc2f79c
2021-05-23 23:46:10 +01:00
LuK1337
c5ba03ee35 gts4lv-common: Improve camcorder-stereo-mic volume
Change-Id: I2d71b1a2be120d2fd342ed43a28e51a97b3f5989
2021-02-01 23:06:30 +01:00
Bruno Martins
0e4f17b9e3 gts4lv-common: audio: Set stock ACDB IDs for voicemmode1-call usecase
This fixes incall audio volume control.

Change-Id: Ie2cbd2559d5e88e765ed7c18885e2bbfb4b1b9ec
2020-11-23 13:42:36 +02:00
LuK1337
2ef4166056 gts4lv-common: Pass call state to audio HAL and add voice-speaker paths
* This fixes incall audio in S5e LTE variant.

Change-Id: I9fdffcf97318b64429a952bda411c282c816a336
2020-11-07 01:18:45 +00:00
LuK1337
2a3b88452a gts4lv-common: Update blobs from T720XXU1CTI1
* Drop no longer needed gralloc hack
* Sync audio configs
* Sync VENDOR_SECURITY_PATCH

Change-Id: I15f87c3af59f33d8b797ce0fade027b29445da05
2020-10-28 19:22:16 +01:00
LuK1337
a48f4f9e9f gts4lv-common: Rebase custom audio impl
Change-Id: Ie4872630dd2a4220113df34de6b202a72c65d82f
2020-10-10 22:04:30 +01:00
Bruno Martins
d05d1efd44 gts4lv-common: Update all the things to Q
* Drop no longer necessary gralloc flags:
  - TARGET_USES_UNALIGNED_NV21_ZSL := true
  - TARGET_USES_UNALIGNED_YCRCB := true
* Enable TARGET_USES_ALIGNED_YCBCR_HEIGHT hack, fixes
  misaligned height when using certain camera resolutions
* Sync VENDOR_SECURITY_PATCH with stock
* Sync audio, wifi configuration files with stock
* Sync init scripts with stock
* Sync vintf manifest and HALs with stock
* Sync seccomp policy with stock
* Update SELinux policy according to changes in HALs
* Regenerate config.fs using lineage/scripts/config-fs-gen

Change-Id: Ia53db2e488fe96d41083da686a42811da46d291a
2020-08-04 19:39:49 +02:00
LuK1337
a733153fce gts4lv-common: Fix audio-playback-voip mixer ctl and add voice-speaker{,-2} usecases
Google Duo now works fine.

Change-Id: I8fc424e2cad9b1f64279e384f7dc802013b3a21a
2020-07-18 22:57:03 +02:00
LuK1337
2bed8d38c4 gts4lv-common: Add voice-rec-mic path
D hardware_info: hw_info_append_hw_type : device_name = voice-rec-mic
D audio_hw_primary: disable_snd_device: snd_device(163: voice-rec-mic)
E audio_route: unable to find path 'voice-rec-mic'

Change-Id: I3034318f24696b13609da60267d50f9553aca8aa
2020-07-18 13:54:52 +02:00
LuK1337
78f357b053 gts4lv-common: Improve built-in mic volume part #2137
* Hopefully now someone will be happy.

Change-Id: If1e1a50363efc7609900bf91ed7b05e6387336e9
2020-07-08 23:24:11 +02:00
LuK1337
f5e6f28dd6 gts4lv-common: Increase {voice-speaker-mic,speaker-mic} volume
Change-Id: Ia3582162a4be20f5491830cb1a9669b19bb53ff2
2020-06-30 21:37:21 +02:00
LuK1337
591455d8c1 gts4lv-common: Reroute and increase handset-mic volume
Change-Id: Ib62f13484b068425260160223d08bc7d73822b4e
2020-06-29 10:01:09 +02:00
LuK1337
864ed93408 gts4lv-common: audio: Switch to CAF audio policy configuration
* Keep AOSP BT configuration
* Remove earpiece
* Remove vorbis offloading
* Remove ULL (ultra low latency)

Change-Id: I1c305c8b8b8f8dc0e9224a154b9e2c058e70968f
2020-06-14 20:40:15 +02:00
LuK1337
4dce7ed86d gts4lv-common: Bring up OSS audio HAL
* Add SEC <-> QCOM audio routes
* Enable all features according to
  {HAL}/configs/sdm710/sdm710.mk
* Use compatible deep_buffer format
* Switch to CAF USB audio policy

Change-Id: I365f6ee319a0c16ed755e7bc728be623a0c4a41a
2020-06-14 15:53:07 +02:00
LuK1337
5f27260ed4 gts4lv-common: audio: Fix "Bt Sco Headset Mic" type
Change-Id: Ib930e801eba13ffd8e2ca381dca6da1bc4e1c88f
2020-06-13 20:46:39 +01:00
dianlujitao
b6a4b826c3 gts4lv-common: Enable AOSP bluetooth audio HAL v2
Change-Id: I4d12752ae5fb2829d6612647c8740c84967f5434
2020-01-30 14:04:36 +01:00
Sujin Panicker
069754f4c9 gts4lv-common: Add BT SCO to routes list
- Issue with returning a valid device descriptor
  since BT SCO is not defined in IOProfile.
- With Android-Q changes, first attempt to retrieve device
  descriptor from the avaiable HwModule may fail due to
  address and encoded format conditions.
- Further device descriptor query is based on IOProfile
  with devices defined in audio_policy_configuration.
- This change adds BT SCO to IOProfile.

Change-Id: I52225070e97dd702f965ca5dbb5db9d128df1faf
2019-09-25 13:50:28 +02:00
Wang Han
a8e75e83a7 gts4lv-common: Define missing BT SCO device ports
Change-Id: I09b5ae75c7df6a035803daca8702d1d79a2dbde7
2019-09-25 13:49:52 +02:00
LuK1337
a3b95bcafa gts4lv-common: Rebase custom audio impl
Change-Id: I9491e88aca1b0494f5ef2d835b6c3517868be560
2019-09-16 22:36:36 +01:00
Bruno Martins
1bd5b75ebe gts4lv-common: Delete completely unused audio configs
Drop all configs unrelated with our sound card. As for sound trigger,
it looks like Samsung uses their own implementation that doesn't rely
on the usual configuration files.

Change-Id: I6675a077ffef0ab5eb223f7e06c52a5218d9e01e
2019-08-23 01:56:09 +02:00
Bruno Martins
6ebcf5d7b0 gts4lv-common: Use audio policy configurations from AOSP
Remove unparsed SEC specific files and stick to plain AOSP
audio policy configs as there are no device specific changes.
The AOSP configs additionally include hearing aid support.

Change-Id: I2d93103e5502064cd8061f419787340c0ad998f7
2019-08-23 00:20:47 +02:00
LuK1337
a179b3cb0e gts4lv-common: Clean up audio effects
* Move QCOM effects from _sec to non-sec.
* Drop remaining SEC effects along with legacy conf.

Change-Id: I4e30ee72aec64968840897a7643134d4d5be0549
2019-08-22 14:50:04 +02:00
Rashed Abdel-Tawab
c939e56012 gts4lv-common: Move speaker rotation control to audio@4.0-impl
This replaces system-only implementation (commits aaa7ae1 and 6217ecb).

Change-Id: I6fc63636a712303ce6109ba63737ac24a392c600
2019-08-21 16:06:10 -07:00
Rashed Abdel-Tawab
0ebb846807 gts4lv-common: Import ParametersUtil.impl.h into ParametersUtil.cpp
We need to change the setParams methods

Change-Id: Ibf636467e17e687c255eb42ab8907c30268459cb
2019-08-21 16:06:09 -07:00
Rashed Abdel-Tawab
add8f0c5c6 gts4lv-common: Build device specific audio impl and remove 2.0 impls
Change-Id: I99a09d22022e892a388bb8e6a5c45698603dd357
2019-08-21 16:06:09 -07:00
Rashed Abdel-Tawab
66f2b93d40 gts4lv-common: Import audio@4.0 default impl
Change-Id: Id7ef580205a1a8ee219afb4d6825f93eba82820d
2019-08-21 16:06:09 -07:00
Rashed Abdel-Tawab
1a3f51acd0 gts4lv-common: Move audio configs to audio/configs
Change-Id: Ic97d39dd3996339e1416e1897e31ee041e1c3ada
2019-08-21 16:06:09 -07:00
Bruno Martins
6217ecbfb0 gts4lv-common: Mimic stock behavior for quad speakers during rotation
Leave ASPRX2 untouched for now, as different values don't seem
to have any effect.

This also sets proper initial values for 0 degrees rotation, which
is needed since the service only reacts to rotation changes and
after boot is complete sys.audio.rotation prop is still empty.

Change-Id: I29989963ae2f5872f81704c34b5b9fd363ea8e78
2019-08-20 23:39:53 +01:00
LuK1337
8a47b61a8b gts4lv-common: audio: Reverse slot positions for rear speakers
Change-Id: Id17e8e03579172fe9aa1aa78bfae89a44d18e37d
2019-08-18 23:55:23 +02:00
LuK1337
e71ae05fc9 gts4lv-common: audio: Set "working" slot positions for rear left and right speakers
Change-Id: Ifbc784f93fc1cd5ed3e19ad0d8aa393988662de3
2019-08-15 14:27:01 +02:00
Rashed Abdel-Tawab
50b91d1b0b gts4lv-common: Custom audio policy config that works on AOSP 2019-08-04 23:37:58 +02:00