Commit graph

61 commits

Author SHA1 Message Date
millerliang
6ef0262388 audio: add missed camcorder be_cfg in dsp latency
Some 3rd party app may use one or three microhpne(s)
to do the camera recording.
Add these two configurations to UC_AUDIO_RECORD to sync
the audio and video of the recoreded video.

Bug: 260824124
Test: Reporter verified
Change-Id: Ide731ef55457a4aee47a1cbfd7badd2ba31704dc
2022-12-05 16:20:59 +08:00
vincenttew
7570035fe7 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: I3f422169a8bccbeece0c97b3ba515d99f7dab2e2
2022-09-20 15:20:09 +00:00
Omer Osman
49a124f8cd Add support for Opus as a BT A2DP offload codec
Bug: 226441860
Test: Sink device using bds-dev
Change-Id: Ia371622514fa7e9145d41311f39bb422fbe17a36
2022-07-15 19:44:57 +00:00
Carter Hsu
146e6d5806 audio: update Fortemedia VoIP condition to reserve2
Bug: 226869868
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: Ia71851c7a66d3d180daa956d844cc4bde7ba056b
2022-05-13 09:04:41 +00:00
Carter Hsu
b68c7cf0b7 audio: add Fortemedia mcps file
Bug: 213020870
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I3699bbbf4e220fce806ac1d61b329b51c65002ae
2022-01-26 06:26:09 +00:00
Jasmine Cha
6c0b1b1034 audio: waves: add test file for unit test am: e303cad342 am: 0586179b4d
Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/16123776

Change-Id: Ia1c421c8bda6e6a87d0dd70419cdd0c2660516ba
2021-11-02 06:40:07 +00:00
Jasmine Cha
e303cad342 audio: waves: add test file for unit test
Bug: 204272480
Test: atest audio_waves_halcontroller_tests

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I7aa5205c7443692c95b96ac6537d404e0e15d165
2021-11-02 06:18:13 +00:00
Jasmine Cha
278a538154 audio: waves: support custom action identification am: 25c8af397b am: 64a5691078
Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/16047102

Change-Id: I6be94c25d43a6949265b9f1cfc53790e093ce8d5
2021-10-14 11:51:21 +00:00
Jasmine Cha
0bc1dc0ae1 audio: waves: support custom action identification
Bug: 203029117
Test: build pass, LR mixed

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: Ib1e95efb8ea94bd187be7b681b6a94d53e0c5ce1
2021-10-14 06:56:03 +00:00
millerliang
0b02260f22 audio: changet the period size of VoIP Record am: 47a8acc5f1 am: 87179e112b am: 24dc47bdc3 am: a292e519a1
Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/15824293

Change-Id: Icaaf7beb2f7c9a9f4061573cc3dba7b37658f53b
2021-09-24 08:01:21 +00:00
millerliang
823c84320c audio: changet the period size of VoIP Record am: 47a8acc5f1 am: 87179e112b
Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/15824293

Change-Id: Ic17bc449305c97ad73b14975365c81e27b069e94
2021-09-24 07:35:43 +00:00
millerliang
5fb9498c64 audio: changet the period size of VoIP Record am: 47a8acc5f1
Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/15824293

Change-Id: I9051aef768a94eb34b32770dafe38ed25046007d
2021-09-24 07:14:38 +00:00
millerliang
a8c236c35c audio: changet the period size of VoIP Record
Change the period size of VoIP Record to 20ms.
Otherwise it will apply fast capture.
Fast capture timestamps are not supported yet.

Bug: 196912510
Test: Build pass
Change-Id: I6434a7596880712efa7cbfa03b3480efb5e2c2aa
2021-09-24 10:41:15 +08:00
Roger Fang
a7c875330f audio_usb: Enable ASRC in USB voice call path am: 18b3ec8f86 am: 32670f1046 am: 4859b70b8f
Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/15782861

Change-Id: I732dbc5a8e87285f46bed94faecc11f7ef3a63f1
2021-09-09 06:04:43 +00:00
Roger Fang
be2bde46ba audio_usb: Enable ASRC in USB voice call path
Telephony downlink ASRC should be enabled for USB. See b/173577733.
Otherwise the downlink ring buffer will underflow or overflow

