问题描述
我做了具体平台现有的HAL一些改变,我想这个变化,当我开始我的音频流可以得到选择。
I made some changes in the platform specific existing HAL, and I want this changes to be get selected when I start my audio stream.
为此,我需要从其他流区分开来,所以我在HAL增加了一个变量,我想它会接触到我将力推系统/ lib目录/ HW目录我的共享库,这样,当我开始我流我设置这个变量在我的.so
For this I need to differentiate it from other streams, so I added a variable in HAL and I wanted it to be exposed to my shared library that I will be pushing to system/lib/hw directory, so that when I start my stream I set this variable in my .so
因此,在HAL我可以从其他流区分开来。
So that in HAL I can differentiate it from other streams.
任何想法在HAL变量暴露于系统中的/ lib目录/硬件的共享库?
Any ideas to expose the variable in HAL to shared library in system/lib/hw ?
建议/帮助将是非常美联社preciated。
Suggestions/help will be really appreciated.
推荐答案
我会建议你添加一个新的流类型( AUDIO_STREAM _
),可能是一个新的路由策略(战略_
)。然后修改 getStrategy
在 AudioPolicyManager
来回报您的新策略时,新的流类型使用,并修改 getDeviceForStrategy
来选择合适的 DEVICE_OUT _
为您的新策略路由的价值。
I would suggest that you add a new stream type (AUDIO_STREAM_
), and possibly a new routing strategy (STRATEGY_
). Then modify getStrategy
in the AudioPolicyManager
to return your new strategy when your new stream type is used, and modify getDeviceForStrategy
to select the appropriate DEVICE_OUT_
value for your new routing strategy.
这篇关于如何从HAL暴露变量,共享库,美元的系统/ lib目录/ HW(机器人)p $ psent?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!