DTS Support, Audio track selection, USB full screen mode
Re: DTS Support, Audio track selection, USB full screen mode
Right now I'm limited with time. I'll try to make more compatible version of AudioSwitch (some searching procedure to find proper addresses to patch) and then I'll return to the subject. I think there are two possibilities - further analysis of possible DTS pass-through (there's at least one more function I'd like to debug) and also real-time (?) conversion of DTS to AC3 using sbav1's sample.
Re: DTS Support, Audio track selection, USB full screen mode
Also doesn't work on my 46B651T3P CI+ with 2006FW.
TV hangs at every start of a movie.
TV hangs at every start of a movie.
- erdem_ua
- SamyGO Admin
- Posts: 3125
- Joined: Thu Oct 01, 2009 6:02 am
- Location: Istanbul, Turkey
- Contact:
Re: DTS Support, Audio track selection, USB full screen mode
I think it's more easy to give sound to TV speakers instead of pass-through... Decoding of DTS not problem, problem is diverting the stream...tolou wrote:Let?s just focus on the DTS pass-through for now, as it bound to be much easier than realtime decoding don?t you think? I mean who would really wan?t DTS decoded into ... a TV sets stereo speakers? Most of us are using an external surround receiver anyways.doodlecz wrote:I think there are two possibilities - further analysis of possible DTS pass-through (there's at least one more function I'd like to debug) and also real-time (?) conversion of DTS to AC3 using sbav1's sample.
-
- Official SamyGO Developer
- Posts: 111
- Joined: Thu Jun 24, 2010 8:26 am
- Location: Frankfurt, Germany
Re: DTS Support, Audio track selection, USB full screen mode
I need some help in understanding the AudioSwitch. Especially this part:
It stores "asw_streamid[asw_currentstream]" into [R5, ,#0xDB0]. The values in "asw_streamid[]" are assigned in "asw_process_mediatype()":
with "u9" coming from the injector code "asw_mediatype_injection()"
So, asw_streamid[] contains the stream index + 1. That's OK so far. But when I look at the original code in Multimedia::MediaPlayer::Movie::CMovie::SetStreamId(void), which populates [R5,#0xDB0], it shows this:
So, #0xDB0 is not just "stream index + 1".
Do I miss something?
Code: Select all
void *asw_movieplay_injection()
{
...
asm volatile(
"MOV R10,%0\n"
"STR R10,[R5,#0xDB0]\n"
:
: "r" (asw_streamid[asw_currentstream]) );
...
}
Code: Select all
...
asw_streamcodec[asw_streams] = u8;
asw_streamid[asw_streams] = u9;
asw_streamptr[asw_streams] = u7;
asw_streams++;
...
Code: Select all
...
"ADD R9, R6, #0x1\n"
);
asm volatile(
"MOV r5,%0\n"
"STR r7,[r5]\n"
"MOV r5,%1\n"
"STR r8,[r5]\n"
"MOV r5,%2\n"
"STR r9,[r5]\n"
:
: "r" (&u7), "r" (&u8), "r" (&u9) );
asw_process_mediatype();
...
Code: Select all
...
text:00FCE8A4 loc_FCE8A4 ; CODE XREF: Multimedia::MediaPlayer::Movie::CMovie::SetStreamId(void)+14j
.text:00FCE8A4 ; DATA XREF: Multimedia::MediaPlayer::Movie::CMovie::SetStreamId(void)+1Co
.text:00FCE8A4 00 20 A0 E3 MOV R2, #0 ; jumptable 00FCE860 case 11
.text:00FCE8A8 01 10 A0 E3 MOV R1, #1
.text:00FCE8AC C0 30 A0 E3 MOV R3, #0xC0
.text:00FCE8B0 AC 2D 80 E5 STR R2, [R0,#0xDAC]
.text:00FCE8B4 B0 3D 80 E5 STR R3, [R0,#0xDB0]
.text:00FCE8B8 A0 2D 80 E5 STR R2, [R0,#0xDA0]
.text:00FCE8BC 9C 2D 80 E5 STR R2, [R0,#0xD9C]
.text:00FCE8C0 01 00 A0 E1 MOV R0, R1
.text:00FCE8C4 00 A8 9D E8 LDMFD SP, {R11,SP,PC}
.text:00FCE8C8 ; ---------------------------------------------------------------------------
.text:00FCE8C8
.text:00FCE8C8 loc_FCE8C8 ; CODE XREF: Multimedia::MediaPlayer::Movie::CMovie::SetStreamId(void)+14j
.text:00FCE8C8 ; DATA XREF: Multimedia::MediaPlayer::Movie::CMovie::SetStreamId(void)+1Co
.text:00FCE8C8 98 3D 90 E5 LDR R3, [R0,#0xD98] ; jumptable 00FCE860 cases 4,8
.text:00FCE8CC 05 00 53 E3 CMP R3, #5
.text:00FCE8D0 01 00 00 0A BEQ loc_FCE8DC
.text:00FCE8D4 04 00 53 E3 CMP R3, #4
.text:00FCE8D8 EE FF FF 1A BNE loc_FCE898 ; default
.text:00FCE8D8 ; jumptable 00FCE860 cases 1-3,5-7,9,10
.text:00FCE8DC
.text:00FCE8DC loc_FCE8DC ; CODE XREF: Multimedia::MediaPlayer::Movie::CMovie::SetStreamId(void)+84j
.text:00FCE8DC A8 3D 90 E5 LDR R3, [R0,#0xDA8] ; CMovie->SamsungAudioCodecID
.text:00FCE8E0 03 00 53 E3 CMP R3, #3
.text:00FCE8E4 BD 30 83 02 ADDEQ R3, R3, #0xBD
.text:00FCE8E8 B0 3D 80 05 STREQ R3, [R0,#0xDB0]
.text:00FCE8EC 02 00 00 0A BEQ loc_FCE8FC
.text:00FCE8F0 09 00 53 E3 CMP R3, #9
.text:00FCE8F4 97 30 83 02 ADDEQ R3, R3, #0x97
.text:00FCE8F8 B0 3D 80 05 STREQ R3, [R0,#0xDB0]
.text:00FCE8FC
.text:00FCE8FC loc_FCE8FC ; CODE XREF: Multimedia::MediaPlayer::Movie::CMovie::SetStreamId(void)+A0j
.text:00FCE8FC E0 30 A0 E3 MOV R3, #0xE0
.text:00FCE900 01 10 A0 E3 MOV R1, #1
.text:00FCE904 AC 3D 80 E5 STR R3, [R0,#0xDAC]
.text:00FCE908 A0 3D 80 E5 STR R3, [R0,#0xDA0]
.text:00FCE90C 9C 3D 80 E5 STR R3, [R0,#0xD9C]
.text:00FCE910 01 00 A0 E1 MOV R0, R1
.text:00FCE914 00 A8 9D E8 LDMFD SP, {R11,SP,PC}
...
Do I miss something?
Re: DTS Support, Audio track selection, USB full screen mode
In fact, I think, SetStreamId function is a little bit strange. First of all, it switch-jumps according to the number of tracks and only in _some_special_cases_, it sets 0xDB0 to constant (various private stream ids - 0xA0, 0xBD, 0xC0), although in previous function (Multimedia::MediaPlayer::Movie::CMovie::GetAudioInfo) it is set to the first (!) stream index:
..called from:
So after possible (and maybe buggy or not understood..) updating 0xDB0 to private stream id, we finally set it to really requested stream id.. (similar to setting the first audio stream id by GetAudioInfo)
Code: Select all
.text:00F6F970 loc_F6F970 ; CODE XREF: Multimedia::MediaPlayer::Movie::CMovie::GetAudioInfo(Multimedia::_tMediaInfoContext *,int)+E0j
.text:00F6F970 LDR R3, [R1,#0x288]
.text:00F6F974 MOV R6, R2
.text:00F6F978 STR R3, [R4,#0xDA8]
.text:00F6F97C LDR R2, [R5,#0x224]
.text:00F6F980 STR R2, [R4,#0xDAC]
.text:00F6F984 LDR R3, [R1,#0x28C]
.text:00F6F988 STR R12, [R4,#0xDB4]
.text:00F6F98C STR R3, [R4,#0xDB0]
Code: Select all
.text:00F5B5E8 MOV R2, #1 ----- get stream id of the first audio track
.text:00F5B5EC MOV R0, R5
.text:00F5B5F0 BL _ZN10Multimedia11MediaPlayer5Movie6CMovie12GetAudioInfoEPNS_18_tMediaInfoContextEi ; Multimedia::MediaPlayer::Movie::CMovie::GetAudioInfo(Multimedia::_tMediaInfoContext *,int)
-
- Official SamyGO Developer
- Posts: 111
- Joined: Thu Jun 24, 2010 8:26 am
- Location: Frankfurt, Germany
Re: DTS Support, Audio track selection, USB full screen mode
I agree with the first part. But I doubt that the switch() in SetStreamId() jumps according to the number of streams (nStreams) variable. The _tMediaInfoContext is at offset 0x18 within the class definition of CMovie. So the offset 0x220 from "this" will point to 0x208 within _tMediaInfoContext - which is the container type.doodlecz wrote:In fact, I think, SetStreamId function is a little bit strange. First of all, it switch-jumps according to the number of tracks and only in _some_special_cases_, it sets 0xDB0 to constant (various private stream ids - 0xA0, 0xBD, 0xC0), although in previous function (Multimedia::MediaPlayer::Movie::CMovie::GetAudioInfo) it is set to the first (!) stream index: