VirtualBox

Changeset 33717 in vbox


Ignore:
Timestamp:
Nov 3, 2010 5:58:43 AM (14 years ago)
Author:
vboxsync
Message:

Audio/HDA: more clean ups. fixes typo in r67342 node count macro.

File:
1 edited

Legend:

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

    r33716 r33717  
    7575
    7676/* HDA spec 7.3.3.1 defines layout of configuration registers/verbs (0xF00) */
    77 /* VendorID */
     77/* VendorID (7.3.4.1) */
    7878#define CODEC_MAKE_F00_00(vendorID, deviceID) (((vendorID) << 16) | (deviceID))
    79 /* RevisionID */
     79/* RevisionID (7.3.4.2)*/
    8080#define CODEC_MAKE_F00_02(MajRev, MinRev, RevisionID, SteppingID) (((MajRev) << 20)|((MinRev) << 16)|((RevisionID) << 8)|(SteppingID))
    81 /* Subordinate node count */
    82 #define CODEC_MAKE_F00_04(startNodeNumber, totalNodeNumber) ((((startNodeNumber) & 0xFF) << 16)|(((totalNodeNumber) & 0xFF) << 8))
     81/* Subordinate node count (7.3.4.3)*/
     82#define CODEC_MAKE_F00_04(startNodeNumber, totalNodeNumber) ((((startNodeNumber) & 0xFF) << 16)|((totalNodeNumber) & 0xFF))
    8383/*
    84  * Function Group Type
     84 * Function Group Type  (7.3.4.4)
    8585 * 0 & [0x3-0x7f] are reserved types
    8686 * [0x80 - 0xff] are vendor defined function groups
     
    9090#define CODEC_F00_05_AFG    (0x1)
    9191#define CODEC_F00_05_MFG    (0x2)
     92/*  Audio Function Group capabilities (7.3.4.5) */
     93#define CODEC_MAKE_F00_08(BeepGen, InputDelay, OutputDelay) ((BeepGen)| (((InputDelay) & 0xF) << 8) | ((OutputDelay) & 0xF))
     94#define CODEC_F00_08_BEEP_GEN RT_BIT(16)
    9295
    9396/* HDA spec 7.3.3.31 defines layout of configuration registers/verbs (0xF1C) */
     
    260263        case 0:
    261264            pNode->root.node.name = "Root";
    262             pNode->node.au32F00_param[2] = CODEC_MAKE_F00_02(0x1, 0x0, 0x31, 0x1); /* rev id */
     265            pNode->node.au32F00_param[2] = CODEC_MAKE_F00_02(0x1, 0x0, 0x34, 0x1); /* rev id */
    263266            break;
    264267        case 1:
    265268            pNode->afg.node.name = "AFG";
    266             pNode->node.au32F00_param[8] = RT_MAKE_U32_FROM_U8(0x0d, 0x0d, 0x01, 0x0); /* Capabilities */
     269            pNode->node.au32F00_param[8] = CODEC_MAKE_F00_08(CODEC_F00_08_BEEP_GEN, 0xd, 0xd);
    267270            pNode->node.au32F00_param[0xC] = (17 << 8)|RT_BIT(6)|RT_BIT(5)|RT_BIT(2)|RT_BIT(1)|RT_BIT(0);
    268271            pNode->node.au32F00_param[0xB] = RT_BIT(0);
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