1 | /* $Id: HDAStreamMap.h 82968 2020-02-04 10:35:17Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * HDAStreamMap.h - Stream map functions for HD Audio.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2017-2020 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef VBOX_INCLUDED_SRC_Audio_HDAStreamMap_h
|
---|
19 | #define VBOX_INCLUDED_SRC_Audio_HDAStreamMap_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * Audio stream data mapping.
|
---|
26 | */
|
---|
27 | typedef struct HDASTREAMMAP
|
---|
28 | {
|
---|
29 | /** The stream's layout. */
|
---|
30 | PDMAUDIOSTREAMLAYOUT enmLayout;
|
---|
31 | uint8_t cbFrameSize;
|
---|
32 | /** Number of mappings in paMappings. */
|
---|
33 | uint8_t cMappings;
|
---|
34 | uint8_t aPadding[2];
|
---|
35 | /** Array of stream mappings.
|
---|
36 | * Note: The mappings *must* be layed out in an increasing order, e.g.
|
---|
37 | * how the data appears in the given data block. */
|
---|
38 | R3PTRTYPE(PPDMAUDIOSTREAMMAP) paMappings;
|
---|
39 | #if HC_ARCH_BITS == 32
|
---|
40 | RTR3PTR Padding1;
|
---|
41 | #endif
|
---|
42 | #ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND
|
---|
43 | /** Circular buffer holding for holding audio data for this mapping. */
|
---|
44 | R3PTRTYPE(PRTCIRCBUF) pCircBuf;
|
---|
45 | #endif
|
---|
46 | } HDASTREAMMAP;
|
---|
47 | AssertCompileSizeAlignment(HDASTREAMMAP, 8);
|
---|
48 | /** Pointer to an audio stream data mapping. */
|
---|
49 | typedef HDASTREAMMAP *PHDASTREAMMAP;
|
---|
50 |
|
---|
51 | /** @name Stream mapping functions.
|
---|
52 | * @{
|
---|
53 | */
|
---|
54 | #ifdef IN_RING3
|
---|
55 | int hdaR3StreamMapInit(PHDASTREAMMAP pMapping, PPDMAUDIOPCMPROPS pProps);
|
---|
56 | void hdaR3StreamMapDestroy(PHDASTREAMMAP pMapping);
|
---|
57 | void hdaR3StreamMapReset(PHDASTREAMMAP pMapping);
|
---|
58 | #endif
|
---|
59 | /** @} */
|
---|
60 |
|
---|
61 | #endif /* !VBOX_INCLUDED_SRC_Audio_HDAStreamMap_h */
|
---|
62 |
|
---|