karawin / Ka-Radio32

esp32 version of Ka-Radio (https://github.com/karawin/Ka-Radio) by jp Cocatrix
523 stars 155 forks source link

KaraDio32 with PCM5102 I2S DAC #37

Closed Gromkz closed 5 years ago

Gromkz commented 6 years ago

I use ESP32 with PCM5102 I2S DAC. The project perfectly works with your bin files, too works with the OTA updates.

I want to add the IR codes.

But when I compile the project itself, there are problems with a sound, fast playback with noise and clicks. I have tried esp-idf versions from the last to esp-idf-v2.1. but I don't receive a correct sound.

Gromkz commented 6 years ago

I try to enclose old i2s drivers.

karawin commented 6 years ago

With the latest ESP-IDF you need to replace the i2s.c and .h given in the root of KaraDio32 in idf components driver

Gromkz commented 6 years ago

And I have made. the sound became better but the sound strongly clicks at any updating of the screen I have LCD_SPI_ILI9341

karawin commented 6 years ago

I made some update recently for this problem

emax73 commented 6 years ago

Will update spi display speed from 1MHz to 20MHz, please - its solve click problem. Best Regards

Gromkz commented 6 years ago

I update git clone --recursive https://github.com/karawin/Ka-Radio32.git

replace the i2s.c and .h given in the root of KaraDio32 in idf components driver clicks are after compilation I update OTA of any clicks.

karawin commented 6 years ago

I released a bin in R8 with all updates

emax73 commented 6 years ago

tested R8 - sound clicked with my SPI 256x64 display (SSD1322), after increase SPI clock >= 10 MHz sound becomes continuous

karawin commented 6 years ago

I lowered the spi speed because I was not sure that every type support the 10MHz. May be i will make an uart command for that.

emax73 commented 6 years ago

u8g2 library has clock info for every controller, may using its

karawin commented 6 years ago

You mean sck_pulse_width_ns?

For ucg I use dev_config.clock_speed_hz = (1000000000/((ucg_com_info_t *)data)->serial_clk_speed) ;

But not found where sck_pulse_width_ns is initialized. Many comment like

karawin commented 6 years ago

May be // dev_config.clock_speed_hz = 1000000; dev_config.clock_speed_hz = u8x8->display_info->sck_clock_hz; in u8g2_esp32_hal.c

emax73 commented 6 years ago

I see clock info at u8x8_d_ssd1322.c, line 248 static const u8x8_display_info_t u8x8_ssd1322_256x64_display_info = { ... / sck_clock_hz = / 10000000UL, / since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns, increased to 8MHz (issue 215), 10 MHz (issue 301) / ... } Probably, its u8x8->display_info->sck_clock_hz, right

emax73 commented 6 years ago

Topicstarter using color hi-resolution 240x320 SPI display, therefore he using ucglib

Gromkz commented 6 years ago

today it was updated on OTA there were problems with a sound and on R8 (clicks)

I have returned on R6

Gromkz commented 6 years ago

I have compiled R7 with esp-idf-v2.1.1 I have corrected main/websocket. with Solves the issue of multiple declaration of the function 'base64_encode'

The sound good without clicks, IR works. ))

Gromkz commented 6 years ago

R7 with the last esp-idf

acolwill commented 6 years ago

@Gromkz Any chance you could share your changes to the code to get the PCM5102 DAC working? I've got a TTGO-TM-ESP32 board which has it integrated and am having a hard time getting it seen by Ka-Radio32. Thanks in advance!

pilnikov commented 6 years ago

https://github.com/pilnikov/KaRadio32_fork bin worked

acolwill commented 6 years ago

@pilnikov Hi Alex, unfortunately I can't get that to work with my TTGO-TM-ESP32 unit... it will either not boot, or it won't initialise the screen

pilnikov commented 6 years ago

If you compile with a new expressif sdk - you must comment line 72 in vs1053.c .flags = SPICOMMON_BUSFLAG_NATIVE_PINS|SPICOMMON_BUSFLAG_MASTER because spi is not native

pilnikov commented 6 years ago

I updated the files in my repository. You can try to compile it. My ttgo works fine.

acolwill commented 6 years ago

@pilnikov Thanks! Will have a look!

acolwill commented 6 years ago

@pilnikov working brilliantly! Will communicate with you on your github page.