VirtualBox

Changeset 33787 in vbox


Ignore:
Timestamp:
Nov 4, 2010 8:36:36 PM (14 years ago)
Author:
vboxsync
Message:

Audio/HDA: VerbID(F00[0B/0D]) clarification and clean up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevCodec.cpp

    r33753 r33787  
    148148#define CODEC_F00_0A_48KHZ_1_6X         RT_BIT(0)
    149149
     150/* Supported streams formats (7.3.4.8) */
     151#define CODEC_F00_0B_AC3                RT_BIT(2)
     152#define CODEC_F00_0B_FLOAT32            RT_BIT(1)
     153#define CODEC_F00_0B_PCM                RT_BIT(0)
     154
    150155/* Pin Capabilities (7.3.4.9)*/
    151156#define CODEC_MAKE_F00_0C(vref_ctrl) (((vref_ctrl) & 0xFF) << 8)
     
    161166#define CODEC_F00_0C_CAP_TRIGGER_REQUIRED       RT_BIT(1)
    162167#define CODEC_F00_0C_CAP_IMPENDANCE_SENSE       RT_BIT(0)
     168
     169/* Amplifier capabilities (7.3.4.10) */
     170#define MAKE_F00_0D(mute_cap, step_size, num_steps, offset) \
     171           (((mute_cap) & 0x1) << 31)                       \
     172        | (((step_size) & 0xFF) << 16)                      \
     173        | (((num_steps) & 0xFF) << 8)                       \
     174        | ((offset) & 0xFF)
    163175
    164176
     
    343355                                             | CODEC_F00_0C_CAP_TRIGGER_REQUIRED
    344356                                             | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//(17 << 8)|RT_BIT(6)|RT_BIT(5)|RT_BIT(2)|RT_BIT(1)|RT_BIT(0);
    345             pNode->node.au32F00_param[0xB] = RT_BIT(0);
    346             pNode->node.au32F00_param[0xD] = RT_BIT(31)|(0x5 << 16)|(0xE)<<8;
     357            pNode->node.au32F00_param[0xB] = CODEC_F00_0B_PCM;
     358            pNode->node.au32F00_param[0xD] = MAKE_F00_0D(1, 0x5, 0xE, 0);//RT_BIT(31)|(0x5 << 16)|(0xE)<<8;
    347359            pNode->node.au32F00_param[0x12] = RT_BIT(31)|(0x2 << 16)|(0x7f << 8)|0x7f;
    348360            pNode->node.au32F00_param[0x11] = 0xc0000004;
     
    406418                                                    | CODEC_F00_09_CAP_LSB;//(4 << 16) | RT_BIT(9)|RT_BIT(4)|0x1;
    407419            pNode->node.au32F00_param[0xa] = pState->pNodes[1].node.au32F00_param[0xA];
    408             pNode->spdifout.node.au32F00_param[0xB] = RT_BIT(2)|RT_BIT(0);
     420            pNode->spdifout.node.au32F00_param[0xB] = CODEC_F00_0B_PCM;
    409421            pNode->spdifout.u32F06_param = 0;
    410422            pNode->spdifout.u32F0d_param = 0;
     
    421433            pNode->node.au32F00_param[0xE] = RT_BIT(0);
    422434            pNode->node.au32F02_param[0] = 0x11;
    423             pNode->spdifin.node.au32F00_param[0xB] = RT_BIT(2)|RT_BIT(0);
     435            pNode->spdifin.node.au32F00_param[0xB] = CODEC_F00_0B_PCM;
    424436            pNode->spdifin.u32F06_param = 0;
    425437            pNode->spdifin.u32F0d_param = 0;
     
    758770        case 0x1: /* AFG */
    759771            pNode->afg.u32F20_param = pState->u16VendorId << 16 | pState->u16DeviceId;
    760             pNode->node.au32F00_param[0xB] = 0x1;
     772            pNode->node.au32F00_param[0xB] = CODEC_F00_0B_PCM;
    761773            pNode->node.au32F00_param[0x11] = RT_BIT(30)|0x2;
    762774            break;
     
    779791            pNode->node.au32F00_param[0xA] = pState->pNodes[1].node.au32F00_param[0xA];
    780792            pNode->node.au32F00_param[0x9] = 0x11;
    781             pNode->node.au32F00_param[0xB] = 0x1;
     793            pNode->node.au32F00_param[0xB] = CODEC_F00_0B_PCM;
    782794            pNode->dac.u32A_param = (1<<14)|(0x1<<4) | 0x1;
    783795            break;
Note: See TracChangeset for help on using the changeset viewer.

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