ESP32 Webradio
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: ESP32 Webradio
Its for sending audio to the ESP32. Whats your use case for doing it the other way round?
Re: ESP32 Webradio
I could use a bluetooth speaker for sound output instead of a amplifier breakout board.
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: ESP32 Webradio
I went on a Bluedroid SDK search, but it seems A2DP source mode is not implemented. You'll have to ask Espressif if/when they'll plan to support it. I agree it would be quite useful.
-
- Posts: 2
- Joined: Wed Sep 20, 2017 11:38 am
Re: ESP32 Webradio
Hello,
currently I try to install and make the "ESP32 webradio streamer" from here: https://github.com/MrBuddyCasino/ESP32_MP3_Decoder
but I get the following error:
I use Windows 8 and installed the Windows all-in-one toolchain & MSYS2 zip file from dl.espressif.com: https://dl.espressif.com/dl/esp32_win32 ... 170918.zip
After installation I switched back to release 5.2.0:
The command does not work.
What is the course of the make problem? I tried the but nothing happens.
My input console is MINGW64 from MSYS2 folder of Espressif installation.
Please help.
Best regards, Micha
currently I try to install and make the "ESP32 webradio streamer" from here: https://github.com/MrBuddyCasino/ESP32_MP3_Decoder
but I get the following error:
Code: Select all
Toshiba@Michael MINGW32 /c/esp/mp3
$ make
CC build/playlist/playlist.o
C:/esp/mp3/components/playlist/playlist.c:19:17: fatal error: ini.h: No such file or directory
compilation terminated.
make[1]: *** [/c/esp/esp-idf/make/component_wrapper.mk:243: playlist.o] Fehler 1
make: *** [C:/esp/esp-idf/make/project.mk:421: component-playlist-build] Fehler 2
After installation I switched back to release 5.2.0:
Code: Select all
cd ~/esp
git clone https://github.com/espressif/esp-idf.git esp-idf-v5.2.0
cd esp-idf-v5.2.0/
git checkout v5.2.0
git submodule update --init --recursive
Code: Select all
git checkout v5.2.0
What is the course of the make problem? I tried the
Code: Select all
git submodule init && git submodule update
My input console is MINGW64 from MSYS2 folder of Espressif installation.
Please help.
Best regards, Micha
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 Webradio
Where did you get the 5.2.0 version number for esp-idf? At the moment, we're up to 2.1, working on 3.0; to succesfully switch to 5.2.0 you'd need a time machine
Re: ESP32 Webradio
If you execute
the esp-idf master will be cloned to the local directory esp-idf-v5.2.0
https://git-scm.com/docs/git-clone
https://git-scm.com/docs/git-checkout
Code: Select all
git clone https://github.com/espressif/esp-idf.git esp-idf-v5.2.0
https://git-scm.com/docs/git-clone
https://git-scm.com/docs/git-checkout
Re: ESP32 Webradio
Hi all
I made a little change on the soft to add a volume control.
Karadio32 is based on your soft and KaraDio for esp8266.
The volume control is from 0 to 256.
Check in https://github.com/karawin/Ka-Radio32
in audio_renderer.c
//KaraDio32
void renderer_volume(uint32_t vol)
{
if (vol >256) vol = 256;
renderer_instance->volume = vol<<8; // *256
}
and
//KaraDio32 Volume control
register uint32_t mult = renderer_instance->volume;
if (mult!= 0x10000) // need voluem?
{
int16_t *psample;
psample = (int16_t*)buf;
for (int i = 0; i < num_samples*buf_desc->num_channels; i++)
{
int temp = psample * mult;
psample = temp>>16 & 0xFFFF;
}
}
Works pretty well!
But still unable to play aac stations. Not enough heap i suppose.
I made a little change on the soft to add a volume control.
Karadio32 is based on your soft and KaraDio for esp8266.
The volume control is from 0 to 256.
Check in https://github.com/karawin/Ka-Radio32
in audio_renderer.c
//KaraDio32
void renderer_volume(uint32_t vol)
{
if (vol >256) vol = 256;
renderer_instance->volume = vol<<8; // *256
}
and
//KaraDio32 Volume control
register uint32_t mult = renderer_instance->volume;
if (mult!= 0x10000) // need voluem?
{
int16_t *psample;
psample = (int16_t*)buf;
for (int i = 0; i < num_samples*buf_desc->num_channels; i++)
{
int temp = psample * mult;
psample = temp>>16 & 0xFFFF;
}
}
Works pretty well!
But still unable to play aac stations. Not enough heap i suppose.
Re: ESP32 Webradio
Dear Folks,
First of all - Thank you for this great code!
In Master mode - everything works well as expected but I cannot find the way to use it in I2S Slave Mode with my ADAU1701.
Configuration is simple: 44100 Khz, 16bit depth, Standard I2S.
I first change this flag to:
This wasn't enough: The output on the I2S Data channel wasn't a standard I2S (I cannot see zeroes between Left and Right Channel);
In fact I read:
I can get this fixed setting the rate at 32 bit depth like the Merus Audio kind of output.
In this mode I can see the zeroes in:
I imagine that I'm doing some confusion between I2S Frame lenght and Data Lenght (in 32bit of space i need to put 16bit of zeroes)...
I cannot understand so well where this could be set in my esp32...
Now I can get some audio - but really distorted.
Uncommenting the following:
Throw me DMA Buffer Underflow - could this be the problem?
Any help will be really appreciated!
pad52
--
It does not matter how slowly you go as long as you do not stop. - Confucio
First of all - Thank you for this great code!
In Master mode - everything works well as expected but I cannot find the way to use it in I2S Slave Mode with my ADAU1701.
Configuration is simple: 44100 Khz, 16bit depth, Standard I2S.
I first change this flag to:
Code: Select all
static void init_i2s(renderer_config_t *config)
{
i2s_mode_t mode = I2S_MODE_SLAVE | I2S_MODE_TX;
In fact I read:
Code: Select all
const char samp32[4] = {ptr_l[0], ptr_l[1], ptr_r[0], ptr_r[1]};
bytes_pushed = i2s_push_sample(renderer_instance->i2s_num, (const char*) &samp32, max_wait);
In this mode I can see the zeroes in:
Code: Select all
const char samp64[8] = {0, 0, ptr_l[0], ptr_l[1], 0, 0, ptr_r[0], ptr_r[1]};
bytes_pushed = i2s_push_sample(renderer_instance->i2s_num, (const char*) &samp64, max_wait);
I cannot understand so well where this could be set in my esp32...
Now I can get some audio - but really distorted.
Uncommenting the following:
Code: Select all
// takes too long
i2s_event_t evt = {0};
if(xQueueReceive(i2s_event_queue, &evt, 0)) {
if(evt.type == I2S_EVENT_TX_DONE) {
ESP_LOGE(TAG, "DMA Buffer Underflow");
}
}
Any help will be really appreciated!
pad52
--
It does not matter how slowly you go as long as you do not stop. - Confucio
Re: ESP32 Webradio
Hi,
got compiler-error and cant get missing ini.h with git submodule init && git submodule update .
My solution is download https://github.com/benhoyt/inih.git and put only content in
ESP32_MP3_Decoder-master/components/inih_port/inih/
I modified sdkconfig CONFIG_FREERTOS_HZ=10 cause ESP32 make Interrupt every
100ms for 8µs . With 1000Hz this can disturb timings. Lets try give feetback.
I use I2S with ES9023 and works. With PDM and DAC I hear good Sound with Crackling
have to check why.
Thx for ESP32 Webradio.
got compiler-error and cant get missing ini.h with git submodule init && git submodule update .
My solution is download https://github.com/benhoyt/inih.git and put only content in
ESP32_MP3_Decoder-master/components/inih_port/inih/
I modified sdkconfig CONFIG_FREERTOS_HZ=10 cause ESP32 make Interrupt every
100ms for 8µs . With 1000Hz this can disturb timings. Lets try give feetback.
I use I2S with ES9023 and works. With PDM and DAC I hear good Sound with Crackling
have to check why.
Thx for ESP32 Webradio.
Re: ESP32 Webradio
hi again,
after CONFIG_FREERTOS_HZ=10 ,I got problems with my playlist change channels.
With CONFIG_FREERTOS_HZ=100 no problems.
So please be carefull with this option.
after CONFIG_FREERTOS_HZ=10 ,I got problems with my playlist change channels.
With CONFIG_FREERTOS_HZ=100 no problems.
So please be carefull with this option.
Who is online
Users browsing this forum: No registered users and 43 guests