Commit Graph

191 Commits

Author SHA1 Message Date
Evenly Wang
ea3900fdd3 Audio HAL: To add initial value for kctrls
note: Add initial value for kctrls to avoid unexpected events during hal restart

Test: Test by pts/audio and result is pass

Bug: 222601717

Change-Id: I35a086bbc7c31082e0c44d9cdd5b75ac4a2bf0cc
2022-03-10 09:35:17 +00:00
Evenly Wang
e739f5949b Merge "Audio HAL: remove unused kctls from mixer paths files" 2022-01-25 01:23:51 +00:00
Evenly Wang
8299fcb0b5 Merge "Clean up platform_info error log" 2022-01-25 01:23:51 +00:00
Evenly Wang
39903bbf43 Audio HAL: remove unused kctls from mixer paths files
note: remove unused kctls from mixer_paths_bolero_snd.xml and sound_trigger_mixer_paths.xml to avoid error messages showed during initialization

Bug: 184149926

Test: push xml files and reboot to see if the sound card bring up successfully or not(10 times)
Change-Id: I6bd52456a6d7ecda27025a527ff6a687ec990824
2021-12-14 09:53:56 +00:00
EvenlyWang
de319fc2f4 Clean up platform_info error log
note: remove unused kctls from audio_platform_info.xml and fix error that platform_get_snd_device_index will be out of range to avoid error messages showed during initialization

Bug: 184822984

Test: reboot to see if the sound card bring up successfully or not(10 times)
Change-Id: Ic80e9fed1e8fe6f0be867bb81be9028f301c0f71
2021-12-13 05:59:44 +00:00
yixuanjiang
53acf6b56a audio: fix the wrong format on hotword input
Bug: 186705251
Test: "atest VtsHalAudioV7_0TargetTest" pass
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
Change-Id: I2f2fdc1a693b09da241efde5a3824ea36cae5a2b
2021-05-04 12:37:09 +08:00
Wayne Lo
4d4f1a455c Merge "Update mixer path to support to parse array of integer type" into sc-dev 2021-04-26 02:02:34 +00:00
llololo
13e4126f3f Update mixer path to support to parse array of integer type
Add id attribute into the control ADCx Capture Volume.

Bug: 185443843
Test: Audio function simple tests.
Change-Id: If64a7fe36bfd0c23d3aa22b5750d32adcca3fdd6
2021-04-22 07:36:04 +00:00
yixuanjiang
98bd77c04c audio: Add hotword port for zero latency feature
Bug: 184006297
Test: local test
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
Change-Id: I05fe6e7b8df12dbe4145d168374a8efd2aced753
2021-04-15 20:03:43 +08:00
Vincent Tew
723fe1f7d4 Merge "audio: update speaker firmware and tuning." into rvc-qpr-dev am: 1dc727a4b8 am: f300bd48dd
Original change: https://googleplex-android-review.googlesource.com/c/device/google/redfin/+/13693469

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If7a8f23ca20fbb5a912ffb468f90e7f52201d169
2021-03-05 07:49:48 +00:00
juyuchen
cf2ac10bb9 audio: update speaker firmware and tuning.
Bug: 174637337
Test: manual audio tests

Signed-off-by: juyuchen <juyuchen@google.com>
Change-Id: I65ad4a6e15053fc20d0f6786827a3c5fdec3b447
2021-02-25 06:34:41 +00:00
Mikhail Naganov
914f74be2a Switch audio HAL to V7
Updated audio policy manager configuration files to comply
with the changes in the XML schema. This was done automatically
by running the following commands:

  hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh \
    device/google/redfin/audio/audio_policy_configuration.xml 6.0

  hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh \
    device/google/redfin/audio/audio_policy_configuration_a2dp_offload_disabled.xml 6.0

  hardware/interfaces/audio/7.0/config/update_audio_policy_config.sh \
    device/google/redfin/audio/audio_policy_configuration_bluetooth_legacy_hal.xml 6.0

Note: since bluetooth_hearing_aid_audio_policy_configuration.xml is
shared across all redbull-based devices, this file had to be
temporarily copied to device/google/redfin/audio before upgrading.

