Take a look at my post in this thread:
https://xiaomi.eu/community/threads/k20-pro-sound-issues.51521/
I resolved my issue with this manual, works flawlessly with viper4android mod:
Same bugs here. I managed to get most fixed. I thought I fixed all of the issues, and everything worked perfectly for a few days, but yesterday I got the no voice during call bug and had to restart.
What you have to do is install Magisk via recovery. You can find the links in the xda forums. Then, reboot, go to Magisk manager app, downloads, and look for the following modules:
- Audio Compatibility Patch - most important one;
- Audio Modification library;
- Viper4android FX.
Install these. Most likely, the first module will solve the problem with audio missing from YouTube, Spotify, or all other apps.
The bug regarding no voice or mic during calls seems to be caused by Google Assistant. After yesterday, I disabled Google assistant via settings and everything has been fine.
However, I cannot guarantee the issue will not recur. You will not be able to use Google assistant, but I haven't been able to make it work anyway.
Edit:
Credit goes to Adavius
Alternatively, the User Adavius said, that after uninstalling Magisk and its packages, the problem disappeared.
I solved this issue for good with the above mentioned manual, good luck.