NV_PAPU_FEAV = 0x1118
NV_PAPU_FEAV_VALUE = 0x0000FFFF
NV_PAPU_FEAV_LST = 0x00030000

NV_PAPU_VPVADDR   = 0x202C
NV_PAPU_VPSGEADDR = 0x2030
NV_PAPU_VPSSLADDR = 0x2034
NV_PAPU_VPHTADDR  = 0x2038
NV_PAPU_VPHCADDR  = 0x203C
NV_PAPU_GPSADDR   = 0x2040
NV_PAPU_GPFADDR   = 0x2044
NV_PAPU_EPSADDR   = 0x2048
NV_PAPU_EPFADDR   = 0x204C

NV_PAPU_GPSMAXSGE = 0x20D4
NV_PAPU_GPFMAXSGE = 0x20D8
NV_PAPU_EPSMAXSGE = 0x20DC
NV_PAPU_EPFMAXSGE = 0x20E0

NV_PAPU_EPXMEM = 0x50000
NV_PAPU_EPYMEM = 0x56000
NV_PAPU_EPPMEM = 0x5A000

NV_PAPU_GPXMEM   = 0x30000 
NV_PAPU_GPMIXBUF = 0x35000
NV_PAPU_GPYMEM   = 0x36000
NV_PAPU_GPPMEM   = 0x3A000

NV_PAPU_GPRST = 0x3FFFC
NV_PAPU_GPRST_GPRST    = (1 << 0)
NV_PAPU_GPRST_GPDSPRST = (1 << 1)

NV_PAPU_EPRST = 0x5FFFC
NV_PAPU_EPRST_EPRST    = 0x00000001
NV_PAPU_EPRST_EPDSPRST = 0x00000002

NV_PAPU_GPOF0 = 0x3024 # 4 x 0x10 pitch
NV_PAPU_GPIF0 = 0x3064 # 2 x 0x10 pitch

NV_PAPU_EPOF0 = 0x4024 # 4 x 0x10 pitch
NV_PAPU_EPIF0 = 0x4064 # 2 x 0x10 pitch

NV_PAPU_TVL2D = 0x2054
NV_PAPU_TVL3D = 0x2060
NV_PAPU_TVLMP = 0x206C


NV_PAVS_SIZE = 0x80

NV_PAVS_VOICE_CFG_VBIN = 0x00
NV_PAVS_VOICE_CFG_FMT = 0x04
NV_PAVS_VOICE_CFG_FMT_SAMPLES_PER_BLOCK = (20,16)
NV_PAVS_VOICE_CFG_FMT_MULTIPASS = (21,21)
NV_PAVS_VOICE_CFG_FMT_LINKED_VOICE = (22,22)
NV_PAVS_VOICE_CFG_FMT_PERSIST = (23,23)
NV_PAVS_VOICE_CFG_FMT_DATA_TYPE = (24,24)
NV_PAVS_VOICE_CFG_FMT_LOOP = (25, 25)
NV_PAVS_VOICE_CFG_FMT_STEREO = (27,27)
NV_PAVS_VOICE_CFG_FMT_SAMPLE_SIZE = (29,28)
NV_PAVS_VOICE_CFG_FMT_CONTAINER_SIZE = (31,30)
NV_PAVS_VOICE_CFG_ENV0 = 0x08
NV_PAVS_VOICE_CFG_ENV0_EA_ATTACKRATE = (11, 0)
NV_PAVS_VOICE_CFG_ENV0_EA_DELAYTIME  = (23, 12)
NV_PAVS_VOICE_CFG_ENV0_EF_PITCHSCALE = (31, 24)
NV_PAVS_VOICE_CFG_ENVA = 0x0C
NV_PAVS_VOICE_CFG_ENVA_EA_DECAYRATE    = (11, 0)
NV_PAVS_VOICE_CFG_ENVA_EA_HOLDTIME     = (23, 12)
NV_PAVS_VOICE_CFG_ENVA_EA_SUSTAINLEVEL = (31, 24)
NV_PAVS_VOICE_CFG_ENV1 = 0x10
NV_PAVS_VOICE_CFG_ENV1_EF_ATTACKRATE = (11, 0)
NV_PAVS_VOICE_CFG_ENV1_EF_DELAYTIME  = (23, 12)
NV_PAVS_VOICE_CFG_ENV1_EF_FCSCALE    = (31, 24)
NV_PAVS_VOICE_CFG_ENVF = 0x14
NV_PAVS_VOICE_CFG_ENVF_EF_DECAYRATE    = (11, 0)
NV_PAVS_VOICE_CFG_ENVF_EF_HOLDTIME     = (23, 12)
NV_PAVS_VOICE_CFG_ENVF_EF_SUSTAINLEVEL = (31, 24)
NV_PAVS_VOICE_CFG_MISC = 0x18 # FIXME: Look into this
NV_PAVS_VOICE_CFG_MISC_EF_RELEASERATE = (11, 0)
NV_PAVS_VOICE_CFG_HRTF_TARGET = 0x1C
NV_PAVS_VOICE_CUR_PSL_START = 0x20 # start of buffer?
NV_PAVS_VOICE_CUR_PSL_START_BA = (23, 0)
NV_PAVS_VOICE_CUR_PSL_START_SSLA_COUNT = (7, 0) # Stream
NV_PAVS_VOICE_CUR_PSL_START_SSLA_BASE = (23, 8) # Stream
NV_PAVS_VOICE_CUR_PSL_START_PS_7_0 = (31, 24)
NV_PAVS_VOICE_CUR_PSH_SAMPLE = 0x24 # loop start?
NV_PAVS_VOICE_CUR_PSH_SAMPLE_LBO = (23, 0) # Buffer
NV_PAVS_VOICE_CUR_PSH_SAMPLE_CSI = (7, 0) # Stream (Current stream index?)
NV_PAVS_VOICE_CUR_PSH_SAMPLE_CSSL = (23, 8) # Stream (Current stream segment list?)
NV_PAVS_VOICE_CUR_PSH_SAMPLE_PS_15_8 = (31, 24)
NV_PAVS_VOICE_CUR_VOLA = 0x28
NV_PAVS_VOICE_CUR_VOLB = 0x2C
NV_PAVS_VOICE_CUR_VOLC = 0x30
NV_PAVS_VOICE_CUR_ECNT = 0x34
NV_PAVS_VOICE_CUR_ECNT_EACOUNT = (15, 0)
NV_PAVS_VOICE_CUR_ECNT_EFCOUNT = (31, 16)
NV_PAVS_VOICE_CUR_PRD = 0x38
NV_PAVS_VOICE_CUR_FCA = 0x3C
NV_PAVS_VOICE_CUR_FCB = 0x40
NV_PAVS_VOICE_CUR_FSA = 0x44
NV_PAVS_VOICE_CUR_FSB = 0x48
NV_PAVS_VOICE_CUR_FSC = 0x4C
NV_PAVS_VOICE_PAR_LFO = 0x50
NV_PAVS_VOICE_PAR_STATE = 0x54
NV_PAVS_VOICE_PAR_STATE_PAUSED = (1 << 18)
NV_PAVS_VOICE_PAR_STATE_ACTIVE_VOICE = (1 << 21)
NV_PAVS_VOICE_PAR_STATE_EFCUR = (27, 24)
NV_PAVS_VOICE_PAR_STATE_EFCUR_OFF           = 0
NV_PAVS_VOICE_PAR_STATE_EFCUR_DELAY         = 1
NV_PAVS_VOICE_PAR_STATE_EFCUR_ATTACK        = 2
NV_PAVS_VOICE_PAR_STATE_EFCUR_HOLD          = 3
NV_PAVS_VOICE_PAR_STATE_EFCUR_DECAY         = 4
NV_PAVS_VOICE_PAR_STATE_EFCUR_SUSTAIN       = 5
NV_PAVS_VOICE_PAR_STATE_EFCUR_RELEASE       = 6
NV_PAVS_VOICE_PAR_STATE_EFCUR_FORCE_RELEASE = 7
NV_PAVS_VOICE_PAR_STATE_EACUR = (31, 28)
NV_PAVS_VOICE_PAR_STATE_EACUR_OFF           = 0
NV_PAVS_VOICE_PAR_STATE_EACUR_DELAY         = 1
NV_PAVS_VOICE_PAR_STATE_EACUR_ATTACK        = 2
NV_PAVS_VOICE_PAR_STATE_EACUR_HOLD          = 3
NV_PAVS_VOICE_PAR_STATE_EACUR_DECAY         = 4
NV_PAVS_VOICE_PAR_STATE_EACUR_SUSTAIN       = 5
NV_PAVS_VOICE_PAR_STATE_EACUR_RELEASE       = 6
NV_PAVS_VOICE_PAR_STATE_EACUR_FORCE_RELEASE = 7
NV_PAVS_VOICE_PAR_OFFSET = 0x58 # current playback offset
NV_PAVS_VOICE_PAR_OFFSET_CBO = (23, 0) # Current Buffer Offset (presumably)
NV_PAVS_VOICE_PAR_OFFSET_CSO = (23, 0) # Current Stream Offset (presumably)
NV_PAVS_VOICE_PAR_OFFSET_EALVL = (31, 24)
NV_PAVS_VOICE_PAR_NEXT = 0x5C # end of buffer?
NV_PAVS_VOICE_PAR_NEXT_EBO = (23, 0) # Buffer
NV_PAVS_VOICE_PAR_NEXT_SSLB_COUNT = (7, 0) # Stream
NV_PAVS_VOICE_PAR_NEXT_SSLB_BASE = (23, 8) # Stream
NV_PAVS_VOICE_PAR_NEXT_EFLVL = (31, 24) # Buffer
NV_PAVS_VOICE_TAR_VOLA = 0x60
NV_PAVS_VOICE_TAR_VOLB = 0x64
NV_PAVS_VOICE_TAR_VOLC = 0x68
NV_PAVS_VOICE_TAR_LFO_ENV = 0x6C
NV_PAVS_VOICE_TAR_LFO_ENV_EA_RELEASERATE = (11, 0)
NV_PAVS_VOICE_TAR_LFO_MOD = 0x70
NV_PAVS_VOICE_TAR_FCA = 0x74
NV_PAVS_VOICE_TAR_FCB = 0x78
NV_PAVS_VOICE_TAR_PITCH_LINK = 0x7c
NV_PAVS_VOICE_TAR_PITCH_LINK_NEXT_VOICE_HANDLE = (15,0)
NV_PAVS_VOICE_TAR_PITCH_LINK_PITCH = (31,16)

NV_PAPU_SECTL = 0x2000
