Google Assistant - Talk back fix for Miui roms

p3dboard

Senior Member
Oct 20, 2013
988
611
113
I just thought i would share this, as it's been bugging me on Miui that the Google Assistant didn't always speak results like what is the weather forecast.

https://support.google.com/websearch/forum/AAAAgtjJeM4MwaLxKImwEc/?hl=en

change the value of mm.enable.qcom_parser in build.prop to 245389 (3183219 as mentioned in the article is for another device that supports different codecs) fixes the issue as mentioned in the google bug report for the Xiaomi a1.

I've attached a magisk module that is a modified Camera2 api enabler script. It enables Camera 2 api, adjusts noise cancelation to fluencepro, adds EIS entry for Google camera and turns off noise cancellation for voice recordings

Edit: modified Magisk package to the value @Stoffl_ calculated, 245389, for the mido. Thanks
 

Attachments

Last edited:
  • Like
Reactions: kelmer_cunha

p3dboard

Senior Member
Oct 20, 2013
988
611
113
A better explaination of what is happening - based on that information we can probably work out the right number for the Redmi Note 4x to disable the ogg hardware codec until its updated - The above number may be correct, but we probably just need to get the original number, and just change the bit for Ogg to off for the moment.

http://en.miui.com/forum.php?mod=viewthread&tid=1465017&page=2#pid21050310

21#
01:04, Jan-10-2018 | From PC |
This post was edited by Theliel at 18:09, Jan-09-2018

Is not exactly in that way.

In first instance, the issue is only present in qualcom SoC (not Mediatek) Nougat, Oreo work fine.

In second place, qcom_parser number is a mask, representing all supported codecs directly in hardware (not software). Each SoC support different codecs.

For Mi4c:
Codecs: DivX DivXHD AVI AC3 ASF AAC QCP DTS 3G2 MP2TS
mm.enable.qcom_parser=3379827
3379827 = 1100111001001001110011

Each bit represent a codec, if you set a bit to 1, you enable hw support to that codec. A more simpe example, imagine only 3 codecs and in the exact order: mp3 ogg acc
111 enable all codecs = 7
001 enable only aac = 1
101 enable mp3 and aac, disable ogg = 5

You can't use the same value to each device, because each device support a different array of codecs. The real issue is only with qcom hw lib/codec ogg (container, real codec is opus), that is the audio returned by google. Devices without hw support of ogg or with ogg disabled, work fine in most Nougat.

In my investigations, ogg is placed in 15th position in most of all qcom devices.

So, for default Mi4c:
3379827 = 1100111001001001110011 | Work fine, hw is not used anyway, not supported

Default Mi6 Nougat:
1048575 = 11111111111111111111 | Dont Work
1032191 = 11111011111111111111 | Work perfecly

If you force all devices to 3183219 (for example), yes, you are disabling ogg bit, but you are disabling a lot of other codecs too, is not recommended, not a solution.

The real solution is a newer driver/codec to solve hw codec. Temporal fix is ONLY flip ogg bit to disable hw support and use only software, without touching the others bits. Each device, have a different hw arraw codec, so you shouldn't use the same value to all, is a big mistake
 

Stoffl_

Senior Member
Jan 18, 2007
823
190
0
So..if I understand this correctly...

My Redmi Note 4X Global on Global stable Rom 9.0.5.0 build.prop has currently the following values
Code:
#codecs:(PARSER_)AAC AC3 AMR_NB AMR_WB ASF AVI DTS FLV 3GP 3G2 MKV MP2PS MP2TS MP3 OGG QCP WAV FLAC AIFF APE
mm.enable.qcom_parser=261773
261773 decimal = 111111111010001101 in binary

According to the post above and the comments in my build prop bit 15 should be Ogg support.
111111111010001101 means Ogg is enabled

So the correct value to disable Ogg HW support would be 111111111010000101 = 261765

Correct ?
 
Last edited:

DarthJabba9

Senior Member
May 5, 2014
3,601
3,345
253
Greater London
Hmmm .... this is very interesting - but also probably error prone. With SlimROM v1.17, I have this "mm.enable.qcom_parser=1048575" (i.e., 1111 1111 1111 1111 1111). It seems that everything is turned on! But it is not clear what one will be disabling if any alteration is made.
 

Stoffl_

Senior Member
Jan 18, 2007
823
190
0
Turns out the bits should be read from right to left, whoops.

http://en.miui.com/forum.php?mod=redirect&goto=findpost&ptid=1465017&pid=21367895

And the starting zero bits aren't counted, which would explain why number of codecs and bits didn't match up in my example.

I'm now using 229005 and so far google assistant talkback is working.
*edit*
I had the dumb and counted wrong
111011111010001101 = 245389 is working, weather and time talkback functional!!

Only OGG hardware encoding should be disabled, everything else is should be on default rom setting.
 
Last edited:
  • Like
Reactions: p3dboard
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone