Skip to content

Distorted sound with PT8211 I2S-DAC (regression) #6940

Closed
@tfry-git

Description

@tfry-git

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:

I2SC |= I2SRF | I2SMR | I2SRMS | I2STMS | (div1 << I2SBD) | (div2 << I2SCD);

changing this to I2SC |= I2SRF | I2SMR | I2SRMS | (div1 << I2SBD) | (div2 << I2SCD); (removing "| I2STMS") fixes the issue for me, but probably breaks stuff elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions