I have the same problem with redmi 4. very good sound with earphone, One time I've sound and it was good; Im' international stable 8.2.0. I tried to reboot but stop. it was Chinese. I don't understand/ I tried what XIAMI support write
Dial *#*#6484#*#*
Select the option related to...