VirtualBox

source: vbox/trunk/src/VBox/Devices/Audio/DevHdaStreamMap.h@ 89379

最後變更 在這個檔案從89379是 89379,由 vboxsync 提交於 4 年 前

Audio: Removed PDMAUDIOSTREAMCFG::enmLayout and PDMAUDIOSTREAMLAYOUT. bugref:9890

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 3.2 KB
 
1/* $Id: DevHdaStreamMap.h 89379 2021-05-30 14:33:49Z vboxsync $ */
2/** @file
3 * Intel HD Audio Controller Emulation - Stream mapping (e.g. 5.1 -> stereo).
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.alldomusa.eu.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_DevHdaStreamMap_h
19#define VBOX_INCLUDED_SRC_Audio_DevHdaStreamMap_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/**
25 * Audio stream data mapping.
26 */
27typedef struct HDASTREAMMAP
28{
29 /** The guest stream properties that is being mapped from/to.
30 * The host properties are found in HDASTREAMSTATE::Cfg::Props. */
31 PDMAUDIOPCMPROPS GuestProps;
32 /** The guest side frame size in bytes. */
33 uint8_t cbGuestFrame;
34 /** Set if mapping is needed. */
35 bool fMappingNeeded;
36 /** Number of mappings in paMappings. */
37 uint8_t cMappings;
38 uint8_t aPadding[1+4];
39 /** Array of stream mappings.
40 * Note: The mappings *must* be layed out in an increasing order, e.g.
41 * how the data appears in the given data block. */
42 R3PTRTYPE(PPDMAUDIOSTREAMMAP) paMappings;
43#if HC_ARCH_BITS == 32
44 RTR3PTR Padding1;
45#endif
46#ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND
47 /** Circular buffer holding for holding audio data for this mapping. */
48 R3PTRTYPE(PRTCIRCBUF) pCircBuf;
49#endif
50 /**
51 * Converts guest data to host data.
52 *
53 * @param pvDst The destination (host) buffer.
54 * @param pvSrc The source (guest) data. Does not overlap @a pvDst.
55 * @param cFrames Number of frames to convert.
56 * @param pMapping Pointer to this structure.
57 */
58 DECLR3CALLBACKMEMBER(void, pfnGuestToHost,(void *pvDst, void const *pvSrc, uint32_t cFrames,
59 struct HDASTREAMMAP const *pMapping));
60 /**
61 * Converts host data to guest data.
62 *
63 * @param pvDst The destination (guest) buffer.
64 * @param pvSrc The source (host) data. Does not overlap @a pvDst.
65 * @param cFrames Number of frames to convert.
66 * @param pMapping Pointer to this structure.
67 */
68 DECLR3CALLBACKMEMBER(void, pfnHostToGuest,(void *pvDst, void const *pvSrc, uint32_t cFrames,
69 struct HDASTREAMMAP const *pMapping));
70} HDASTREAMMAP;
71AssertCompileSizeAlignment(HDASTREAMMAP, 8);
72/** Pointer to an audio stream data mapping. */
73typedef HDASTREAMMAP *PHDASTREAMMAP;
74
75/** @name Stream mapping functions.
76 * @{
77 */
78#ifdef IN_RING3
79int hdaR3StreamMapInit(PHDASTREAMMAP pMapping, uint8_t cHostChannels, PPDMAUDIOPCMPROPS pProps);
80void hdaR3StreamMapDestroy(PHDASTREAMMAP pMapping);
81void hdaR3StreamMapReset(PHDASTREAMMAP pMapping);
82#endif
83/** @} */
84
85#endif /* !VBOX_INCLUDED_SRC_Audio_DevHdaStreamMap_h */
86
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette