Commit graph

58 commits

Author SHA1 Message Date
Carter Hsu
3e5292e267 audio: allow Fortemedia to notify setting to CCA
Bug: 237720492
Test: voice-call
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I1a0cfc5511beddb153c7c627f691bdf53b457b5d
2022-09-23 02:53:09 +00:00
vincenttew
4d0d8925d9 audio: extand the period number of hifi usecase
extend this to prevent alsa trigger stop playback
and causing pop

Bug: 238056484
Signed-off-by: vincenttew <vincenttew@google.com>
Change-Id: I1c3e3f68aa63acbc520ddf5f758615c99f1ef9f8
2022-09-20 15:20:09 +00:00
Carter Hsu
d30b8191ec audio: enable USB clock boost on SWB voice-call
Bug: 245421488
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: Iddb6e4c94338afa8998791091e6bf4637d648ba1
2022-09-14 01:05:30 +00:00
juyuchen
d7a8fe331c audio: enable gapless offload for trimming data
Bug: 233723867
Test: manual audio tests
Signed-off-by: juyuchen <juyuchen@google.com>
Change-Id: Ia346acd9c53282098df25c31fa67bf4ef4e329b6
2022-09-01 15:06:21 +00:00
millerliang
5de969c27e audio: adjust the latency for immersive playback
To meet the av sync, we need to adjust the uc latency
for immersive playback.

Bug: 243645548
Test: Test with av sync video
Change-Id: Iac25dc58032dc9b070885c7c425d00b6d2c98c4c
2022-08-29 03:38:26 +00:00
millerliang
a85e8a9faf audio: adjust the latency for av sync result
Adjust the latency for BLE audio and others for av sync result.

Bug: 241898786
Test: Play AV sync video
Change-Id: I3ed43eac0b2e3a4d7ca9e8c8003654d3b0ba4e3a
2022-08-11 19:48:02 +08:00
Carter Hsu
26c0da4f2b audio: separate Fortemedia Stereo VoIP tuning
1. In case the Fortemedia CL conflict between tm-qpr
   and tm-d1, separate the Fortemedia tuning.
2. Enable stereo VoIP on speaker and usb path
3. Reserved 2(VoIP use case) in handsfree and headset mode
   changed to stereo processing.
4. FNS for NB/WB across all modes changed to fulfill CCA settings.

Bug: 237230890
Test: Verified at b/237230890#comment14
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I10303abdce6ef56414db0ce7b457efcd415bd786
2022-07-19 08:39:46 +08:00
Omer Osman
8ce25a8551 Add support for Opus as a BT A2DP Offload codec
Bug: 226441860
Test: Sink device using bds-dev
Change-Id: Ib7395300b01d137a5156be5bad5f311d55b03f59
2022-07-15 19:44:57 +00:00
millerliang
6834a1034c audio: apply new pcm id for immersive output
Change to use pcm id 30 for immersive output,
which is using raw path in AoC to get lower
roundtrip latency.

Bug: 237677573
Test: spatial audio playback
Change-Id: I6519f75daf2f65dc8f1e2a4a3827f8956f563c35
2022-07-15 02:07:24 +00:00
Jasmine Cha
9ed0780a88 audio: refactor BAACL
Bug: 236807658
Test: BAACL control test
      audio_waves_custom_actions_test
      audio_adapted_info_device_test
      audio_adapted_info_features_tests
      audio_adapted_info_features_device_tests

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I3dbbe745572b8db289db2256c7bf51e23027190e
2022-07-13 14:21:11 +00:00
Eric Laurent
f28274c131 audio: configuration for spatial audio
Update audio configuration to enable spatial audio:
- build with spatial audio feature enabled and rondo library
- list spatializer effect in audio effect configuration file
- update audio policy configuration files to declare spatializer output
- declare immersive end point in audio platform configuration

Bug: 237677573
Test: spatial audio playback
Change-Id: Ic9c32d813a19ba2789425e12ee9016d53ab30678
2022-07-12 07:58:36 +00:00
Carter Hsu
07f215f5db audio: Enable CCA HAL module
Bug: 206065000
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I78ce1fa4af4a566b2a0e54cef8945406fb6d4ad3
2022-06-23 06:29:22 +00:00
Robert Lee
c057b09ee7 audio: enable gapless offload flag
Enable gapless support on compressed_offload w/o trimming delay and padding.

Bug: 230305456
Test: test with AOSP Music and MediaMonkey
Change-Id: Ie1129a5323a2225c895cb3f1b332065bc5924075
Signed-off-by: Robert Lee <lerobert@google.com>
2022-06-13 06:49:45 +00:00
millerliang
3df55604f5 audio: adjust the latency for compress-offload
Compress-offload also needs to adjust the latency
to meet the av sync result.

