Skip to content
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

Board support (TTGO ESP32 Tm Music) #36

Closed
joaofl opened this issue Jun 13, 2018 · 21 comments
Closed

Board support (TTGO ESP32 Tm Music) #36

joaofl opened this issue Jun 13, 2018 · 21 comments

Comments

@joaofl
Copy link
Contributor

joaofl commented Jun 13, 2018

I've been trying to port your code to this board. The job tasks are simple. It includes changing a couple of IOs, configuring the proper LCD, push buttons, and It should be good. I'm specially interested on this board. Find the schematic here It uses the PCM5102 I2S DAC.

Its the most complete ready-to-run solution I found. relatively low cost.

But now, as I'm trying to do that, I went through one issue, and one question:

  • How do you think it is a good idea to have a complete board support? Instead of changing individual configs, but having a whole config-set for an specific board? I tough of having some pre-set config structures, that could be changed on the terminal (something like having renderer_config and board_config pre-sets for a given board. How does this sound? I could contribute on that. I'm quiet interested on getting this board to work smoothy.

  • My other issue, which is more technical one: I've been trying for the last couple of weeks to get the audio playing fine. Issue is that I'm always getting musics playing as if they were in fast-forward, with noise as well. I tried changing sampling rate, master clock, clock sources, etc.. Nothing solves the issue.

I found a fork of the the KaRadio from which, If I flash the binaries already compiled, it works, otherwise, it does not. Really dont know where to look more.

It seems that there is a related issue here, but not sure it solves the issue Im having.

@joaofl
Copy link
Contributor Author

joaofl commented Jun 14, 2018

My other issue, which is more technical one: I've been trying for the last couple of weeks to get the audio playing fine. Issue is that I'm always getting musics playing as if they were in fast-forward, with noise as well. I tried changing sampling rate, master clock, clock sources, etc.. Nothing solves the issue.

I found out why and how to solve it. Its basically the I2S library that got major updates lately. By using the latest IDF with the previous I2S library version, I managed to compile and get radio working. Now I have to figure out a way to get it working without downgrading. Need to investigate more.

@karawin
Copy link
Owner

karawin commented Jun 14, 2018

Ok, I will try to investigate too.
Thanks

@joaofl
Copy link
Contributor Author

joaofl commented Jun 14, 2018

The release notes of the latest IDF says:

Breaking Changes
Release v3.0 is largely compatible with apps written for ESP-IDF v3.0-rc1. However some breaking behaviour and significant API changes have been introduced:

Some I2S APIs which mixed return values and error codes have been deprecated. New APIs have been introduced to replace them.

i2s_write should be used instead of i2s_write_bytes and i2s_push_sample, which are deprecated.
i2s_read should be used instead of i2s_read_bytes and i2s_pop_sample, which are deprecated

I may test it these days and do a push if I see that it makes sense.

@karawin
Copy link
Owner

karawin commented Jun 14, 2018

Changed API to the new ones, but something else is wrong. Investigation again and again....

@joaofl
Copy link
Contributor Author

joaofl commented Jun 17, 2018

I saw some commits of yours. DO they solve the issue? Did you get it working with IDF v3?

@karawin
Copy link
Owner

karawin commented Jun 17, 2018

No. I plan to integrate the old i2s driver in KaraDio32.
It seems a problem of bitrate but unable to find a solution.

@joaofl
Copy link
Contributor Author

joaofl commented Jun 17, 2018

Ok. It may be a temporary solution right? By replacing the deprecated I2S functions with the new implementations doesn't do the job?
I'll see what I can find as well.

@karawin
Copy link
Owner

karawin commented Jun 17, 2018

No, in fact in the code the old api is simply a wrapper to call of the new api.
I will integrate the old driver and try to find where is the problem with the new code. May be i will ask some help on the espressif forum.

@pilnikov
Copy link

pilnikov commented Aug 28, 2018

look my repo https://github.com/pilnikov/KaRadio32_fork. I updated and patched problem with i2s (Replacing with old). My ttgo play music fine.

@pilnikov
Copy link

updated to 1.3r1. Does not work at full strength (screen problems) in version 2 bugs promised (JP) to eliminate

@pilnikov
Copy link

updated to 1.3R3 All ok! include buttons

@karawin
Copy link
Owner

karawin commented Nov 23, 2018

I think we can close it now ;-)
https://youtu.be/Jk8d02b-uso

@pilnikov
Copy link

I tried to flash my board without pre-cleaning - everything works very slowly. when I open the web page - i get fails. if set 255 for vs1053 ports -> SPI init error (no GPIO for use SPI)
Maybe all the same finish?
And where to get the correct .csv?

@karawin
Copy link
Owner

karawin commented Nov 23, 2018

http://karadio.karawin.fr/ttgo.zip
https://youtu.be/Jk8d02b-uso
The spi init is in the vs1053. Yes some details must be finished.
For now set sys.lcd("194") (wrong colors but works). On next release sys.lcd("199") for the st3389V lcd.

@pilnikov
Copy link

JP tnx, all work fine! Even with 255 for VS & display #199. Tnx!
Small bug - when switching stations, Cyrillic names are displayed in the wrong encoding for the first time.

  1. Playing station Compile error bt_speaker #2 (Name on latin)
    p_20181126_112643
  2. Tru change station on #0 (Name on cyrillic) - picture is not correct.
    p_20181126_112324
  3. After changing the station, when the encoding also changed and changed the font
    p_20181126_112333
  4. Try to switch the station again - everything shows correctly (font also changed)
    p_20181126_112338
    p_20181126_112350
    If go back to step 1 - the bug will repeat.

@karawin
Copy link
Owner

karawin commented Nov 26, 2018

Yes i noticed it. Will see it when i have some time.
Thanks

@karawin
Copy link
Owner

karawin commented Dec 16, 2018

Must be ok now in 1.5 R5

@pilnikov
Copy link

Without changes. Incorrect display of the title on the splash screen only.

@karawin
Copy link
Owner

karawin commented Dec 18, 2018

Yes sorry, now it's ok in 1.6 R0

@pilnikov
Copy link

JP many tnx, all work fine!

@karawin
Copy link
Owner

karawin commented Dec 19, 2018

Great. I close it

@karawin karawin closed this as completed Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants