Changeset 89341 in vbox
- Timestamp:
- May 28, 2021 10:19:50 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144690
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r89327 r89341 253 253 #endif 254 254 255 /** PDM audio driver instance flags. */256 typedef uint32_t PDMAUDIODRVFLAGS;257 258 /** No flags set. */259 #define PDMAUDIODRVFLAGS_NONE 0260 /** Marks a primary audio driver which is critical261 * when running the VM. */262 #define PDMAUDIODRVFLAGS_PRIMARY RT_BIT(0)263 264 255 /** 265 256 * Audio format in signed or unsigned variants. … … 698 689 /** Whether the endianness is swapped or not. */ 699 690 bool fSwapEndian : 1; 700 /** Raw mixer frames, only applicable for signed 64-bit samples. */ 691 /** Raw mixer frames, only applicable for signed 64-bit samples. 692 * The raw mixer samples are really just signed 32-bit samples stored as 64-bit 693 * integers without any change in the value. 694 * 695 * @todo Get rid of this, only VRDE needs it an it should use the common 696 * mixer code rather than cooking its own stuff. */ 701 697 bool fRaw : 1; 702 698 /** Sample frequency in Hertz (Hz). */ -
trunk/src/VBox/Devices/Audio/DevHda.cpp
r89302 r89341 222 222 /** Pointer to the ring-3 HDA device state. */ 223 223 R3PTRTYPE(PHDASTATER3) pHDAStateR3; 224 /** Driver flags. */225 PDMAUDIODRVFLAGS fFlags;226 uint8_t u32Padding0[2];227 224 /** LUN to which this driver has been assigned. */ 228 225 uint8_t uLUN; 229 226 /** Whether this driver is in an attached state or not. */ 230 227 bool fAttached; 228 uint8_t u32Padding0[6]; 231 229 /** Pointer to attached driver base interface. */ 232 230 R3PTRTYPE(PPDMIBASE) pDrvBase; … … 4380 4378 pDrv->pHDAStateR3 = pThisCC; 4381 4379 pDrv->uLUN = uLUN; 4382 AssertMsg(pDrv->pConnector != NULL, ("Configuration error: LUN#%u has no host audio interface, rc=%Rrc\n", uLUN, rc));4383 4384 /*4385 * For now we always set the driver at LUN 0 as our primary4386 * host backend. This might change in the future.4387 */4388 if (pDrv->uLUN == 0)4389 pDrv->fFlags |= PDMAUDIODRVFLAGS_PRIMARY;4390 4391 LogFunc(("LUN#%u: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->fFlags));4392 4380 4393 4381 /* Attach to driver list if not attached yet. */ … … 4422 4410 } 4423 4411 4424 LogFunc(("LUN#%u: VINF_SUCCESS\n", uLUN));4412 LogFunc(("LUN#%u: returns VINF_SUCCESS (pCon=%p)\n", uLUN, pDrv->pConnector)); 4425 4413 return VINF_SUCCESS; 4426 4414 } -
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r89302 r89341 457 457 /** Node for storing this driver in our device driver list of AC97STATE. */ 458 458 RTLISTNODER3 Node; 459 /** Driver flags. */460 PDMAUDIODRVFLAGS fFlags;461 459 /** LUN # to which this driver has been assigned. */ 462 460 uint8_t uLUN; 463 461 /** Whether this driver is in an attached state or not. */ 464 462 bool fAttached; 465 uint8_t abPadding[ 2];463 uint8_t abPadding[6]; 466 464 /** Pointer to the description string passed to PDMDevHlpDriverAttach(). */ 467 465 R3PTRTYPE(char *) pszDesc; … … 3537 3535 pDrv->pConnector = PDMIBASE_QUERY_INTERFACE(pDrvBase, PDMIAUDIOCONNECTOR); 3538 3536 AssertPtr(pDrv->pConnector); 3539 if ( pDrv->pConnector)3537 if (RT_VALID_PTR(pDrv->pConnector)) 3540 3538 { 3541 3539 pDrv->pDrvBase = pDrvBase; 3542 3540 pDrv->uLUN = iLun; 3543 3541 pDrv->pszDesc = pszDesc; 3544 3545 /*3546 * For now we always set the driver at LUN 0 as our primary3547 * host backend. This might change in the future.3548 */3549 if (iLun == 0)3550 pDrv->fFlags |= PDMAUDIODRVFLAGS_PRIMARY;3551 3552 LogFunc(("LUN#%u: pCon=%p, drvFlags=0x%x\n", iLun, pDrv->pConnector, pDrv->fFlags));3553 3542 3554 3543 /* Attach to driver list if not attached yet. */ … … 3561 3550 if (ppDrv) 3562 3551 *ppDrv = pDrv; 3563 LogFunc(("LUN#%u: VINF_SUCCESS\n", iLun));3552 LogFunc(("LUN#%u: returns VINF_SUCCESS (pCon=%p)\n", iLun, pDrv->pConnector)); 3564 3553 return VINF_SUCCESS; 3565 3554 } -
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r89218 r89341 147 147 /** Stream for output. */ 148 148 SB16DRIVERSTREAM Out; 149 /** Driver flags. */150 PDMAUDIODRVFLAGS fFlags;151 149 /** LUN # to which this driver has been assigned. */ 152 150 uint8_t uLUN; … … 154 152 bool fAttached; 155 153 /** The LUN description. */ 156 char szDesc[ 2+48];154 char szDesc[48 - 2]; 157 155 } SB16DRIVER; 158 156 /** Pointer to the per-LUN data. */ … … 2694 2692 pDrv->uLUN = uLUN; 2695 2693 2696 /*2697 * For now we always set the driver at LUN 0 as our primary2698 * host backend. This might change in the future.2699 */2700 if (pDrv->uLUN == 0)2701 pDrv->fFlags |= PDMAUDIODRVFLAGS_PRIMARY;2702 2703 LogFunc(("LUN#%u: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->fFlags));2704 2705 2694 /* Attach to driver list if not attached yet. */ 2706 2695 if (!pDrv->fAttached) … … 2712 2701 if (ppDrv) 2713 2702 *ppDrv = pDrv; 2714 LogFunc(("LUN#%u: VINF_SUCCESS\n", uLUN));2703 LogFunc(("LUN#%u: returns VINF_SUCCESS (pCon=%p)\n", uLUN, pDrv->pConnector)); 2715 2704 return VINF_SUCCESS; 2716 2705 }
Note:
See TracChangeset
for help on using the changeset viewer.