Bug: 234104918
Test: Play AV sync video in YTMusic test apk
Change-Id: I45e4b2d2c477ae2eae14d7342e3a81c38ec61cb4
2022-06-09 03:00:40 +00:00
Jasmine Cha
d31bca5d0e audio: update c10 p10 RC tuning
For C10_LL_Pt_Ls_mix3500M_volCurve_allModes_Speaker_Safe_ONEAL_V2.mps:
- Non media, update the speaker-safe preset for
  Ringtone/Notification/Alarm stream
- sha1sum:  b813efb994561b71715c075c0d34ad8c1a009ade
  /vendor/etc/waves_preset.mps

For  P10_LL_Pt_Ls_mix2000_volCurve_allModes_Speaker_Safe_ONEAL.mps:
- Non media, update the speaker-safe preset for
  Ringtone/Notification/Alarm stream
- sha1sum: 32a42b5ad6f2c2b3b79b2a33d3f53329edf61047
  /vendor/etc/waves_preset.mps

For audio_policy_volumes_C10_Update.xml:
- Revision for low volume to be compatible with the speaker-safe
  preset mentioned above.
- Revision of full volume curve to be compatible with MIX3500M preset
  for below stream type DTMF, System Sound, Enforced Audible.
- sha1sum: 918ebfef1da80f8caca117cc1da00f0a7eade6c1
  /vendor/etc/audio_policy_volumes.xml

For audio_policy_volumes_P10_Update_V2.xml:
- Revision for low volume to be compatible with the speaker-safe
  preset mentioned above
- Revision of full volume curve to be compatible with MIX2000 preset for
  below stream type DTMF, System Sound, Enforced Audible
- sha1sum: 9333ef3a4359b6c5e5b29a3beb40c677f8961c5d
  /vendor/etc/audio_policy_volumes.xml

Bug: 234590302
Bug: 234464916
Test: manual test
      b/234464916#comment4
      b/234590302#comment8

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I9fcaa0ac6f50af7f0728eb5a686b9866317a49d8
2022-06-07 09:45:02 +08:00
millerliang
04cf0e2c32 audio: enable mmap playback and record on BT
AoC can support mmap on BT both playback and recording
after gpar/322484.

Bug: 232205959
Test: Play MMAP games and OboeTester
Change-Id: Id696b578f4a2e3f94d6193e714b6d9f1ace6977a
2022-05-31 08:06:16 +00:00
Jasmine Cha
2a027324f2 audio: improve mute duration.
- preview of notification will be cut off slightly becuase of mute
  duration in framework is 160ms (40*40)
- set mute duration of primary output from 160 ms to 40 ms.

Bug: 233176336
Test: preview notification/end call sound on voice/VoIP(Line)

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I7f5225372c265cb22e74311b0805d16b1c68fd3d
2022-05-24 08:39:17 +00:00
David Li
d0f673ce10 audio: add dynamics processing effect to audio_effects.xml
Bug: 215662726
Test: YTMusic with adaptive audio
Change-Id: I1346de62a2e1425250583d7bc1365ffa72353ee6
(cherry picked from commit 9e36616a4d)
2022-05-11 06:59:43 +00:00
Carter Hsu
a4d7b2d49d audio: allow mmap-record to set dsp volume
Bug: 231630423
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I311a292f3ab22c46417c9e62c0c5116c15368398
2022-05-11 03:00:58 +00:00
Carter Hsu
0fd0fc935b audio: adjust the digitial gain for speaker-mic
add mic gain on path "speaker-mic" from 0 to 22

Bug: 231909998
Test: mmap record
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I66de7c52c29ec3434a5cbed1799029fa5be05f71
2022-05-10 04:00:32 +00:00
Jasmine Cha
00a456a976 audio: update waves related settings
1. add throttle sensor info for waves module.
2. use default custom action for unsupported projects.

Bug: 230280648
Test: adb shell audio_waves_custom_actions_test

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I71aa59a43b11e7a57834e44da6793b2cfa7c76ed
2022-05-10 01:31:03 +00:00
Jasmine Cha
4eb6a4ed65 Revert "Revert "audio: enable thermal throttle""
This reverts commit e49bc9478a.

Reason for revert: to be merged with  ag/18185769

Change-Id: I746f0b2fc5094653a373835d0c2d048bcca54ae5
2022-05-09 06:15:44 +00:00
Jasmine Cha
e49bc9478a Revert "audio: enable thermal throttle"
This reverts commit 59354f550b.

Reason for revert: disable first

