Changeset 34227 in vbox
- Timestamp:
- Nov 22, 2010 4:31:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
r34226 r34227 1337 1337 } 1338 1338 1339 static uint32_t hdaReadAudio(INTELHDLinkState *pState, uint32_t *pu32Avail, uint32_t u32CblLimit)1339 static uint32_t hdaReadAudio(INTELHDLinkState *pState, uint32_t *pu32Avail, bool *fStop, uint32_t u32CblLimit) 1340 1340 { 1341 1341 PHDABDLEDESC pBdle = &pState->stInBdle; … … 1350 1350 || (*pu32Avail < hdaFifoWToSz(pState, 0))) 1351 1351 { 1352 *fStop = true; 1352 1353 return 0; 1353 1354 } … … 1362 1363 || cb2Copy < pBdle->cbUnderFifoW) 1363 1364 { 1365 *fStop = true; 1364 1366 return 0; 1365 1367 } … … 1389 1391 pBdle->cbUnderFifoW += RT_MIN(cbBackendCopy, cb2Copy); 1390 1392 Assert((pBdle->cbUnderFifoW <= hdaFifoWToSz(pState, 0))); 1393 *fStop = true; 1391 1394 break; 1392 1395 } … … 1401 1404 } 1402 1405 1403 static uint32_t hdaWriteAudio(INTELHDLinkState *pState, uint32_t *pu32Avail, uint32_t u32CblLimit)1406 static uint32_t hdaWriteAudio(INTELHDLinkState *pState, uint32_t *pu32Avail, bool *fStop, uint32_t u32CblLimit) 1404 1407 { 1405 1408 PHDABDLEDESC pBdle = &pState->stOutBdle; … … 1424 1427 { 1425 1428 Log(("hda:wa: amount of unreported bytes is less than room may be transfered (cbUnderFifoW:%d < %d)\n", pBdle->cbUnderFifoW, cb2Copy)); 1429 *fStop = true; 1426 1430 goto done; 1427 1431 } … … 1482 1486 DECLCALLBACK(void) hdaTransfer(CODECState *pCodecState, ENMSOUNDSOURCE src, int avail) 1483 1487 { 1488 bool fStop = false; 1484 1489 uint64_t u64BaseDMA = 0; 1485 1490 PHDABDLEDESC pBdle = NULL; … … 1533 1538 *pu32Sts |= HDA_REG_FIELD_FLAG_MASK(SDSTS, FIFORDY); 1534 1539 fetch_bd(pState, pBdle, u64BaseDMA); 1535 while( avail)1540 while( avail && !fStop) 1536 1541 { 1537 1542 Assert((avail >= 0 && (u32Cbl >= (*pu32Lpib)))); /* sanity */ … … 1541 1546 { 1542 1547 case PO_INDEX: 1543 nBytes = hdaWriteAudio(pState, (uint32_t *)&avail, u32CblLimit);1548 nBytes = hdaWriteAudio(pState, (uint32_t *)&avail, &fStop, u32CblLimit); 1544 1549 break; 1545 1550 case PI_INDEX: 1546 nBytes = hdaReadAudio(pState, (uint32_t *)&avail, u32CblLimit);1551 nBytes = hdaReadAudio(pState, (uint32_t *)&avail, &fStop, u32CblLimit); 1547 1552 break; 1548 1553 default: 1549 1554 nBytes = 0; 1555 fStop = true; 1550 1556 AssertMsgFailed(("Unsupported")); 1551 break;1552 1557 } 1553 1558 /* … … 1592 1597 1593 1598 } 1594 break;1599 fStop = true; 1595 1600 } 1596 1601 }
Note:
See TracChangeset
for help on using the changeset viewer.