Capturing audio frames from HDMI IN port

有些话、适合烂在心里 提交于 2019-12-11 18:09:52

问题


I have a rooted HiSense GoogleTV which has HDMI IN and OUT ports.

What I want to do is to record about 10 secs of the audio from the HDMI IN (from the set-top box). I am new to this, so please bear with me.

  1. Is this possible to do this on a rooted device?

  2. Does the HDMI data get decrypted (due to HDCP) after the HDMI IN and re-encrypted before it is routed out via HDMI out?

  3. If I were to try to capture the audio frames on a regular Linux box, how should I go about it? What components should I look into? I cannot find any documentation that describes the low level architecture and details on how the HDMI IN signal gets routed to HDMI OUT.

  4. Can you please point to the Android framework code that actually does this routing from HDMI In to OUT? Basically, want to understand the flow of what happens to the audio signal during the transfer from the HDMI IN to the OUT.

I am not sure if my questions make sense, but I hope you can give me some pointers on where I should start.


回答1:


Short answer: Not possible. The pass-through is completely isolated from android via the Trusted Video Path SOCs. You need to be a certified SOC provider to get anywhere near the signal.




回答2:


A HDMI input device should be identified as AUDIO_DEVICE_IN_AUX_DIGITAL (see audio.h), though I've never come across an Android device with HDMI input so I can't verify that.

Audio routing is handled by the AudioPolicyManager. There's an AudioPolicyManagerBase in libhardware_legacy, and then there's typically a platform-specific AudioPolicyManager implementation which overloads some of the base class' methods. Where this implementation is found depends on the platform. On Qualcomm platforms it's usually found somewhere under hardware/qcom/audio in the source tree.
The AudioPolicyManager performs high-level routing (like mapping stream types and audio sources to audio devices), and then uses the AudioHardware implementation and possibly other platform-specific classes to do the low-level routing (manage audio streams at the hardware level, load acoustic tuning parameters, interface with device drivers, etc).

Any HDMI input-related functionality is likely to be vendor specific, so might need the full source code for your Google TV device (i.e. including all patches that the vendor has applied on top of vanilla Android) if you want to be able to look at the code that handles HDMI audio input.




回答3:


You will not be able to access either the video or audio input since Google TV implements HDCP. The only way to change that, even on a rooted device, is to change the Google TV code and probably also the SOC HDMI drivers, neither of which have been open sourced by Google.



来源:https://stackoverflow.com/questions/15534175/capturing-audio-frames-from-hdmi-in-port

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!