Bug: 199230403
Test: Local build + Telephony test for five minutes: No glitch observed.
Signed-off-by: Roger Fang <rogerfang@google.com>
Change-Id: Ifbcd9252c97a7f794e0b142e69faf1b0f3041098
2021-09-08 15:06:00 +08:00
Sasha Smundak
a5fd2bfbd0 Replace foreach loops with the calls to copy-files
Bug: 190051051
Test: treehugger
Change-Id: I7e48ce741f6c9d0997f024e567daeec926fecb11
2021-09-02 07:24:01 +00:00
Roger Fang
cfaa3174c3 audio: Add command to set PCM steam wait time for voice and audio.
This control is from this patch: https://partner-android-review.googlesource.com/c/kernel/private/google-modules/aoc/+/1962616/

Bug: 194454077
Test: Playing a music then removing the USB headset
Change-Id: Ie9dbf9df13ffaee80c61e2d5da529878fde0b740
Signed-off-by: Roger Fang <rogerfang@google.com>
2021-08-06 17:14:07 +00:00
millerliang
f4cd1362d0 audio: adjust the latency for bluetooth output
HAL can get the device latency from bluetooth headset.
We just to set the latency of the device side.

Bug: 195166550
Test: av sync
Change-Id: Id64b7ea796ddc4de996817d0553f1855b4d9485a
2021-08-06 06:30:03 +00:00
Robert Lee
755a0887fa audio: add Built-In Back Mic device
Bug: 194169487
Test: Test Diagnostic Tools microphone test

Signed-off-by: Robert Lee <lerobert@google.com>
Change-Id: Ice468e91591f5e552e733d187ade86e76896c5b5
2021-07-30 05:26:47 +00:00
millerliang
225b713e1e audio: refine the period size for raw playback
For raw playback, the buffer size needs to equal to the
ring buffer size. AoC changes the buffer size to 16384 bytes,
but it cannot be divisible by 48(1ms frames with 48000 sample rate).
Use the period size(frame couts) from configuration file.

Bug: 194398677
Test: OboeTester->TEST OUTPUT
Change-Id: I07f0cb7d5904e4e3ef78b9a15d31590fdd5a9087
2021-07-29 16:10:07 +00:00
Joey Poomarin Phloyphisut
96b58c1c6f audio_usb: Updating mixer_paths.xml to use V2 command to send config to AoC to support USB behind HUB.
This V2 command is from this patch:
https://partner-android-review.googlesource.com/c/kernel/private/google-modules/aoc/+/1962494

Bug: 181296179
Test: Local build
Change-Id: Ia95886ed22519f4da70e2a4880f7fb0eb9900660
2021-07-19 11:33:51 +00:00
Joey Poomarin Phloyphisut
895e3d3808 audio_usb: Add unsupported pcm format for USB accessory on Raviole.
This patch need ag/15270810 to work.

Test: N/A
Bug: 193477495
Change-Id: Ied9317fed60f1fae5a0de76ed12aec723c20a0c2
2021-07-19 07:33:28 +00:00
millerliang
eff4e0db3d audio: adjust the latency for USB Headphone
Adjust the latency for OUT_USB_HEADSET_BE_CFG

Bug: 174992590
Test: Test av sync for video playback
Change-Id: Idc1dedbbc21290106d417905832810b1ebd1c576
2021-07-14 21:27:00 +08:00
millerliang
d2db8a5541 audio: apply RAW path for raw playback
Apply the entry point of raw path which writes data through
pcm mmap from user space to DRAM ring buffer.

Bug: 190775545
Test: OboeTester
Change-Id: I3f61126f323fcebc0a2b53c06d564b9e9e64f823
2021-07-12 13:22:54 +00:00
Joey Poomarin Phloyphisut
6def5fe520 USB Audio: Add USB HiFi routing
Let USB HiFi BE as a standalone bind/src command to AoC.
And fix that USB HiFi Rx no audio after the other touch
sound's UC and BE is closed.

On top of the change of pa/1959717
(pa/Ib82ff06986ebe97d472f4518aa136f32da30da66)

Test: Local test
Bug: 191222376
Change-Id: I1017aab232bd2e929dc4caa9939f0613ba937f86
2021-07-12 10:10:40 +00:00
millerliang
0d481528c0 audio: adjust the latency for output and input
Change the period size to 20 for audio record.
Otherwise it will apply fast capture.
Fast capture timestamps are not supported yet.

Bug: 190453606
Bug: 189793417
Test: Test av sync for camera recording
Test: Test av sync for video playback
Change-Id: Ic7225979a411f6fdef1e5869df7f816bd49003b1
2021-06-25 13:44:27 +00:00
YB Chiu
8ae9e16235 FBF:mixer_table: mic soft gain config for O6/R4/W3/Slider
Add mic1 ~ mic4 soft gain configuration

    <path name="mic1-sw-gain">
        <ctl name="MIC Record Soft Gain (dB)" />
    </path>
            :
            :
    <path name="mic4-sw-gain">
        <ctl name="MIC Record Soft Gain (dB)" />
    </path>

