- Timestamp:
- Jan 27, 2023 11:21:34 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r98103 r98333 937 937 RT_NOREF(pStreamCC); 938 938 uint32_t fSrBcis = 0; 939 uint32_t cbTotal = 0; /* Counts the total length (in bytes) of the buffer descriptor list (BDL). */ 939 940 940 941 /* … … 954 955 pStream->Regs.bd.ctl_len = RT_H2LE_U32(Bdle.ctl_len); 955 956 pStream->Regs.picb = pStream->Regs.bd.ctl_len & AC97_BD_LEN_MASK; 957 958 cbTotal += pStream->Regs.bd.ctl_len & AC97_BD_LEN_MASK; 956 959 957 960 LogFlowFunc(("BDLE%02u: %#RX32 L %#x / LB %#x, ctl=%#06x%s%s\n", … … 988 991 ("Odd lengths buffers are not allowed: %#x (%d) samples\n", pStream->Regs.picb, pStream->Regs.picb)); 989 992 990 /* 1.2.4.2 PCM Buffer Restrictions (in 302349-003) - #2 */ 991 ASSERT_GUEST_MSG(pStream->Regs.picb > 0, ("Zero length buffers not allowed to terminate list (LVI=%u CIV=%u)\n", 992 pStream->Regs.lvi, pStream->Regs.civ)); 993 /* 1.2.4.2 PCM Buffer Restrictions (in 302349-003) - #2 994 * 995 * Note: Some guests (like older NetBSDs) first seem to set up the BDL a tad later so that cbTotal is 0. 996 * This means that the BDL is not set up at all. 997 * In such cases pStream->Regs.picb also will be 0 here and (debug) asserts here, which is annoying for debug builds. 998 * So first check if we have *any* BDLE set up before checking if PICB is > 0. 999 */ 1000 ASSERT_GUEST_MSG(cbTotal == 0 || pStream->Regs.picb > 0, ("Zero length buffers not allowed to terminate list (LVI=%u CIV=%u, cbTotal=%zu)\n", 1001 pStream->Regs.lvi, pStream->Regs.civ, cbTotal)); 993 1002 994 1003 return fSrBcis;
Note:
See TracChangeset
for help on using the changeset viewer.