64
DS1113F1
CS4399
5.10 Example Sequences
5.10.6 DoP and PCM Mixing
shows steps necessary to mix DoP and PCM. The XSP is in clock master receiving DoP data with LRCLK at
176.4 kHz and SCLK at 8.4672 MHz. The ASP is clock master receiving PCM data with LRCLK at 44.1 kHz and SCLK at
2.8224 MHz.
6
Wait for interrupt. Check if HPDETECT_PLUG_INT or HPDETECT_UNPLUG_INT is set in the Interrupt Status 1 register (0xF0000).
Example 5-12. DoP and PCM Mixing
STEP
TASK
R
EGISTER
/B
IT
F
IELDS
V
ALUE
D
ESCRIPTION
1
Apply all relevant power supplies, then assert RESET.
2
Wait for 1.5 ms
3
Configure XTAL Driver
4
Configure XTAL bias current
strength (assuming River
Crystal at 22.5792 MHz)
Crystal Setting. 0x20052
0x04
Reserved
XTAL_IBIAS
0000 0
100
Bias current set to 12.5 µA
5
Enable XTAL interrupts
Interrupt Mask 1. 0xF0010
0xE7
DAC_OVFL_INT_MASK
HPDETECT_PLUG_INT_MASK
HPDETECT_UNPLUG_INT_MASK
XTAL_READY_INT_MASK
XTAL_ERROR_INT_MASK
PLL_READY_INT_MASK
PLL_ERROR_INT_MASK
PDN_DONE_INT_MASK
1
1
1
0
0
1
1
1
Enable XTAL_READY interrupt
Enable XTAL_ERROR interrupt
6
Start XTAL
Power Down Control. 0x20000
0xF6
PDN_XSP
PDN_XSP
PDN_DSDIF
PDN_HP
PDN_XTAL
PDN_PLL
PDN_CLKOUT
Reserved
1
1
1
1
0
1
1
0
Power up XTAL driver
7
Apply DSD power-up initialization in
8
Playback DoP audio. Assuming 64
•
Fs DSD stream
9
Configure XSP interface for DoP input.
10
Set sample bit size.
Serial Port Sample Bit Size. 0x1000C
0x05
Reserved
XSP_SPSIZE
ASP_SPSIZE
0000
01
01
XSP sample bit size is set to 24 bits
ASP sample bit size is set to 24 bits
11
Set XSP Numerator
XSP Numerator 1. 0x40020
0x03
XSP_N_LSB
0x03
LSB of XSP sample rate fractional divide numerator
XSP Numerator 2. 0x40021
0x00
XSP_N_MSB
0x00
MSB of XSP sample rate fractional divide numerator
12
Set XSP Denominator
XSP Denominator 1. 0x40022
0x08
XSP_M_LSB
0x08
LSB of XSP sample rate fractional divide denominator
XSP Denominator 2. 0x40023
0x00
XSP_M_MSB
0x00
MSB of XSP sample rate fractional divide denominator
13
Set XSP LRCK high Time
XSP LRCK High Time 1. 0x40024
0x17
XSP_LCHI_LSB
0x17
LSB of XSP LRCK high time duration
XSP LRCK High Time 2. 0x40025
0x00
XSP_LCHI_MSB
0x00
MSB of XSP LRCK high time duration
14
Set XSP LRCK period
XSP LRCK Period 1. 0x40026
0x2F
XSP_LCPR_LSB
0x2F
LSB of XSP LRCK period
XSP LRCK Period 2. 0x40027
0x00
XSP_LCPR_MSB
0x00
MSB of XSP LRCK period
15
Configure XSP Clock
XSP Clock Configuration. 0x40028
0x1C
Reserved
XSP_M/SB
XSP_SCPOL_OUT
XSP_SCPOL_IN
XSP_LCPOL_OUT
XSP_LCPOL_IN
000
1
1
1
0
0
Set XSP port to be Master
Set output SCLK polarity
Input SCLK polarity is don’t care
Set Output LRCLK polarity
Input LRCLK polarity is don’t care
Example 5-11. Sequence for Headphone Detection
(Cont.)
STEP
TASK
R
EGISTER
/B
IT
F
IELDS
V
ALUE
D
ESCRIPTION