注入呼叫上行音频的Snapdragon MSM8960系统芯片 [英] Inject uplink audio in call with Snapdragon MSM8960 SoC

查看:978
本文介绍了注入呼叫上行音频的Snapdragon MSM8960系统芯片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究关于这一主题具体到MSM8960一段时间。我看着从谷歌的 ALSA硬件模块。在迈克尔的回答<一href="http://stackoverflow.com/questions/10544992/call-audio-stream-modification-in-android-4-0-ics">post曾提到MSM8960支持的呼叫上行音频注射硬件和设备驱动程序的水平。难道它是指水平在这个ALSA模块?

I've been investigating on this topic specific to MSM8960 for some time. I looked into the ALSA hardware module from google. Michael's answer in the post did mention that MSM8960 supported the in-call uplink audio injection at "Hardware and Device Driver" level. Did it refer to the level at this ALSA module?

从手机上的ALSA配置文件,它似乎是在电话语音播放是通过为/ dev / SND / pcmC0D0p,完成或至少符合ALSA范例。是否有可能与文件描述符来达到目的的人玩?我确实看到libalsa-INTF一些有趣的USE_CASE定义。

From the ALSA config file on the phone, it seems the in call voice playback is done through /dev/snd/pcmC0D0p, or at least comply with the ALSA paradigm. Is it possible to play with one of the file descriptor to achieve the purpose? I do see some interesting USE_CASE definition in libalsa-intf.

推荐答案

该MSM8960提供了一个名为 Incall_Music音频混合器的ALSA控制,可以连接CPU讲台 MultiMedia1 MultiMedia2 (这将符合ALSA设备 pcmC0D0p pcmC0D1p ,分别)。 (请参阅<一href="https://www.$c$caurora.org/gitweb/quic/la/?p=kernel/msm.git;a=blob;f=sound/soc/msm/msm-pcm-routing.c;h=93866c5f3564ed460cd9d5a4e2545a0bacb45745;hb=4c1e76a598cfdd12b050c2e74644c88f2fbaadab"相对=nofollow> MSM-PCM-路由源$ C ​​$ C)

The MSM8960 provides an ALSA control named Incall_Music Audio Mixer, to which you can connect CPU DAIs MultiMedia1 and MultiMedia2 (which would correspond to ALSA devices pcmC0D0p and pcmC0D1p, respectively). (see the msm-pcm-routing source code)

所以,如果你有一个语音呼叫运行,并想通过亚行外壳通过 pcmC0D0p 打在上行链路上的一些声音,你能做到这一点(假设你有root访问权限):

So if you had a voice call running and wanted to play some audio on the uplink through pcmC0D0p you could do this through adb shell (assuming that you've got root access):

amix 'Incall_Music Audio Mixer MultiMedia1' 1
aplay -Dhw:0,0 mono_8khz_audio.wav


更优雅的方式是创建一个新的用例在设备的UCM文件(snd_soc_msm_blah_blah ..),你在启用序列新的改性剂的添加incall音乐路由:


The more elegant way would be to create a new use-case in the device's UCM file (snd_soc_msm_blah_blah..) where you add the incall music routing in the enable-sequence of your new modifer:

'Incall_Music Audio Mixer MultiMedia1':1:1

(记得要关掉它的禁用序列)。
对于应用程序才能够使用您的自定义ROM此功能,你还必须使音频HAL和多媒体框架其他一些变化,让您的新UCM设置中选择了当呼叫处于活动状态所需的流类型。
由于版权的原因,我不能进入任何细节实施的休息,所以我把它作为一个练习对于那些有兴趣弄明白自己。

(remember to turn it off in the disable-sequence).
For apps to be able to use this functionality on your custom ROM you'd also have to make some other changes in the audio HAL and multimedia framework, so that your new UCM setting is selected for the desired stream types when a call is active.
Due to copyright reasons I can't go into any detail about the rest of the implementation, so I'll leave it as an exercise for those interested to figure it out for themselves.

这篇关于注入呼叫上行音频的Snapdragon MSM8960系统芯片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