Bug: 190822301

Test: build pass

Change-Id: Ia5f35fff6cea22d6dfafa8c76e50d3e16cacbbcf
2021-06-22 08:29:42 +00:00
David Li
00eb5c2a60 audio: add dynamics_processing to audio_effects.xml
Bug: 187144478
Test: run cts --include-filter "CtsMediaTestCases android.media.cts.DynamicsProcessingTest"
Change-Id: Id3ca6f6ef76a00a94d72150bcf3c4873478626ea
2021-06-16 01:56:43 +00:00
Carter Hsu
221629670f audio: fix xml tag name
Bug: 188606492
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I6fbc2e17bc11c19b224e472b868627ee9d110369
2021-06-10 06:22:22 +00:00
David Li
8132cc2f27 audio: upgrade audio.usb.default from v1 to v2
Bug: 187912470
Test: make -j128
Test: deep buffer and compress offload via speaker, USB headset, BT
earphone
Test: phone call via handset
Test: hotword detection

Change-Id: I80ec553797ff7955de0464b98046f879424d0fc5
2021-06-08 06:14:43 +00:00
Joey Poomarin
6facc05f47 USB Audio: Enable HIFI on the audio HAL part on Raviole.
Kernel Change: pa/1887451

Test: N/A
Bug: 182996456
Change-Id: Ia62f8a0b8b0c57270a3c8ed82cb64a79fbcbfe79
2021-06-04 10:52:21 +00:00
Yu-Bin Chiu
18a9190963 [MFG_API] [audio] USB headset loopback functions don't work on ROM SD1A.210602.005
Need to add a new control "USB Config To AoC" in mixer table

Bug: 190002718

Test: verify it with a new mixer table, and it works on O6
Change-Id: Ibcb43d50d0185d8b5249aa2a5620c69871b97de5
2021-06-03 08:42:02 +00:00
Joey Poomarin Phloyphisut
3375ea9045 USB Audio: Enable HIFI Playback on the audio HAL part on Raviole.
Test: Test: local build test. If use highspeed usb + capture. AOC crash. otherwise, everything is normal
Bug: 182996456
Change-Id: I48958acf8dfc77fa90096fc72cd6912c460e1db2
2021-05-24 08:53:27 +00:00
Carter Hsu
4101e82133 audio: separate the spatial audio and WNR block
Bug: 186801118
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I38be2bfd58e864e7f17bc58109d5b4a77df5704b
2021-05-12 01:09:43 +00:00
Carter Hsu
7870ae25e9 audio: update camcorder tuning for refactor
tuning 2021/05/11

Bug: 186801118
Bug: 181869495
Bug: 186721091
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I97da52d76a69606243ca516057a9c09bb337d259
2021-05-12 01:09:43 +00:00
Jasmine Cha
b794f75763 audio: waves: support handset device
Bug: 165776638
Test: VOIP / voice/ playback/ record

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I2133cedac1cf718e3632df5f292a2688fc009428
2021-05-11 11:37:39 +00:00
millerliang
cdeb65a6c2 audio: remove bt path for raw and mmap playback
In AOC, ULL support requires the sink to be ULL
Speaker, Analog HP and USB are ULL Sinks,
Modem and BT are LL

Bug: 165737390
Test: OboeTester --> TEST OUTPUT
Change-Id: I23da02a52586e2f5d017142b5947dd082cdc2c62
2021-05-10 22:11:38 +08:00
millerliang
9c06c83aa3 audio: add to support low-latency-record(fast intput)
AudioRecord not support PCM_FLOAT on FAST path yet.(b/77913243)
Use 16-bit format for low-latency-record.

Bug: 175673727
Test: OboeTester
Change-Id: I450d161cd1b236717ad01287b95f56a284443040
2021-05-07 16:58:11 +08:00
millerliang
80c7d2ef11 audio: add to support mmap record
Add to support mmap-record

Bug: 175673727
Test: OboeTester
Change-Id: Ib3dc9b5df969e972b6a1155a216eeb4e5e353b3f
Signed-off-by: millerliang <millerliang@google.com>
2021-05-06 13:59:32 +00:00
David Li
a10a9d85f2 audio: replace audio_pre_process with offload_effect and remove audio_pre_process
Move AEC and NS to the liboffloadeffect

Bug: 187153996
Test: make -j128
Test: run cts --include-filter "CtsMediaTestCases android.media.cts.AudioPreProcessingTest"
Change-Id: Ic4b7260b483b776ca917dc3694b7d66ba7eefde7
2021-05-06 02:28:43 +00:00
Yung Ti Su
5ed1fe327d audio: add bt-mic for audio capture
slider / whitefin

Bug: 185209822
Test: build pass

Signed-off-by: Yung Ti Su <andysu@google.com>
Change-Id: Id8da30e39773e625d4e77890452f1c6489755452
2021-05-05 04:10:29 +00:00
Robert Lee
4460dac76b audio: bypass aoc post processing on speaker for factory audio test
For Cirrus amp, ASP means Audio Serial Port.
For AoC, ASP means Audio Signal Processing.

Bug: 184238845
Test: manual test factory test command
Change-Id: I8d62535056ef680e14ccc708c8f722a3dfab12ab
Signed-off-by: Robert Lee <lerobert@google.com>
2021-04-29 09:18:46 +00:00
Roger Fang
29c600ea29 device: google: load audio_ext module to support audio suez
Bug: 171854614
Test: manually test passed
Signed-off-by: Roger Fang <rogerfang@google.com>
Change-Id: Ib3cb34d045d80ba69f930dab0d9277c72208ae97
2021-04-28 03:10:20 +00:00
juyuchen
47166c6085 audio: update audio platform table
Increase period size to avoid using Fastmixer in the deep buffer
playback.

Bug: 185096280
Test: manual audio tests
Signed-off-by: juyuchen <juyuchen@google.com>
Change-Id: I8ce12f151eaa9b711e1dacaf12e2f70c0555bf30
2021-04-27 11:15:12 +00:00
HW Lee
eab909573b audio: remove unsupported TinyALSA controls
Bug: 185443616
Test: build pass
Signed-off-by: HW Lee <hwlee@google.com>
Change-Id: I84abb4a1d59ff8344d7fc308be7f82c21b591b00
2021-04-22 01:31:14 +00:00
Jasmine Cha
2a6d256369 audio: switch Audio HAL to V7
- update audio_policy_configuration tables by those instructions.
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/oriole/config/audio_policy_configuration.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/oriole/config/audio_policy_configuration_bluetooth_legacy_hal.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml 6.0

./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/raven/config/audio_policy_configuration.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/raven/config/audio_policy_configuration_bluetooth_legacy_hal.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml 6.0

./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/whitefin/config/audio_policy_configuration.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/whitefin/config/audio_policy_configuration_bluetooth_legacy_hal.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/whitefin/config/audio_policy_configuration_a2dp_offload_disabled.xml 6.0

./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/slider/config/audio_policy_configuration.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/slider/config/audio_policy_configuration_bluetooth_legacy_hal.xml 6.0
./hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh device/google/raviole/audio/slider/config/audio_policy_configuration_a2dp_offload_disabled.xml 6.0

bug:180878031
Test: atest VtsHalAudioV6_0TargetTest
      atest VtsHalAudioV7_0TargetTest
      atest VtsHalAudioEffectV6_0TargetTest
      atest VtsHalAudioEffectV7_0TargetTest
      atest VtsHalAudioPolicyV1_0TargetTest
      manual audio test - playback/record/voice call

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I003875ed041feeedbb7d16f517063cec164382be
2021-04-14 16:35:01 +08:00
David Li
e9fbea2a99 audio: initialize mixer_control Incall Sink Mute and Incall Mic Mute
Bug: 177914228
Bug: 165750425
Bug: 180983997
Bug: 180984364
Test: call screen mode 2, mute microphone in voice call
Change-Id: I7535e6d2c9f739a0e2c7f867f4ca54430d587da0
2021-04-13 01:43:38 +00:00
Carter Hsu
3755b08b67 audio: add VoIP RX/TX
Bug: 165755752
Test: Build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I1393c55447b50dbff8ad590e48b9046a7f4ecc7d
2021-03-30 00:44:05 +00:00
Jasmine Cha
56f0aac772 audio: waves: support 64-bit algfx lib
Bug: 183174341
Test: manual audio test / playback

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I03337ac977836a04c5996f2833f42fbbeb0f2b42
2021-03-29 08:56:18 +00:00
justinweng
cd5aaf7fdf add AAC to A2DP offload support format
Bug: 168584138
Test: builds pass

Signed-off-by: justinweng <justinweng@google.com>
Change-Id: I59768fc12d759ceb2ab9569c57417a9b0f6c7026
2021-03-25 10:57:48 +00:00