Bug: 142480271
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioEffectV7_0TargetTest
Change-Id: I1bd864019c417e6118a90dc1f45d97ae4e6c5d6e
2021-02-16 14:50:19 -08:00
Eric Laurent
2b3a59900b Merge "audio policy: add offload gapless support flag" 2021-01-18 09:31:35 +00:00
llololo
2b8d7b1da7 audio: update mixer paths table am: 2c6c597acf am: f4620110a4
Original change: https://googleplex-android-review.googlesource.com/c/device/google/redfin/+/13273435

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7739bb66eb8040eb6a4d409a35487cf822b16ab1
2021-01-13 07:15:05 +00:00
llololo
2c6c597acf audio: update mixer paths table
Mixer Path:
Move the speaker-mic path to behind the speaker-dmic-endfire path.

Bug: 176338594
Test: Enable the live transcribe. Check the path switches to speaker-mic in logcat. The function live transcribe works.
Change-Id: Iffeed13a7557d6d0011a80583fd063ceee03c894
2021-01-11 02:17:14 +00:00
Eric Laurent
44d0978d30 audio policy: add offload gapless support flag
Add flag AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD to explicitely indicate support
for gapless transitions for offload output profiles in audio policy
configuration file.

Bug: 158191844
Test: atest AudioTrackOffloadTest
Change-Id: I711f5677075e8a0f33c951656c8a019255e2f41c
2021-01-08 15:47:49 +01:00
llololo
9e1b8792e5 Remove A2DP input module in audio policy configuration
No Pixel device support A2DP sink functionality.

Bug: 163050296
Test: A2DP related test.
Change-Id: I6ee0e4a1713d631c38c3768d1821dc13edef3729
2020-12-25 07:56:50 +00:00
yixuanjiang
676efa537e audio: separate dapm control on barge-in case
barge-in path will turns off unexpectedly by other
record usecase. Use different dapm control to prevent it.

Bug: 170364233
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
Change-Id: I87dcc0173de4c2d43408fddd91db7c9015b9e493
2020-10-27 06:25:44 +00:00
yixuanjiang
13d4ce7588 audio: separate dapm control on barge-in case
barge-in path will turns off unexpectedly by other
record usecase. Use different dapm control to prevent it.

Bug: 170364233
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
Change-Id: I87dcc0173de4c2d43408fddd91db7c9015b9e493
2020-10-23 09:05:02 +00:00
juyuchen
a2fa1c0b2f audio: update the threshold for vpbr on speaker amps.
Bug: 163298967
Test: manual audio tests
Change-Id: Ica2266d02913a37eb130add0ca1e7e231c399459
Signed-off-by: juyuchen <juyuchen@google.com>
2020-09-02 04:07:04 +00:00
Jason Hsu
8ad4040ef2 audio: Update ACDB table
Changelist:
1. HANB/WB Fine tune for carrier requirement
     FM: FDEQ @max-2 vol
2. HAWB Fine tune
    FM: FDEQ @ nom vol
    VOL: nom vol.
3. Update AGC tuning parameters in use case ID 61~66

Bug: 165875970
Test: Verified by H/W

Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: Ifaf96ce2b87a21e3f5b64a37dec952c0d548732d
2020-08-21 10:43:07 +08:00
Jason Hsu
fce21e75a9 audio: Update ACDB table
changelist:

Handset NB / Handset WB
> improve subjective listening max-1 / max-2 / nom /  min volume step

Bug: 161327071
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I69f810c2d10fda905260697fadff18fd7ffd4649
2020-08-06 16:57:19 +08:00
TreeHugger Robot
a985529409 Merge "audio: Update audio tables" into rvc-d1-dev 2020-08-05 04:26:29 +00:00
juyuchen
f7e11f68d0 audio: update cs35l41 protection bin files to reduce the pilot tone length.
Bug: 162262288
Test: manual audio tests.

Signed-off-by: juyuchen <juyuchen@google.com>
Change-Id: Icb9aeb0db228a794b9e9a1ff098254df025f1e56
2020-08-05 01:44:01 +00:00
Jason Hsu
b9f1dc138f audio: Update audio tables
Change list is as below:
acdb
1. Speaker NB: VOL
2. Speaker WB: VOL
3. Speaker SWB: VOL
audio_policy_volume
1. Speaker volume curve

Bug: 162713453
Test: Verified by H/W

Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: Ia937389a3fd63d37291cd25c6ce40e17584275ff
2020-08-04 16:49:23 +08:00
Jason Hsu
692b8e6c31 audio: update ACDB table
Change list is as below:
 - Update the SURREC / MicGain / IIR / AGC / MBDRC in CAMCORDER use case ID 61~66

Bug: 162490183
Test: Verified by H/W

Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I3f75d3edb5ee5d1e1bb8b558348e902670c17ae7
2020-07-30 21:04:03 +08:00
Jason Hsu
8dead84b87 audio: update ACDB table
Change list is as below:
1. acdb id [55/56] NB/WB/SWB TX parameters

Bug: 161513832
Test: Verified by H/W

Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I0fcfe5bca3e5f546fd216ea4833d0a3bd021b772
2020-07-17 16:51:10 +08:00
Jason Hsu
e6390c19de audio: update ACDB table
Change list is as below:
1. HAFB  SFR fine tune
2. De-vibration tuning on concurrency (playback + call volume)
3. Verizon Handset adjustment
      HANB RFR (CDMA only)
      HHNB SFR (CDMA only)
4.  Camcorder parameters updates
     - Update the SURREC parameters in camcorder use case 61~63
     - Update the IIR parameters in camcorder use case 61~63
     - Update the MBDRC parameters in camcorder use case 61~66

Bug: 161427466
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I9b762491cf7aa9efee3df6a4ba3cea316003ded3
2020-07-17 02:45:55 +08:00
Jason Hsu
d00d7bbf51 audio: update acdb table
- Disable WNR module in GENERAL_RECORDING APPTYPE for ACDB ID 61~66

Bug: 160764892
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I11d1c655b097de1042561fbcabcb370e758337eb
2020-07-08 19:19:17 +08:00
millerliang
1e84ccdc30 audio: add delay settings for playback and capture
AudioTrack/AudioRecord timestamps are off by 30ms
when tested with the Clarity app

Bug: 158430162
Test: Manual test with Clarity apk
Signed-off-by: millerliang <millerliang@google.com>
Change-Id: I5ce5027badcf4de9f5047936a3575baef421d26c
2020-07-06 16:33:34 +08:00
juyuchen
6fa426c3b7 audio: update cs35l41 speaker bin files
Changes are
 - PICL enabled.
 - Correct values entered so that this will operate as a default calibration file for service centers

Bug: 153562615
Test: manual audio tests

Signed-off-by: juyuchen <juyuchen@google.com>
Change-Id: I299a311ef22dde2909b83442d708cc29a62f235a
2020-07-03 13:35:30 +08:00
TreeHugger Robot
7c720acf0f Merge "audio: update mixer paths table" into rvc-d1-dev 2020-07-02 15:39:52 +00:00
Jason Hsu
b6381ebe00 audio: update mixer paths table
Mixer Path:
Added the VP Brownout feature config

ACDB:
1. HESWB: SFR adjustment
2. acdb id 7 compress offload: apply de-vib tuning
3. HHWB/SWB: Rx distortion fine tune
4. HASWB: SFR adjustment
5. HEWB SFR adjustment
6. Adjust HASWB BVE boosting gain

Bug: 145244105
Bug: 160379276
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I839bd4c08c2c2482b3391ab5e03a4c7424db5080
2020-07-02 14:08:22 +08:00
TreeHugger Robot
464cd081d1 Merge "Revert "audio: temporarily disabling auido-ull-playback feature"" into rvc-d1-dev 2020-07-01 10:04:47 +00:00
Justin Weng
41df54e7f8 Revert "audio: temporarily disabling auido-ull-playback feature"
This reverts commit 845e4be94dd6617f9061bd98ee062ce7de17fefe.

Reason for revert: The tuning for vibration control is done.

Bug: 155831461
Test: Verify by H/W

Change-Id: I8adc2df69bc46f0a90bcd0c8687124454f126db7
2020-06-30 01:31:27 +08:00
Jason Hsu
f07e4d4ad0 audio: update acdb table
Change list is as below:
1. Handsfree SWB
    - RX modify DRC
    - BVE on
2. BTNB / BTNB-NREC / BTWB / BTWB-NREC Uplink
    - WB IIR: modify for SFR
3. Handset Smoothing tuning Downlink
    - HANB: max-1 / max-2
    - HAWB: max / max-1 / max-2
    - HASWB: max-1 / max-2
4. Camcorder
   - Upgrade the WNR version from 1.0.2 to 1.0.6
   - Update the WNR parameters in camcorder use case ID 61~66
   - Update the SURREC parameters in camcorder use case ID 61~66
   - Update the IIR parameters in camcorder use case ID 61~66
   - Update the Mic Gain parameters in camcorder use case ID 61~63

