Skip to content

Unable to change I2S_DEVICE from 0 to 1 #21

@drewandre

Description

@drewandre

Hi @bbulkow, thanks again for this port and for the quality of maintenance. I've found it a breeze to work with so far and the readme is above and beyond.

I'm using this port in a project that uses the SGTL5000 audio codec on I2S bus 0 (which this port uses by default). BT audio stream comes in and is handled by I2S bus 0, pumped through a filter bank for audio analysis, and sent to the SGTL5000 using GPIO 0 for main clock.

I see that you should be able to change the default I2S bus in platforms/esp/32/clockless_i2s_esp32.h line 127, but when I set this to 1, nothing shows on the WS2811 strip I'm using. I understand i2s at a high level, but I'm not sure how to debug this, nor do I have access to a scope.

Is there something I'm missing here about which pins are usable with each i2s bus? I ask because I know i2s bus 0 must use GPIO 0 for its main clock, so maybe I'm just using the wrong pins? (I was running the included sketch on pin 13)

Steps to reproduce:

  • Clone latest FastLED-idf
  • Copy over the sdkconfig.4-2 config to sdkconfig, run idf.py menuconfig, and save
  • Do not change any of the pins/led sets used (I own a WS2811 strip and ran it on pin 13)
  • Run idf.py flash monitor and ensure included blinkWithFx_test fxn renders animations as expected
  • Add #define I2S_DEVICE 1 to very top of main.cpp
  • Run idf.py flash monitor again and observe that none of the animations are displayed

It would be great to have the flexibility to run FastLED using i2s bus 1, and all audio on i2s bus 0. That being said, is there anything I should watch out for here? Theoretically I should be able to do this, right? I remember earlier this summer when I was using this port and its RMT interface, outputting LED data completely killed my audio. It was all scrambled as if the RMT was interrupting the main clock or something. But it was way beyond my experience level and I didn't feel opening an issue was necessary. But now that the i2s interface has been ironed out in this port, I thought maybe this is again a good time to see if this port plays well with my audio pipeline. Happy to share code samples, too. Thanks!

Versions:

  • ESP-IDF 4.2 (from release/4.2 branch)
  • FastLED-idf (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions