DVTB on BeagleBoard.

Hi everyone,

I installed TI's dvsdk on my host. Reconfigured the following memory
allocations in the decode.tcf/encode.tcf in dvsdk_install_dir/
omap3530_combos/pkgs/ti/sdo/servers/decode, encode/:
DDRALGHEAP,DDR2,DSPLINKMEM,RESET_VECTOR as it seems the previous
settings(0x86800000-0x89700000) override the kernel memory
(0x80000000-0x88000000).

I built the combos_dir and then built /dvsdk_install_dir/
dvtb_install_dir, and got dvtb-d/r excutables.

I load the excuables and loadmodules.sh(reconfigure the cmemk.ko's
phys_start and end, due to the same reason) into beagleboard, 1. load
the three modules sucessfully, 2. open dvtb-d/r, 3. set the h264encode
params(setp params) and activate the h264 encode process(func ).

The result looks no good:

"failed to open engine", error=3 means "cannot load DSP"

I don't know what exactly this error means, and please anyone tell me
why it doesn't work, and how should I fix it??

Thanks in advance.

michael wrote:

Hi everyone,

I installed TI's dvsdk on my host. Reconfigured the following memory
allocations in the decode.tcf/encode.tcf in dvsdk_install_dir/
omap3530_combos/pkgs/ti/sdo/servers/decode, encode/:
DDRALGHEAP,DDR2,DSPLINKMEM,RESET_VECTOR as it seems the previous
settings(0x86800000-0x89700000) override the kernel memory
(0x80000000-0x88000000).

I built the combos_dir and then built /dvsdk_install_dir/
dvtb_install_dir, and got dvtb-d/r excutables.

I load the excuables and loadmodules.sh(reconfigure the cmemk.ko's
phys_start and end, due to the same reason) into beagleboard, 1. load
the three modules sucessfully, 2. open dvtb-d/r, 3. set the h264encode
params(setp params) and activate the h264 encode process(func ).

The result looks no good:

"failed to open engine", error=3 means "cannot load DSP"

CE_DEBUG=2

?Im sorry, What do you mean??

This is setp and func:

setp engine name encode
setp engine trace 1
setp videnc1 codec h264enc

setp videnc1 encodingPreset 0
setp videnc1 rateControlPreset 1
setp videnc1 maxHeight 576
setp videnc1 maxWidth 720
setp videnc1 maxFrameRate 30000
setp videnc1 maxBitRate 2000000
setp videnc1 dataEndianness 1
setp videnc1 maxInterFrameInterval 1
setp videnc1 inputChromaFormat 4
setp videnc1 inputContentType 0
setp videnc1 reconChromaFormat -1
setp videnc1 inputHeight 480
setp videnc1 inputWidth 720
setp videnc1 refFrameRate 30000
setp videnc1 targetFrameRate 30000
setp videnc1 targetBitRate 2000000
setp videnc1 intraFrameInterval 30
setp videnc1 generateHeader 0
setp videnc1 captureWidth 0
setp videnc1 forceFrame 0
setp videnc1 interFrameInterval 1
setp videnc1 mbDataFlag 0
setp videnc1 framePitch 720
setp videnc1 numFrames 30

func videnc1 -s test.yuv -t h264e.264

This is the command result:

[DVEVM-ST-LOG]: dvevmStFuncDispatcher.c: Starting Thread for command
<videnc1>
[DVEVM-ST-DEBUG]: dvevmStFuncDispatcher.c: Returning 2
PNDG: func

<DVEVM-ST> $ [DVEVM-ST-DEBUG]: dvevmStVidCapture1.c: Video Encoder
[capture][enc
ode] called with USE DSP option
[DVEVM-ST-DEBUG]: dvevmStVidCapture1.c: Number of frames to [capture]
[encode] :
30
[DVEVM-ST-ERROR]: dvevmStEngine.c: Engine <encode> open failed. Status
=> 3
[DVEVM-ST-ERROR]: dvevmStVidCapture1.c: Cannot initialize Engine
<encode>
[DVEVM-ST-LOG]: dvevmStVidCapture1.c: Video [capture][encode]
completed for <-1>
frames
[DVEVM-ST-LOG]: dvevmStVidCapture1.c: Video Encoder <h264enc> closed
[DVEVM-ST-LOG]: dvevmStVidCapture1.c: Engine <encode> closed

michael wrote:

?Im sorry, What do you mean??

http://wiki.omap.com/index.php?title=CE_DEBUG

http://wiki.omap.com/index.php?title=Codec_Engine_Application_Developers_Guide#What_About_Codec_Engine_Debugging.3F

Thanks, the results here.
error: cannot access file encodeCombo.x64P.
memory mapping problem in tcf?

<DVEVM-ST> $ func videnc1 -s test.yuv -t h264e.264
[DVEVM-ST-LOG]: dvevmStFuncDispatcher.c: Starting Thread for command
<videnc1>
[DVEVM-ST-DEBUG]: dvevmStFuncDispatcher.c: Returning 2
PNDG: func

<DVEVM-ST> $ [DVEVM-ST-DEBUG]: dvevmStVidCapture1.c: Video Encoder
[capture][enc
ode] called with USE DSP option
[DVEVM-ST-DEBUG]: dvevmStVidCapture1.c: Number of frames to [capture]
[encode] :
30
@81,145,019us: [+0 T:0x412e7490] CE - Engine_open> Enter('encode',
0x0, 0x412e6d
d4)
@81,145,111us: [+0 T:0x412e7490] CE - rserverOpen('encodeCombo.x64P'),
count = 0

@81,145,141us: [+0 T:0x412e7490] OP - Processor_create> Enter
(imageName='encodeC
ombo.x64P', linkCfg='(null)', attrs=0x412e6d78)
@81,145,538us: [+7 T:0x412e7490] OP - Processor_create> ERROR: cannot
access fil
e encodeCombo.x64P
@81,145,568us: [+6 T:0x412e7490] CE - rserverOpen: can't start
'encodeCombo.x64P
'; Processor_create failed
@81,145,629us: [+0 T:0x412e7490] CE - rserverOpen('encodeCombo.x64P'):
0x0 done.

@81,145,660us: [+0 T:0x412e7490] CE - Engine_close(0x97878)
@81,145,721us: [+0 T:0x412e7490] CE - Engine_open> return(0)
[DVEVM-ST-ERROR]: dvevmStEngine.c: Engine <encode> open failed. Status
=> 3
[DVEVM-ST-ERROR]: dvevmStVidCapture1.c: Cannot initialize Engine
<encode>
[DVEVM-ST-LOG]: dvevmStVidCapture1.c: Video [capture][encode]
completed for <-1>
frames
[DVEVM-ST-LOG]: dvevmStVidCapture1.c: Video Encoder <h264enc> closed
@81,145,904us: [+0 T:0x412e7490] CE - Engine_close(0x0)
[DVEVM-ST-LOG]: dvevmStVidCapture1.c: Engine <encode> closed

The file encodeCombo.x64P, which contains the DSP code, needs to be in the same directory as the DVTB executable, so it can be downloaded to the C64+ processor.

Mark

2009/5/13 michael <joviryan@gmail.com>

Thanks, I copied the x64p file to dvtb excutable directory, and run,
This time it get something new, i hope you spend some time help me
analyse:

setp....pass

<DVEVM-ST> $ func videnc1 -s test.yuv -t h264e.264
[DVEVM-ST-LOG]: dvevmStFuncDispatcher.c: Starting Thread for command
<videnc1>
[DVEVM-ST-DEBUG]: dvevmStFuncDispatcher.c: Returning 2
PNDG: func

<DVEVM-ST> $ [DVEVM-ST-DEBUG]: dvevmStVidCapture1.c: Video Encoder
[capture][enc
ode] called with USE DSP option
[DVEVM-ST-DEBUG]: dvevmStVidCapture1.c: Number of frames to [capture]
[encode] :
30
@26,600,036us: [+0 T:0x412e7490] CE - Engine_open> Enter('encode',
0x<1>Unhandle
d fault: external abort on non-linefetch (0x1008) at 0xc8a00208
Unhandled fault: external abort on non-linefetch (0x1008) at
0xc8a00208
0, 0x412e6dd4)
@26,600,097us: [Internal error: : 1008 [#1]
Internal error: : 1008 [#1]
Modules linked in:Modules linked in: lpm_omap3530(F) lpm_omap3530(F)
dsplinkk(F)
dsplinkk(F) cmemk cmemk

CPU: 0 Tainted: GF (2.6.22.18-omap3 #3)
CPU: 0 Tainted: GF (2.6.22.18-omap3 #3)
PC is at IPS_init+0x168/0x288 [dsplinkk]
PC is at IPS_init+0x168/0x288 [dsplinkk]
LR is at map_vm_area+0x194/0x1b8
LR is at map_vm_area+0x194/0x1b8
pc : [<bf00e868>] lr : [<c0098490>] psr: 80000013
sp : c4697db8 ip : c4697d08 fp : c4697dfc
pc : [<bf00e868>] lr : [<c0098490>] psr: 80000013
sp : c4697db8 ip : c4697d08 fp : c4697dfc
r10: 00000020 r9 : 00000000 r8 : 00000000
r10: 00000020 r9 : 00000000 r8 : 00000000
r7 : 00008000 r6 : 00000000 r5 : bf0208bc r4 : c8a00200
r7 : 00008000 r6 : 00000000 r5 : bf0208bc r4 : c8a00200
r3 : 00000000 r2 : 00000000 r1 : 00000100 r0 : 00008000
r3 : 00000000 r2 : 00000000 r1 : 00000100 r0 : 00008000
Flags: Nzcv IRQs on FIQs on Mode SVC_32 Segment user
Flags: Nzcv IRQs on FIQs on Mode SVC_32 Segment user
Control: 00c5387f Table: 83f58018 DAC: 00000015
Control: 00c5387f Table: 83f58018 DAC: 00000015
Process dvtb-d (pid: 1384, stack limit = 0xc46962d8)
Process dvtb-d (pid: 1384, stack limit = 0xc46962d8)
Stack: (0xc4697db8 to 0xc4698000)
Stack: (0xc4697db8 to 0xc4698000)
7da0: 7da0:
                                        bf0208cc bf0208cc 00002380
00002380

7dc0: 7dc0: c4697ddc c4697ddc 00000000 00000000 ffffffff ffffffff
c4697e1c c4697
e1c 00000000 00000000 00000000 00000000 bf020b18 bf020b18 00000001
00000001

7de0: 7de0: 00008000 00008000 00000000 00000000 c8a00180 c8a00180
00000000 00000
000 c4697e3c c4697e3c c4697e00 c4697e00 bf00f678 bf00f678 bf00e70c
bf00e70c

7e00: 7e00: bf020b18 bf020b18 00000080 00000080 bf020e70 bf020e70
c8878000 c8878
000 c886e000 c886e000 c8a00000 c8a00000 00008000 00008000 00000000
00000000

7e20: 7e20: bf020b00 bf020b00 c8870000 c8870000 00000000 00000000
c886e000 c886e
000 c4697e6c c4697e6c c4697e40 c4697e40 bf00f34c bf00f34c bf00f58c
bf00f58c

7e40: 7e40: bf020b04 bf020b04 00000100 00000100 bf020e38 bf020e38
00008000 00008
000 00000000 00000000 00000000 00000000 00000000 00000000 bf01ff38
bf01ff38

7e60: 7e60: c4697e8c c4697e8c c4697e70 c4697e70 bf013374 bf013374
bf00f1d0 bf00f
1d0 00008000 00008000 bf01ff38 bf01ff38 00000001 00000001 00000000
00000000

7e80: 7e80: c4697ed4 c4697ed4 c4697e90 c4697e90 bf009824 bf009824
bf013304 bf013
304 00000052 00000052 00000001 00000001 c4697eb4 c4697eb4 c8895000
c8895000

7ea0: 7ea0: 00000000 00000000 0000b580 0000b580 c4697ec4 c4697ec4
00006c08 00006
c08 00008000 00008000 40ae6d74 40ae6d74 c4bf9260 c4bf9260 c0029f68
c0029f68

7ec0: 7ec0: c4696000 c4696000 00000000 00000000 c4697f3c c4697f3c
c4697ed8 c4697
ed8 bf008544 bf008544 bf009770 bf009770 c0023800 c0023800 c039800c
c039800c

7ee0: 7ee0: 00000017 00000017 c4697fb0 c4697fb0 0004a338 0004a338
0009a4a4 0009a
4a4 00000007 00000007 0008010c 0008010c c4697fac c4697fac c4697f08
c4697f08

7f00: 7f00: c00291e8 c00291e8 00008000 00008000 00000000 00000000
00000000 00000
000 2f0813c0 2f0813c0 0003cce0 0003cce0 00000188 00000188 00000002
00000002

7f20: 7f20: c69b8638 c69b8638 00006c08 00006c08 40ae6d74 40ae6d74
00000009 00000
009 c4697f54 c4697f54 c4697f40 c4697f40 c00af250 c00af250 bf008094
bf008094

7f40: 7f40: c4bf9260 c4bf9260 40ae6d74 40ae6d74 c4697f7c c4697f7c
c4697f58 c4697
f58 c00af4c0 c00af4c0 c00af1f4 c00af1f4 c6da0340 c6da0340 00000053
00000053

7f60: 7f60: 00000009 00000009 40ae6d74 40ae6d74 00006c08 00006c08
c4bf9260 c4bf9
260 c4697fa4 c4697fa4 c4697f80 c4697f80 c00af518 c00af518 c00af26c
c00af26c

7f80: 7f80: c4696000 c4696000 00000001 00000001 00008000 00008000
00081bb8 00081
bb8 00080af0 00080af0 00000036 00000036 00000000 00000000 c4697fa8
c4697fa8

7fa0: 7fa0: c0029dc0 c0029dc0 c00af4e4 c00af4e4 00008000 00008000
00081bb8 00081
bb8 00000009 00000009 00006c08 00006c08 40ae6d74 40ae6d74 00000009
00000009

7fc0: 7fc0: 00008000 00008000 00081bb8 00081bb8 00080af0 00080af0
00000036 00000
036 0009a4a4 0009a4a4 00000007 00000007 0008010c 0008010c 40ae6d64
40ae6d64

7fe0: 7fe0: 0009a4d8 0009a4d8 40ae6ca8 40ae6ca8 00043e9c 00043e9c
401ed83c 401ed
83c 80000010 80000010 00000009 00000009 00000000 00000000 00000000
00000000

Backtrace: Backtrace:

[<bf00e700>] [<bf00e700>] (IPS_init+0x0/0x288 [dsplinkk]) (IPS_init
+0x0/0x288 [d
splinkk]) from [<bf00f678>] from [<bf00f678>] (LDRV_IPS_init
+0xf8/0x17c [dsplink
k])
(LDRV_IPS_init+0xf8/0x17c [dsplinkk])
[<bf00f580>] [<bf00f580>] (LDRV_IPS_init+0x0/0x17c [dsplinkk])
(LDRV_IPS_init+0x
0/0x17c [dsplinkk]) from [<bf00f34c>] from [<bf00f34c>] (LDRV_DRV_init
+0x188/0x2
9c [dsplinkk])
(LDRV_DRV_init+0x188/0x29c [dsplinkk])
[<bf00f1c4>] [<bf00f1c4>] (LDRV_DRV_init+0x0/0x29c [dsplinkk])
(LDRV_DRV_init+0x
0/0x29c [dsplinkk]) from [<bf013374>] from [<bf013374>] (LDRV_PROC_init
+0x7c/0xc
4 [dsplinkk])
(LDRV_PROC_init+0x7c/0xc4 [dsplinkk])
[<bf0132f8>] [<bf0132f8>] (LDRV_PROC_init+0x0/0xc4 [dsplinkk])
(LDRV_PROC_init+0
x0/0xc4 [dsplinkk]) from [<bf009824>] from [<bf009824>]
(PMGR_PROC_attach+0xc0/0
x290 [dsplinkk])
(PMGR_PROC_attach+0xc0/0x290 [dsplinkk])
r7:00000000 r7:00000000 r6:00000001 r6:00000001 r5:bf01ff38
r5:bf01ff38 r4:0000
8000 r4:00008000

[<bf009764>] [<bf009764>] (PMGR_PROC_attach+0x0/0x290 [dsplinkk])
(PMGR_PROC_att
ach+0x0/0x290 [dsplinkk]) from [<bf008544>] from [<bf008544>]
(DRV_Ioctl+0x4bc/0
x7c4 [dsplinkk])
(DRV_Ioctl+0x4bc/0x7c4 [dsplinkk])
[<bf008088>] [<bf008088>] (DRV_Ioctl+0x0/0x7c4 [dsplinkk]) (DRV_Ioctl
+0x0/0x7c4
[dsplinkk]) from [<c00af250>] from [<c00af250>] (do_ioctl+0x68/0x78)
(do_ioctl+0x68/0x78)
r6:00000009 r6:00000009 r5:40ae6d74 r5:40ae6d74 r4:00006c08
r4:00006c08

[<c00af1e8>] [<c00af1e8>] (do_ioctl+0x0/0x78) (do_ioctl+0x0/0x78) from
[<c00af4c
0>] from [<c00af4c0>] (vfs_ioctl+0x260/0x278)
(vfs_ioctl+0x260/0x278)
r5:40ae6d74 r5:40ae6d74 r4:c4bf9260 r4:c4bf9260

[<c00af260>] [<c00af260>] (vfs_ioctl+0x0/0x278) (vfs_ioctl+0x0/0x278)
from [<c00
af518>] from [<c00af518>] (sys_ioctl+0x40/0x64)
(sys_ioctl+0x40/0x64)
r7:c4bf9260 r7:c4bf9260 r6:00006c08 r6:00006c08 r5:40ae6d74
r5:40ae6d74 r4:0000
0009 r4:00000009

[<c00af4d8>] [<c00af4d8>] (sys_ioctl+0x0/0x64) (sys_ioctl+0x0/0x64)
from [<c0029
dc0>] from [<c0029dc0>] (ret_fast_syscall+0x0/0x2c)
(ret_fast_syscall+0x0/0x2c)
r7:00000036 r7:00000036 r6:00080af0 r6:00080af0 r5:00081bb8
r5:00081bb8 r4:0000
8000 r4:00008000

Code: Code: ebfff184 ebfff184 e1a08006 e1a08006 e1a07000 e1a07000
ea00000d ea000
00d (e5943008) (e5943008)

+0 T:0x412e7490] CE - rserverOpen('encodeCombo.x64P'), count = 0
@26,600,158us: [+0 T:0x412e7490] OP - Processor_create> Enter
(imageName='encodeC
ombo.x64P', linkCfg='(null)', attrs=0x412e6d78)
@26,600,280us: [+0 T:0x412e7490] OP - doCmd> Enter (cmdId=1,
proc=0x97658)
@26,600,341us: [+0 T:0x412e7490] ti.sdo.ce.osal.Sem - Entered
Sem_post> sem[0x90
330]
@26,600,402us: [+0 T:0x412e7490] ti.sdo.ce.osal.Sem - Leaving
Sem_post> sem[0x90
330]
@26,600,463us: [+0 T:0x412e7490] ti.sdo.ce.osal.Sem - Entered
Sem_pend> sem[0x90
348] timeout[0xffffffff]
@26,600,524us: [+0 T:0x40ae7490] ti.sdo.ce.osal.Sem - Leaving
Sem_pend> sem[0x90
330] status[0]
@26,600,555us: [+0 T:0x40ae7490] OP - getCmd_d> Exit (result=1)
@26,600,585us: [+0 T:0x40ae7490] OP - Processor_create_d> Enter
(proc=0x97658)
@26,600,646us: [+0 T:0x40ae7490] ti.sdo.ce.ipc.Power - Power_on> Enter
(handle=0x
97674)
@26,600,677us: [+2 T:0x40ae7490] ti.sdo.ce.ipc.Power - Power_on>
Opening Local P
ower Manager for the DSP on /dev/lpm0...
@26,600,769us: [+2 T:0x40ae7490] ti.sdo.ce.ipc.Power - Power_on>
Turning on DSP
power...
@26,600,952us: [+2 T:0x40ae7490] ti.sdo.ce.ipc.Power - Power_on>
return (0)
@26,601,013us: [+2 T:0x40ae7490] OP - Processor_create_d> Initializing
DSP PROC.
..
@26,601,043us: [+2 T:0x40ae7490] OP - Processor_create_d> Using
DspLink config d
ata for entry #1 [server 'encodeCombo.x64P']
@26,601,104us: [+2 T:0x40ae7490] OP - Processor_create_d> Adding DSP
segment #0
to Link configuration: name='DDR2', startAddress=0x89200000,
sizeInBytes=0x40000
0, shared=1
@26,601,165us: [+2 T:0x40ae7490] OP - Processor_create_d> Adding DSP
segment #1
to Link configuration: name='DSPLINKMEM', startAddress=0x89600000,
sizeInBytes=0
x100000, shared=1
@26,601,196us: [+2 T:0x40ae7490] OP - Processor_create_d> Adding DSP
segment #2
to Link configuration: name='RESET_VECTOR', startAddress=0x89700000,
sizeInBytes
=0x1000, shared=1
@26,601,257us: [+2 T:0x40ae7490] OP - Processor_create_d> Adding DSP
segment #3
to Link configuration: name='L4PER', startAddress=0x49000000,
sizeInBytes=0x1000
00, shared=0
@26,601,318us: [+2 T:0x40ae7490] OP - Processor_create_d> Adding DSP
segment #4
to Link configuration: name='DDRALGHEAP', startAddress=0x88000000,
sizeInBytes=0
x1200000, shared=0
@26,601,348us: [+2 T:0x40ae7490] OP - Processor_create_d> Adding DSP
segment #5
to Link configuration: name='L4CORE', startAddress=0x48000000,
sizeInBytes=0x100
0000, shared=0
@26,601,409us: [+2 T:0x40ae7490] OP - Processor_create_d> Found 'CMEM'
entry, ad
justing base and size according to CMEM_getBlock()
@26,601,470us: [+0 T:0x40ae7490] OP - Processor_create_d> Setting CMEM
base to 0
x88000000, size to 0x1000000
@26,601,501us: [+2 T:0x40ae7490] OP - Processor_create_d> Adding DSP
segment #6
to Link configuration: name='CMEM', startAddress=0x88000000,
sizeInBytes=0x10000
00, shared=0
@26,601,562us: [+2 T:0x40ae7490] OP - Processor_create_d>
DOPOWERCONTROL was=0;
now=0
@26,621,520us: [+2 T:0x40ae7490] OP - Processor_create_d> Attaching to
DSP PROC.
..

there's still error in engine-open(encode), and I might need to
configure the params of dsplinkk.ko, cmemk.ko, lpm....ko.....?
and after that, the beagleboard pending there, and I can't quit by
typing "z"or"exit", althrough it shows "exiting...."

Please tell me why this error happens?