如何修改Android的蓝牙堆栈启用A2DP接收器蓝牙、堆栈、接收器、Android

2023-09-03 22:42:07 作者:你对我说的,你还记得吗

我工作的录音机应用程序,使用蓝牙麦克风录制音频到Android设备(的Nexus 7 - 扎根安卓4.4.2)。它是在HFP目前已实施和一切工作正常。蓝牙麦克风与蓝兆WT32蓝牙模块+麦克风输入来实现,通过HFP音频质量是不是很大,但它足够了。

I'm working on an audio recorder app that uses a bluetooth mic to record audio on to an Android device (Nexus 7 - rooted Android 4.4.2). It's currently implemented on HFP and everything is working fine. The bluetooth mic is implemented with Bluegiga's WT32 bluetooth module + a mic input, audio quality via HFP isn't great but it's sufficient for now.

不过,我现在试图改变蓝牙配置文件A2DP,因为有两个麦克风输入(L / R)和WT32支持A2DP(源)。大量的研究后,我发现,股票Android不支持A2DP(片),它是可以修改Android的蓝牙堆栈,使A2DP(片)。

However, I'm now trying to change the bluetooth profile to A2dp, since there are two mic inputs (L/R) and WT32 supports A2dp (source). After much research I found that stock Android doesn't support A2dp (sink), and it's possible to modify Android's bluetooth stack to enable A2dp (sink).

我不明白的是如何来访问和修改的蓝牙堆栈。这将是很好,如果有人有一个答案是可以击穿的步骤来实现这一点。

What I don't understand is how does one access and modify the bluetooth stack. It would be nice if someone with an answer is able to break-down the steps to achieve this.

我已经试过了之后这个问题的答案: 通过蓝牙在Android中接收音频,但我似乎无法找到相应的文件进行修改。事实上,我甚至不知道我在寻找到合适的文件夹中。我已经通过通过Android的工作室的DDMS,文件资源管理器的设备文件看。

I've tried following the answer to this question: Receive audio via Bluetooth in Android, yet I can't seem to find the appropriate file to modify. Actually, I don't even know if I'm looking into the right folder. I've looked through the devices file via Android-studio's DDMS-File Explorer.

ps的,我还是相当新与Android应用程序开发,所以我可能误用一些术语和我道歉的,提前了。

ps, I'm still fairly new with Android app development, so I may have misused some of the terminologies and I apologies in-advance for that.

推荐答案

这实际上是我想要做的很长一段时间... 你不能文件中的配置文件的原因是因为谷歌从替代的的BlueZ蓝牙协议栈由谷歌和Broadcom建立了一个新的堆栈。在新的堆栈使用不同的配置文件,我不知道怎么鼓捣了。

This is actually that I'm trying to do for a long time... The reason you can't file the configuration file is because Google replaced the Bluetooth stack from BlueZ to a new stack built by Google and Broadcom. The new stack uses a different configuration file, which I don't know how to tinker with.

如果你是认真的,最接近我发现开始是在Android的蓝牙框架正式出台: https://source.android.com/devices/bluetooth.html

If you are serious about it, the closest thing I found to start with is the official introduction for the bluetooth framework on Android: https://source.android.com/devices/bluetooth.html