Page 11 of 19

Re: ESP32 Webradio

Posted: Mon May 08, 2017 10:50 pm
by Jakobsen
Hi Buddy

Nice work on the Bluetooth implementation - I have BT audio streaming up running with my 32 bit I2S interface to my MA12040P :-)
Push in 4 extra bytes pr L/R samples set and got stable audio flow.

But audio is very distorted / sounds more like playing what is left out in the joint_stereo setup. I will try to get deeper into the decoder and try with other controllable BT audio source.

But all in all a very big step forward for the holy grail of BT audio on the ESP32.

Grate work /Jakobsen

Re: ESP32 Webradio

Posted: Tue May 09, 2017 1:31 pm
by BuddyCasino
@bernard.xiong: I use the Fraunhofer AAC decoder now, check it out if you like. Its using a lot of RAM too, but at least radio streams seem to work better.

Re: ESP32 Webradio

Posted: Tue May 09, 2017 7:16 pm
by rudi ;-)
@mike
must take a short time for a general saying: "Thank you Mike!"
bt_sbc_i2s.jpg
bt_sbc_i2s.jpg (55.1 KiB) Viewed 15210 times
[/url]

best wishes
rudi ;-)

Re: ESP32 Webradio

Posted: Tue May 09, 2017 7:35 pm
by BuddyCasino
:D Thanks for the shout out.
Btw. I also made some progress on the Alexa client, main issue right now is that I2S RX doesn't work. If anyone can assist, I'd be grateful.

Re: ESP32 Webradio

Posted: Tue May 09, 2017 9:26 pm
by Jakobsen
Hi Buddy
Yes - Got Bluetooth 16 bits audio interleaved to 32 bits I2S and audio quality again set by i2s clock jitter. Very nice.

After syncing to lastest idf-sdk floating point performance has almost increased by 100% - Good news for anyone with plans for advanced DSP audio processing. Need to look closer into this.

/Jakobsen

Re: ESP32 Webradio

Posted: Wed May 10, 2017 8:22 am
by BuddyCasino
Yes - Got Bluetooth 16 bits audio interleaved to 32 bits I2S and audio quality again set by i2s clock jitter. Very nice.
Cool. Will route it through the renderer, the I2S Merus branch should work right?
Hi Buddy
After syncing to lastest idf-sdk floating point performance has almost increased by 100% - Good news for anyone with plans for advanced DSP audio processing. Need to look closer into this.
What lib are you using for the biquad, the Teensy one? How does the the audio processing pipeline look like, sample-by-sample or blocks of samples? I'd like to add a subsystem so filters can be plugged in easily.

Re: ESP32 Webradio

Posted: Wed May 10, 2017 1:31 pm
by Jakobsen
Hi Buddy

Still have some 16/32 bits alligenemt to look into - the BT module give out some dropped package when i do bulk i2s_write.
passing through the audio render sound like a good way to deal with diff. audio source.

My DSP code is still inline in a early port of your code. It is block based and it will come out as a module that easy can be plugged into the audio path.

/j

Re: ESP32 Webradio

Posted: Thu May 11, 2017 2:49 pm
by BuddyCasino
Still have some 16/32 bits alligenemt to look into - the BT module give out some dropped package when i do bulk i2s_write.
Any idea how to solve that?
My DSP code is still inline in a early port of your code. It is block based and it will come out as a module that easy can be plugged into the audio path.
Cool, I'll wait then. Idea: filters can register a callback with the audio renderer. They get a pointer to the PCM sample buffer and its format and are called whenever there is a buffer fresh from the decoder. Would that work?

I'm currently refactoring he renderer, I noticed you're doing this:

Code: Select all

            char high0 = sample_buff_ch0[i]>>8;
            char mid0  = sample_buff_ch0[i] & 0xff;
            char high1 = sample_buff_ch1[i]>>8;
            char mid1  = sample_buff_ch1[i] & 0xff;
            const char samp32[8] = {0,0,mid0,high0,0,0,mid1,high1};
Does that mean your chip wants LSB samples? It might be easier to configure the I2S interface as LSB and send MSB samples, so we don't have to care about that (I guess?).

EDIT: forget what I said above.The renderer is refactored, bt speaker and aac are now routed through it. 16 Bit, 32 Bit and DAC mode should work fine for all sources now.

Re: ESP32 Webradio

Posted: Sat May 13, 2017 2:55 pm
by rudi ;-)
From the Tweet
Live Test with ESP Speaker Mode
and Android APP: Talking to A2DP - BabyPhone is born - done :)

direct demo show on YouTube
best wishes
rudi ;-)

Music Stream by A2DP:

First Download and Config ESP32 Webradio to Bluetooth Speaker Mode in Menuconfig

- Boot then your ESP32 with Speaker or DAC or what you want
- Activate Bluetooth on your Android
- search the A2DP SINK ( ESP-Speaker )
- connect to the Sink
- play your music, video ( audio will be streamed )

Bonus: talk to esp32 by A2DP
- run the Free A2DP Talking APP

have phun :),
thanks to @BuddyCasino for the ESP32 Webradio and support BT Speaker Mode... :mrgreen:



btw:
in the video is showing
i have power off music player ( pause ) before start the A2DP talking APP
you do not need this do - you can play your music and A2DP talking do at same time ;-)

info:
why there is a delay on A2DP talking: its a Android Security Part
cause Android does not support Hardware A2DP Service direct on each Phone ( unrootet )
- the Audio from Talking is for this showing simple buffered
next step is: Direct HW A2DP service - you need then more rights on the phone ( or rootet phone )

Re: ESP32 Webradio

Posted: Sat May 13, 2017 5:54 pm
by WiFive
you do not need this do - you can play your music and A2DP talking do at same time ;-)
Oh no esp32 karaoke machine is born