android - Inject uplink audio in call with Snapdragon MSM8960 SoC -
i've been investigating on topic specific msm8960 time. looked alsa hardware module google. michael's answer in post did mention msm8960 supported in-call uplink audio injection @ "hardware , device driver" level. did refer level @ alsa module?
from alsa config file on phone, seems in call voice playback done through /dev/snd/pcmc0d0p, or @ least comply alsa paradigm. possible play 1 of file descriptor achieve purpose? see interesting use_case definition in libalsa-intf.
the msm8960 provides alsa control named incall_music audio mixer
, can connect cpu dais multimedia1
, multimedia2
(which correspond alsa devices pcmc0d0p
, pcmc0d1p
, respectively). (see msm-pcm-routing source code)
so if had voice call running , wanted play audio on uplink through pcmc0d0p
through adb shell
(assuming you've got root access):
amix 'incall_music audio mixer multimedia1' 1 aplay -dhw:0,0 mono_8khz_audio.wav
more elegant way create new use-case in device's ucm file (snd_soc_msm_blah_blah..) add incall music routing in enable-sequence of new modifer:
'incall_music audio mixer multimedia1':1:1
(remember turn off in disable-sequence).
apps able use functionality on custom rom you'd have make other changes in audio hal , multimedia framework, new ucm setting selected desired stream types when call active.
due copyright reasons can't go detail rest of implementation, i'll leave exercise interested figure out themselves.
Comments
Post a Comment