https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1082091/tlv320dac3203-programming-review
部件号:TLV320DAC3203您好,
我使用 DAC3203替换产品中使用 AKM 作为主 DAC 的部件,以在 USB 音频设备中驱动耳机。 该芯片的 ADC 部分未被使用。
当我在自己的定制硬件上启动并运行时,一切似乎都运行正常,我想验证我的方法是否正确。
首先,我正在通过 I2C 设置具有以下寄存器的 DAC3203:
typedef struct {
unsigned char command;
unsigned char param;
} dac3203_reg;
dac3203_reg DAC3203_REGISTERS[] =
{
{0x00, 0x00}, // Initialize to page 0
{0x01, 0x01}, // Initialize device through software reset
{0x0b, 0x81}, // Power up the NDAC divider with value 1
{0x0c, 0x82}, // Power up the MDAC divider with value 2
{0x0d, 0x00}, // Program the OSR of DAC to 128
{0x0e, 0x80},
{0x1b, 0x30}, // Set word length of audio interface to 32 bits
{0x3c, 0x08}, // Set the DAC mode to PRB_P8
{0x00, 0x01}, // Select Page 1
{0x01, 0x08}, // Disable weak AVDD to DVDD connection
{0x02, 0x01}, // Power up AVDD LDO
{0x7b, 0x01}, // Set the REF charging time to 40ms
{0x0a, 0x00}, // Set input common mode to 0.9v and output common mode for HP to input common mode
{0x0c, 0x08}, // Route L DAC to HPL
{0x0d, 0x08}, // Route R DAC to HPR
{0x03, 0x00}, // Set the DAC PTM mode to PTM_P3/4
{0x04, 0x00},
{0x10, 0x16}, // Set HPL gain to 22dB
{0x11, 0x16}, // Set HPR gain to 22dB
{0x14, 0x29}, // HP soft stepping settings for optimal pop performance at power up. Rpop used is 6k with N = 6 & soft step = 20usec.
{0x09, 0x30}, // Power up HPL and HPR drivers
{0x00, 0x00}, // Select page 0
{0x3f, 0xd4}, // Power up the left and right DAC channels and route I2S data, soft step enabled
{0x40, 0x01}, // Unmute the DAC digital volume control, Left Channel Volume is controlled by Right Channel Volume Control setting
{0x42, 0xD8} // Set default HP level
};
接下来,我通过写入值来更改增益,使其在 第0页上注册0x42。
这基本上就是我所做的一切。 我可以根据需要更改输出级别,当我更改采样率时,音频将继续播放,并且没有错误。
本设备支持以下采样率和时钟。 同样,我也没有对采样率变化做任何特别的事情-正如我所提到的,一切似乎都正常工作,听起来不错。
44.1 kHz
MCLK = 22.57 MHz
BCLK = 2.8 MHz
LRCLK = 44.1 kHz
48 kHz
MCLK = 24.57 MHz
BCLK = 3.07 MHz
LRCLK = 48.0 kHz
88.2 kHz
MCLK = 22.57 MHz
BCLK = 5.64 MHz
LRCLK = 88.2 kHz
96 kHz
MCLK = 24.57 MHz
BCLK = 6.14 MHz
LRCLK = 96.0 kHz
此设计中是否遗漏了任何内容,或者在采样率发生变化时应注意到这些内容? 我不想发现路上错过的东西...
谢谢,
科林