File nut/include/dev/vs10xx.h


Included Files


Preprocessor definitions

#define _DEV_VS10XX_H_

#define VS_OPCODE_READ 3

#define VS_OPCODE_WRITE 2

#define VS_MODE_REG 0

#define VS_SM_DIFF 0x0001

#define VS_SM_LAYER12 0x0002

#define VS_SM_FFWD 0x0002

#define VS_SM_RESET 0x0004

#define VS_SM_MP12 0x0008

#define VS_SM_OUTOFWAV 0x0008

#define VS_SM_PDOWN 0x0010

#define VS_SM_DAC 0x0020

#define VS_SM_TESTS 0x0020

#define VS_SM_DACMONO 0x0040

#define VS_SM_STREAM 0x0040

#define VS_SM_BASS 0x0080

#define VS_SM_DACT 0x0100

#define VS_SM_BYTEORD 0x0200

#define VS_SM_SDIORD 0x0200

#define VS_SM_IBMODE 0x0400

#define VS_SM_SDISHARE 0x0400

#define VS_SM_IBCLK 0x0800

#define VS_SM_SDINEW 0x0800

#define VS_SM_ADPCM 0x1000

#define VS_SM_ADPCM_HP 0x2000

#define VS_SM_LINE_IN 0x4000

#define VS_SM_CLK_RANGE 0x8000

#define VS_STATUS_REG 1

#define VS_SS_AVOL 0x0003

#define VS_SS_AVOL_LSB 0

#define VS_SS_APDOWM1 0x0004

#define VS_SS_APDOWN2 0x0008

#define VS_SS_VER 0x0070

#define VS_SS_VER_LSB 4

#define VS_INT_FCTLH_REG 2

#define VS_BASS_REG 2

#define VS_SB_FREQLIMIT 0x000F

#define VS_SB_FREQLIMIT_LSB 0

#define VS_SB_AMPLITUDE 0x00F0

#define VS_SB_AMPLITUDE_LSB 4

#define VS_ST_FREQLIMIT 0x000F

#define VS_ST_FREQLIMIT_LSB 0

#define VS_ST_AMPLITUDE 0x00F0

#define VS_ST_AMPLITUDE_LSB 4

#define VS_CLOCKF_REG 3

#define VS_SC_FREQ 0x7FFF

#define VS_SC_X3FREQ 0x07FF

#define VS_SC_FREQ_LSB 0

#define VS_SC_ADD 0x1800

#define VS_SC_MULT 0xE000

#define VS_CF_DOUBLER 0x8000

#define VS_DECODE_TIME_REG 4

#define VS_AUDATA_REG 5

#define VS_AD_STEREO 0x0001

#define VS_AD_SRATE 0xFFFE

#define VS_AD_SRATE_LSB 1

#define VS_WRAM_REG 6

#define VS_WRAMADDR_REG 7

#define VS_HDAT0_REG 8

#define VS_IN0_REG 8

#define VS_HDAT1_REG 9

#define VS_IN1_REG 9

#define VS_AIADDR_REG 10

#define VS_VOL_REG 11

#define VS_VOL_RIGHT 0x00FF

#define VS_VOL_RIGHT_LSB 0

#define VS_VOL_LEFT 0xFF00

#define VS_VOL_LEFT_LSB 8

#define VS_MIXERVOL_REG 12

#define VS_SMV_GAIN1 0x001F

#define VS_SMV_GAIN2 0x03E0

#define VS_SMV_GAIN3 0x7C00

#define VS_SMV_ACTIVE 0x8000

#define VS_ADPCMRECCTL_REG 13

#define VS_SARC_GAIN4 0x003F

#define VS_SARC_MANUALGAIN 0x0040

#define VS_SARC_OUTOFADPCM 0x0080

#define VS_AICTRL0_REG 12

#define VS_AICTRL_REG 13

#define VS_AICTRL1_REG 13

#define VS_AICTRL2_REG 14

#define VS_AICTRL3_REG 15

#define VS_FLUSH_BYTES 2048

#define VS_STATUS_STOPPED 0

#define VS_STATUS_RUNNING 1

#define VS_STATUS_EOF 2

#define VS_STATUS_EMPTY 4


Typedef VS_HEADERINFO

typedef struct {...} VS_HEADERINFO
struct  
   {  
      uint16_t vshi_no_crc:1;  
      uint16_t vshi_layer:2;  
      uint16_t vshi_id:2;  
      uint16_t vshi_syncword:11;  
      uint16_t vshi_emphasis:2;  
      uint16_t vshi_original:1;  
      uint16_t vshi_copyright:1;  
      uint16_t vshi_extension:2;  
      uint16_t vshi_mode:2;  
      uint16_t vshi_private_bit:1;  
      uint16_t vshi_pad_bit:1;  
      uint16_t vshi_sample_rate:2;  
      uint16_t vshi_bitrate:4;  
   }