Skip to content

Commit 0ac8b21

Browse files
committed
ES9038
1 parent e40953a commit 0ac8b21

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

examples/ES9038/Readme.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#32 bit ES9038
2+
3+
For those who have a board with a 32bit DAC
4+
[DJ202](https://github.com/dj202) sent us a solution:
5+
6+
7+
There are some great sounding and cheap 32 bit decoders available like boards with the ES9038Q2M that don't work because the library outputs 16 bits data.
8+
You only need to change 3 lines lines of code to change it to 32bit:
9+
## Audio.cpp
10+
in Audio::Audio
11+
````c++
12+
m_i2s_std_cfg.slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_STEREO);
13+
in Audio::resampleTo48kStereo:
14+
15+
m_samplesBuff48K[outputIndex * 2] = clipToInt16(outLeft);
16+
m_samplesBuff48K[outputIndex * 2 + 1] = 0x00;
17+
m_samplesBuff48K[outputIndex * 2 + 2] = clipToInt16(outRight);
18+
m_samplesBuff48K[outputIndex * 2 + 3] = 0x00;
19+
````

0 commit comments

Comments
 (0)