Bug: 159768812
Bug: 156513851
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I663d41fe87e528aa2ec478744142806aee2086ba
2020-06-29 14:14:23 +08:00
vincenttew
2500653beb audio: update audio table
change list:
1. add voip bt sco/sco-wb/sco-swb echo reference
2. fix indent in mixer table

Bug: 157877037
Test: build pass
Signed-off-by: vincenttew <vincenttew@google.com>
Change-Id: I3379a76f7fd35ebaf7e96e31bbad4686e709897b
2020-06-18 07:07:24 +00:00
Jason Hsu
54ea660f52 audio: update acdb table
change list:
1. De-vibration tuning in Handset NB/WB/SWB
2. Align TMUS Handset VoIP tuning to Generic

Bug: 159178918
Test: verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I9d3b5714b3dd7b133be854a157e168efc022148d
2020-06-17 12:15:02 +08:00
Jason Hsu
b19567794e audio: update audio table
audio_platform_info.xml:
Modify Record acdb id path
<device name="SND_DEVICE_IN_USB_HEADSET_MIC" acdb_id="44"/> => From 4 to 44
<device name="SND_DEVICE_IN_VOICE_RECOG_USB_HEADSET_MIC" acdb_id="143"/> => New add

ACDB:
1. HAC FB fine tune from Annie
2. HE Recording (acdb id :44) modify
 - Change Recording topology to AUDIO_TX_MONO_COPP_MBDRC_V4
 - Apply parameter, 18dB gain in Audio Mic gain , and pre-gain set to 0x1 in IIR

Bug: 158717246
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I2fd20bdccd344807b4b98ec389088318345ff5b9
2020-06-16 01:37:34 +08:00
Jason Hsu
3b13583bb5 audio: update audio tables
1. acdb's change list is as below
  - Handset NB/WB/SWB/FB EPD-Offset to fine tune EC performance
  - Handheld WB EPD-offset to fine tune EC performance
  - Ringback tone: MBDRC modification
  - Handheld FB: update tuning for DT & EC
  - Handheld NB/WB: optimize BVE parameters

2. mixer's changelist
  *** The mixer modification was based on b/145244105 comment #63.
  - change the EC reference from TDM-RX to TDM-TX (align with B5S5) in Handheld voice call & VoIP. Details is as below.

    <ctl name="ASPTX1 Slot Position" value="1" />
    <ctl name="R ASPTX1 Slot Position" value="0" />

    <path name="echo-reference">
        <ctl name="AUDIO_REF_EC_UL1 MUX" value="QUIN_TDM_TX_0" />
        <ctl name="EC Reference Channels" value="Two"/>

    <path name="echo-reference speaker">
        <ctl name="AUDIO_REF_EC_UL10 MUX" value="QUIN_TDM_TX_0"/>
        <ctl name="EC Reference Channels" value="Two"/>

    <path name="voicemmode1-call speaker">
        <ctl name="VOC_EXT_EC MUX" value="QUIN_TDM_TX" />
        <ctl name="QUIN_TDM_RX_0_Voice Mixer VoiceMMode1" value="1"/>
        <ctl name="VoiceMMode1_Tx Mixer PRI_TDM_TX_0_MMode1" value="1"/>
    </path>

Bug: 158623210
Bug: 156513851
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I3ddd419a1d7da76841dd58889de36769e48c1f74
2020-06-10 09:42:57 +00:00
Jason Hsu
445011aaad audio: update audio table
1. For mixer_paths_noextcodec_snd.xml,
    a. Change gain setup from 0dB(value 23) to 22dB(value 52) of path name "voice-rec-mic".
    b. Add strings for gain visibility of path name "handset-stereo-dmic-ef".
    c. Change gain setup from 13dB(value 40) to 22dB(value 52) and add strings for gain visibility of path name "voice-rec-dmic-ef".
    d. Change gain setup from 0dB(value 23) to 22dB(value 52) of path name "three-mic".
    e. Change gain setup from 0dB(value 23) to 5dB(value 30) and add strings for gain visibility of path name "unprocessed-mic".
    f.  Change gain setup from 13dB(value 40) to 5dB(value 30) and add strings for gain visibility of path name "unprocessed-stereo-mic".
    g. Change gain setup from 0dB(value 23) to 5dB(value 30) and add strings for gain visibility of path name "unprocessed-three-mic".

2. For audio_platform_info_noextcodec_snd.xml,
    a. Apply acdb id_144 for SND_DEVICE_IN_VOICE_REC_DMIC_STEREO.
    b. Update "microphone_characteristics" and "input_snd_device_mic_mapping" to fit R3 configurations.

