-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distorted sound with PT8211 I2S-DAC (regression) #6940
Comments
#4571 is the cause. The old Arduino code was sending data 1 bit too early ("Japanese format") and was broken for the standard I2S ("Philips" IIRC). Your DAC datasheet specifies Japanese mode, so it's kind of uncommon in that respect compared to reports I've had from ESP8266Audio. The current mode isn't going to change, and there is not (yet) and API to allow setting the I2S mode, so you'll need to keep your patch. For 3.0 we're probably going to reset the I2S API completely, making something closer to the Arduino I2S class (which is, itself, kind of hokey). We're tracking that in #427 (yes, it's that old!). Closing this one as wontfix for now, and tracked in #427. |
How can I use the PT8211 with this library now? I cant use the DAC now because the i2s driver changed in the sourcecode and i cant see how i need to modify the library. Please help? |
Ok... I find it and is working now: In the line 493 of the file core_esp8266_i2s.cpp change this line to: i2sc_temp |= I2SRF | I2SMR | I2SRMS | (div1 << I2SBD) | (div2 << I2SCD); |
it work for esp8266 ,How about in esp32? |
|
Using the cheap PT8211 I2S-DAC, all I get is highly distorted sound output. Scoping the output it looks like the sign bit is either disregarded or misinterpreted. The output is "cut" on the center line, and the lower half is shifted upwards to be above the upper half.
Output was working fine in a February 2018 development snapshot of the core, but is no longer in version 2.6.3. I suppose the issue may have been introduced with #4574 / #4571 .
The culprit appears to be in the following line of code:
Arduino/cores/esp8266/core_esp8266_i2s.cpp
Line 474 in 6c2ab25
changing this to
I2SC |= I2SRF | I2SMR | I2SRMS | (div1 << I2SBD) | (div2 << I2SCD);
(removing "| I2STMS") fixes the issue for me, but probably breaks stuff elsewhere.The text was updated successfully, but these errors were encountered: