15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * Intermediate audio driver header.
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * Copyright (C) 2006-2014 Oracle Corporation
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * available from http://www.virtualbox.org. This file is free software;
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * you can redistribute it and/or modify it under the terms of the GNU
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * General Public License (GPL) as published by the Free Software
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * --------------------------------------------------------------------
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * This code is based on: audio.h
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * QEMU Audio subsystem header
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * Copyright (c) 2003-2005 Vassili Karpov (malc)
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * Permission is hereby granted, free of charge, to any person obtaining a copy
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * of this software and associated documentation files (the "Software"), to deal
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * in the Software without restriction, including without limitation the rights
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * copies of the Software, and to permit persons to whom the Software is
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * furnished to do so, subject to the following conditions:
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * The above copyright notice and this permission notice shall be included in
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * all copies or substantial portions of the Software.
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * THE SOFTWARE.
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsynctypedef enum
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * Audio driver instance data.
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * @implements PDMIAUDIOCONNECTOR
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Input/output processing thread. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Event for input/ouput processing. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Shutdown indicator. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** The audio interface presented to the device/driver above us. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Pointer to the driver instance. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Pointer to audio driver below us. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Max. number of free input streams. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Max. number of free output streams. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /** Audio configuration settings retrieved
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync * from the backend. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync/** Makes a PDRVBLOCK out of a PPDMIBLOCK. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync ( (PDRVAUDIO)((uintptr_t)pInterface - RT_OFFSETOF(DRVAUDIO, IAudioConnector)) )
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync//const char *drvAudioHlpFormatToString(PDMAUDIOFMT fmt);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncconst char *drvAudioRecSourceToString(PDMAUDIORECSOURCE enmRecSource);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncPDMAUDIOFMT drvAudioHlpStringToFormat(const char *pszFormat);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncbool drvAudioPCMPropsAreEqual(PPDMPCMPROPS info, PPDMAUDIOSTREAMCFG pCfg);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync/* AUDIO IN function declarations. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioHlpPcmSwFreeResourcesIn(PPDMAUDIOGSTSTRMIN pGstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioGstInFreeRes(PPDMAUDIOGSTSTRMIN pGstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioGstInRemove(PPDMAUDIOGSTSTRMIN pGstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncuint32_t drvAudioHstInFindMinCaptured(PPDMAUDIOHSTSTRMIN pHstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioHstInFreeRes(PPDMAUDIOHSTSTRMIN pHstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncuint32_t drvAudioHstInGetFree(PPDMAUDIOHSTSTRMIN pHstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncuint32_t drvAudioHstInGetLive(PPDMAUDIOHSTSTRMIN pHstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioGstInRemove(PPDMAUDIOGSTSTRMIN pGstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioGstInInit(PPDMAUDIOGSTSTRMIN pGstStrmIn, PPDMAUDIOHSTSTRMIN pHstStrmIn, const char *pszName, PPDMAUDIOSTREAMCFG pCfg);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncPPDMAUDIOHSTSTRMIN drvAudioFindNextHstIn(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMIN pHstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncPPDMAUDIOHSTSTRMIN drvAudioFindNextEnabledHstIn(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMIN pHstStrmIn);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncPPDMAUDIOHSTSTRMIN drvAudioFindNextEqHstIn(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync/* AUDIO OUT function declarations. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioGstOutAlloc(PPDMAUDIOGSTSTRMOUT pGstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioGstOutFreeRes(PPDMAUDIOGSTSTRMOUT pGstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioHstOutFreeRes(PPDMAUDIOHSTSTRMOUT pHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioDestroyGstOut(PDRVAUDIO pDrvAudio, PPDMAUDIOGSTSTRMOUT pGstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioDestroyHstOut(PDRVAUDIO pDrvAudio, PDMAUDIOHSTSTRMOUT pHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioGstOutInit(PPDMAUDIOGSTSTRMOUT pGstStrmOut, PPDMAUDIOHSTSTRMOUT pHstStrmOut, const char *pszName, PPDMAUDIOSTREAMCFG pCfg);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncPPDMAUDIOHSTSTRMOUT drvAudioFindAnyHstOut(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMOUT pHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncPPDMAUDIOHSTSTRMOUT drvAudioHstFindAnyEnabledOut(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMOUT pHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncPPDMAUDIOHSTSTRMOUT drvAudioFindSpecificOut(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioAllocHstOut(PDRVAUDIO pDrvAudio, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOHSTSTRMOUT *ppHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioHlpPcmHwAddOut(PDRVAUDIO pDrvAudio, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOHSTSTRMOUT *ppHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioHlpPcmCreateVoicePairOut(PDRVAUDIO pDrvAudio, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOGSTSTRMOUT *ppGstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync/* Common functions between DrvAudio and backends (host audio drivers). */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncint drvAudioAttachCapture(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMOUT pHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid drvAudioDetachCapture(PPDMAUDIOHSTSTRMOUT pHstStrmOut);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncuint32_t drvAudioHstOutSamplesLive(PPDMAUDIOHSTSTRMOUT pHstStrmOut, uint32_t *pcStreamsLive);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncvoid audio_pcm_info_clear_buf(PPDMPCMPROPS pPCMInfo, void *pvBuf, int len);
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsyncstatic struct {
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /* Fixed output settings. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync { /* DAC fixed settings */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync /* Fixed input settings. */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync { /* ADC fixed settings */
15fd6c193acece312cad1846b7c6e1e677b4557fvboxsync#endif /* DRV_AUDIO_H */