Changeset 88731 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Apr 27, 2021 12:10:00 PM (4 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r88726 r88731 904 904 /** No flags being set. */ 905 905 #define PDMAUDIOSTREAM_STS_NONE UINT32_C(0) 906 /** Whether this stream has been initialized by the backend or not. */ 906 /** Set if the backend for the stream has been initialized. 907 * This is generally always set after stream creation, but can be cleared if the 908 * re-initialization of the stream fails later on. */ 907 909 #define PDMAUDIOSTREAM_STS_INITIALIZED RT_BIT_32(0) 908 /** Whether this stream is enabled ordisabled. */910 /** Set if the stream is enabled, clear if disabled. */ 909 911 #define PDMAUDIOSTREAM_STS_ENABLED RT_BIT_32(1) 910 /** Whether this stream has been paused or not. This also implies911 * that this is an enabled stream!*/912 /** Set if the stream is paused. 913 * Requires enabled status to be set when used. */ 912 914 #define PDMAUDIOSTREAM_STS_PAUSED RT_BIT_32(2) 913 /** Indicates that the stream is draining (output only). 914 * Whether this stream was marked as being disabled 915 * but there are still associated guest output streams 916 * which rely on its data. */ 915 /** Output only: Set when the stream is draining. 916 * Requires the enabled status to be set when used. */ 917 917 #define PDMAUDIOSTREAM_STS_PENDING_DISABLE RT_BIT_32(3) 918 /** Whether this stream is in re-initialization phase and requires the device919 * to call pfnStreamReInit.920 * 921 * All other bits remain untouched to be able to restore the stream's state922 * after the re-initialization has been completed.*/918 /** Set if the stream needs to be re-initialized by the device (i.e. call 919 * PDMIAUDIOCONNECTOR::pfnStreamReInit). 920 * (The other status bits are preserved and are worked as normal while in this 921 * state, so that the stream can resume operation where it left off.) 922 * @note This is not appropriate for PDMIHOSTAUDIO::pfnStreamGetStatus. */ 923 923 #define PDMAUDIOSTREAM_STS_NEED_REINIT RT_BIT_32(4) 924 924 /** Validation mask. */ 925 925 #define PDMAUDIOSTREAM_STS_VALID_MASK UINT32_C(0x0000001f) 926 /** Asserts the validity of the given stream status mask. */ 927 #define PDMAUDIOSTREAM_STS_ASSERT_VALID(a_fStreamStatus) do { \ 928 AssertMsg(!((a_fStreamStatus) & ~PDMAUDIOSTREAM_STS_VALID_MASK), ("%#x\n", (a_fStreamStatus))); \ 929 Assert(!((a_fStreamStatus) & PDMAUDIOSTREAM_STS_PAUSED) || ((a_fStreamStatus) & PDMAUDIOSTREAM_STS_ENABLED)); \ 930 Assert(!((a_fStreamStatus) & PDMAUDIOSTREAM_STS_PENDING_DISABLE) || ((a_fStreamStatus) & PDMAUDIOSTREAM_STS_ENABLED)); \ 931 } while (0) 926 932 /** @} */ 927 933 -
trunk/include/VBox/vmm/pdmaudioinline.h
r88724 r88731 426 426 DECLINLINE(bool) PDMAudioStrmStatusCanRead(uint32_t fStatus) 427 427 { 428 AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false); 429 /* 430 return fStatus & PDMAUDIOSTREAM_STS_INITIALIZED 431 && fStatus & PDMAUDIOSTREAM_STS_ENABLED 432 && !(fStatus & PDMAUDIOSTREAM_STS_PAUSED) 433 && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/ 428 PDMAUDIOSTREAM_STS_ASSERT_VALID(fStatus); 429 AssertReturn(!(fStatus & ~PDMAUDIOSTREAM_STS_VALID_MASK), false); 434 430 return (fStatus & ( PDMAUDIOSTREAM_STS_INITIALIZED 435 431 | PDMAUDIOSTREAM_STS_ENABLED … … 448 444 DECLINLINE(bool) PDMAudioStrmStatusCanWrite(uint32_t fStatus) 449 445 { 450 AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false); 451 /* 452 return fStatus & PDMAUDIOSTREAM_STS_INITIALIZED 453 && fStatus & PDMAUDIOSTREAM_STS_ENABLED 454 && !(fStatus & PDMAUDIOSTREAM_STS_PAUSED) 455 && !(fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE) 456 && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/ 446 PDMAUDIOSTREAM_STS_ASSERT_VALID(fStatus); 447 AssertReturn(!(fStatus & ~PDMAUDIOSTREAM_STS_VALID_MASK), false); 457 448 return (fStatus & ( PDMAUDIOSTREAM_STS_INITIALIZED 458 449 | PDMAUDIOSTREAM_STS_ENABLED … … 472 463 DECLINLINE(bool) PDMAudioStrmStatusIsReady(uint32_t fStatus) 473 464 { 474 AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false); 475 /* 476 return fStatus & PDMAUDIOSTREAM_STS_INITIALIZED 477 && fStatus & PDMAUDIOSTREAM_STS_ENABLED 478 && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/ 465 PDMAUDIOSTREAM_STS_ASSERT_VALID(fStatus); 466 AssertReturn(!(fStatus & ~PDMAUDIOSTREAM_STS_VALID_MASK), false); 479 467 return (fStatus & ( PDMAUDIOSTREAM_STS_INITIALIZED 480 468 | PDMAUDIOSTREAM_STS_ENABLED
Note:
See TracChangeset
for help on using the changeset viewer.