Change-Id: I3d74311bc66476e259018a1bc62cf0433ba5c165
2022-05-06 04:18:05 +00:00
Jasmine Cha
59354f550b audio: enable thermal throttle
Bug: 229819466
Test: build pass, voip hands-free mode
      atest --host acoustic_shock_test
      atest --host thermal_throttle_test
      atest --host libaudiohardwarefeatures_test

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I3d75e88a977ce5a2e2b08ef92894d9c5da7eb04c
2022-05-06 02:29:47 +00:00
Jasmine Cha
844477baf8 audio: rename spk module config am: 3a50fbbc53
Original change: https://googleplex-android-review.googlesource.com/c/device/google/pantah/+/17856403

Change-Id: Ie07acb2eb11d7f43d05064c10a9394ef496b3fb3
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 05:11:26 +00:00
Jasmine Cha
3a50fbbc53 audio: rename spk module config
Bug: 204271052
Test: voip + speaker mode

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I6aa0da65a1b1faa8be26ae8eb77a01b14d277666
2022-04-25 04:50:48 +00:00
Robert Lee
80e905ded6 audio: update fast switch config for speaker amp
fast_swtich1.txt => Enable FIR of top amp
fast_swtich2.txt => Enable FIR of bot amp
fast_switch3.txt => Disable FIR of top amp
fast_switch4.txt => Disable FIR of bot amp

Bug: 214487028
Test: Build pass
Change-Id: Id7c9eae52d9e59250cbc7e79705d86d0268a7a79
Signed-off-by: Robert Lee <lerobert@google.com>
2022-04-08 10:22:30 +00:00
Rios Kao
9b7f753e57 audio: add immersive playback support
Bug: 227697054
Test: build pass and pts-audio
Change-Id: Iccb1953def4a9dffaf7b9e3dd512c68ae8a37c1e
2022-04-07 02:42:39 +00:00
Rios Kao
7c61e4166e audio: sync mixer table for Eraser capture
Bug: 227697054
Test: build pass and pts-audio.
Change-Id: Id0384c7af546dec1a6237e3091a366a85d097d26
2022-04-07 02:42:39 +00:00
David Li
12775d11ed Revert "audio: add dynamics processing effect to audio_effects.xml"
This reverts commit 9e36616a4d.

Reason for revert: disable offload DPE

Change-Id: Iecd1079a625094b322f672846c4cd1517c853827
2022-04-01 05:17:58 +00:00
Yung Ti Su
98696e6eec add BLE Headset Mic
Test: manual

Signed-off-by: Yung Ti Su <andysu@google.com>
Change-Id: Ic796722d5186b2bb354315862892c5640252bf67
2022-03-30 14:14:24 +00:00
David Li
9e36616a4d audio: add dynamics processing effect to audio_effects.xml
Bug: 215662726
Test: n/a
Change-Id: I1346de62a2e1425250583d7bc1365ffa72353ee6
2022-03-29 01:48:50 +00:00
Yung Ti Su
3ff3a57ebb Seperate audio_policy_configuration for a2dp and le
If ro.bluetooth.a2dp_offload.supported == true AND persist.bluetooth.a2dp_offload.disabled == true
use audio_policy_configuration_a2dp_offload_disabled.xml (a2dp X LE X)

If ro.bluetooth.a2dp_offload.supported == true AND persist.bluetooth.a2dp_offload.disabled == false AND
(ro.bluetooth.leaudio_offload.supported == false OR persist.bluetooth.leaudio_offload.disabled == true)
use audio_policy_configuration_le_offload_disabled.xml (a2dp O LE X)

If ro.bluetooth.a2dp_offload.supported == true AND persist.bluetooth.a2dp_offload.disabled == false AND
ro.bluetooth.leaudio_offload.supported == true AND persist.bluetooth.leaudio_offload.disabled == false
use default audio_policy_configuration.xml (a2dp O LE O)

Note:
The above settings are based on ro.bluetooth.a2dp_offload.supported == true condition
If ro.bluetooth.a2dp_offload.supported == false, the content of the default audio_policy_configuration.xml
file must be replaced by audio_policy_configuration_a2dp_offload_disabled.xml on the target

Test: manual

Signed-off-by: Yung Ti Su <andysu@google.com>
Change-Id: I4a9bd45c1341100217ab32fd81f7421af00e059d
2022-03-18 19:06:27 +08:00
millerliang
a4f879a3d4 audio: change format of mmap-playback to float
Bug: 201398105
Test: OboeTester
Test: atest CtsNativeMediaAAudioTestCases
Signed-off-by: millerliang <millerliang@google.com>
Change-Id: I57965faeb93f6e07f10ba8ab63d66298149bd556
2022-03-07 02:59:26 +00:00
Carter Hsu
7585c7545a Revert^2 "audio: Update voice tuning 20220224"
fd3cebfa22

