DevIchHdaCodec.h revision 5f80794f0fac6c6ae43bf4d2baaef60babb2a7c7
/* $Id$ */
/** @file
* DevIchHdaCodec - VBox ICH Intel HD Audio Codec.
*/
/*
* Copyright (C) 2006-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef DEV_CODEC_H
#define DEV_CODEC_H
/** The ICH HDA (Intel) codec state. */
/** Pointer to the Intel ICH HDA codec state. */
#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
typedef struct PDMIAUDIOCONNECTOR * PPDMIAUDIOCONNECTOR;
typedef struct PDMGSTVOICEOUT *PPDMGSTVOICEOUT;
typedef struct PDMGSTVOICEIN *PPDMGSTVOICEIN;
#endif
/**
* Verb processor method.
*/
typedef FNHDACODECVERBPROCESSOR **PPFNHDACODECVERBPROCESSOR;
/* PRM 5.3.1 */
#ifndef VBOX_WITH_HDA_CODEC_EMU
typedef struct CODECVERB
{
/* operation bitness mask */
} CODECVERB;
#endif
#ifndef VBOX_WITH_HDA_CODEC_EMU
# define TYPE union
#else
# define TYPE struct
#endif
typedef enum
{
PI_INDEX = 0, /* PCM in */
PO_INDEX, /* PCM out */
MC_INDEX, /* Mic in */
typedef struct HDACODEC
{
#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
/** Pointer to the attached audio driver. */
#endif
#ifndef VBOX_WITH_HDA_CODEC_EMU
int cVerbs;
#else
#endif
#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
/** PCM in */
/** PCM out */
#else
/** PCM in */
/** PCM out */
#endif
void *pvHDAState;
bool fInReset;
#ifndef VBOX_WITH_HDA_CODEC_EMU
const uint8_t cTotalNodes;
const uint8_t *au8AdcVols;
const uint8_t *au8AdcMuxs;
const uint8_t *au8Pcbeeps;
const uint8_t *au8SpdifIns;
const uint8_t *au8SpdifOuts;
const uint8_t *au8DigInPins;
const uint8_t *au8DigOutPins;
const uint8_t *au8VolKnobs;
const uint8_t *au8Reserveds;
const uint8_t u8AdcVolsLineIn;
const uint8_t u8DacLineOut;
#endif
/* These callbacks are set by Codec implementation. */
/* These callbacks are set by codec implementation to answer debugger requests. */
DECLR3CALLBACKMEMBER(void, pfnCodecDbgListNodes, (PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs));
DECLR3CALLBACKMEMBER(void, pfnCodecDbgSelector, (PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs));
} CODECState;
int hdaCodecOpenVoice(PHDACODEC pThis, ENMSOUNDSOURCE enmSoundSource, audsettings_t *pAudioSettings);
#define HDA_SSM_VERSION 4
#define HDA_SSM_VERSION_1 1
#define HDA_SSM_VERSION_2 2
#define HDA_SSM_VERSION_3 3
# ifdef VBOX_WITH_HDA_CODEC_EMU
/* */
struct CODECEMU
{
};
# endif
#endif