summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f369639)
raw | patch | inline | side by side (parent: f369639)
author | Jianzhong Xu <a0869574@ti.com> | |
Mon, 26 Mar 2018 19:58:02 +0000 (15:58 -0400) | ||
committer | Jianzhong Xu <a0869574@ti.com> | |
Mon, 26 Mar 2018 19:58:02 +0000 (15:58 -0400) |
McASP Tx clock is hard coded for DDP 48kHz. DDP 48kHz streaming works
fine. To run PCM streaming, neeed to change McASP Tx clock aclkxctl.
fine. To run PCM streaming, neeed to change McASP Tx clock aclkxctl.
diff --git a/pasdk/test_dsp/application/itopo/evmk2g/mcasp_cfg.c b/pasdk/test_dsp/application/itopo/evmk2g/mcasp_cfg.c
index ac16b5adfea1fc65b158b96dc24dcc9e25919a87..7457e4a7996dd3acea4e29bdee29139f09ae9d8d 100644 (file)
/* .xstat = */ 0x000001FF, /* reset any existing status bits */
/* .xevtctl = */ 0x00000000, /* DMA request is enabled or disabled */
{
-// /* .aclkxctl = */ 0X000000E1, // Transmit bit clock divide ratio = 2
- /* .aclkxctl = */ 0X000000E7, // Transmit bit clock divide ratio = 8
+// /* .aclkxctl = */ 0X000000E1, // Transmit bit clock divide ratio = 2 --> works for 48khz PCM but not for DDP
+ /* .aclkxctl = */ 0X000000E7, // Transmit bit clock divide ratio = 8 --> working for DDP 48khz but not for PCM
/* .ahclkxctl = */ 0x00004000,
/* .xclkchk = */ 0x00000000
},
Mcasp_WordLength_32, /* wordWidth */
NULL, /* void * userLoopJobBuffer */
0, /* userLoopJobLength */
- NULL, /* edmaHandle */
+ NULL, /* edmaHandle */
GblErr,
2, /* number of TDM channels */
Mcasp_BufferFormat_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1,
diff --git a/pasdk/test_dsp/framework/audioStreamInpProcNewIO.c b/pasdk/test_dsp/framework/audioStreamInpProcNewIO.c
index 67f902fa010c19879a58f6687ad8a2e1817855d9..68c90266de84d3ff29e6a806602b1995a539c5ff 100644 (file)
@@ -1139,7 +1139,7 @@ Int asitSelectDevices(const PAF_ASIT_Patchs *pQ, PAF_AST_Config *pAstCfg, PAF_AS
pInp->pRxParams = pQ->devinp->x[interface];
pInp->hMcaspChan = lldCfg->hMcaspChan;
- pInp->stride = lldCfg->mcaspChanParams->noOfSerRequested * 2; // 2 for stereo
+ pInp->stride = lldCfg->mcaspChanParams->noOfSerRequested * lldCfg->mcaspChanParams->noOfChannels;
/* Set flag to swap HDMI data if it is 4xI2S and word length is 16 */
if( (lldCfg->mcaspChanParams->wordWidth == Mcasp_WordLength_16)
return ASIT_NO_ERR;
} /* asitUpdateIoComps */
-
+#if 0
#ifndef IO_LOOPBACK_TEST
#if OUTPUT_FRAME_LENGTH == INPUT_FRAME_LENGTH
U8 pcmbuf[OUTPUT_FRAME_SIZE];
}
#endif
+#endif
+
Int asitEvtErrCheck(UInt actualEvents, UInt expectedEvents)
{
TRACE_VERBOSE2("ASIT events error: actual events are: %d, expected events are: %d.",
diff --git a/pasdk/test_dsp/framework/audioStreamOutIo.c b/pasdk/test_dsp/framework/audioStreamOutIo.c
index c70438c9c7860528d7599f8726f7054bdb733e1d..2a92966baf005aa697de0a1efa954a7c2b1e6a20 100644 (file)
}
pOut->hMcaspChan = mcaspChanHandle;
+ pOut->stride = lldCfg->mcaspChanParams->noOfSerRequested * lldCfg->mcaspChanParams->noOfChannels;
}
return 0;
#if 1 // FL, New IO: add similar thing to be figured out
// Update framework Phy transfer size
- pOut[z].phyXferSize = pAstCfg->xOut[z].outBufConfig.lengthofFrame * OUTPUT_STRIDE * WORD_SIZE_PCM;
+ pOut[z].phyXferSize = pAstCfg->xOut[z].outBufConfig.lengthofFrame * pOut[z].stride * WORD_SIZE_PCM;
// Update IO Phy transfer size
ioPhyCtl.code = IOPHY_CTL_FRAME_SIZE;
ioPhyCtl.params.xferFrameSize = pOut[z].phyXferSize;
ioBuffParams.base = pOutBuf->outBufConfig.base.pVoid;
ioBuffParams.size = pOutBuf->outBufConfig.allocation/STRIDE_WORST_CASE*STRIDE_WORST_CASE;
ioBuffParams.sync = IOBUff_READ_SYNC;
- ioBuffParams.nominalDelay = OUTPUT_FRAME_SIZE * (NUM_PRIME_XFERS+1);
+ ioBuffParams.nominalDelay = NUM_CYCLE_PER_FRAME_DEF * pOutIo->stride * WORD_SIZE_PCM * (NUM_PRIME_XFERS+1);
if(ioBuffInit(pOutIo->hIoBuff, &ioBuffParams) != IOBUFF_NOERR)
{
return -1; // to remove magic number
}
ioPhyParams.ioBuffHandle = pOutIo->hIoBuff;
- ioPhyParams.xferFrameSize = OUTPUT_FRAME_SIZE;
+ ioPhyParams.xferFrameSize = NUM_CYCLE_PER_FRAME_DEF * pOutIo->stride * WORD_SIZE_PCM;
ioPhyParams.mcaspChanHandle = pOutIo->hMcaspChan;
ioPhyParams.ioBuffOp = IOPHY_IOBUFFOP_READ;
if(ioPhyInit(pOutIo->hIoPhy, &ioPhyParams) != IOPHY_NOERR)
pOutBufCfg = &pOutBuf->outBufConfig;
hIoBuff = pOutIo->hIoBuff;
- pOutBufCfg->stride = OUTPUT_STRIDE;
+ pOutBufCfg->stride = pOutIo->stride;
pOutBufCfg->sizeofElement = WORD_SIZE_PCM;
pOutBufCfg->precision = 24;
// FL, New IO: original code can change these values in every DOB issue
// Need to determine if this is required or not.
- pOutBufCfg->stride = OUTPUT_STRIDE;
+ pOutBufCfg->stride = pOutIo->stride;
pOutBufCfg->sizeofElement = WORD_SIZE_PCM;
pOutBufCfg->precision = 24;
diff --git a/pasdk/test_dsp/framework/audioStreamOutProc.h b/pasdk/test_dsp/framework/audioStreamOutProc.h
index 4a909bc37a3de888a7d9a102aebf174a455f43cc..88d5483b60ab7f819292f3cc1c9d7e75f66abbd3 100644 (file)
ioBuffHandle_t hIoBuff; /* handle to I/O buffer management */
Ptr hMcaspChan; /* handle to McASP LLD channel for output */
uint32_t phyXferSize;
+ uint32_t stride;
void *mcaspTxBuf1;
void *mcaspTxBuf2;
index e43bcfb14760b4e3862d6d462a438a08a38b1e55..2a2a6dbb6a5cc88d8a1a44dea628b999dc29a52a 100644 (file)
//#define PCM_LOOPBACK_TEST // define this to run DSP-only PCM loopback test in PASDK framework
//#define INPUT_HDMI_4xI2S // HDMI, 4 Rx serializers
-#define INPUT_HDMI_STEREO // HDMI, 1 Rx serializer
+//#define INPUT_HDMI_STEREO // HDMI, 1 Rx serializer
//#define INPUT_SPDIF // S/PDIF, 1 Rx serializer
//#define INPUT_PCM_ONLY // debugging, input fixed to PCM
+#define TX_MCASP_USE_MULT_SER // This is the normal operation. Undefine this for debugging and loopback
+
#ifdef INPUT_PCM_ONLY
#define SWAP_INPUT_DATA FALSE
#else
#ifdef INPUT_HDMI_4xI2S
#define RX_MCASP_USE_MULT_SER
-#define TX_MCASP_USE_MULT_SER // This is the normal operation. Undefine this for debugging and loopback
#define IO_HW_INTERFACE 2
//#define ASIP_ELEMENT_SIZE 2
//#define ASIP_STRIDE 8 // 4 lane, stereo