📄 snd_ps3_reg.h
字号:
Data Bit ModeSpecifies number of data bits0 - 16 bits1 - Reserved2 - 20 bits3 - 24 bits*/#define PS3_AUDIO_AO_SPDCTRL_SPODB_MASK (0x3 << 8) /* RWIVF */#define PS3_AUDIO_AO_SPDCTRL_SPODB_16BIT (0x0 << 8) /* RWI-V */#define PS3_AUDIO_AO_SPDCTRL_SPODB_RESVD (0x1 << 8) /* RW--V */#define PS3_AUDIO_AO_SPDCTRL_SPODB_20BIT (0x2 << 8) /* RW--V */#define PS3_AUDIO_AO_SPDCTRL_SPODB_24BIT (0x3 << 8) /* RW--V *//*Data format ModeSpecifies the data format, where (LSB side or MSB)the data(in 20 or 24 bit resolution) is put in the32 bit field.0 - LSB Side1 - MSB Side*/#define PS3_AUDIO_AO_SPDCTRL_SPODF (1 << 11) /* RWIVF */#define PS3_AUDIO_AO_SPDCTRL_SPODF_LSB (0 << 11) /* RWI-V */#define PS3_AUDIO_AO_SPDCTRL_SPODF_MSB (1 << 11) /* RW--V *//*Source SelectSpecifies the source of the S/PDIF output. When 0, outputoperation is controlled by 3wen[0] of AO_3WMCTRL register.The SR must have the same setting as the a0_3wmctrl reg.0 - 3-Wire Audio OUT Ch0 Buffer1 - S/PDIF buffer*/#define PS3_AUDIO_AO_SPDCTRL_SPOSS_MASK (0x3 << 16) /* RWIVF */#define PS3_AUDIO_AO_SPDCTRL_SPOSS_3WEN (0x0 << 16) /* RWI-V */#define PS3_AUDIO_AO_SPDCTRL_SPOSS_SPDIF (0x1 << 16) /* RW--V *//*Sampling RateSpecifies the divide ratio of the bit clock (clock outputfrom bclko) used by the S/PDIF Output Clock, whichis applied to the master clock selected by mcksel.*/#define PS3_AUDIO_AO_SPDCTRL_SPOSR (0xf << 20) /* RWIVF */#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV2 (0x1 << 20) /* RWI-V */#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV4 (0x2 << 20) /* RW--V */#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV8 (0x4 << 20) /* RW--V */#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV12 (0x6 << 20) /* RW--V *//*Master Clock Select0 - Master Clock 01 - Master Clock 1*/#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL (1 << 24) /* RWIVF */#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL_CLK0 (0 << 24) /* RWI-V */#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL_CLK1 (1 << 24) /* RW--V *//*S/PDIF Output Channel Operational StatusThis bit becomes 1 after S/PDIF Output Channel is inaction by setting 1 to spoen. This bit becomes 0after S/PDIF Output Channel is out of action by setting0 to spoen.*/#define PS3_AUDIO_AO_SPDCTRL_SPORUN (1 << 27) /* R-IVF */#define PS3_AUDIO_AO_SPDCTRL_SPORUN_STOPPED (0 << 27) /* R-I-V */#define PS3_AUDIO_AO_SPDCTRL_SPORUN_RUNNING (1 << 27) /* R---V *//*S/PDIF Audio Output Channel Output EnableEnables and disables output operation. This bit is usedonly when sposs = 1*/#define PS3_AUDIO_AO_SPDCTRL_SPOEN (1 << 31) /* RWIVF */#define PS3_AUDIO_AO_SPDCTRL_SPOEN_DISABLED (0 << 31) /* RWI-V */#define PS3_AUDIO_AO_SPDCTRL_SPOEN_ENABLED (1 << 31) /* RW--V *//*S/PDIF Audio Output Channel Channel StatusSetting Registers.Configures channel status bit settings for each block(192 bits).Output is performed from the MSB(AO_SPDCS0 register bit 31).The same value is added for subframes within the same frame. 31 24 23 16 15 8 7 0 +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ | SPOCS | AO_SPDCS +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+S/PDIF Audio Output Channel User Bit SettingConfigures user bit settings for each block (384 bits).Output is performed from the MSB(ao_spdub0 register bit 31). 31 24 23 16 15 8 7 0 +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ | SPOUB | AO_SPDUB +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+*//***************************************************************************** * * DMAC register * *****************************************************************************//*The PS3_AUDIO_KICK register is used to initiate a DMA transfer and monitorits status 31 24 23 16 15 8 7 0 +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ |0 0 0 0 0|STATU|0 0 0| EVENT |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|R| KICK +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+*//*The REQUEST field is written to ACTIVE to initiate a DMA request when EVENToccurs.It will return to the DONE state when the request is completed.The registers for a DMA channel should only be written if REQUEST is IDLE.*/#define PS3_AUDIO_KICK_REQUEST (1 << 0) /* RWIVF */#define PS3_AUDIO_KICK_REQUEST_IDLE (0 << 0) /* RWI-V */#define PS3_AUDIO_KICK_REQUEST_ACTIVE (1 << 0) /* -W--T *//* *The EVENT field is used to set the event in which *the DMA request becomes active. */#define PS3_AUDIO_KICK_EVENT_MASK (0x1f << 16) /* RWIVF */#define PS3_AUDIO_KICK_EVENT_ALWAYS (0x00 << 16) /* RWI-V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY (0x01 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT0_UNDERFLOW (0x02 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT1_EMPTY (0x03 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT1_UNDERFLOW (0x04 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT2_EMPTY (0x05 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT2_UNDERFLOW (0x06 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT3_EMPTY (0x07 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SERIALOUT3_UNDERFLOW (0x08 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SPDIF0_BLOCKTRANSFERCOMPLETE \ (0x09 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SPDIF0_UNDERFLOW (0x0A << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SPDIF0_EMPTY (0x0B << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SPDIF1_BLOCKTRANSFERCOMPLETE \ (0x0C << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SPDIF1_UNDERFLOW (0x0D << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_SPDIF1_EMPTY (0x0E << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA(n) \ ((0x13 + (n)) << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA0 (0x13 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA1 (0x14 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA2 (0x15 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA3 (0x16 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA4 (0x17 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA5 (0x18 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA6 (0x19 << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA7 (0x1A << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA8 (0x1B << 16) /* RW--V */#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA9 (0x1C << 16) /* RW--V *//*The STATUS field can be used to monitor the progress of a DMA request.DONE indicates the previous request has completed.EVENT indicates that the DMA engine is waiting for the EVENT to occur.PENDING indicates that the DMA engine has not started processing thisrequest, but the EVENT has occured.DMA indicates that the data transfer is in progress.NOTIFY indicates that the notifier signalling end of transfer is being written.CLEAR indicated that the previous transfer was cleared.ERROR indicates the previous transfer requested an unsupportedsource/destination combination.*/#define PS3_AUDIO_KICK_STATUS_MASK (0x7 << 24) /* R-IVF */#define PS3_AUDIO_KICK_STATUS_DONE (0x0 << 24) /* R-I-V */#define PS3_AUDIO_KICK_STATUS_EVENT (0x1 << 24) /* R---V */#define PS3_AUDIO_KICK_STATUS_PENDING (0x2 << 24) /* R---V */#define PS3_AUDIO_KICK_STATUS_DMA (0x3 << 24) /* R---V */#define PS3_AUDIO_KICK_STATUS_NOTIFY (0x4 << 24) /* R---V */#define PS3_AUDIO_KICK_STATUS_CLEAR (0x5 << 24) /* R---V */#define PS3_AUDIO_KICK_STATUS_ERROR (0x6 << 24) /* R---V *//*The PS3_AUDIO_SOURCE register specifies the source address for transfers. 31 24 23 16 15 8 7 0 +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ | START |0 0 0 0 0|TAR| SOURCE +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+*//*The Audio DMA engine uses 128-byte transfers, thus the address must be alignedto a 128 byte boundary. The low seven bits are assumed to be 0.*/#define PS3_AUDIO_SOURCE_START_MASK (0x01FFFFFF << 7) /* RWIUF *//*The TARGET field specifies the memory space containing the source address.*/#define PS3_AUDIO_SOURCE_TARGET_MASK (3 << 0) /* RWIVF */#define PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY (2 << 0) /* RW--V *//*The PS3_AUDIO_DEST register specifies the destination address for transfers. 31 24 23 16 15 8 7 0 +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ | START |0 0 0 0 0|TAR| DEST +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+*//*The Audio DMA engine uses 128-byte transfers, thus the address must be alignedto a 128 byte boundary. The low seven bits are assumed to be 0.*/#define PS3_AUDIO_DEST_START_MASK (0x01FFFFFF << 7) /* RWIUF *//*The TARGET field specifies the memory space containing the destination addressAUDIOFIFO = Audio WriteData FIFO,*/#define PS3_AUDIO_DEST_TARGET_MASK (3 << 0) /* RWIVF */#define PS3_AUDIO_DEST_TARGET_AUDIOFIFO (1 << 0) /* RW--V *//*PS3_AUDIO_DMASIZE specifies the number of 128-byte blocks + 1 to transfer.So a value of 0 means 128-bytes will get transfered. 31 24 23 16 15 8 7 0 +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0| BLOCKS | DMASIZE +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+*/#define PS3_AUDIO_DMASIZE_BLOCKS_MASK (0x7f << 0) /* RWIUF *//* * source/destination address for internal fifos */#define PS3_AUDIO_AO_3W_LDATA(n) (0x1000 + (0x100 * (n)))#define PS3_AUDIO_AO_3W_RDATA(n) (0x1080 + (0x100 * (n)))#define PS3_AUDIO_AO_SPD_DATA(n) (0x2000 + (0x400 * (n)))/* * field attiribute * * Read * ' ' = Other Information * '-' = Field is part of a write-only register * 'C' = Value read is always the same, constant value line follows (C) * 'R' = Value is read * * Write * ' ' = Other Information * '-' = Must not be written (D), value ignored when written (R,A,F) * 'W' = Can be written * * Internal State * ' ' = Other Information * '-' = No internal state * 'X' = Internal state, initial value is unknown * 'I' = Internal state, initial value is known and follows (I) * * Declaration/Size * ' ' = Other Information * '-' = Does Not Apply * 'V' = Type is void * 'U' = Type is unsigned integer * 'S' = Type is signed integer * 'F' = Type is IEEE floating point * '1' = Byte size (008) * '2' = Short size (016) * '3' = Three byte size (024) * '4' = Word size (032) * '8' = Double size (064) * * Define Indicator * ' ' = Other Information * 'D' = Device * 'M' = Memory * 'R' = Register * 'A' = Array of Registers * 'F' = Field * 'V' = Value * 'T' = Task */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -