I don't know if anyone else has had issues with streaming any kind of audio through Bluetooth but I found a fix for it without screwing up anything else audio-wise with the phone.
I just got a Mazda with Bluetooth audio built into the stereo and was completely underwhelmed with the quality of the Bluetooth audio compared to an aux plug. It sounded so poor as if the phone converted the high quality 320kbps files I uploaded to Google Play to a lower 64kbps.
I researched and found its in the coding of the audio_policy.conf in system/etc.
The file should contain the following...
# Global configuration section: lists input and output devices always present on the device
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC
}
# audio hardware module section: contains descriptors for all audio hw modules present on the
# device. Each hw module node is named after the corresponding hw module library base name.
# For instance, "primary" corresponds to audio.primary..so.
# The "primary" module is mandatory and must include at least one output with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors and zero or more
# input profile descriptors. Each profile lists all the parameters supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
audio_hw_modules {
primary {
outputs {
primary {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
flags AUDIO_OUTPUT_FLAG_PRIMARY
}
}
inputs {
primary {
sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC
}
}
}
a2dp {
outputs {
a2dp {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
}
usb {
outputs {
usb_accessory {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_ACCESSORY
}
usb_device {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_DEVICE
}
}
}
}
Click to expand...
Click to collapse
Let me know if anyone else had this problem and if it worked for you.
I just put the previous code in the file with nothing else and rebooted.
I have only tested this on MMuzzy 4.2.1
Didn't seem to be the source of the problem for me. I'm on stock (rooted) and the a2dp values are already what you posted. The a2dp quality has gone to crap since the 4.2 update. There is compression type distortion on all the music I stream from my phone to my car. Is there any 4.2 ROM that has fixed this issue yet? This was perfect up until 4.1.2.
ra990 said:
Didn't seem to be the source of the problem for me. I'm on stock (rooted) and the a2dp values are already what you posted. The a2dp quality has gone to crap since the 4.2 update. There is compression type distortion on all the music I stream from my phone to my car. Is there any 4.2 ROM that has fixed this issue yet? This was perfect up until 4.1.2.
Click to expand...
Click to collapse
Oh wow, didn't know it was a 4.2 problem at all. Makes sense though. I'm not sure of any Roms that work around this at the moment. Keep me posted if you do.
I'm also running stock (rooted) and my audio_policy.conf had the same values you posted. The terrible sound quality is driving me insane! Are you using Google Music on your device? I think there might have been a change in Google Music that caused the problem when they introduced gapless playback. On my Motorola Xoom, running stock (rooted) 4.1, it sounded great before I updated to the new Google Music. Ever since the update, it sounds like crap. Rolling back to the old version does nothing. Maybe since Google Music is a system file on Google Experience devices, the update modified something else on the system level.
Aw man you guys are lucky you can at least steam your music to your car I can never get it to work using my gnex streaming to a Fiat Punto which uses blue and me. I can connect for calls to be made and received but never can get music to work.
Do you have to use bluetooth tether or something?
What I tried was connecting to Bluetooth on the car and press play on Google play music and nothing happens on the cars speakers just music plays of the phone.
I also tried a 3.5mm - USB and plugged that into the car and same results as above. I think the car doesn't support the file system of gnex.
Can you explain to me how you guys are streaming as I'd love to use this feature
Sent from my Galaxy Nexus
Are you sure that ad2p is working with your radio? Check manual!
Used it with a lot of cars and adapters.
Never get problems with connections or quality.
FrankNS said:
Are you sure that ad2p is working with your radio? Check manual!
Used it with a lot of cars and adapters.
Never get problems with connections or quality.
Click to expand...
Click to collapse
Personally I really don't know, to sound extremely noobish could you explain exactly how you go about streaming to a car?
Sent from my Galaxy Nexus
MetalMessiah78 said:
I'm also running stock (rooted) and my audio_policy.conf had the same values you posted. The terrible sound quality is driving me insane! Are you using Google Music on your device? I think there might have been a change in Google Music that caused the problem when they introduced gapless playback. On my Motorola Xoom, running stock (rooted) 4.1, it sounded great before I updated to the new Google Music. Ever since the update, it sounds like crap. Rolling back to the old version does nothing. Maybe since Google Music is a system file on Google Experience devices, the update modified something else on the system level.
Click to expand...
Click to collapse
Sorry for replying so late...
I'm experiencing the same issue as you but I can't say it was better on 4.1 because I only got my car at the beginning of December. I initially found Google Music to have this problem but since I have learned that Pandora is the same result.
My code fix did not fix it after I upgraded my ROM even after changing the code again in the new ROM. Not sure where the problem lies.
Any luck from anyone else?
I'm on 4.2.1 (CM10.1 M1), and I haven't had too many problems with bt streaming. I do think the quality use to be better on CM10, and a few times its paused itself randomly, but not so bad I want to connect a cable. I'm using PowerAmp as my music player, and the XtremeMac InCharge Auto BT.
It has been fixed in the latest nightly
Sent from my Nexus 4 using Tapatalk 2
Well I don't think it will fix audio streaming because I have tested it with CyanogenMod's audio_policy.conf!
At least I got it better a little bit and that file is included in my ROM, but that won't fix the audio streaming quality completely,I have also added CM's Bluetooth files ("/system/etc/bluetooth/") but still pretty same result..
Then I sent message to Cm dev team and I got reply that the Bluetooth files are incompatible with stock android ROM so it's not possible to fix A2DP streaming with CM's files!
But yeah, I know that audio_policy.conf is one of the files that affects to A2DP streaming quality..
manumanfred said:
Well I don't think it will fix audio streaming because I have tested it with CyanogenMod's audio_policy.conf!
At least I got it better a little bit and that file is included in my ROM, but that won't fix the audio streaming quality completely,I have also added CM's Bluetooth files ("/system/etc/bluetooth/") but still pretty same result..
Then I sent message to Cm dev team and I got reply that the Bluetooth files are incompatible with stock android ROM so it's not possible to fix A2DP streaming with CM's files!
But yeah, I know that audio_policy.conf is one of the files that affects to A2DP streaming quality..
Click to expand...
Click to collapse
Yes I was assuming everyone would understand you need to flash CM to get this fix....
Sent from my Nexus 4 using Tapatalk 2
FYI, i tested the BT Audio quality in my car tonight and it is MUCH MUCH better =) Cymbals are crisp!
Vanhoud said:
FYI, i tested the BT Audio quality in my car tonight and it is MUCH MUCH better =) Cymbals are crisp!
Click to expand...
Click to collapse
Are you using a new ROM? After flashing Aroma's, I have no issues with Bluetooth at all. He raised the streaming quality so its perfect now. Give it a try!
gfro9191 said:
Are you using a new ROM? After flashing Aroma's, I have no issues with Bluetooth at all. He raised the streaming quality so its perfect now. Give it a try!
Click to expand...
Click to collapse
yes im using the latest CM 10.1 nightly
I was unaware that the Fire TV XBMC did not play certain MP4 and MKV files with Dobly Digital.
I came across three different files one was a 2 were Mp4's and one was an Mkv that XBMC recognized as 5.1 files.
1 - I made sure that passthrough was enable to goto my receiver along with DTS enabled
2 - I was unable to find an updated media analyzer software to figure out what how the audio was encoded so I know what doesn't play on this system
3 - I then took the same files and I played them on my Midnight Mx2 w/ xbmc 13.1 and they both were identified and played properly in 5.1 on my receiver.
4 - I have used my Firetv with a ton of DTS and Dolby Digital files however these three for some reason do not work.
Does anyone know a good media analyzer software that will give me the correct information?
Also I'm assuming I have to wait for an updated Firetv firmware to fix this issue ?
I am running xbmc 13.2 not rooted but side loaded. Passtrhough is enabled correctly in the audio settings. XBMC recognizes the files as 5.1 but will not play that one my receiver.
Please let me know
thanks
I use MediaInfo which is updated regularly.
rrussell50 said:
I was unaware that the Fire TV XBMC did not play certain MP4 and MKV files with Dobly Digital.
I came across three different files one was a 2 were Mp4's and one was an Mkv that XBMC recognized as 5.1 files.
1 - I made sure that passthrough was enable to goto my receiver along with DTS enabled
2 - I was unable to find an updated media analyzer software to figure out what how the audio was encoded so I know what doesn't play on this system
3 - I then took the same files and I played them on my Midnight Mx2 w/ xbmc 13.1 and they both were identified and played properly in 5.1 on my receiver.
4 - I have used my Firetv with a ton of DTS and Dolby Digital files however these three for some reason do not work.
Does anyone know a good media analyzer software that will give me the correct information?
Also I'm assuming I have to wait for an updated Firetv firmware to fix this issue ?
I am running xbmc 13.2 not rooted but side loaded. Passtrhough is enabled correctly in the audio settings. XBMC recognizes the files as 5.1 but will not play that one my receiver.
Please let me know
thanks
Click to expand...
Click to collapse
That's an interesting find. Do you happen to have a download link or torrent to one of those videos? I'd love to do some testing of my own.
Use MediaInfo as stated above by @bruce7373,
AFTVnews.com said:
That's an interesting find. Do you happen to have a download link or torrent to one of those videos? I'd love to do some testing of my own.
Click to expand...
Click to collapse
Thanks for the media info, I will post the findings from that audio after I use Mediainfo tonight for all three files
[U[/U]
rrussell50 said:
Thanks for the media info, I will post the findings from that audio after I use Mediainfo tonight for all three files
Click to expand...
Click to collapse
FILE 1
D : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 2h 42mn
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 9ms
Stream size : 447 MiB (15%)
Default : Yes
Forced : No
FILE 2
D : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 2h 16mn
Bit rate mode : Variable
Bit rate : 317 Kbps
Maximum bit rate : 430 Kbps
Channel(s) : 2 channels
Channel(s)_Original : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 309 MiB (14%)
Title : English - Xitz (StyLish Release)
Language : English
Encoded date : UTC 2012-10-29 17:33:06
Tagged date : UTC 2012-10-29 17:33:27
FILE 3
: 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 1h 30mn
Bit rate mode : Variable
Bit rate : 384 Kbps
Maximum bit rate : 426 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 244 MiB (16%)
Language : English
Encoded date : UTC 2013-03-25 11:23:22
Tagged date : UTC 2013-03-25 13:33:06
FILE 4
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Codec ID : A_AAC
Duration : 2h 21mn
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz / 24.0 KHz
Compression mode : Lossy
Delay relative to video : 31ms
Language : English
Default : No
Forced : No
All files play properly on my Midnight Mx2 running xbmc 13.1...... however the dolby digital does not work on the amazon fire tv running 13.1 or 13.2
Passthrough is enabled, and I am running a DTS receiver, I would love to hear some insight
thanks
I thought MP4 only supported 2 channel AAC, or am I misinformed?
bruce7373 said:
I thought MP4 only supported 2 channel AAC, or am I misinformed?
Click to expand...
Click to collapse
any one have recommendations on what I should re-encode the tiles as? to get the right audio for the fire tv?
Try Handbrake. You can change the container from MP4 to MKV and transcode AAC to AC3.
I'm totally unable to play anything with Dolby Digital, DTS, etc. formats in XBMC 13.2 or 13.1. I am hooking up to an Onkyo receiver using HDMI and through that to a Sony TV via HDMI. Receiver shows 2 channel stereo only and never switches to DD or DTS (let alone HD formats).
If I start using just the Amazon interface, I can stream content from Amazon in DD mode just fine, so I know the basic connections work. Once I start XBMC, it works fine except all output is in 2 channel stereo.
Not only that, once I start XBMC, and then exit and go back to the Amazon interface, all programs that stream from Amazon fail.
Can anyone confirm this behavior?
Thanks in advance
pilotbob3 said:
I'm totally unable to play anything with Dolby Digital, DTS, etc. formats in XBMC 13.2 or 13.1. I am hooking up to an Onkyo receiver using HDMI and through that to a Sony TV via HDMI. Receiver shows 2 channel stereo only and never switches to DD or DTS (let alone HD formats).
If I start using just the Amazon interface, I can stream content from Amazon in DD mode just fine, so I know the basic connections work. Once I start XBMC, it works fine except all output is in 2 channel stereo.
Not only that, once I start XBMC, and then exit and go back to the Amazon interface, all programs that stream from Amazon fail.
Can anyone confirm this behavior?
Thanks in advance
Click to expand...
Click to collapse
What are your settings under Audio output? please confirm this, and make sure audio passthrough is enabled along with dts capable receiver.
I have had a lot of success with the fire tv with a lot of different files, but I found some that had an issue.
To get XBMC to transcode AAC 5.1 to AC3 5.1, in the Audio Setting under System, ensure you have Passthrough enabled, and the number of speakers set to 2.0. (This doesnt affect your ability to pass 5.1 audio on the passthrough, as it essentially does nothing for a passthrough device, but the setting does enable the next option). Now under the passthrough section, where you select the capabilities of your receiver, under the AC3 capable reciever, there will be an option to enable Dolby Digital Transcoding. Enable that, and your AAC 5.1 will be transcoded to AC3 5.1 and passed through to your receiver as such.
credit give to :http://forum.xbmc.org/showthread.php?tid=191109&page=210
by: Colin15150
snowf0x said:
To get XBMC to transcode AAC 5.1 to AC3 5.1, in the Audio Setting under System, ensure you have Passthrough enabled, and the number of speakers set to 2.0. (This doesnt affect your ability to pass 5.1 audio on the passthrough, as it essentially does nothing for a passthrough device, but the setting does enable the next option). Now under the passthrough section, where you select the capabilities of your receiver, under the AC3 capable reciever, there will be an option to enable Dolby Digital Transcoding. Enable that, and your AAC 5.1 will be transcoded to AC3 5.1 and passed through to your receiver as such.
credit give to :http://forum.xbmc.org/showthread.php?tid=191109&page=210
by: Colin15150
Click to expand...
Click to collapse
Thank you so much! Did not see in XBMC that there was an advanced settings selection. Once I selected the advanced settings and chose the options as you specified, DD and DTS worked fine.:good:
rrussell50, did this work for you? It did not work for me, and I am having the same issue. DTS works great, but DD 5.1 passthrough is not working. I am running Gotham 13.2 sideloaded. The FireTV has not been rooted.
pilotbob3 said:
Thank you so much! Did not see in XBMC that there was an advanced settings selection. Once I selected the advanced settings and chose the options as you specified, DD and DTS worked fine.:good:
Click to expand...
Click to collapse
Could anyone confirm that they have DD 5.1 working on a FireTV with Gotham 13.2? Thanks.
SamuraiAlex said:
rrussell50, did this work for you? It did not work for me, and I am having the same issue. DTS works great, but DD 5.1 passthrough is not working. I am running Gotham 13.2 sideloaded. The FireTV has not been rooted.
Click to expand...
Click to collapse
No it did not I was replying back finally to ask for instructions, even though I am familiar with handbrake and have used it for years I could use a refresher on changing audio streams and containers. I'm used to just converting everything to an apple approved codec to make it work across all devices
So I tried using the universal preset and changing some of the options in the audio to ac3 but that did not work
could really use some help
thanks
13.2 does work with DTS audio and Dolby 5.1 please read my first post and my reply to the person who previously had trouble with getting it work.
SamuraiAlex said:
Could anyone confirm that they have DD 5.1 working on a FireTV with Gotham 13.2? Thanks.
Click to expand...
Click to collapse
I have it with 13.1. Haven't tried 13.2, sorry .
bruce7373 said:
I have it with 13.1. Haven't tried 13.2, sorry .
Click to expand...
Click to collapse
it works
Im not sure if this is of any help but I have DTS,AC3 and AAC 5.1 working with the fire TV. All I had to was basically what snowf0x wrote, and I also had the setting at "best match".
Could you post a screenshot of your audio settings? and maybe the title of your file so I could try it on my Fire TV?
Have not found any files which doesn't work yet. I also have mediacodec disabled with libstagefright enabled. The ONLY issue I have is LQ AVI files being a little choppy but that is a known issue with the fire TV.
ars_92 said:
Im not sure if this is of any help but I have DTS,AC3 and AAC 5.1 working with the fire TV. All I had to was basically what snowf0x wrote, and I also had the setting at "best match".
Could you post a screenshot of your audio settings? and maybe the title of your file so I could try it on my Fire TV?
Have not found any files which doesn't work yet. I also have mediacodec disabled with libstagefright enabled. The ONLY issue I have is LQ AVI files being a little choppy but that is a known issue with the fire TV.
Click to expand...
Click to collapse
Thanks for help, I want to be clear it is not all files it is just a small handful of files (the ones I posted on the previous page) that are giving me this problem. I have the exact same settings on my other XBMC boxes (Midnight Mx2, Apple TV 2) and it plays perfectly with Dolby Digital and DTS. Just for some reasons those 4 files out of the 100 I have play incorrectly.
If someone could just give me the settings in Handbrake to get them to play correctly that would solve my issue. If you PM I can tell you the files that I am using and you can test for yourself
The only app on my Fire TV Cube gen2 that can output a 5.1 bitstream is Amazon Video. With any other player, it will downmix a 5.1 audio track to 2.0 stereo. My soundbar will always indicate 2.0 Dolby Digital, except when I stream Amazon content, then I get 5.1 DD. So the hardware setup works.
Does anyone know of any player app that will put out 5.1 DD over HDMI when the content provides it? Tried VLC and MXPlayer, and they won't do it.
KODI.
Make sure in system audio (trust me):
Setting level expert
Number of channels 2 (yes two, allows passthrough to work)
Output config best match (I dont think this one matters)
Allow passthrough on
DD AC3 capable yes
Transcoding yes
Then DTS and EAC3 as it is.
These are proper Kodi settings for passthrough digital HDMI, Optical, Composite whatever
Thanks, that worked!
np happy to help