Change-Id: I161570a9f52f7586ab674c675b5fdaaad5457741
2022-03-02 13:09:51 +00:00
Carter Hsu
94c8478ae8 Revert^2 "audio: voip downlink to stereo"
a692a92f6f

Change-Id: I312d657be88e5fe4f4c52f649b0e84c3858a0916
2022-03-02 13:09:51 +00:00
Carter Hsu
a692a92f6f Revert "audio: voip downlink to stereo"
Revert submission 16996078-voip_speaker_separation-master-table-tm-dev

Reason for revert: <AoC is reverted by b/222138584>
Reverted Changes:
I85c654319:audio: voip downlink to stereo
Iac83ae74c:audio: iS900 table release of Fortemedia

Change-Id: Ib741e38913ab39af916f3dbb60bd08159c0d6cf2
2022-03-02 12:00:42 +00:00
Carter Hsu
fd3cebfa22 Revert "audio: Update voice tuning 20220224"
This reverts commit cbb9f05e5a.

Reason for revert: <AoC is reverted by b/222138584>

Change-Id: I4125a61c1142e0c6733f121b227d9ec652191a4b
2022-03-02 12:00:42 +00:00
Carter Hsu
cbb9f05e5a audio: Update voice tuning 20220224
FM table Changelist:
1. P10/C10 Based on iS900 : HA / HH / HE tuning setting for EVT1.1

Mixer changelist:
1. P10/C10 Change PCM Gain for Handset mode

Bug: 216258666
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I5bfd1334f949540b2c87ea5b3aaed4c47eb6fb93
2022-03-02 02:04:31 +00:00
Carter Hsu
b06bb3278f audio: voip downlink to stereo
Bug: 208951314
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I85c654319998e31bb846830f9878b9385ef30091
2022-03-01 06:31:49 +00:00
Tai Kuo
e6f34d946a haptics: enable hapitcs sink and slot setting
Bug: 199578214
Test: trigger audio coupled haptics via sound picker app
Change-Id: I2c20f75d5df59e5d72800878c76c5ad3c1709079
2022-02-16 17:39:13 +00:00
Jasmine Cha
b88ab088d6 audio: enable dual spk control in voice/VOIP
Bug: 204271052
Test: voip with speaker mode
      atest dual_speakers_test

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I3bb59bf5444a537230c1dc3a4f74bd68ec209f4e
2022-02-14 06:17:53 +00:00
juyuchen
071cd6b172 audio: Switch 96K to 48K TDM speaker playback
Bug: 215442102
Test: manual audio tests.
Signed-off-by: juyuchen <juyuchen@google.com>
Change-Id: I59db8d6735872722b7878b854e2260289c160ba2
2022-01-28 20:10:49 +00:00
Carter Hsu
d95f875407 audio: enable decoded offload
Bug: 213020870
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I12144bdff8af2aa878f438a97a2d495c5c3d0765
2022-01-22 05:48:09 +00:00
Carter Hsu
d3bed20146 Revert "Revert "Revert "Revert "audio: enable SA lite/full module""""
This reverts commit b68bbcddda.

Reason for revert: <AoC with SA module merged>

Change-Id: Ic9ba6814c6c6e058198eab71eeb35ff267e7f599
2022-01-22 04:32:50 +00:00
Carter Hsu
b68bbcddda Revert "Revert "Revert "audio: enable SA lite/full module"""
This reverts commit c3e70c164b.

Reason for revert: <AoC is reverted in b/214259243>

Change-Id: I0e6dcd259cdb3efe7ec870bf7934da38675edb23
2022-01-14 11:45:12 +00:00
Carter Hsu
74d7fb110e audio: enable telephony input and output
Bug: 213020870
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I9c56aa6905645f89b0aa5fe320ac57c2b06f45f1
2022-01-13 02:48:30 +00:00
Carter Hsu
c3e70c164b Revert "Revert "audio: enable SA lite/full module""
This reverts commit 1fa392b4b2.

Reason for revert: <AoC enables the SA module>

Change-Id: I4aaf967432b0254e3369608fa5a95cb2bd87079b
2022-01-12 09:23:09 +00:00
Carter Hsu
1fa392b4b2 Revert "audio: enable SA lite/full module"
This reverts commit d5d0e9f343.

Reason for revert: <AOC FW that supports Spatial audio capture has been reverted>

Change-Id: I18286694da289215193c3e39ad71ea4a50392a69
2022-01-06 03:42:31 +00:00
Carter Hsu
be8aaf02d4 audio: change primary output to float
Bug: 200293124
Test: build pass
Change-Id: I356376d8090da006b915e8cce9a71759ebb459e6
Signed-off-by: Carter Hsu <carterhsu@google.com>
2022-01-05 11:19:05 +00:00