2013-08-27, 20:43
I have created a hack to get pass through in xbmc, both hdmi and spdif output, working on minix neo devices like X5, X5 mini and X7, link to thread on minixforums.com.
This hack may also work on other RK3066 and RK3188 based devices but i haven't investigated that yet.
My solution to the problem that the android java framework doesn't allow you to pass a flag to activate pass through, is to binary patch the file libmedia.so to activate pass through when the stream type argument to AudioTrack is set to STREAM_VOICE_CALL.
Since this hack is created to use on android based multimedia devices not intended for making telephone calls with, the use of STREAM_VOICE_CALL as pass through flag should not cause to much trouble.
If it does I have thought of using a combination of STREAM_VOICE_CALL and CHANNEL_OUT_5POINT1 since phone calls probably isn't more than stereo, but so far I haven't got any reports of problem caused by this.
The main problem with this hack is that it requires a modified xbmc version, that sets the audio stream type to STREAM_VOICE_CALL instead of STREAM_MUSIC when m_passthrough is true to activate pass through.
I realize that this is not an optimal solution, requiring a binary patched libmedia.so and a wrongful use of arguments to a function, and that this never could be used straight off in the main xbmc build but it's the best I have managed to come up with so far.
What I was hoping for is that this could be implemented as an advanced feature available as an option in advancedsettings.xml I have created all the code necessary for this, and by all I mean the few lines needed, and compiled my version.
So my question is, is there even the slightest possibility for me to get this solution in to the xbmc code?
This hack may also work on other RK3066 and RK3188 based devices but i haven't investigated that yet.
My solution to the problem that the android java framework doesn't allow you to pass a flag to activate pass through, is to binary patch the file libmedia.so to activate pass through when the stream type argument to AudioTrack is set to STREAM_VOICE_CALL.
Since this hack is created to use on android based multimedia devices not intended for making telephone calls with, the use of STREAM_VOICE_CALL as pass through flag should not cause to much trouble.
If it does I have thought of using a combination of STREAM_VOICE_CALL and CHANNEL_OUT_5POINT1 since phone calls probably isn't more than stereo, but so far I haven't got any reports of problem caused by this.
The main problem with this hack is that it requires a modified xbmc version, that sets the audio stream type to STREAM_VOICE_CALL instead of STREAM_MUSIC when m_passthrough is true to activate pass through.
I realize that this is not an optimal solution, requiring a binary patched libmedia.so and a wrongful use of arguments to a function, and that this never could be used straight off in the main xbmc build but it's the best I have managed to come up with so far.
What I was hoping for is that this could be implemented as an advanced feature available as an option in advancedsettings.xml I have created all the code necessary for this, and by all I mean the few lines needed, and compiled my version.
So my question is, is there even the slightest possibility for me to get this solution in to the xbmc code?