162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Audio support for PS3 462306a36Sopenharmony_ci * Copyright (C) 2007 Sony Computer Entertainment Inc. 562306a36Sopenharmony_ci * Copyright 2006, 2007 Sony Corporation 662306a36Sopenharmony_ci * All rights reserved. 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci/* 1062306a36Sopenharmony_ci * interrupt / configure registers 1162306a36Sopenharmony_ci */ 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0 (0x00000100) 1462306a36Sopenharmony_ci#define PS3_AUDIO_INTR_EN_0 (0x00000140) 1562306a36Sopenharmony_ci#define PS3_AUDIO_CONFIG (0x00000200) 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci/* 1862306a36Sopenharmony_ci * DMAC registers 1962306a36Sopenharmony_ci * n:0..9 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci#define PS3_AUDIO_DMAC_REGBASE(x) (0x0000210 + 0x20 * (x)) 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci#define PS3_AUDIO_KICK(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x00) 2462306a36Sopenharmony_ci#define PS3_AUDIO_SOURCE(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x04) 2562306a36Sopenharmony_ci#define PS3_AUDIO_DEST(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x08) 2662306a36Sopenharmony_ci#define PS3_AUDIO_DMASIZE(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x0C) 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci/* 2962306a36Sopenharmony_ci * mute control 3062306a36Sopenharmony_ci */ 3162306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL (0x00004000) 3262306a36Sopenharmony_ci#define PS3_AUDIO_AX_ISBP (0x00004004) 3362306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP (0x00004008) 3462306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC (0x00004010) 3562306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE (0x00004014) 3662306a36Sopenharmony_ci#define PS3_AUDIO_AX_IS (0x00004018) 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci/* 3962306a36Sopenharmony_ci * three wire serial 4062306a36Sopenharmony_ci * n:0..3 4162306a36Sopenharmony_ci */ 4262306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL (0x00006000) 4362306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL (0x00006004) 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL(n) (0x00006200 + 0x200 * (n)) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* 4862306a36Sopenharmony_ci * S/PDIF 4962306a36Sopenharmony_ci * n:0..1 5062306a36Sopenharmony_ci * x:0..11 5162306a36Sopenharmony_ci * y:0..5 5262306a36Sopenharmony_ci */ 5362306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPD_REGBASE(n) (0x00007200 + 0x200 * (n)) 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL(n) \ 5662306a36Sopenharmony_ci (PS3_AUDIO_AO_SPD_REGBASE(n) + 0x00) 5762306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDUB(n, x) \ 5862306a36Sopenharmony_ci (PS3_AUDIO_AO_SPD_REGBASE(n) + 0x04 + 0x04 * (x)) 5962306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCS(n, y) \ 6062306a36Sopenharmony_ci (PS3_AUDIO_AO_SPD_REGBASE(n) + 0x34 + 0x04 * (y)) 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci/* 6462306a36Sopenharmony_ci PS3_AUDIO_INTR_0 register tells an interrupt handler which audio 6562306a36Sopenharmony_ci DMA channel triggered the interrupt. The interrupt status for a channel 6662306a36Sopenharmony_ci can be cleared by writing a '1' to the corresponding bit. A new interrupt 6762306a36Sopenharmony_ci cannot be generated until the previous interrupt has been cleared. 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci Note that the status reported by PS3_AUDIO_INTR_0 is independent of the 7062306a36Sopenharmony_ci value of PS3_AUDIO_INTR_EN_0. 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 7362306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 7462306a36Sopenharmony_ci |0 0 0 0 0 0 0 0 0 0 0 0 0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C| INTR_0 7562306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 7662306a36Sopenharmony_ci*/ 7762306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN(n) (1 << ((n) * 2)) 7862306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN9 PS3_AUDIO_INTR_0_CHAN(9) 7962306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN8 PS3_AUDIO_INTR_0_CHAN(8) 8062306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN7 PS3_AUDIO_INTR_0_CHAN(7) 8162306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN6 PS3_AUDIO_INTR_0_CHAN(6) 8262306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN5 PS3_AUDIO_INTR_0_CHAN(5) 8362306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN4 PS3_AUDIO_INTR_0_CHAN(4) 8462306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN3 PS3_AUDIO_INTR_0_CHAN(3) 8562306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN2 PS3_AUDIO_INTR_0_CHAN(2) 8662306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN1 PS3_AUDIO_INTR_0_CHAN(1) 8762306a36Sopenharmony_ci#define PS3_AUDIO_INTR_0_CHAN0 PS3_AUDIO_INTR_0_CHAN(0) 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci/* 9062306a36Sopenharmony_ci The PS3_AUDIO_INTR_EN_0 register specifies which DMA channels can generate 9162306a36Sopenharmony_ci an interrupt to the PU. Each bit of PS3_AUDIO_INTR_EN_0 is ANDed with the 9262306a36Sopenharmony_ci corresponding bit in PS3_AUDIO_INTR_0. The resulting bits are OR'd together 9362306a36Sopenharmony_ci to generate the Audio interrupt. 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 9662306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 9762306a36Sopenharmony_ci |0 0 0 0 0 0 0 0 0 0 0 0 0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C| INTR_EN_0 9862306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci Bit assignments are same as PS3_AUDIO_INTR_0 10162306a36Sopenharmony_ci*/ 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci/* 10462306a36Sopenharmony_ci PS3_AUDIO_CONFIG 10562306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 10662306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 10762306a36Sopenharmony_ci |0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 C|0 0 0 0 0 0 0 0| CONFIG 10862306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_ci*/ 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci/* The CLEAR field cancels all pending transfers, and stops any running DMA 11362306a36Sopenharmony_ci transfers. Any interrupts associated with the canceled transfers 11462306a36Sopenharmony_ci will occur as if the transfer had finished. 11562306a36Sopenharmony_ci Since this bit is designed to recover from DMA related issues 11662306a36Sopenharmony_ci which are caused by unpredictable situations, it is preferred to wait 11762306a36Sopenharmony_ci for normal DMA transfer end without using this bit. 11862306a36Sopenharmony_ci*/ 11962306a36Sopenharmony_ci#define PS3_AUDIO_CONFIG_CLEAR (1 << 8) /* RWIVF */ 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci/* 12262306a36Sopenharmony_ci PS3_AUDIO_AX_MCTRL: Audio Port Mute Control Register 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 12562306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 12662306a36Sopenharmony_ci |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|A|A|0 0 0 0 0 0 0|S|S|A|A|A|A| AX_MCTRL 12762306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 12862306a36Sopenharmony_ci*/ 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci/* 3 Wire Audio Serial Output Channel Mutes (0..3) */ 13162306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_ASOMT(n) (1 << (3 - (n))) /* RWIVF */ 13262306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_ASO3MT (1 << 0) /* RWIVF */ 13362306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_ASO2MT (1 << 1) /* RWIVF */ 13462306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_ASO1MT (1 << 2) /* RWIVF */ 13562306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_ASO0MT (1 << 3) /* RWIVF */ 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci/* S/PDIF mutes (0,1)*/ 13862306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_SPOMT(n) (1 << (5 - (n))) /* RWIVF */ 13962306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_SPO1MT (1 << 4) /* RWIVF */ 14062306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_SPO0MT (1 << 5) /* RWIVF */ 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci/* All 3 Wire Serial Outputs Mute */ 14362306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_AASOMT (1 << 13) /* RWIVF */ 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci/* All S/PDIF Mute */ 14662306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_ASPOMT (1 << 14) /* RWIVF */ 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci/* All Audio Outputs Mute */ 14962306a36Sopenharmony_ci#define PS3_AUDIO_AX_MCTRL_AAOMT (1 << 15) /* RWIVF */ 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci/* 15262306a36Sopenharmony_ci S/PDIF Outputs Buffer Read/Write Pointer Register 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 15562306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 15662306a36Sopenharmony_ci |0 0 0 0 0 0 0 0|0|SPO0B|0|SPO1B|0 0 0 0 0 0 0 0|0|SPO0B|0|SPO1B| AX_ISBP 15762306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 15862306a36Sopenharmony_ci 15962306a36Sopenharmony_ci*/ 16062306a36Sopenharmony_ci/* 16162306a36Sopenharmony_ci S/PDIF Output Channel Read Buffer Numbers 16262306a36Sopenharmony_ci Buffer number is value of field. 16362306a36Sopenharmony_ci Indicates current read access buffer ID from Audio Data 16462306a36Sopenharmony_ci Transfer controller of S/PDIF Output 16562306a36Sopenharmony_ci*/ 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci#define PS3_AUDIO_AX_ISBP_SPOBRN_MASK(n) (0x7 << 4 * (1 - (n))) /* R-IUF */ 16862306a36Sopenharmony_ci#define PS3_AUDIO_AX_ISBP_SPO1BRN_MASK (0x7 << 0) /* R-IUF */ 16962306a36Sopenharmony_ci#define PS3_AUDIO_AX_ISBP_SPO0BRN_MASK (0x7 << 4) /* R-IUF */ 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci/* 17262306a36Sopenharmony_ciS/PDIF Output Channel Buffer Write Numbers 17362306a36Sopenharmony_ciIndicates current write access buffer ID from bus master. 17462306a36Sopenharmony_ci*/ 17562306a36Sopenharmony_ci#define PS3_AUDIO_AX_ISBP_SPOBWN_MASK(n) (0x7 << 4 * (5 - (n))) /* R-IUF */ 17662306a36Sopenharmony_ci#define PS3_AUDIO_AX_ISBP_SPO1BWN_MASK (0x7 << 16) /* R-IUF */ 17762306a36Sopenharmony_ci#define PS3_AUDIO_AX_ISBP_SPO0BWN_MASK (0x7 << 20) /* R-IUF */ 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci/* 18062306a36Sopenharmony_ci 3 Wire Audio Serial Outputs Buffer Read/Write 18162306a36Sopenharmony_ci Pointer Register 18262306a36Sopenharmony_ci Buffer number is value of field 18362306a36Sopenharmony_ci 18462306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 18562306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 18662306a36Sopenharmony_ci |0|ASO0B|0|ASO1B|0|ASO2B|0|ASO3B|0|ASO0B|0|ASO1B|0|ASO2B|0|ASO3B| AX_AOBP 18762306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 18862306a36Sopenharmony_ci*/ 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ci/* 19162306a36Sopenharmony_ci3 Wire Audio Serial Output Channel Buffer Read Numbers 19262306a36Sopenharmony_ciIndicates current read access buffer Id from Audio Data Transfer 19362306a36Sopenharmony_ciController of 3 Wire Audio Serial Output Channels 19462306a36Sopenharmony_ci*/ 19562306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASOBRN_MASK(n) (0x7 << 4 * (3 - (n))) /* R-IUF */ 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO3BRN_MASK (0x7 << 0) /* R-IUF */ 19862306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO2BRN_MASK (0x7 << 4) /* R-IUF */ 19962306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO1BRN_MASK (0x7 << 8) /* R-IUF */ 20062306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO0BRN_MASK (0x7 << 12) /* R-IUF */ 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_ci/* 20362306a36Sopenharmony_ci3 Wire Audio Serial Output Channel Buffer Write Numbers 20462306a36Sopenharmony_ciIndicates current write access buffer ID from bus master. 20562306a36Sopenharmony_ci*/ 20662306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASOBWN_MASK(n) (0x7 << 4 * (7 - (n))) /* R-IUF */ 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO3BWN_MASK (0x7 << 16) /* R-IUF */ 20962306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO2BWN_MASK (0x7 << 20) /* R-IUF */ 21062306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO1BWN_MASK (0x7 << 24) /* R-IUF */ 21162306a36Sopenharmony_ci#define PS3_AUDIO_AX_AOBP_ASO0BWN_MASK (0x7 << 28) /* R-IUF */ 21262306a36Sopenharmony_ci 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci/* 21662306a36Sopenharmony_ciAudio Port Interrupt Condition Register 21762306a36Sopenharmony_ciFor the fields in this register, the following values apply: 21862306a36Sopenharmony_ci0 = Interrupt is generated every interrupt event. 21962306a36Sopenharmony_ci1 = Interrupt is generated every 2 interrupt events. 22062306a36Sopenharmony_ci2 = Interrupt is generated every 4 interrupt events. 22162306a36Sopenharmony_ci3 = Reserved 22262306a36Sopenharmony_ci 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 22562306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 22662306a36Sopenharmony_ci |0 0 0 0 0 0 0 0|0 0|SPO|0 0|SPO|0 0|AAS|0 0 0 0 0 0 0 0 0 0 0 0| AX_IC 22762306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 22862306a36Sopenharmony_ci*/ 22962306a36Sopenharmony_ci/* 23062306a36Sopenharmony_ciAll 3-Wire Audio Serial Outputs Interrupt Mode 23162306a36Sopenharmony_ciConfigures the Interrupt and Signal Notification 23262306a36Sopenharmony_cicondition of all 3-wire Audio Serial Outputs. 23362306a36Sopenharmony_ci*/ 23462306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_AASOIMD_MASK (0x3 << 12) /* RWIVF */ 23562306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_AASOIMD_EVERY1 (0x0 << 12) /* RWI-V */ 23662306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_AASOIMD_EVERY2 (0x1 << 12) /* RW--V */ 23762306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_AASOIMD_EVERY4 (0x2 << 12) /* RW--V */ 23862306a36Sopenharmony_ci 23962306a36Sopenharmony_ci/* 24062306a36Sopenharmony_ciS/PDIF Output Channel Interrupt Modes 24162306a36Sopenharmony_ciConfigures the Interrupt and signal Notification 24262306a36Sopenharmony_ciconditions of S/PDIF output channels. 24362306a36Sopenharmony_ci*/ 24462306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO1IMD_MASK (0x3 << 16) /* RWIVF */ 24562306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO1IMD_EVERY1 (0x0 << 16) /* RWI-V */ 24662306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO1IMD_EVERY2 (0x1 << 16) /* RW--V */ 24762306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO1IMD_EVERY4 (0x2 << 16) /* RW--V */ 24862306a36Sopenharmony_ci 24962306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO0IMD_MASK (0x3 << 20) /* RWIVF */ 25062306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO0IMD_EVERY1 (0x0 << 20) /* RWI-V */ 25162306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO0IMD_EVERY2 (0x1 << 20) /* RW--V */ 25262306a36Sopenharmony_ci#define PS3_AUDIO_AX_IC_SPO0IMD_EVERY4 (0x2 << 20) /* RW--V */ 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci/* 25562306a36Sopenharmony_ciAudio Port interrupt Enable Register 25662306a36Sopenharmony_ciConfigures whether to enable or disable each Interrupt Generation. 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 26062306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 26162306a36Sopenharmony_ci |0 0 0 0 0 0 0 0|S|S|0 0|A|A|A|A|0 0 0 0|S|S|0 0|S|S|0 0|A|A|A|A| AX_IE 26262306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 26362306a36Sopenharmony_ci 26462306a36Sopenharmony_ci*/ 26562306a36Sopenharmony_ci 26662306a36Sopenharmony_ci/* 26762306a36Sopenharmony_ci3 Wire Audio Serial Output Channel Buffer Underflow 26862306a36Sopenharmony_ciInterrupt Enables 26962306a36Sopenharmony_ciSelect enable/disable of Buffer Underflow Interrupts for 27062306a36Sopenharmony_ci3-Wire Audio Serial Output Channels 27162306a36Sopenharmony_ciDISABLED=Interrupt generation disabled. 27262306a36Sopenharmony_ci*/ 27362306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASOBUIE(n) (1 << (3 - (n))) /* RWIVF */ 27462306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO3BUIE (1 << 0) /* RWIVF */ 27562306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO2BUIE (1 << 1) /* RWIVF */ 27662306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO1BUIE (1 << 2) /* RWIVF */ 27762306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO0BUIE (1 << 3) /* RWIVF */ 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci/* S/PDIF Output Channel Buffer Underflow Interrupt Enables */ 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPOBUIE(n) (1 << (7 - (n))) /* RWIVF */ 28262306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPO1BUIE (1 << 6) /* RWIVF */ 28362306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPO0BUIE (1 << 7) /* RWIVF */ 28462306a36Sopenharmony_ci 28562306a36Sopenharmony_ci/* S/PDIF Output Channel One Block Transfer Completion Interrupt Enables */ 28662306a36Sopenharmony_ci 28762306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPOBTCIE(n) (1 << (11 - (n))) /* RWIVF */ 28862306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPO1BTCIE (1 << 10) /* RWIVF */ 28962306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPO0BTCIE (1 << 11) /* RWIVF */ 29062306a36Sopenharmony_ci 29162306a36Sopenharmony_ci/* 3-Wire Audio Serial Output Channel Buffer Empty Interrupt Enables */ 29262306a36Sopenharmony_ci 29362306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASOBEIE(n) (1 << (19 - (n))) /* RWIVF */ 29462306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO3BEIE (1 << 16) /* RWIVF */ 29562306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO2BEIE (1 << 17) /* RWIVF */ 29662306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO1BEIE (1 << 18) /* RWIVF */ 29762306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_ASO0BEIE (1 << 19) /* RWIVF */ 29862306a36Sopenharmony_ci 29962306a36Sopenharmony_ci/* S/PDIF Output Channel Buffer Empty Interrupt Enables */ 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPOBEIE(n) (1 << (23 - (n))) /* RWIVF */ 30262306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPO1BEIE (1 << 22) /* RWIVF */ 30362306a36Sopenharmony_ci#define PS3_AUDIO_AX_IE_SPO0BEIE (1 << 23) /* RWIVF */ 30462306a36Sopenharmony_ci 30562306a36Sopenharmony_ci/* 30662306a36Sopenharmony_ciAudio Port Interrupt Status Register 30762306a36Sopenharmony_ciIndicates Interrupt status, which interrupt has occurred, and can clear 30862306a36Sopenharmony_cieach interrupt in this register. 30962306a36Sopenharmony_ciWriting 1b to a field containing 1b clears field and de-asserts interrupt. 31062306a36Sopenharmony_ciWriting 0b to a field has no effect. 31162306a36Sopenharmony_ciField values are the following: 31262306a36Sopenharmony_ci0 - Interrupt hasn't occurred. 31362306a36Sopenharmony_ci1 - Interrupt has occurred. 31462306a36Sopenharmony_ci 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 31762306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 31862306a36Sopenharmony_ci |0 0 0 0 0 0 0 0|S|S|0 0|A|A|A|A|0 0 0 0|S|S|0 0|S|S|0 0|A|A|A|A| AX_IS 31962306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci Bit assignment are same as AX_IE 32262306a36Sopenharmony_ci*/ 32362306a36Sopenharmony_ci 32462306a36Sopenharmony_ci/* 32562306a36Sopenharmony_ciAudio Output Master Control Register 32662306a36Sopenharmony_ciConfigures Master Clock and other master Audio Output Settings 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_ci 32962306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 33062306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 33162306a36Sopenharmony_ci |0|SCKSE|0|SCKSE| MR0 | MR1 |MCL|MCL|0 0 0 0|0 0 0 0 0 0 0 0| AO_MCTRL 33262306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 33362306a36Sopenharmony_ci*/ 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci/* 33662306a36Sopenharmony_ciMCLK Output Control 33762306a36Sopenharmony_ciControls mclko[1] output. 33862306a36Sopenharmony_ci0 - Disable output (fixed at High) 33962306a36Sopenharmony_ci1 - Output clock produced by clock selected 34062306a36Sopenharmony_ciwith scksel1 by mr1 34162306a36Sopenharmony_ci2 - Reserved 34262306a36Sopenharmony_ci3 - Reserved 34362306a36Sopenharmony_ci*/ 34462306a36Sopenharmony_ci 34562306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC1_MASK (0x3 << 12) /* RWIVF */ 34662306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC1_DISABLED (0x0 << 12) /* RWI-V */ 34762306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC1_ENABLED (0x1 << 12) /* RW--V */ 34862306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC1_RESVD2 (0x2 << 12) /* RW--V */ 34962306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC1_RESVD3 (0x3 << 12) /* RW--V */ 35062306a36Sopenharmony_ci 35162306a36Sopenharmony_ci/* 35262306a36Sopenharmony_ciMCLK Output Control 35362306a36Sopenharmony_ciControls mclko[0] output. 35462306a36Sopenharmony_ci0 - Disable output (fixed at High) 35562306a36Sopenharmony_ci1 - Output clock produced by clock selected 35662306a36Sopenharmony_ciwith SCKSEL0 by MR0 35762306a36Sopenharmony_ci2 - Reserved 35862306a36Sopenharmony_ci3 - Reserved 35962306a36Sopenharmony_ci*/ 36062306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC0_MASK (0x3 << 14) /* RWIVF */ 36162306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC0_DISABLED (0x0 << 14) /* RWI-V */ 36262306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC0_ENABLED (0x1 << 14) /* RW--V */ 36362306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC0_RESVD2 (0x2 << 14) /* RW--V */ 36462306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MCLKC0_RESVD3 (0x3 << 14) /* RW--V */ 36562306a36Sopenharmony_ci/* 36662306a36Sopenharmony_ciMaster Clock Rate 1 36762306a36Sopenharmony_ciSets the divide ration of Master Clock1 (clock output from 36862306a36Sopenharmony_cimclko[1] for the input clock selected by scksel1. 36962306a36Sopenharmony_ci*/ 37062306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MR1_MASK (0xf << 16) 37162306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MR1_DEFAULT (0x0 << 16) /* RWI-V */ 37262306a36Sopenharmony_ci/* 37362306a36Sopenharmony_ciMaster Clock Rate 0 37462306a36Sopenharmony_ciSets the divide ratio of Master Clock0 (clock output from 37562306a36Sopenharmony_cimclko[0] for the input clock selected by scksel0). 37662306a36Sopenharmony_ci*/ 37762306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MR0_MASK (0xf << 20) /* RWIVF */ 37862306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_MR0_DEFAULT (0x0 << 20) /* RWI-V */ 37962306a36Sopenharmony_ci/* 38062306a36Sopenharmony_ciSystem Clock Select 0/1 38162306a36Sopenharmony_ciSelects the system clock to be used as Master Clock 0/1 38262306a36Sopenharmony_ciInput the system clock that is appropriate for the sampling 38362306a36Sopenharmony_cirate. 38462306a36Sopenharmony_ci*/ 38562306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_SCKSEL1_MASK (0x7 << 24) /* RWIVF */ 38662306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_SCKSEL1_DEFAULT (0x2 << 24) /* RWI-V */ 38762306a36Sopenharmony_ci 38862306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_SCKSEL0_MASK (0x7 << 28) /* RWIVF */ 38962306a36Sopenharmony_ci#define PS3_AUDIO_AO_MCTRL_SCKSEL0_DEFAULT (0x2 << 28) /* RWI-V */ 39062306a36Sopenharmony_ci 39162306a36Sopenharmony_ci 39262306a36Sopenharmony_ci/* 39362306a36Sopenharmony_ci3-Wire Audio Output Master Control Register 39462306a36Sopenharmony_ciConfigures clock, 3-Wire Audio Serial Output Enable, and 39562306a36Sopenharmony_ciother 3-Wire Audio Serial Output Master Settings 39662306a36Sopenharmony_ci 39762306a36Sopenharmony_ci 39862306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 39962306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 40062306a36Sopenharmony_ci |A|A|A|A|0 0 0|A| ASOSR |0 0 0 0|A|A|A|A|A|A|0|1|0 0 0 0 0 0 0 0| AO_3WMCTRL 40162306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 40262306a36Sopenharmony_ci*/ 40362306a36Sopenharmony_ci 40462306a36Sopenharmony_ci 40562306a36Sopenharmony_ci/* 40662306a36Sopenharmony_ciLRCKO Polarity 40762306a36Sopenharmony_ci0 - Reserved 40862306a36Sopenharmony_ci1 - default 40962306a36Sopenharmony_ci*/ 41062306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOPLRCK (1 << 8) /* RWIVF */ 41162306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOPLRCK_DEFAULT (1 << 8) /* RW--V */ 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_ci/* LRCK Output Disable */ 41462306a36Sopenharmony_ci 41562306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOLRCKD (1 << 10) /* RWIVF */ 41662306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOLRCKD_ENABLED (0 << 10) /* RW--V */ 41762306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOLRCKD_DISABLED (1 << 10) /* RWI-V */ 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_ci/* Bit Clock Output Disable */ 42062306a36Sopenharmony_ci 42162306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOBCLKD (1 << 11) /* RWIVF */ 42262306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOBCLKD_ENABLED (0 << 11) /* RW--V */ 42362306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOBCLKD_DISABLED (1 << 11) /* RWI-V */ 42462306a36Sopenharmony_ci 42562306a36Sopenharmony_ci/* 42662306a36Sopenharmony_ci3-Wire Audio Serial Output Channel 0-3 Operational 42762306a36Sopenharmony_ciStatus. Each bit becomes 1 after each 3-Wire Audio 42862306a36Sopenharmony_ciSerial Output Channel N is in action by setting 1 to 42962306a36Sopenharmony_ciasoen. 43062306a36Sopenharmony_ciEach bit becomes 0 after each 3-Wire Audio Serial Output 43162306a36Sopenharmony_ciChannel N is out of action by setting 0 to asoen. 43262306a36Sopenharmony_ci*/ 43362306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN(n) (1 << (15 - (n))) /* R-IVF */ 43462306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(n) (0 << (15 - (n))) /* R-I-V */ 43562306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(n) (1 << (15 - (n))) /* R---V */ 43662306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN0 \ 43762306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN(0) 43862306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN0_STOPPED \ 43962306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(0) 44062306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN0_RUNNING \ 44162306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(0) 44262306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN1 \ 44362306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN(1) 44462306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN1_STOPPED \ 44562306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(1) 44662306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN1_RUNNING \ 44762306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(1) 44862306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN2 \ 44962306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN(2) 45062306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN2_STOPPED \ 45162306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(2) 45262306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN2_RUNNING \ 45362306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(2) 45462306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN3 \ 45562306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN(3) 45662306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN3_STOPPED \ 45762306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(3) 45862306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASORUN3_RUNNING \ 45962306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(3) 46062306a36Sopenharmony_ci 46162306a36Sopenharmony_ci/* 46262306a36Sopenharmony_ciSampling Rate 46362306a36Sopenharmony_ciSpecifies the divide ratio of the bit clock (clock output 46462306a36Sopenharmony_cifrom bclko) used by the 3-wire Audio Output Clock, which 46562306a36Sopenharmony_ciis applied to the master clock selected by mcksel. 46662306a36Sopenharmony_ciData output is synchronized with this clock. 46762306a36Sopenharmony_ci*/ 46862306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOSR_MASK (0xf << 20) /* RWIVF */ 46962306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV2 (0x1 << 20) /* RWI-V */ 47062306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV4 (0x2 << 20) /* RW--V */ 47162306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV8 (0x4 << 20) /* RW--V */ 47262306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV12 (0x6 << 20) /* RW--V */ 47362306a36Sopenharmony_ci 47462306a36Sopenharmony_ci/* 47562306a36Sopenharmony_ciMaster Clock Select 47662306a36Sopenharmony_ci0 - Master Clock 0 47762306a36Sopenharmony_ci1 - Master Clock 1 47862306a36Sopenharmony_ci*/ 47962306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOMCKSEL (1 << 24) /* RWIVF */ 48062306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOMCKSEL_CLK0 (0 << 24) /* RWI-V */ 48162306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOMCKSEL_CLK1 (1 << 24) /* RW--V */ 48262306a36Sopenharmony_ci 48362306a36Sopenharmony_ci/* 48462306a36Sopenharmony_ciEnables and disables 4ch 3-Wire Audio Serial Output 48562306a36Sopenharmony_cioperation. Each Bit from 0 to 3 corresponds to an 48662306a36Sopenharmony_cioutput channel, which means that each output channel 48762306a36Sopenharmony_cican be enabled or disabled individually. When 48862306a36Sopenharmony_cimultiple channels are enabled at the same time, output 48962306a36Sopenharmony_cioperations are performed in synchronization. 49062306a36Sopenharmony_ciBit 0 - Output Channel 0 (SDOUT[0]) 49162306a36Sopenharmony_ciBit 1 - Output Channel 1 (SDOUT[1]) 49262306a36Sopenharmony_ciBit 2 - Output Channel 2 (SDOUT[2]) 49362306a36Sopenharmony_ciBit 3 - Output Channel 3 (SDOUT[3]) 49462306a36Sopenharmony_ci*/ 49562306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOEN(n) (1 << (31 - (n))) /* RWIVF */ 49662306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(n) (0 << (31 - (n))) /* RWI-V */ 49762306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(n) (1 << (31 - (n))) /* RW--V */ 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOEN0 \ 50062306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN(0) /* RWIVF */ 50162306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOEN0_DISABLED \ 50262306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(0) /* RWI-V */ 50362306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WMCTRL_ASOEN0_ENABLED \ 50462306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(0) /* RW--V */ 50562306a36Sopenharmony_ci#define PS3_AUDIO_A1_3WMCTRL_ASOEN0 \ 50662306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN(1) /* RWIVF */ 50762306a36Sopenharmony_ci#define PS3_AUDIO_A1_3WMCTRL_ASOEN0_DISABLED \ 50862306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(1) /* RWI-V */ 50962306a36Sopenharmony_ci#define PS3_AUDIO_A1_3WMCTRL_ASOEN0_ENABLED \ 51062306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(1) /* RW--V */ 51162306a36Sopenharmony_ci#define PS3_AUDIO_A2_3WMCTRL_ASOEN0 \ 51262306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN(2) /* RWIVF */ 51362306a36Sopenharmony_ci#define PS3_AUDIO_A2_3WMCTRL_ASOEN0_DISABLED \ 51462306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(2) /* RWI-V */ 51562306a36Sopenharmony_ci#define PS3_AUDIO_A2_3WMCTRL_ASOEN0_ENABLED \ 51662306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(2) /* RW--V */ 51762306a36Sopenharmony_ci#define PS3_AUDIO_A3_3WMCTRL_ASOEN0 \ 51862306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN(3) /* RWIVF */ 51962306a36Sopenharmony_ci#define PS3_AUDIO_A3_3WMCTRL_ASOEN0_DISABLED \ 52062306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(3) /* RWI-V */ 52162306a36Sopenharmony_ci#define PS3_AUDIO_A3_3WMCTRL_ASOEN0_ENABLED \ 52262306a36Sopenharmony_ci PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(3) /* RW--V */ 52362306a36Sopenharmony_ci 52462306a36Sopenharmony_ci/* 52562306a36Sopenharmony_ci3-Wire Audio Serial output Channel 0-3 Control Register 52662306a36Sopenharmony_ciConfigures settings for 3-Wire Serial Audio Output Channel 0-3 52762306a36Sopenharmony_ci 52862306a36Sopenharmony_ci 52962306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 53062306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 53162306a36Sopenharmony_ci |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|0 0 0 0|A|0|ASO|0 0 0|0|0|0|0|0| AO_3WCTRL 53262306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_ci*/ 53562306a36Sopenharmony_ci/* 53662306a36Sopenharmony_ciData Bit Mode 53762306a36Sopenharmony_ciSpecifies the number of data bits 53862306a36Sopenharmony_ci0 - 16 bits 53962306a36Sopenharmony_ci1 - reserved 54062306a36Sopenharmony_ci2 - 20 bits 54162306a36Sopenharmony_ci3 - 24 bits 54262306a36Sopenharmony_ci*/ 54362306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODB_MASK (0x3 << 8) /* RWIVF */ 54462306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODB_16BIT (0x0 << 8) /* RWI-V */ 54562306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODB_RESVD (0x1 << 8) /* RWI-V */ 54662306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODB_20BIT (0x2 << 8) /* RW--V */ 54762306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODB_24BIT (0x3 << 8) /* RW--V */ 54862306a36Sopenharmony_ci/* 54962306a36Sopenharmony_ciData Format Mode 55062306a36Sopenharmony_ciSpecifies the data format where (LSB side or MSB) the data(in 20 bit 55162306a36Sopenharmony_cior 24 bit resolution mode) is put in a 32 bit field. 55262306a36Sopenharmony_ci0 - Data put on LSB side 55362306a36Sopenharmony_ci1 - Data put on MSB side 55462306a36Sopenharmony_ci*/ 55562306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODF (1 << 11) /* RWIVF */ 55662306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODF_LSB (0 << 11) /* RWI-V */ 55762306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASODF_MSB (1 << 11) /* RW--V */ 55862306a36Sopenharmony_ci/* 55962306a36Sopenharmony_ciBuffer Reset 56062306a36Sopenharmony_ciPerforms buffer reset. Writing 1 to this bit initializes the 56162306a36Sopenharmony_cicorresponding 3-Wire Audio Output buffers(both L and R). 56262306a36Sopenharmony_ci*/ 56362306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASOBRST (1 << 16) /* CWIVF */ 56462306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASOBRST_IDLE (0 << 16) /* -WI-V */ 56562306a36Sopenharmony_ci#define PS3_AUDIO_AO_3WCTRL_ASOBRST_RESET (1 << 16) /* -W--T */ 56662306a36Sopenharmony_ci 56762306a36Sopenharmony_ci/* 56862306a36Sopenharmony_ciS/PDIF Audio Output Channel 0/1 Control Register 56962306a36Sopenharmony_ciConfigures settings for S/PDIF Audio Output Channel 0/1. 57062306a36Sopenharmony_ci 57162306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 57262306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 57362306a36Sopenharmony_ci |S|0 0 0|S|0 0|S| SPOSR |0 0|SPO|0 0 0 0|S|0|SPO|0 0 0 0 0 0 0|S| AO_SPDCTRL 57462306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 57562306a36Sopenharmony_ci*/ 57662306a36Sopenharmony_ci/* 57762306a36Sopenharmony_ciBuffer reset. Writing 1 to this bit initializes the 57862306a36Sopenharmony_cicorresponding S/PDIF output buffer pointer. 57962306a36Sopenharmony_ci*/ 58062306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOBRST (1 << 0) /* CWIVF */ 58162306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOBRST_IDLE (0 << 0) /* -WI-V */ 58262306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOBRST_RESET (1 << 0) /* -W--T */ 58362306a36Sopenharmony_ci 58462306a36Sopenharmony_ci/* 58562306a36Sopenharmony_ciData Bit Mode 58662306a36Sopenharmony_ciSpecifies number of data bits 58762306a36Sopenharmony_ci0 - 16 bits 58862306a36Sopenharmony_ci1 - Reserved 58962306a36Sopenharmony_ci2 - 20 bits 59062306a36Sopenharmony_ci3 - 24 bits 59162306a36Sopenharmony_ci*/ 59262306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODB_MASK (0x3 << 8) /* RWIVF */ 59362306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODB_16BIT (0x0 << 8) /* RWI-V */ 59462306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODB_RESVD (0x1 << 8) /* RW--V */ 59562306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODB_20BIT (0x2 << 8) /* RW--V */ 59662306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODB_24BIT (0x3 << 8) /* RW--V */ 59762306a36Sopenharmony_ci/* 59862306a36Sopenharmony_ciData format Mode 59962306a36Sopenharmony_ciSpecifies the data format, where (LSB side or MSB) 60062306a36Sopenharmony_cithe data(in 20 or 24 bit resolution) is put in the 60162306a36Sopenharmony_ci32 bit field. 60262306a36Sopenharmony_ci0 - LSB Side 60362306a36Sopenharmony_ci1 - MSB Side 60462306a36Sopenharmony_ci*/ 60562306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODF (1 << 11) /* RWIVF */ 60662306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODF_LSB (0 << 11) /* RWI-V */ 60762306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPODF_MSB (1 << 11) /* RW--V */ 60862306a36Sopenharmony_ci/* 60962306a36Sopenharmony_ciSource Select 61062306a36Sopenharmony_ciSpecifies the source of the S/PDIF output. When 0, output 61162306a36Sopenharmony_cioperation is controlled by 3wen[0] of AO_3WMCTRL register. 61262306a36Sopenharmony_ciThe SR must have the same setting as the a0_3wmctrl reg. 61362306a36Sopenharmony_ci0 - 3-Wire Audio OUT Ch0 Buffer 61462306a36Sopenharmony_ci1 - S/PDIF buffer 61562306a36Sopenharmony_ci*/ 61662306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSS_MASK (0x3 << 16) /* RWIVF */ 61762306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSS_3WEN (0x0 << 16) /* RWI-V */ 61862306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSS_SPDIF (0x1 << 16) /* RW--V */ 61962306a36Sopenharmony_ci/* 62062306a36Sopenharmony_ciSampling Rate 62162306a36Sopenharmony_ciSpecifies the divide ratio of the bit clock (clock output 62262306a36Sopenharmony_cifrom bclko) used by the S/PDIF Output Clock, which 62362306a36Sopenharmony_ciis applied to the master clock selected by mcksel. 62462306a36Sopenharmony_ci*/ 62562306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSR (0xf << 20) /* RWIVF */ 62662306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV2 (0x1 << 20) /* RWI-V */ 62762306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV4 (0x2 << 20) /* RW--V */ 62862306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV8 (0x4 << 20) /* RW--V */ 62962306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV12 (0x6 << 20) /* RW--V */ 63062306a36Sopenharmony_ci/* 63162306a36Sopenharmony_ciMaster Clock Select 63262306a36Sopenharmony_ci0 - Master Clock 0 63362306a36Sopenharmony_ci1 - Master Clock 1 63462306a36Sopenharmony_ci*/ 63562306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL (1 << 24) /* RWIVF */ 63662306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL_CLK0 (0 << 24) /* RWI-V */ 63762306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL_CLK1 (1 << 24) /* RW--V */ 63862306a36Sopenharmony_ci 63962306a36Sopenharmony_ci/* 64062306a36Sopenharmony_ciS/PDIF Output Channel Operational Status 64162306a36Sopenharmony_ciThis bit becomes 1 after S/PDIF Output Channel is in 64262306a36Sopenharmony_ciaction by setting 1 to spoen. This bit becomes 0 64362306a36Sopenharmony_ciafter S/PDIF Output Channel is out of action by setting 64462306a36Sopenharmony_ci0 to spoen. 64562306a36Sopenharmony_ci*/ 64662306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPORUN (1 << 27) /* R-IVF */ 64762306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPORUN_STOPPED (0 << 27) /* R-I-V */ 64862306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPORUN_RUNNING (1 << 27) /* R---V */ 64962306a36Sopenharmony_ci 65062306a36Sopenharmony_ci/* 65162306a36Sopenharmony_ciS/PDIF Audio Output Channel Output Enable 65262306a36Sopenharmony_ciEnables and disables output operation. This bit is used 65362306a36Sopenharmony_cionly when sposs = 1 65462306a36Sopenharmony_ci*/ 65562306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOEN (1 << 31) /* RWIVF */ 65662306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOEN_DISABLED (0 << 31) /* RWI-V */ 65762306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPDCTRL_SPOEN_ENABLED (1 << 31) /* RW--V */ 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_ci/* 66062306a36Sopenharmony_ciS/PDIF Audio Output Channel Channel Status 66162306a36Sopenharmony_ciSetting Registers. 66262306a36Sopenharmony_ciConfigures channel status bit settings for each block 66362306a36Sopenharmony_ci(192 bits). 66462306a36Sopenharmony_ciOutput is performed from the MSB(AO_SPDCS0 register bit 31). 66562306a36Sopenharmony_ciThe same value is added for subframes within the same frame. 66662306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 66762306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 66862306a36Sopenharmony_ci | SPOCS | AO_SPDCS 66962306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 67062306a36Sopenharmony_ci 67162306a36Sopenharmony_ciS/PDIF Audio Output Channel User Bit Setting 67262306a36Sopenharmony_ciConfigures user bit settings for each block (384 bits). 67362306a36Sopenharmony_ciOutput is performed from the MSB(ao_spdub0 register bit 31). 67462306a36Sopenharmony_ci 67562306a36Sopenharmony_ci 67662306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 67762306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 67862306a36Sopenharmony_ci | SPOUB | AO_SPDUB 67962306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 68062306a36Sopenharmony_ci*/ 68162306a36Sopenharmony_ci/***************************************************************************** 68262306a36Sopenharmony_ci * 68362306a36Sopenharmony_ci * DMAC register 68462306a36Sopenharmony_ci * 68562306a36Sopenharmony_ci *****************************************************************************/ 68662306a36Sopenharmony_ci/* 68762306a36Sopenharmony_ciThe PS3_AUDIO_KICK register is used to initiate a DMA transfer and monitor 68862306a36Sopenharmony_ciits status 68962306a36Sopenharmony_ci 69062306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 69162306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 69262306a36Sopenharmony_ci |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 69362306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 69462306a36Sopenharmony_ci*/ 69562306a36Sopenharmony_ci/* 69662306a36Sopenharmony_ciThe REQUEST field is written to ACTIVE to initiate a DMA request when EVENT 69762306a36Sopenharmony_cioccurs. 69862306a36Sopenharmony_ciIt will return to the DONE state when the request is completed. 69962306a36Sopenharmony_ciThe registers for a DMA channel should only be written if REQUEST is IDLE. 70062306a36Sopenharmony_ci*/ 70162306a36Sopenharmony_ci 70262306a36Sopenharmony_ci#define PS3_AUDIO_KICK_REQUEST (1 << 0) /* RWIVF */ 70362306a36Sopenharmony_ci#define PS3_AUDIO_KICK_REQUEST_IDLE (0 << 0) /* RWI-V */ 70462306a36Sopenharmony_ci#define PS3_AUDIO_KICK_REQUEST_ACTIVE (1 << 0) /* -W--T */ 70562306a36Sopenharmony_ci 70662306a36Sopenharmony_ci/* 70762306a36Sopenharmony_ci *The EVENT field is used to set the event in which 70862306a36Sopenharmony_ci *the DMA request becomes active. 70962306a36Sopenharmony_ci */ 71062306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_MASK (0x1f << 16) /* RWIVF */ 71162306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_ALWAYS (0x00 << 16) /* RWI-V */ 71262306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY (0x01 << 16) /* RW--V */ 71362306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT0_UNDERFLOW (0x02 << 16) /* RW--V */ 71462306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT1_EMPTY (0x03 << 16) /* RW--V */ 71562306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT1_UNDERFLOW (0x04 << 16) /* RW--V */ 71662306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT2_EMPTY (0x05 << 16) /* RW--V */ 71762306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT2_UNDERFLOW (0x06 << 16) /* RW--V */ 71862306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT3_EMPTY (0x07 << 16) /* RW--V */ 71962306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SERIALOUT3_UNDERFLOW (0x08 << 16) /* RW--V */ 72062306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SPDIF0_BLOCKTRANSFERCOMPLETE \ 72162306a36Sopenharmony_ci (0x09 << 16) /* RW--V */ 72262306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SPDIF0_UNDERFLOW (0x0A << 16) /* RW--V */ 72362306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SPDIF0_EMPTY (0x0B << 16) /* RW--V */ 72462306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SPDIF1_BLOCKTRANSFERCOMPLETE \ 72562306a36Sopenharmony_ci (0x0C << 16) /* RW--V */ 72662306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SPDIF1_UNDERFLOW (0x0D << 16) /* RW--V */ 72762306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_SPDIF1_EMPTY (0x0E << 16) /* RW--V */ 72862306a36Sopenharmony_ci 72962306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA(n) \ 73062306a36Sopenharmony_ci ((0x13 + (n)) << 16) /* RW--V */ 73162306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA0 (0x13 << 16) /* RW--V */ 73262306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA1 (0x14 << 16) /* RW--V */ 73362306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA2 (0x15 << 16) /* RW--V */ 73462306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA3 (0x16 << 16) /* RW--V */ 73562306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA4 (0x17 << 16) /* RW--V */ 73662306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA5 (0x18 << 16) /* RW--V */ 73762306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA6 (0x19 << 16) /* RW--V */ 73862306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA7 (0x1A << 16) /* RW--V */ 73962306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA8 (0x1B << 16) /* RW--V */ 74062306a36Sopenharmony_ci#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA9 (0x1C << 16) /* RW--V */ 74162306a36Sopenharmony_ci 74262306a36Sopenharmony_ci/* 74362306a36Sopenharmony_ciThe STATUS field can be used to monitor the progress of a DMA request. 74462306a36Sopenharmony_ciDONE indicates the previous request has completed. 74562306a36Sopenharmony_ciEVENT indicates that the DMA engine is waiting for the EVENT to occur. 74662306a36Sopenharmony_ciPENDING indicates that the DMA engine has not started processing this 74762306a36Sopenharmony_cirequest, but the EVENT has occurred. 74862306a36Sopenharmony_ciDMA indicates that the data transfer is in progress. 74962306a36Sopenharmony_ciNOTIFY indicates that the notifier signalling end of transfer is being written. 75062306a36Sopenharmony_ciCLEAR indicated that the previous transfer was cleared. 75162306a36Sopenharmony_ciERROR indicates the previous transfer requested an unsupported 75262306a36Sopenharmony_cisource/destination combination. 75362306a36Sopenharmony_ci*/ 75462306a36Sopenharmony_ci 75562306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_MASK (0x7 << 24) /* R-IVF */ 75662306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_DONE (0x0 << 24) /* R-I-V */ 75762306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_EVENT (0x1 << 24) /* R---V */ 75862306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_PENDING (0x2 << 24) /* R---V */ 75962306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_DMA (0x3 << 24) /* R---V */ 76062306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_NOTIFY (0x4 << 24) /* R---V */ 76162306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_CLEAR (0x5 << 24) /* R---V */ 76262306a36Sopenharmony_ci#define PS3_AUDIO_KICK_STATUS_ERROR (0x6 << 24) /* R---V */ 76362306a36Sopenharmony_ci 76462306a36Sopenharmony_ci/* 76562306a36Sopenharmony_ciThe PS3_AUDIO_SOURCE register specifies the source address for transfers. 76662306a36Sopenharmony_ci 76762306a36Sopenharmony_ci 76862306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 76962306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 77062306a36Sopenharmony_ci | START |0 0 0 0 0|TAR| SOURCE 77162306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 77262306a36Sopenharmony_ci*/ 77362306a36Sopenharmony_ci 77462306a36Sopenharmony_ci/* 77562306a36Sopenharmony_ciThe Audio DMA engine uses 128-byte transfers, thus the address must be aligned 77662306a36Sopenharmony_cito a 128 byte boundary. The low seven bits are assumed to be 0. 77762306a36Sopenharmony_ci*/ 77862306a36Sopenharmony_ci 77962306a36Sopenharmony_ci#define PS3_AUDIO_SOURCE_START_MASK (0x01FFFFFF << 7) /* RWIUF */ 78062306a36Sopenharmony_ci 78162306a36Sopenharmony_ci/* 78262306a36Sopenharmony_ciThe TARGET field specifies the memory space containing the source address. 78362306a36Sopenharmony_ci*/ 78462306a36Sopenharmony_ci 78562306a36Sopenharmony_ci#define PS3_AUDIO_SOURCE_TARGET_MASK (3 << 0) /* RWIVF */ 78662306a36Sopenharmony_ci#define PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY (2 << 0) /* RW--V */ 78762306a36Sopenharmony_ci 78862306a36Sopenharmony_ci/* 78962306a36Sopenharmony_ciThe PS3_AUDIO_DEST register specifies the destination address for transfers. 79062306a36Sopenharmony_ci 79162306a36Sopenharmony_ci 79262306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 79362306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 79462306a36Sopenharmony_ci | START |0 0 0 0 0|TAR| DEST 79562306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 79662306a36Sopenharmony_ci*/ 79762306a36Sopenharmony_ci 79862306a36Sopenharmony_ci/* 79962306a36Sopenharmony_ciThe Audio DMA engine uses 128-byte transfers, thus the address must be aligned 80062306a36Sopenharmony_cito a 128 byte boundary. The low seven bits are assumed to be 0. 80162306a36Sopenharmony_ci*/ 80262306a36Sopenharmony_ci 80362306a36Sopenharmony_ci#define PS3_AUDIO_DEST_START_MASK (0x01FFFFFF << 7) /* RWIUF */ 80462306a36Sopenharmony_ci 80562306a36Sopenharmony_ci/* 80662306a36Sopenharmony_ciThe TARGET field specifies the memory space containing the destination address 80762306a36Sopenharmony_ciAUDIOFIFO = Audio WriteData FIFO, 80862306a36Sopenharmony_ci*/ 80962306a36Sopenharmony_ci 81062306a36Sopenharmony_ci#define PS3_AUDIO_DEST_TARGET_MASK (3 << 0) /* RWIVF */ 81162306a36Sopenharmony_ci#define PS3_AUDIO_DEST_TARGET_AUDIOFIFO (1 << 0) /* RW--V */ 81262306a36Sopenharmony_ci 81362306a36Sopenharmony_ci/* 81462306a36Sopenharmony_ciPS3_AUDIO_DMASIZE specifies the number of 128-byte blocks + 1 to transfer. 81562306a36Sopenharmony_ciSo a value of 0 means 128-bytes will get transferred. 81662306a36Sopenharmony_ci 81762306a36Sopenharmony_ci 81862306a36Sopenharmony_ci 31 24 23 16 15 8 7 0 81962306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 82062306a36Sopenharmony_ci |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 82162306a36Sopenharmony_ci +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ 82262306a36Sopenharmony_ci*/ 82362306a36Sopenharmony_ci 82462306a36Sopenharmony_ci 82562306a36Sopenharmony_ci#define PS3_AUDIO_DMASIZE_BLOCKS_MASK (0x7f << 0) /* RWIUF */ 82662306a36Sopenharmony_ci 82762306a36Sopenharmony_ci/* 82862306a36Sopenharmony_ci * source/destination address for internal fifos 82962306a36Sopenharmony_ci */ 83062306a36Sopenharmony_ci#define PS3_AUDIO_AO_3W_LDATA(n) (0x1000 + (0x100 * (n))) 83162306a36Sopenharmony_ci#define PS3_AUDIO_AO_3W_RDATA(n) (0x1080 + (0x100 * (n))) 83262306a36Sopenharmony_ci 83362306a36Sopenharmony_ci#define PS3_AUDIO_AO_SPD_DATA(n) (0x2000 + (0x400 * (n))) 83462306a36Sopenharmony_ci 83562306a36Sopenharmony_ci 83662306a36Sopenharmony_ci/* 83762306a36Sopenharmony_ci * field attiribute 83862306a36Sopenharmony_ci * 83962306a36Sopenharmony_ci * Read 84062306a36Sopenharmony_ci * ' ' = Other Information 84162306a36Sopenharmony_ci * '-' = Field is part of a write-only register 84262306a36Sopenharmony_ci * 'C' = Value read is always the same, constant value line follows (C) 84362306a36Sopenharmony_ci * 'R' = Value is read 84462306a36Sopenharmony_ci * 84562306a36Sopenharmony_ci * Write 84662306a36Sopenharmony_ci * ' ' = Other Information 84762306a36Sopenharmony_ci * '-' = Must not be written (D), value ignored when written (R,A,F) 84862306a36Sopenharmony_ci * 'W' = Can be written 84962306a36Sopenharmony_ci * 85062306a36Sopenharmony_ci * Internal State 85162306a36Sopenharmony_ci * ' ' = Other Information 85262306a36Sopenharmony_ci * '-' = No internal state 85362306a36Sopenharmony_ci * 'X' = Internal state, initial value is unknown 85462306a36Sopenharmony_ci * 'I' = Internal state, initial value is known and follows (I) 85562306a36Sopenharmony_ci * 85662306a36Sopenharmony_ci * Declaration/Size 85762306a36Sopenharmony_ci * ' ' = Other Information 85862306a36Sopenharmony_ci * '-' = Does Not Apply 85962306a36Sopenharmony_ci * 'V' = Type is void 86062306a36Sopenharmony_ci * 'U' = Type is unsigned integer 86162306a36Sopenharmony_ci * 'S' = Type is signed integer 86262306a36Sopenharmony_ci * 'F' = Type is IEEE floating point 86362306a36Sopenharmony_ci * '1' = Byte size (008) 86462306a36Sopenharmony_ci * '2' = Short size (016) 86562306a36Sopenharmony_ci * '3' = Three byte size (024) 86662306a36Sopenharmony_ci * '4' = Word size (032) 86762306a36Sopenharmony_ci * '8' = Double size (064) 86862306a36Sopenharmony_ci * 86962306a36Sopenharmony_ci * Define Indicator 87062306a36Sopenharmony_ci * ' ' = Other Information 87162306a36Sopenharmony_ci * 'D' = Device 87262306a36Sopenharmony_ci * 'M' = Memory 87362306a36Sopenharmony_ci * 'R' = Register 87462306a36Sopenharmony_ci * 'A' = Array of Registers 87562306a36Sopenharmony_ci * 'F' = Field 87662306a36Sopenharmony_ci * 'V' = Value 87762306a36Sopenharmony_ci * 'T' = Task 87862306a36Sopenharmony_ci */ 87962306a36Sopenharmony_ci 880