[Xiaomi Mi CC9 / Mi 9 Lite ROMs, Kernels, Recoverie] NoSohoth:
I am also having the mic and speaker issue in call.

I've tried modifying the value of persist.audio.fluence.voicecall to false and ro.qc.sdk.audio.fluencetype to none in /system/build.prop as usually suggested for Mi phones running LineageOS, to no avail.

Took a look in mixer_paths.xml, tried cleaning cache partitions and rebooting as well. Recording the microphone with the Recorder app works so this looks like it is tied to voice calls.

Here's a (grep'd) logcat during a phone call, any clue ?

11-12 00:02:41.649 875 7366 E audio_hw_primary: offload_thread_loop: Compress handle is NULL
11-12 00:02:43.694 6177 6177 W dex2oat : Compilation of void com.google.android.gms.ads.nonagon.transaction.a.<init>(android.util.JsonReader) took 353.875ms
11-12 00:02:51.698 875 7639 E msm8974_platform: platform_check_backends_match: Invalid snd_device =
11-12 00:02:51.698 875 7639 E audio_hw_primary: @@: usecase[0xf1fa0180]=low-latency-playback, devices=0x4, uc_info[0xf1fa0180]=low-latency-playback
11-12 00:02:51.707 875 7639 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
11-12 00:02:51.707 875 7639 E ACDB-LOADER: Error: ACDB AFE returned = -19
11-12 00:02:52.082 875 875 E audio_route: unable to find path 'hph-lowpower-mode'
11-12 00:02:52.082 875 875 E audio_hw_primary: @@: usecase[0xf1fa0180]=low-latency-playback, devices=0x4, uc_info[0xf1fa0180]=low-latency-playback
11-12 00:02:52.117 875 875 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
11-12 00:02:52.118 875 875 E ACDB-LOADER: Error: ACDB AFE returned = -19
11-12 00:02:52.176 875 1481 W DeviceHAL: Error from HAL Device in function get_mic_mute: Function not implemented
11-12 00:02:52.177 875 1481 W DeviceHAL: Error from HAL Device in function get_mic_mute: Function not implemented
11-12 00:21:24.548 875 7639 E msm8974_platform: platform_check_backends_match: Invalid snd_device =
11-12 00:21:24.548 875 7639 E audio_hw_primary: @@: usecase[0xf1fa01b8]=low-latency-playback, devices=0x1, uc_info[0xf1fa01b8]=low-latency-playback
11-12 00:21:24.554 875 7639 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
11-12 00:21:24.554 875 7639 E ACDB-LOADER: Error: ACDB AFE returned = -19
11-12 00:21:24.958 875 875 E audio_hw_primary: @@: usecase[0xf1fa01b8]=low-latency-playback, devices=0x2, uc_info[0xf1fa01b8]=low-latency-playback
11-12 00:21:24.958 875 875 E voice : voice_is_in_call_rec_stream: input stream is NULL
11-12 00:21:24.958 875 875 E audio_hw_utils: send_app_type_cfg_for_device: Could not get ctl for mixer cmd - Audio Stream Capture 40 App Type Cfg
11-12 00:21:24.958 875 875 E voice : voice_is_in_call_rec_stream: input stream is NULL
11-12 00:21:24.959 875 875 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
11-12 00:21:24.979 875 875 E tas_spk_prot: Using 24 bit playback
11-12 00:21:25.001 875 875 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
11-12 00:21:25.001 875 875 E ACDB-LOADER: Error: ACDB AFE returned = -19
11-12 00:21:25.105 875 875 W DeviceHAL: Error from HAL Device in function get_mic_mute: Function not implemented
11-12 00:21:25.106 875 875 W DeviceHAL: Error from HAL Device in function get_mic_mute: Function not implemented
11-12 00:21:47.537 875 7639 E msm8974_platform: platform_check_backends_match: Invalid snd_device =
11-12 00:21:47.537 875 7639 E audio_hw_primary: @@: usecase[0xf1fa01f0]=low-latency-playback, devices=0x1, uc_info[0xf1fa01f0]=low-latency-playback
11-12 00:21:47.543 875 7639 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
11-12 00:21:47.543 875 7639 E ACDB-LOADER: Error: ACDB AFE returned = -19
11-12 00:21:47.959 875 875 E audio_hw_primary: @@: usecase[0xf1fa01f0]=low-latency-playback, devices=0x2, uc_info[0xf1fa01f0]=low-latency-playback
11-12 00:21:47.960 875 875 E voice : voice_is_in_call_rec_stream: input stream is NULL
11-12 00:21:47.960 875 875 E audio_hw_utils: send_app_type_cfg_for_device: Could not get ctl for mixer cmd - Audio Stream Capture 40 App Type Cfg
11-12 00:21:47.960 875 875 E voice : voice_is_in_call_rec_stream: input stream is NULL
11-12 00:21:47.961 875 875 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
11-12 00:21:47.978 875 875 E tas_spk_prot: Using 24 bit playback
11-12 00:21:47.996 875 875 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
11-12 00:21:47.996 875 875 E ACDB-LOADER: Error: ACDB AFE returned = -19
11-12 00:21:48.142 875 1481 W DeviceHAL: Error from HAL Device in function get_mic_mute: Function not implemented
11-12 00:21:48.142 875 1481 W DeviceHAL: Error from HAL Device in function get_mic_mute: Function not implemented