Some DAC questions

Hi,

I am trying to learn to read documentation of ES9038Q2M DAC, but I am having trouble with some stuff:

1) Where am I supposed to pass audio for example from USB to the chip?
2) How am I supposed to control volume and is setted volume supposed to be remember somewhere after DAC lose power?
3) I am confused about filters. Does ES9038Q2M have integrated filters and I need to somehow select which filter I want to use?
4) Am I right when thinking that I can use AGND_R + DACRB + DACR and AGND_L + DACL + DACLB for balanced output, for example for XLR connectors?
5) Exposed Pad can be connected to DGND route track just like that?
6) What are SW, FSYNC, HPSDb, GPIO1/GPIO2, DATA1/DATA2, DATA_CLK, XTAL, SCL, SDA?
7) What is the purpose of ADDR in case of DAC?

Sorry about a lot of questions, but I am new to all of this and I am trying to learn how DAC works, but for questions above I can't find any explanations online.

Thanks.
 
1. You will need a USB to I2S interface for that, such as an Amanero board
2. 3. 7. You can change the settings via a serial interface known as I2C. There is quite some stuff about how I2C works on the Internet.

I don't know your chip well, so I'll leave your other questions to someone who does.
 
To elaborate a bit:

1) Your DAC chip uses a serial interface for the audio data input, an interface that can be switched between the modes I2S, left justified and right justified. The most usual mode is I2S, which is a standard once invented by Philips, see https://www.sparkfun.com/datasheets/BreakoutBoards/I2SBUS.pdf

USB is a far more complicated serial interface standard. If you like a challenge or if you are a masochist, you can download the USB standard and try to design a digital circuit that translates USB to I2S from first principles, but most audio hobbyists just buy a board that does that for them. A popular one is the Amanero Combo384, see Amanero Technologies

2) Volume control is set via the I2C interface. I2C is a serial interface meant for slow control data, also invented by Philips long ago, see https://www.nxp.com/docs/en/user-guide/UM10204.pdf In order to control the volume or any of the other settings, you have to connect a digital circuit that drives the I2C bus. Typically that would be a microcontroller. For example, you could use an Arduino microcontroller module and use the free Arduino compiler and development tools to program it to shift the correct data into the DAC chip.
Whether the volume setting is remembered depends on what you program into the microcontroller. When you program it to store the setting in non-volatile memory at power-off and to restore it at power-on, then your DAC remembers the setting, otherwise it doesn't. The DAC chip itself doesn't remember it.

3) Yes, again via I2C.

6) 7) SCL and SDA are the two wires of the I2C interface. The ADDR pin makes it possible to choose between two I2C addresses, which can be useful to prevent that there are two things on the I2C bus with the same address. For example, when you want to control two ES9038Q2M's with one I2C bus, you can pull the address pin of one low and of the other high, so you can control them independently.

XTAL stands for crystal. As explained on page 6 of the datasheet, the chip requires either a clock signal from an external oscillator or a quartz crystal.


If you find all of this too complicated, you could try making an ES9038 DAC designed by someone else instead of designing your own.
 
Yes, there are. As far as I know there are several threads about cheaper USB interfaces on diyaudio. I have no experience with any of them, by the way, nor with the Amanero.

Besides, some single-board computers, like the Raspberry Pi, simply have an I2S output. The story goes that the Raspberry Pi's I2S output has a relatively large systematic jitter, but that shouldn't matter much when you use the ES9038's asynchronous sample rate conversion (ASRC) function.

I just browsed through the datasheet to see if the ES9038 is usable without I2C, but it isn't. Most registers have sensible values by default, but register 14 bit 7 is 0 by default, which turns off the DAC outputs. Besides, the default volume set by registers 15 and 16 is also rather low, -40 dB.
 
The Pi Zero can probably do it, as it has an I2S output according to

Raspberry Pi Zero, audio output via I2S – lucadentella.it

It can also act as an I2C master to control the ES9038 settings.

I don't know if the Arduino Uno is usable for high-resolution audio playback via an ES9038. It could very well be too slow and the 5 V I/O's may also be a problem (only a few of the ES9038 inputs are 5 V compatible).
 
Last edited:
Interface cards like the Amanero and the one rfbrw linked to can be connected to a USB port of a computer and to the DAC and then translate the USB audio signals to I2S signals that the DAC can handle. The alternative with a Raspberry Pi works differently, the Pi is then the computer that plays the audio and its I2S output directly drives the DAC.
 
True that. I have decided to take a look at what Zero is. I have also found an information that by default Zero USB port is acting like a master, but it can be configured as a slave. Would that make Zero to act like Amanero or "XMOS + CPLD U208 USB Interface"? I know Raspberry devices are very configurable and I would be shocked if I somehow wouldn't be able to configure it to act like I need.