[FIX] A2DP Bluetooth fix for CM10 Based Builds/Compiled ROMs

Search This thread

KRZ-2pa

Senior Member
Sep 3, 2011
211
313
Depreciated -------- posted Sept-14-2012:
A2DP fix for media: Currently CM10(CyanogenMod JB) based builds the Bluetooth device works just to stream audio to make calls but it doesn't work when streaming media(Pandora, PowerAmp Music player)

Looks like sample rate is missing in the at a2dp line in the "audio_policy.conf"(/etc) line "sampling_rates 48000" and the 44100 needs to added before the 48000 with this "|" symbol and it should look like this "sampling_rates 44100|48000".:good:

After changing the sampling rate reboot your device in order for it to take effect.

Edit file with root explorer text editor.
Before:
sampling_rates 48000
After:
sampling_rates 44100


The fix is for Hercules/Skyrocket CMX based builds:
- CM10
- CM10-ParanoidAndroid
- AOKP JB


File is located at root of system you can use Root Browser or Solid Explorer and open as Text Editor to edit. Make a back up of the file just in case.

File location:
/system/etc/audio_policy.conf

Solid Explorer:
https://play.google.com/store/apps/details?id=pl.solidexplorer

Root Browser Lite:
https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree


Edit Sept-17-2012 10:14pm:
As of Sept17+ some builds have been implemented with the fix by the OPs, not sure if CyanogenMod has done it yet.

Edit Sept-19-2012 11:04pm: Fix has been implemented by CyanogenMod, it looks like the 48000 sampling rate is not required. I've tested it too and all audio works(with just 44100) except during calls and plays the audio on earpiece of the phone/device instead of streaming it to BT earphones. See Post by budjb.

××× Workaround ×××
I notice that during a call if you turn OFF the Bluetooth earphone while connected to your device(phone) then turn ON the BT earphone it'll connect and also stream the phone call to BT earphone. :screwy:


I can confirm that bluetooth audio and calls work on the sept 13th build. By default, that build's audio_policy.conf has a2dp's sampling rate set to 48000, which does not work, however changing the rate to 44100 allows both audio streaming and calls to work. Having both rates (44100|48000) does not work, it has to be only 44100.

This exact same config that works on the 13th does not work on the 17th or 18th builds. On those builds, I can get audio streaming to work but not calls over bluetooth. On those builds, calls will only play through the phone's speaker with the sampling rate set only to 44100. When I add 48000, audio streaming still works, and calls no longer play out of the phone's speaker while bluetooth is connected, however, the stream to the bluetooth device is completely silent.

So looks like something broke between the 13th build and anything after. Hope this helps, and hope you can fix it!


---INFO---
Code:
 [URL="http://en.wikipedia.org/wiki/Sampling_rate"]Info about sampling rates:[/URL]
[B]44,100 Hz[/B] Audio CD, also most commonly used with MPEG-1 audio (VCD, SVCD, MP3). Originally chosen by Sony because it could be recorded on modified video equipment running at either 25 frames per second (PAL) or 30 frame/s (using an NTSC monochrome video recorder) and cover the 20*kHz bandwidth thought necessary to match professional analog recording equipment of the time. A PCM adaptor would fit digital audio samples into the analog video channel of, for example, PAL video tapes using 588 lines by 3 samples by 25 frames per second. Much pro audio gear uses (or is able to select) 44.1*kHz sampling, including mixers, EQs, compressors, reverb, crossovers, recording devices and CD-quality encrypted wireless microphones.


[B]48,000 Hz[/B] The standard audio sampling rate used by professional digital video equipment such as tape recorders, video servers, vision mixers and so on. This rate was chosen because it could deliver a 22*kHz frequency response and work with 29.97 frames per second NTSC video - as well as 25 frame/s, 30 frame/s and 24 frame/s systems. With 29.97 frame/s systems it is necessary to handle 1601.6 audio samples per frame delivering an integer number of audio samples only every fifth video frame.[6] Also used for sound with consumer video formats like DV, digital TV, DVD, and films. The professional Serial Digital Interface (SDI) and High-definition Serial Digital Interface (HD-SDI) used to connect broadcast television equipment together uses this audio sampling frequency. Much professional audio gear uses (or is able to select) 48*kHz sampling, including mixers, EQs, compressors, reverb, crossovers and recording devices such as DAT.



Sent from my ♛ SGH-T989 ♛ w/CM10-Hybrid PA v2.14(9-22-12) by: michinohatoresu using XDA app.
 
Last edited:

Kerns_JW

Senior Member
Aug 26, 2009
449
92
Funny, so on 9/16 b2 music audio works fine, but not phone audio over Bluetooth! I will grab the cm10 audio.conf and merge this fix to see if that fixes it
 

griever721

Senior Member
Apr 28, 2012
165
86
San Diego
Funny, so on 9/16 b2 music audio works fine, but not phone audio over Bluetooth! I will grab the cm10 audio.conf and merge this fix to see if that fixes it

I have the same problem! Running superlite CM10, and media audio works perfectly from bluetooth headset, but does NOT work when trying to make a phone call with the bluetooth headset. Suggestions anyone?
 

kevo777

Member
Nov 6, 2009
49
11
Plano, TX
Hi,

How do you access "audio_policy.conf" to modify it? Please let me know I am a newbie. Thanks.

Assuming you have already rooted your device, use a file explorer app like ES File Explorer. Allow it to access root files and folders and then navigate to the /etc folder and look for the "audio_policy.conf" file. Then use your text editor of choice (ES File Explorer has one built-in) to make the correction as illustrated.
 
  • Like
Reactions: dineshan

KRZ-2pa

Senior Member
Sep 3, 2011
211
313
Hi,

How do you access "audio_policy.conf" to modify it? Please let me know I am a newbie. Thanks.

Gave you a free thanks, i hit/selected the wrong selection .... lol

Is located at root of system you can use Root Browser or Solid Explorer and open as Text Editor to edit. Make a back up of the file just in case.

File location:
/system/etc/audio_policy.conf

Solid Explorer:
https://play.google.com/store/apps/details?id=pl.solidexplorer

Root Browser Lite:
https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree

Sent from my ♛ SGH-T989 ♛ w/CM10-Hybrid PA v2.14(9-22-12) by: michinohatoresu using XDA app.
 
Last edited:

dineshan

Member
Aug 9, 2011
17
2
Gave you a free thanks, i hit/selected the wrong selection .... lol

Is located at root of system you can use Root Browser or Solid Explorer and open as Text Editor to edit. Make a back up of the file just in case.

File location:
/system/etc/audio_policy.conf

Solid Explorer:
https://play.google.com/store/apps/details?id=pl.solidexplorer

Root Browser Lite:
https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree

Sent from my ♛ SGH-T989 ♛ w/CM10-Hybrid PA v2.14(9-22-12) by: michinohatoresu using XDA app.

Hi a quick question if you don't mind. What ROM were you using when you fixed the BT issue? According to budjb Sept 13 build worked fine and none worked after Sept 13, but I am running Superheavy ROM which says its build on Sept 14. So a bit confused just wanted to know which ROM you used when you fixed the issue? Sorry if it is a stupid question I am a newbie trying to learn.
 
  • Like
Reactions: KRZ-2pa

KRZ-2pa

Senior Member
Sep 3, 2011
211
313
Hi a quick question if you don't mind. What ROM were you using when you fixed the BT issue? According to budjb Sept 13 build worked fine and none worked after Sept 13, but I am running Superheavy ROM which says its build on Sept 14. So a bit confused just wanted to know which ROM you used when you fixed the issue? Sorry if it is a stupid question I am a newbie trying to learn.

I didn't fixed the BT issue I simply found a fix(correct sampling rate) and the Superheavy ROM might of been compile on Sept 13th. Who's it made by?

I've tried different ROMs, I was using/used gs2usr's CM10 PA, erickwill's Unofficial CM10 and whitehawx's AOKP jb I believe it affected all builds made for Skyrocket & Hercules.

But the builds/compiles after 17th or 19th+ it had the correct sampling rate from the Cyanogen source and this time its the other way around call audio won't stream to BT devices but music does stream to BT devices.


Sent from my ♛ SGH-T989 ♛ w/CM10-Hybrid PA v2.14(9-22-12) by: michinohatoresu using XDA app.
 
Last edited:

dineshan

Member
Aug 9, 2011
17
2
I didn't fixed the BT issue I simply found a fix(correct sampling rate) and the Superheavy ROM might of been compile on Sept 13th. Who's it made by?

I've tried different ROMs, I was using/used gs2usr's CM10 PA, erickwill's Unofficial CM10 and whitehawx's AOKP jb I believe it affected all builds made for Skyrocket & Hercules.

But the builds/compiles after 17th or 19th+ it had the correct sampling rate from the Cyanogen source and this time its the other way around call audio won't stream to BT devices but music does stream to BT devices.


Sent from my ♛ SGH-T989 ♛ w/CM10-Hybrid PA v2.14(9-22-12) by: michinohatoresu using XDA app.

Ok thanks for your reply. My ROM is by vincom I think. I applied the fix but it didn't work. I might go back to Cyanogen 9.1 stable version, because even official samsung release ICS gave me issues like after 10 hours I see the time will be one hour less or I get unexpected reboot. I liked this super heavy ROM but BT calling is important to me. Anyways thanks for all the help.
 

jagguli

Member
Aug 26, 2011
9
0
What were the sampling rates you tried and which was successful?

Sent from my XT910 using xda app-developers app
 

modfrenzy

Member
Sep 15, 2010
26
3
Hey guys any updates on this? I've been looking around and have not found any info on the BT working with phone calls?

Has there been any updates?
 

jagguli

Member
Aug 26, 2011
9
0
None at all still broken in all cm10 roms I guess no one cares much about bluetooth headsets :banghead:

Sent from my XT910 using xda app-developers app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Depreciated -------- posted Sept-14-2012:
    A2DP fix for media: Currently CM10(CyanogenMod JB) based builds the Bluetooth device works just to stream audio to make calls but it doesn't work when streaming media(Pandora, PowerAmp Music player)

    Looks like sample rate is missing in the at a2dp line in the "audio_policy.conf"(/etc) line "sampling_rates 48000" and the 44100 needs to added before the 48000 with this "|" symbol and it should look like this "sampling_rates 44100|48000".:good:

    After changing the sampling rate reboot your device in order for it to take effect.

    Edit file with root explorer text editor.
    Before:
    sampling_rates 48000
    After:
    sampling_rates 44100


    The fix is for Hercules/Skyrocket CMX based builds:
    - CM10
    - CM10-ParanoidAndroid
    - AOKP JB


    File is located at root of system you can use Root Browser or Solid Explorer and open as Text Editor to edit. Make a back up of the file just in case.

    File location:
    /system/etc/audio_policy.conf

    Solid Explorer:
    https://play.google.com/store/apps/details?id=pl.solidexplorer

    Root Browser Lite:
    https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree


    Edit Sept-17-2012 10:14pm:
    As of Sept17+ some builds have been implemented with the fix by the OPs, not sure if CyanogenMod has done it yet.

    Edit Sept-19-2012 11:04pm: Fix has been implemented by CyanogenMod, it looks like the 48000 sampling rate is not required. I've tested it too and all audio works(with just 44100) except during calls and plays the audio on earpiece of the phone/device instead of streaming it to BT earphones. See Post by budjb.

    ××× Workaround ×××
    I notice that during a call if you turn OFF the Bluetooth earphone while connected to your device(phone) then turn ON the BT earphone it'll connect and also stream the phone call to BT earphone. :screwy:


    I can confirm that bluetooth audio and calls work on the sept 13th build. By default, that build's audio_policy.conf has a2dp's sampling rate set to 48000, which does not work, however changing the rate to 44100 allows both audio streaming and calls to work. Having both rates (44100|48000) does not work, it has to be only 44100.

    This exact same config that works on the 13th does not work on the 17th or 18th builds. On those builds, I can get audio streaming to work but not calls over bluetooth. On those builds, calls will only play through the phone's speaker with the sampling rate set only to 44100. When I add 48000, audio streaming still works, and calls no longer play out of the phone's speaker while bluetooth is connected, however, the stream to the bluetooth device is completely silent.

    So looks like something broke between the 13th build and anything after. Hope this helps, and hope you can fix it!


    ---INFO---
    Code:
     [URL="http://en.wikipedia.org/wiki/Sampling_rate"]Info about sampling rates:[/URL]
    [B]44,100 Hz[/B] Audio CD, also most commonly used with MPEG-1 audio (VCD, SVCD, MP3). Originally chosen by Sony because it could be recorded on modified video equipment running at either 25 frames per second (PAL) or 30 frame/s (using an NTSC monochrome video recorder) and cover the 20*kHz bandwidth thought necessary to match professional analog recording equipment of the time. A PCM adaptor would fit digital audio samples into the analog video channel of, for example, PAL video tapes using 588 lines by 3 samples by 25 frames per second. Much pro audio gear uses (or is able to select) 44.1*kHz sampling, including mixers, EQs, compressors, reverb, crossovers, recording devices and CD-quality encrypted wireless microphones.
    
    
    [B]48,000 Hz[/B] The standard audio sampling rate used by professional digital video equipment such as tape recorders, video servers, vision mixers and so on. This rate was chosen because it could deliver a 22*kHz frequency response and work with 29.97 frames per second NTSC video - as well as 25 frame/s, 30 frame/s and 24 frame/s systems. With 29.97 frame/s systems it is necessary to handle 1601.6 audio samples per frame delivering an integer number of audio samples only every fifth video frame.[6] Also used for sound with consumer video formats like DV, digital TV, DVD, and films. The professional Serial Digital Interface (SDI) and High-definition Serial Digital Interface (HD-SDI) used to connect broadcast television equipment together uses this audio sampling frequency. Much professional audio gear uses (or is able to select) 48*kHz sampling, including mixers, EQs, compressors, reverb, crossovers and recording devices such as DAT.



    Sent from my ♛ SGH-T989 ♛ w/CM10-Hybrid PA v2.14(9-22-12) by: michinohatoresu using XDA app.
    2
    Hi,

    How do you access "audio_policy.conf" to modify it? Please let me know I am a newbie. Thanks.

    Gave you a free thanks, i hit/selected the wrong selection .... lol

    Is located at root of system you can use Root Browser or Solid Explorer and open as Text Editor to edit. Make a back up of the file just in case.

    File location:
    /system/etc/audio_policy.conf

    Solid Explorer:
    https://play.google.com/store/apps/details?id=pl.solidexplorer

    Root Browser Lite:
    https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree

    Sent from my ♛ SGH-T989 ♛ w/CM10-Hybrid PA v2.14(9-22-12) by: michinohatoresu using XDA app.
    1
    Will this work on AOKP JB?

    Sent from AOKP JB Goodness :D

    The fix is in the AOKP thread
    1
    Will this work on AOKP JB?

    Sent from AOKP JB Goodness :D

    Yes, AOKP JB rom builds uses CyanogenMod's Github to compile AOKP ROMs.


    Sent from my SGH-T989 w/CM10-Hybrid ParanoidAndroid v2.12(9-16-12) by: michinohatoresu using XDA app.
    1
    Hi,

    How do you access "audio_policy.conf" to modify it? Please let me know I am a newbie. Thanks.