DTS Support, Audio track selection, USB full screen mode

Ideas and dreaming will go this forum

Re: DTS Support, Audio track selection, USB full screen mode

Postby doodlecz » Thu Jul 15, 2010 11:39 am

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.
doodlecz
Official SamyGO Developer
 
Posts: 98
Joined: Wed Mar 17, 2010 9:12 am

Re: DTS Support, Audio track selection, USB full screen mode

Postby alexlexx » Fri Jul 16, 2010 5:49 am

doodlecz wrote:Could you please check the _same_ file also with previous version? So we''ll be 100% sure, there is some difference between both versions.. Thanks..


I was check the same file with previous version - sound exist.

Thanks.
alexlexx
 
Posts: 8
Joined: Sun Jul 04, 2010 3:14 pm

Re: DTS Support, Audio track selection, USB full screen mode

Postby alaci » Tue Jul 27, 2010 4:57 pm

Also doesn't work on my 46B651T3P CI+ with 2006FW.
TV hangs at every start of a movie.
User avatar
alaci
 
Posts: 7
Joined: Mon Jan 04, 2010 4:49 pm

Re: DTS Support, Audio track selection, USB full screen mode

Postby dimitrilortet » Sun Aug 08, 2010 9:16 am

Does not work on 46B750 - with 2006.0FW patched
TV hangs at every start of a movie.
dimitrilortet
 
Posts: 3
Joined: Mon Apr 12, 2010 7:49 pm

Re: DTS Support, Audio track selection, USB full screen mode

Postby tolou » Tue Aug 10, 2010 7:59 pm

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.


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.
tolou
 
Posts: 6
Joined: Tue Aug 10, 2010 7:50 pm

Re: DTS Support, Audio track selection, USB full screen mode

Postby erdem_ua » Wed Aug 11, 2010 9:17 am

tolou wrote:
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.


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.


:) 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...
User avatar
erdem_ua
SamyGO Admin
 
Posts: 2957
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey

Re: DTS Support, Audio track selection, USB full screen mode

Postby theomeier » Wed Sep 15, 2010 8:08 am

to doodlecz

is there still a timeline to adapt your tool to other firmwares e.g. 2006.0 ?


doodlecz wrote:
theomeier wrote:
doodlecz wrote:What version of FW do you use? Mine is 2005.0.


My Version is:
T-CHLCIPDEUC 2006.0 (SWU_T-CHLCIPDEUC_002006_I02_ES000DS000_091112)


This will be the reason. After publishing next version I'll fix it for other FWs. Sorry about that.
theomeier
 
Posts: 4
Joined: Tue Jun 22, 2010 10:55 pm

Re: DTS Support, Audio track selection, USB full screen mode

Postby smartsmurf » Mon Oct 04, 2010 10:26 am

I need some help in understanding the AudioSwitch. Especially this part:
Code: Select all
void *asw_movieplay_injection()
{
...
   asm volatile(
      "MOV   R10,%0\n"
      "STR    R10,[R5,#0xDB0]\n"
      :
      : "r" (asw_streamid[asw_currentstream]) );

...
}

It stores "asw_streamid[asw_currentstream]" into [R5, ,#0xDB0]. The values in "asw_streamid[]" are assigned in "asw_process_mediatype()":

Code: Select all
...
      asw_streamcodec[asw_streams] = u8;
      asw_streamid[asw_streams] = u9;
      asw_streamptr[asw_streams] = u7;
      asw_streams++;
...

with "u9" coming from the injector code "asw_mediatype_injection()"
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();
...

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:
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}
...

So, #0xDB0 is not just "stream index + 1".

Do I miss something?
smartsmurf
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

Postby doodlecz » Wed Oct 06, 2010 12:26 pm

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:

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]


..called from:

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)


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)
doodlecz
Official SamyGO Developer
 
Posts: 98
Joined: Wed Mar 17, 2010 9:12 am

Re: DTS Support, Audio track selection, USB full screen mode

Postby smartsmurf » Wed Oct 06, 2010 1:22 pm

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:

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.
smartsmurf
Official SamyGO Developer
 
Posts: 111
Joined: Thu Jun 24, 2010 8:26 am
Location: Frankfurt, Germany

PreviousNext

Return to [B] Brainstorm

Who is online

Users browsing this forum: No registered users and 1 guest