RE: how Codec_engine call the dsplink

2010-04-07 Thread Tivy, Robert



From: davinci-linux-open-source-boun...@linux.davincidsp.com 
[mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of 
liuyue18301
Sent: Tuesday, April 06, 2010 6:56 PM
To: davinci-linux-open-source@linux.davincidsp.com
Subject: how Codec_engine call the dsplink

hello everybody:
  well in the video_copy demos of the codec_engine i think i call the api 
of dsplink to implement the communication between arm and dsp. but i can't find 
out that in the code
  who can help me it confused me so long time. what is the relationship 
codec_engine and dsplink and the relationship of calling
  thank you very much.




DSPLink is used internally by Codec Engine.  You do not call any DSPLink APIs, 
which is the whole point of Codec Engine, to insulate the user from the details 
of the implementation.  You just call Codec Engine APIs, as the video_copy demo 
does, or any of the Codec Engine example apps.

DSPLink is used by Codec Engine when there is a remote server configured into 
the system, so you need to configure a remote server but you don't need to 
configure the use of DSPLink, since Codec Engine does that for you.  If you're 
just doing a local codec then you won't specify a server and DSPLink is not 
needed in this case.

- Rob
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: how Codec_engine call the dsplink

2010-04-07 Thread Ring, Chris
Rob's right, the Link details are intentionally hidden under Codec Engine.  But 
it's often useful to know what's going on underneath.

There are more details about CE and DSP Link interaction during DSP start/stop 
in section 2's Opening an Engine and Closing an Engine here:
http://tiexpressdsp.com/index.php/Codec_Engine_Application_Developers_Guide

-

I couldn't find an article that describes the internal MSGQ usage under the 
VISA APIs, but you can get a good feel for what's going on under by studying 
the trace output when setting CE_DEBUG=3 
(http://tiexpressdsp.com/index.php/CE_DEBUG).

Here's a [very trimmed] excerpt of trace from a single VIDENC_process() call 
with CE_DEBUG=3 set.  The ARM-side is in red, the DSP side is in green, and 
I've underlined the lines where Codec Engine internally calls 
MSGQ_alloc()/put()/get()/free() on the ARM side, as well as MSGQ_get()/put() on 
the DSP side:

@1,454,227us: [+0 T:0x4001f000 S:0x03874944] ti.sdo.ce.video.VIDENC - 
VIDENC_process Enter (handle=0x44c90, inBufs=0x3874a74, outBufs=0x3874a68, 
inArgs=0x443c8, outArgs=0x443e0)
@1,454,428us: [+5 T:0x4001f000 S:0x038748dc] CV - VISA_allocMsg Allocating 
message for messageId=0x00026700
@1,458,639us: [+0 T:0x4001f000 S:0x038748e4] CV - VISA_call(visa=0x44c90, 
msg=0x41169c80): messageId=0x00026700, command=0x0
@1,458,807us: [+0 T:0x4001f000 S:0x038748ac] OC - Comm_put Enter(queue=0x2, 
msg=0x41169c80)
@1,459,039us: [+0 T:0x4001f000 S:0x038748ac] OC - Comm_put return (0)
@1,459,221us: [+0 T:0x4001f000 S:0x038748a4] OC - Comm_get 
Enter(queue=0x10001, msg=0x387495c, timeout=-1)
@1,507,703us: [+0 T:0x4001f000 S:0x038748a4] OC - Comm_get MSGQ_get() 
status=0x8000, return (0)
[DSP] @0,511,501tk: [+5 T:0x8b9fb21c S:0x8b9fd1e4] CN - NODE 
0x8fa82398(xavsc_ateme#0) call(algHandle=0x8fa82450, msg=0x8fe06c80); 
messageId=0x00026700
[DSP] @0,512,933tk: [+0 T:0x8b9fb21c S:0x8b9fd14c] ti.sdo.ce.video.VIDENC - 
VIDENC_process Enter (handle=0x8fa82450, inBufs=0x8b9fd1ec, 
outBufs=0x8b9fd1f8, inArgs=0x8fe06db8, outArgs=0x8fe06dc8)
[DSP] @0,513,035tk: [+5 T:0x8b9fb21c S:0x8b9fd12c] CV - 
VISA_enter(visa=0x8fa82450): algHandle = 0x8fa82480
[DSP] @0,513,095tk: [+0 T:0x8b9fb21c S:0x8b9fd10c] ti.sdo.ce.alg.Algorithm - 
Algorithm_activate Enter(alg=0x8fa82480)
[DSP] @0,513,157tk: [+0 T:0x8b9fb21c S:0x8b9fd10c] ti.sdo.ce.alg.Algorithm - 
Algorithm_activate Exit
[DSP] @0,622,199tk: [+5 T:0x8b9fb21c S:0x8b9fd12c] CV - 
VISA_exit(visa=0x8fa82450): algHandle = 0x8fa82480
[DSP] @0,622,282tk: [+0 T:0x8b9fb21c S:0x8b9fd10c] ti.sdo.ce.alg.Algorithm - 
Algorithm_deactivate Enter(alg=0x8fa82480)
[DSP] @0,622,371tk: [+0 T:0x8b9fb21c S:0x8b9fd10c] ti.sdo.ce.alg.Algorithm - 
Algorithm_deactivate Exit
[DSP] @0,622,424tk: [+0 T:0x8b9fb21c S:0x8b9fd14c] ti.sdo.ce.video.VIDENC - 
VIDENC_process Exit (handle=0x8fa82450, retVal=0x0)
[DSP] @0,623,888tk: [+5 T:0x8b9fb21c S:0x8b9fd1e4] CN - NODE returned from 
call(algHandle=0x8fa82450, msg=0x8fe06c80); messageId=0x00026700
@1,518,966us: [+0 T:0x4001f000 S:0x038748e4] CV - VISA_call Completed: 
messageId=0x00026700, command=0x0, return(status=0)
@1,522,687us: [+5 T:0x4001f000 S:0x038748bc] CV - VISA_freeMsg(0x44c90, 
0x41169c80): Freeing message with messageId=0x00026700
@1,522,855us: [+0 T:0x4001f000 S:0x03874944] ti.sdo.ce.video.VIDENC - 
VIDENC_process Exit (handle=0x44c90, retVal=0x0)

Chris


From: davinci-linux-open-source-boun...@linux.davincidsp.com 
[mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of 
Tivy, Robert
Sent: Wednesday, April 07, 2010 10:39 AM
To: liuyue18301; davinci-linux-open-source@linux.davincidsp.com
Subject: RE: how Codec_engine call the dsplink




From: davinci-linux-open-source-boun...@linux.davincidsp.com 
[mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of 
liuyue18301
Sent: Tuesday, April 06, 2010 6:56 PM
To: davinci-linux-open-source@linux.davincidsp.com
Subject: how Codec_engine call the dsplink

hello everybody:
  well in the video_copy demos of the codec_engine i think i call the api 
of dsplink to implement the communication between arm and dsp. but i can't find 
out that in the code
  who can help me it confused me so long time. what is the relationship 
codec_engine and dsplink and the relationship of calling
  thank you very much.




DSPLink is used internally by Codec Engine.  You do not call any DSPLink APIs, 
which is the whole point of Codec Engine, to insulate the user from the details 
of the implementation.  You just call Codec Engine APIs, as the video_copy demo 
does, or any of the Codec Engine example apps.

DSPLink is used by Codec Engine when there is a remote server configured into 
the system, so you need to configure a remote server but you don't need to 
configure the use of DSPLink, since Codec Engine does that for you.  If you're 
just doing a local codec then you won't specify a server