summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2694a54)
raw | patch | inline | side by side (parent: 2694a54)
author | Frank Livingston <frank-livingston@ti.com> | |
Thu, 22 Jun 2017 00:50:20 +0000 (19:50 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Thu, 22 Jun 2017 00:50:20 +0000 (19:50 -0500) |
index 2ca01bcbd626680522046fd0d772e8ba17e442e4..8b69e794ed3788a8d429a50bfcc31711ea60ee9b 100644 (file)
Cache_wait();
Log_info1("CB: %s", (IArg)locInfo);
- Log_info3("CB: readerActiveFlag=%d, writerActiveFlag=%d, emptyFlag=%d", pCb->readerActiveFlag, pCb->writerActiveFlag, pCb->emptyFlag);
+ Log_info3("CB: readerActiveFlag=%d, writerActiveFlag=%d, drainFlag=%d", pCb->readerActiveFlag, pCb->writerActiveFlag, pCb->drainFlag);
Log_info4("CB: afRdIdx=%d, pcmRdIdx=%d, afWrtIdx=%d, numAfCb=%d", pCb->afRdIdx, pCb->pcmRdIdx,
pCb->afWrtIdx,
pCb->numAfCb);
index 2303d6960ed7e482f6dcf0baac43eb62d92997fb..dd872ec4523fb0ac99a0e9ad5742bd3314923ac4 100644 (file)
Int16 strFrameLen; // stream frame length (output transaction size)
Int8 writerActiveFlag; // flag indicates whether CB writer is active: FALSE - writer not active, TRUE - writer active
Int8 readerActiveFlag; // flag indicates whether CB reader is active: FALSE - reader not active, TRUE - reader active
- Int8 emptyFlag; // flag indicates whether reader should empty (drain) remaining frames in CB: FALSE - reader should not drain, TRUE - reader should drain
+ Int8 drainFlag; // flag indicates whether reader should drain (empty) remaining frames in CB: FALSE - reader should not drain, TRUE - reader should drain
Int8 errUndCnt; // underflow count
Int8 errOvrCnt; // overflow count
PAF_AudioData *pcmBufEnd; // PCM buffer, contains PCM data associated with audio frames end
diff --git a/pasdk/test_arm/framework/aspDecOpCircBuf_slave.c b/pasdk/test_arm/framework/aspDecOpCircBuf_slave.c
index 31532010ce5082b43cfd48d598efb42756a1b9e6..1ed6f66fbcd5a153a4f7e199354ae8cc7a5e8987 100644 (file)
// update flags
pCb->writerActiveFlag = 1;
- pCb->emptyFlag = 0;
+ pCb->drainFlag = 0;
//pCb->afLagIdx = 0;
// Write back circular buffer configuration
// update flags
pCb->writerActiveFlag = 0;
- pCb->emptyFlag = 1;
+ pCb->drainFlag = 1;
// Write back circular buffer configuration
Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
diff --git a/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c b/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c
index f79f85128dbdd25db0b9ec8491776a4374c830a0..c00f5e3e5d044b867bb3afea33efee0ac8cc7628 100644 (file)
// reset read/write flags
pCb->writerActiveFlag = 0;
pCb->readerActiveFlag = 0;
- pCb->emptyFlag = 0;
+ pCb->drainFlag = 0;
// reset error counts
pCb->errUndCnt = 0;
{
pCb->writerActiveFlag = 0;
pCb->readerActiveFlag = 0;
- pCb->emptyFlag = 0;
+ pCb->drainFlag = 0;
}
// reset error counts
//Log_info1("cbReadAf:afCb=0x%04x", (IArg)pCb->afCb); // debug
- if ((pCb->writerActiveFlag == 1) && (pCb->emptyFlag == 1))
+ if ((pCb->writerActiveFlag == 1) && (pCb->drainFlag == 1))
{
// This shouldn't occur:
// writer is active AND draining circular buffer
- //Log_info2("cbReadAf: ERROR: writerActiveFlag=%d, emptyFlag=%d", pCb->writerActiveFlag, pCb->emptyFlag); // FL: debug
+ //Log_info2("cbReadAf: ERROR: writerActiveFlag=%d, drainFlag=%d", pCb->writerActiveFlag, pCb->drainFlag); // FL: debug
SW_BREAKPOINT; // FL: debug
// Leave the gate
return ASP_DECOP_CB_READ_INVSTATE;
}
- //if (((pCb->writerActiveFlag == 0) && (pCb->emptyFlag == 0)) || (pCb->afLagIdx < pCb->afInitialLag))
- if ((pCb->writerActiveFlag == 0) && (pCb->emptyFlag == 0))
+ //if (((pCb->writerActiveFlag == 0) && (pCb->drainFlag == 0)) || (pCb->afLagIdx < pCb->afInitialLag))
+ if ((pCb->writerActiveFlag == 0) && (pCb->drainFlag == 0))
{
//
// No active writer, not draining circular buffer.
}
- // (writerActiveFlag,emptyFlag)=(1,0) and (0,1) are left
+ // (writerActiveFlag,drainFlag)=(1,0) and (0,1) are left
// Here we are checking (1,0) state here
if (pCb->writerActiveFlag == 1)
{
cbReadMuteWithLastAfInfo(pCb, pAfRd);
//SW_BREAKPOINT; // FL: debug
- {
- static Uint8 toggleState = 0;
- if (toggleState == 0)
- GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_107);
- else
- GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_107);
- toggleState = ~(toggleState);
- }
+ // debug
+ //{
+ // static Uint8 toggleState = 0;
+ // if (toggleState == 0)
+ // GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_107);
+ // else
+ // GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_107);
+ // toggleState = ~(toggleState);
+ //}
#ifdef CB_RW_OP_CAP_PP // debug
if (pCb->cb_opCnt < CB_OP_COUNT_MAX)
}
}
- if ((pCb->writerActiveFlag == 1) || (pCb->emptyFlag == 1))
+ if ((pCb->writerActiveFlag == 1) || (pCb->drainFlag == 1))
{
//
// Writer active or draining remaining frames in circular buffer.
}
}
- if (pCb->emptyFlag == 1)
+ if (pCb->drainFlag == 1)
{
//
// Writer inactive, but remaining frames in circular buffer.
//
if (pCb->numAfCb <= 0)
{
- pCb->emptyFlag = 0;
+ pCb->drainFlag = 0;
}
}