summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorJiaojinxing <jiaojinxing1987@gmail.com>2016-11-11 10:05:35 (GMT)
committer Jiaojinxing <jiaojinxing1987@gmail.com>2016-11-11 10:05:35 (GMT)
commitb973b55505ef7604699f1854f734f81d733a1779 (patch)
treee1ae690e92559807b4cd64c0680fb52878774d8f
parent08a25f29dd40c4219ec2d63c51b2917bbc9d9cae (diff)
downloadbspam335x-b973b55505ef7604699f1854f734f81d733a1779.zip
bspam335x-b973b55505ef7604699f1854f734f81d733a1779.tar.gz
bspam335x-b973b55505ef7604699f1854f734f81d733a1779.tar.bz2
Fixed audio driver bug.
-rw-r--r--SylixOS/driver/mcasp/am335x_mcasp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/SylixOS/driver/mcasp/am335x_mcasp.c b/SylixOS/driver/mcasp/am335x_mcasp.c
index 873f315..38bfabe 100644
--- a/SylixOS/driver/mcasp/am335x_mcasp.c
+++ b/SylixOS/driver/mcasp/am335x_mcasp.c
@@ -358,6 +358,8 @@ static INT __am335xMcAspTransferMsg (__PAM335X_MCASP_CHANNEL pMcAspChannel,
API_QueueIn(&pMcAspChannel->MCASP_rxMsgQueue, &uiIn); /* 获得入队位置并入队 */
pMcAspChannel->MCASP_rxMsgPool[uiIn] = *pSpiMsg; /* 在入队位置记录接收消息 */
+ pMcAspChannel->MCASP_rxMsgPool[uiIn].SPIMSG_pucRdBuffer -= pMcAspChannel->MCASP_iBytesPerSample;
+ pMcAspChannel->MCASP_rxMsgPool[uiIn].SPIMSG_uiLen += pMcAspChannel->MCASP_iBytesPerSample;
LW_SPIN_UNLOCK_QUICK(&pMcAspChannel->MCASP_splRx, iregInterLevel);
@@ -372,6 +374,8 @@ static INT __am335xMcAspTransferMsg (__PAM335X_MCASP_CHANNEL pMcAspChannel,
API_QueueIn(&pMcAspChannel->MCASP_txMsgQueue, &uiIn); /* 获得入队位置并入队 */
pMcAspChannel->MCASP_txMsgPool[uiIn] = *pSpiMsg; /* 在入队位置记录发送消息 */
+ pMcAspChannel->MCASP_txMsgPool[uiIn].SPIMSG_pucWrBuffer -= pMcAspChannel->MCASP_iBytesPerSample;
+ pMcAspChannel->MCASP_txMsgPool[uiIn].SPIMSG_uiLen += pMcAspChannel->MCASP_iBytesPerSample;
LW_SPIN_UNLOCK_QUICK(&pMcAspChannel->MCASP_splTx, iregInterLevel);
}