Bug: 145244105
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I5cc6c87c0a4cf100e993fce1906a253966bc564c
2020-06-10 15:15:56 +08:00
Jason Hsu
bbd22edaf1 audio: update acdb file
The change list is as below:
1. Enable BVE at HANB/WB/SWB
2. Adjust HASWB Nom FDEQ for RFR
3. Adjust HAC FB
4. Recording (HA_Tri_Mic id46)
    - disable all effect
5.Camcorder
   - Import the WNR module into ACDB.
   - Add the WNR module in the camcorder use case ID 61~66.
6. optimize PTL MPPS  in id 513

Bug: 158043299
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: Ia3bb5766e216419090b15549b140c3372a7178ed
2020-06-08 17:19:22 +08:00
Cyan_Hsieh
ee61f152d0 Merge branch 'rvc-dev' into rvc-d1-dev
Change-Id: I6ec66f04fee0d2fd8a1a78b7dad67af40e9f1c62
2020-06-02 18:48:49 +08:00
JJ Lee
1ab04aed6c audio: add mixer paths for call screen mode
Bug: 140384450
Test: build pass, call screen mode functions
Change-Id: Iec1740df2a9b507dc31839a45410cd5e34a2838a
Signed-off-by: JJ Lee <leejj@google.com>
2020-06-02 18:39:17 +08:00
JJ Lee
4cd460e1eb audio: update acdb files
Changelist:
  1. Adjust HASWB TX
     - SFR optimize
     - Noise Suppression high band optimize
  2. Modify HAWB
     - The adapt len: 0x000 for response stability

Bug: 157618341
Test: verified by H/W
Change-Id: Ice4d15a5eb032ff1fd50336f25bffe67845d27b5
Signed-off-by: JJ Lee <leejj@google.com>
2020-05-29 21:25:22 +08:00
yixuanjiang
5ea7630e9c audio: update pcmid on speaker calib tx and rx usecase
Bug: 156714478
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
Change-Id: Ic1b54057154e0dbef4f7be065682b42af1760df0
2020-05-29 21:22:47 +08:00
Jason Hsu
207f444255 audio: update acdb table
Changelist:
- update the IIR parameters for ACDB ID 61~66
- update Mic gain for ACDB 61~63
- update the MBDRC parameters for ACDB ID 61~66

Bug: 157112078
Test: Verified by H/W

Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: Ib38e5eeb06460df326df88d771e00bd5b59dd34b
2020-05-29 21:22:43 +08:00
TreeHugger Robot
3da3a89b15 Merge "audio: update acdb table" into rvc-d1-dev
Change-Id: I0832a3b75dca25622c43e74fe770ed11b8c345f5
Change-Id: Ib7563dc68c6469a2f5a6bae177fd789396fe07c9
Change-Id: I0a83648fc754a87019f5c35602b4633394035f82
Change-Id: I9e2edb47e36e3dc09ccc719ec4de1ec9cc0be077
Change-Id: I5cb35e7ccf83c15b8f5542da7d8cdeadc71edaaf
2020-05-29 21:22:38 +08:00
Jason Hsu
ea0d0e4cd2 audio: update acdb table
Change list:
1. WAV PTL topology added in id 513
2. No mic HE volume table update
3. HANDSET_TRI_MIC (ID46)
     - change TOPO into AUDIO_TX_MONO_COPP on GENERAL_RECORDING app types
     - Set the mic gain and IIR & MBDRC parameters for three mic recording
4. For HANDSET_MIC_STEREO (ID34)
     - keep preGain_settings[0] & preGain_settings[1] in IIR module as "1" and set others as "0"
5. HA WB/SWB/FB Robustness
6. HAFB (voip) NS optimization

Bug: 156719506
Test: Verified by H/W
Signed-off-by: Jason Hsu <jasonchhsu@google.com>
Change-Id: I18e217de12336dddcb3c9d61ec7a9dfc933544f9
2020-05-29 21:22:38 +08:00
justinweng
c7d2fc3cdd audio: adjust poll time for themal listener
Increase poll time (200ms -> 2s)

Bug: 143265000
Test: verify by H/W

Signed-off-by: justinweng <justinweng@google.com>
Change-Id: I0f239775d973d84f8d4c7082642ff3ec0190edf4
2020-05-29 21:22:36 +08:00