USB(PCM2706) to ESP32 for a PC digital sound system #2224
Replies: 2 comments 2 replies
-
|
Hi @alw1746, Thanks for sharing! I'm actually building something very similar, but couldn't get it to work properly. The sound read from PCM2706 (via I2S) is very noisy and seems to be mixed into a single channel, despite settings in windows\mac os. I'm using the same esp32s3 board, MAX98357 I2S as output (works perfectly fine with other scatches), and almost the same USB card (without S/PDIF): Here is my code: The only difference is
Would appreciate any help :) |
Beta Was this translation helpful? Give feedback.
-
|
I had similar problems with 44.1kHz as well. After trying various permutations of the 3 parameters (sample rate, bits, channels) I got it to work only at 48kHz 32-bit despite what the datasheet said. Perhaps it's related to some USB audio driver issue. I tried changing the Windows Device Manager Sound properties to 44100 to match the ESP32 but it did not help. Another problem you may encounter is distorted output with buzzing interference. Restarting ESP32 will not fix it, it is a driver issue. Solution: Device Manager -> Sound -> USB AUDIO DAC Properties -> Advanced The PCM2706C is 10 years old so it is possible changes to the USB driver since then has introduced some incompatibilities. |
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This project uses a PCM2706 board that has a USB-to-SPDIF interface but also outputs I2S with a jumper setting. This is perfect for building a digital sound system for a PC. The I2S interface outputs 12MHz on the MCLK pin but it worked with just BCLK,LRCLK,DATA connected to the ESP32. For testing, I wired up the following components:
USB(PCM2706) -> ESP32 -> DAC(PCM5102) -> stereo amplifier
On Windows, the module shows up as Speakers (2 - USB Audio DAC) and music apps like VLC output to it just like a normal soundcard. The only catch is the Windows volume/mute control has no effect, you need to use your amplifier for that. However application-level volume control such as in VLC works as expected. Given the module is a standard USB audio device, it should be supported in Linux as well.
Sketch
The PCM2706 board and ESP32-S3 Supermini(Tenstar Robot) are generic Aliexpress items while the PCM5102 is from Adafruit.


Beta Was this translation helpful? Give feedback.
All reactions