Bernard,
The issue with MSGQ_transportOpen that you are facing is likely because
Codec Engine already opens it for you. So you cannot open it again (you
are getting DSP_EACCSESDENIED error). However, since CE has already
opened it, you can directly use the MSGQ module from your application
for using MSGQ_open, locate, put, get etc.
Regarding adding a new pool for your application:
Someone from Codec Engine can further comment about how the pool can be
added through the CE usage of the DSP/BIOS Link dynamic configuration. I
will give you the basic pitch about how a different pool can be opened
for your application in "bare" DSPLink. Warning ... detailed long e-mail
below. We are adding this information in a Programmer's Guide document
in future releases, but till then, here goes ... this is with reference
to DSPLink 1.40.05xx releases.
Add a new pool into DSPLink. The default configuration only supports one
pool (as you saw through the assertions when you attempted to open pool
1), so if you want to add more pools, you need to let DSPLink know about
this:
GPP-side:
CFG_<platform>.c needs to be updated for multiple POOLS on GPP side. The
parameters to be updated are:
1. Add other 'n' entries in LINKCFG_poolTable_00 with the same
name. MEMENTRY i.e. the memory entry from which the pool will be
configured and the POOLSIZE i.e. the size of the second pool can be
configured as desired by the application.
STATIC CONST LINKCFG_Pool LINKCFG_poolTable_00 [] =
{
{
"SMAPOOL", /* NAME : Name of the pool */
(Uint32) 1, /* MEMENTRY: Mem entry ID (-1 if not
needed)*/
(Uint32) 0x35000, /* POOLSIZE: Size of pool (-1 if not
needed)*/
(Uint32) -1, /* IPSID : ID of the IPS used */
(Uint32) -1, /* IPSEVENTNO: IPS Event number for POOL
*/
0x0, /* ARGUMENT1 : First Pool-specific
argument */
0x0 /* ARGUMENT2 : Second Pool-specific
argument*/
},
{
"SMAPOOL", /* NAME */
(Uint32) 1, /* MEMENTRY */
(Uint32) 0x35000, /* POOLSIZE */
(Uint32) -1, /* IPSID */
(Uint32) -1, /* IPSEVENTNO */
0x0, /* ARGUMENT1 */
0x0 /* ARGUMENT2 */
}
}
2. Update NUMPOOLS in LINKCFG_linkDrvObjects to 'n'.
STATIC CONST LINKCFG_LinkDrv LINKCFG_linkDrvObjects [] =
{
{
"SHMDRV", /* NAME: Name of the link driver */
(Uint32) 100000000, /* HSHKPOLLCOUNT : Poll value for which
*/
* handshake waits (-1 if infinite) */
(Uint32) 1, /* MEMENTRY: Mem entry ID (-1 if not
needed)*/
0, /* IPSTABLEID : ID of the IPS table used
*/
2, /* IPSENTRIES : Number of IPS supported
*/
0, /* POOLTABLEID : ID of the POOL table */
2, /* NUMPOOLS : Number of POOLs
supported */
0, /* DATATABLEID : ID of data driver table
*/
1, /* NUMDATADRV : Number of data drivers
*/
0, /* MQTID : ID of the MQT */
0, /* RINGIOTABLEID: RingIO Table Id */
0, /* MPLISTTABLEID: MpList Table Id */
0 /* MPCSTABLEID : MPCS Table ID */
}
} ;
After configuring the pools, if application is using dynamic
configuration, the GPP-side application must be rebuilt. If dynamic
configuration is not used, the DSP/BIOS LINK user API library
dsplink.lib must be rebuilt from /dsplink/gpp/src/api followed by the
application rebuild.
In the above example, we have just split the existing one pool of size
0x70000 into two pools of 0x35000 each. This avoids the need to
configure additional shared memory than the 1MB default we provide. If
you need larger pools (more than 0x35000), you need to increase the size
of configured shared memory (DSPLINKMEM/DSPLINKMEM1 regions), and
accordingly modify the DSP-side TCF file to reserve this memory, and
reduce the MEM= parameter you pass to Linux bootargs from 0x254
(reserving 2MB) to, for example 0x250 (if you want to reserve 6MB).
DSP side
With BIOS 5.xx:
1. The global variable POOL_config must be configured as required by
DSP/BIOS(tm).
POOL_Config POOL_config = {MESSAGE_Pools, 2} ;
2. The pools must be configured as required by DSP/BIOS(tm).
POOL_Obj MESSAGE_Pools [NUM_POOLS] =
{
{
&SMAPOOL_init, /* Init Function */
(POOL_Fxns *) &SMAPOOL_FXNS, /* Pool interface functions */
&MESSAGE_PoolParams [0], /* Pool params */
NULL /* Pool object: Set in pool impl.
*/
},
{
&SMAPOOL_init, /* Init Function */
(POOL_Fxns *) &SMAPOOL_FXNS, /* Pool interface functions */
&MESSAGE_PoolParams [1], /* Pool params */
NULL /* Pool object: Set in pool impl.
*/
}
}
After configuring the pools, the DSP-side application must be rebuilt to
generate the DSP executable.
Now if you dedicate pool 0 to the Codec Engine and MSGQ_transportOpen,
you are free to call POOL_open on pool 1 and use it directly for your
application.
Note that all the above information is specific to "bare" DSPLink. The
way you configure the additional pools is likely to be different when
you are using it with Codec Engine.
Hope this helps ...
Regards,
Mugdha
-----------------------------
Mugdha Kamoolkar
DSP/BIOS(TM) LINK (PSP)
Texas Instruments (India)
+91 80 25099178
-----------------------------
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Bernard Blackham
Sent: Thursday, November 01, 2007 8:17 AM
To: [email protected]
Subject: Mixing DSP/BIOS Link and Codec Engine
I'm still at this task, looking to use dsplink's message queues
in a different thread of a CE application. I'm essentially trying to
merge CE's audio_copy example and dsplink's readwrite example.
I've gotten the two to build happily together, requiring some evil
#define's to resolve conflicting typedefs between <xdc/std.h> and
dsplink's gpp/inc/gpptypes.h.
Now, I'm presented with the issue of what pool to open and pass to
MSGQ_transportOpen. If I try to pass pool 0, without opening it
explicitly, I get:
MSGQ_transportOpen () failed. Status: [0x80008000]
and this in dmesg:
<1>[ 145.490000] Assertion failed (ipsEventList [i].eventHandlerCount
== 0). File : ../../IPS/Davinci/ips.c Line : 554
<1>[ 145.510000] Assertion failed (IPS_IsInitialized [dspId][ipsId] ==
TRUE). File : ../../IPS/Davinci/ips.c Line : 811
If I open pool 0, I get the same error from MSGQ_transportOpen if I
open the pool first. If I try to open any other pool (e.g. pool id
1), dmesg comes back with
<1>[ 335.090000] Assertion failed (poolId < poolState->numPools). File
: POOLS/ldrv_pool.c Line : 605
<1>[ 335.120000] Assertion failed (poolId < poolState->numPools). File
: POOLS/ldrv_pool.c Line : 699
<1>[ 335.130000] Assertion failed (((*msg != NULL) && (DSP_SUCCEEDED
(status))) || ((*msg == NULL) && (DSP_FAILED (status)))). File :
ldrv_msgq.c Line : 872
<1>[ 335.180000] Assertion failed (ipsEventList [i].eventHandlerCount
== 0). File : ../../IPS/Davinci/ips.c Line : 554
<1>[ 335.200000] Assertion failed (IPS_IsInitialized [dspId][ipsId] ==
TRUE). File : ../../IPS/Davinci/ips.c Line : 811
How do I allocate and open a separate pool for my dsplink gear when
using codec engine? Any advice would be greatly appreciated :)
Cheers,
Bernard.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source