A2DP Codec in Marshmallow - General Questions and Answers

Hi,
I searched a lot now - but I could not find a correct answer.
Does CM13 support the MP3 Codec for A2DP? I read that up until I think CM11 you could enable the MP3 codec in a config file in /etc/bluetooth/.
But since the BT Stack got changed (I think in KitKat?) this config file does not exist anymore and I could not find a way to configure anything.
I even looked at the code and as far as I could understand, there is a default codec, which is always used (probably SBC).
I increased the verbosity for bluetooth and looked at the logs and they let me think that only the SBC Codec is used:
Code:
01-05 16:50:01.253 3308 3364 W bt_btif : bta_av_getcap_results max bitpool length received for SBC is out of range.Clamping the codec bitpool configuration from 250 to 53
How can I change the codec to mp3 (or aac) and what is the best method to really know which codec is used on CM12/CM13?
Thanks for your answers in advance.

Related

[Q] How to change video rec audio sample codec, (Omnia2 can do it)

I was trying to find a way to increase the video recording quality because mines records at 8hz 2kbps amr-nb which is pathetic, and I found this: http://www.modaco.com/content-page/...-flash-guide-suggested-programs-faq/page/355/
Quote from NuclearEMP
---------------------------------------------------------------------------------------------------
This is the first mod that I have found and hopefully not the last.
Goto HKCU/Software/Samsung/Camera
Find AudioNormalCodec
the options are:
0 - Default : GSM-AMR-NB 8000Hz 1ch (this is the default but has lots of high pitched noises in the background)
1 - MPEG4 AAC 16000Hz 1ch (this so far is the cleanest audio that I found you can get during video recording)
2 - Qualcomm QCELP 1000Hz 2ch (this is the MMS setting, not good at all for video recording)
---------------------------------------------------------------------------------------------------
I couldnt find this reg file in my registry, does anyone know where else it may be located for HTC phones?? Would be a very useful tweak for many phones here if someone found out.

VOIP decoding in DSP

Hello,
I am developing a custom VOIP application which use AMR-WB as the codec. I was reading QCOM documents saying it is possible to use the DSP as the vocoder to offload the task from the host CPU.
did any one try to use this option and can share any information, for example amix commands to set the mixer and how to choose codec type and bit rate?
Thanks

[Q] Choppy Bluetooth Streaming...

Hi guys,
I am new to this blog. Basically I am working as a Infotainment system tester over Bluetooth profile. I am encountering lots of choppy music while Bluetooth music streaming on infotainment systems via android devices. While taking Bluetooth traces via Frontline BPA 600 sniffer, I am able to get A2DP profile with SBC frames where Bitpool is 35 and Bit rate is 327 for all the frames however just CRC changes with its after check values. Can you please suggest me where exactly the problem can lie, i mean like what parameters can be changed, Bitrate, or Bit pool or buffer, while decoding the music packets?

Google Assistant - Talk back fix for Miui roms

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
Thanks, will try this as the TalkBack issue has bugged me for a while.
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
Click to expand...
Click to collapse
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 ?
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.
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.

Question Bluetootg Audio Codec

Can anybody help me? I use Sony's WH1000XM3 headphones and by no means can I set LDAC audio codec. There's only AAC available for me. Why?
Go into developer options and find Bluetooth codec option, there you can select LDAC.

Categories

Resources