summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7b7a96)
raw | patch | inline | side by side (parent: a7b7a96)
author | Frank Livingston <frank-livingston@ti.com> | |
Thu, 7 Jun 2018 00:30:36 +0000 (19:30 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Thu, 7 Jun 2018 00:30:36 +0000 (19:30 -0500) |
Change default rateX to correspond to default Tx McASP CLKXDIV
Add error return to asopSetCheckRateX.
Update ASOT to check error returns from setCheckRateX.
- ignored in Init-Sync Dec1. This is typical use case since RateX
change is normal at start of stream.
- not ignored in Dec Info2. This isn't typical use case since RateX
shouldn't change during stream.
Add error return to asopSetCheckRateX.
Update ASOT to check error returns from setCheckRateX.
- ignored in Init-Sync Dec1. This is typical use case since RateX
change is normal at start of stream.
- not ignored in Dec Info2. This isn't typical use case since RateX
shouldn't change during stream.
diff --git a/pasdk/test_dsp/application/itopo/evmk2g/mcasp_cfg.c b/pasdk/test_dsp/application/itopo/evmk2g/mcasp_cfg.c
index b3f1f14f3c96149c007e236092fff16124e6b7c9..e8a8797f17691ea3d7ef2dd78c5aaf2f2d24861a 100644 (file)
/* .xevtctl = */ 0x00000000, /* DMA request is enabled or disabled */
{
// /* .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/MAT/THD 48khz but not for PCM
+// /* .aclkxctl = */ 0X000000E7, // Transmit bit clock divide ratio = 8 --> working for DDP/MAT/THD 48khz but not for PCM
// /* .aclkxctl = */ 0X000000E3, // Transmit bit clock divide ratio = 4 --> THD 96khz
-// /* .aclkxctl = */ 0X000000E1, // Transmit bit clock divide ratio = 2 --> THD 192khz
+ /* .aclkxctl = */ 0X000000E1, // Transmit bit clock divide ratio = 2 --> THD 192khz
/* .ahclkxctl = */ 0x00004000,
/* .xclkchk = */ 0x00000000
},
diff --git a/pasdk/test_dsp/framework/audioStreamOutDec.c b/pasdk/test_dsp/framework/audioStreamOutDec.c
index c3886e54c7fd108173803da59c488e2db7d341ec..89075d9779ea59be676239045283a146139f1b6f 100644 (file)
&pAstCfg->xEnc[z].encodeStatus);
if (errno)
{
- TRACE_TERSE1("asopDecOutProcDec1: info returns errno 0x%x ", errno);
+ TRACE_TERSE1("asopDecOutProcDec1: enc info returns errno 0x%x ", errno);
status = ASOP_DOP_ERR_DEC1_ENCINFO;
return status;
}
errno = asopSetCheckRateX(pP, pQ, pAsotCfg, 0);
if (errno)
{
- TRACE_TERSE1("asopDecOutProcDec1: info returns errno 0x%x ", errno);
- status = ASOP_DOP_ERR_DEC1_SETRATEX;
- return status;
+ if (errno != ASOP_IO_ERR_RATE_CHANGE)
+ {
+ TRACE_TERSE1("asopDecOutProcDec1: asopSetCheckRateX returns errno 0x%x", errno);
+ status = ASOP_DOP_ERR_DEC1_SETRATEX;
+ return status;
+ }
+ else
+ {
+ TRACE_TERSE1("asopDecOutProcDec1: asopSetCheckRateX returns errno 0x%x, ignoring", errno);
+ }
}
// FL, New IO: API for multiple Outputs
errno = asopSetCheckRateX(pP, pQ, pAsotCfg, 0);
if (errno)
{
+ //
+ // Note Rate change is NOT ignored here
+ //
+
TRACE_TERSE1("asopDecOutProcInfo2: info returns errno 0x%x ", errno);
status = ASOP_DOP_ERR_INFO2_SETRATEX;
return status;
diff --git a/pasdk/test_dsp/framework/audioStreamOutIo.c b/pasdk/test_dsp/framework/audioStreamOutIo.c
index a655af2675ac0b7681a8cceeee8678bdd57435fb..5fddf93ac84f51d12ad62b6f3aae3b60eb1f910e 100644 (file)
pOut->stride = pReqLldCfg->mcaspChanParams->noOfSerRequested *
pReqLldCfg->mcaspChanParams->noOfChannels;
- pOut->rateX = 1.; // intialize rateX
+ // initialize rateX
+ pOut->rateX = 1.; // rateX==1.0 for CLKXDIV==1
}
else
{
return ((getVal & 0xff) | ASPERR_RATE_CHECK);
}
#endif // FL, New IO
+
+ //
+ // "Proof on concept" code for McASP LLD API to change bit clock divider.
+ //
if (pOut->rateX != rateX)
{
- UInt32 regVal;
+ //UInt32 regVal;
- //
- // "Proof on concept" code for McASP LLD API to change bit clock divider.
- //
-
// Initialize divider value.
// This works for AHCLKX input from HDMI & sample rate = 44.1,48,88.2,96,192 kHz.
divider = 2;
*(volatile UInt32 *)0x23400B0 = regVal; // write MCASP_ACLKXCTL
#endif
-#if 1
// get existing McASP HW setup
status = mcaspControlChan(pOut->hMcaspChan, Mcasp_IOCTL_CNTRL_GET_FORMAT_CHAN, &mcaspSetup);
if (status != MCASP_COMPLETED)
Log_info0("asopSetCheckRateX(): McASP set channel format failed!\n");
return ASOP_IO_ERR_MCASP_CFG;
}
-#endif
- pOut->rateX = rateX;
+ pOut->rateX = rateX; // update saved rateX
+
+ return ASOP_IO_ERR_RATE_CHANGE;
}
}
}
diff --git a/pasdk/test_dsp/framework/audioStreamOutIo.h b/pasdk/test_dsp/framework/audioStreamOutIo.h
index 60978b7c04f269d7ec0e7528b53b9f3755d822f8..4d85fea6381d82a693b30245c494fe380a2eff6a 100644 (file)
#define ASOP_IO_ERR_IOBUFF_INIT ( -5 ) // error, IO Buff initialization
#define ASOP_IO_ERR_IOPHY_INIT ( -6 ) // error, IO Phy initialization
#define ASOP_IO_ERR_OUTBUF_OVERFLOW ( -7 ) // error, Output buffer overflow
+#define ASOP_IO_ERR_RATE_CHANGE ( -8 ) // error, rateX change
// Select Output devices