ESP32 Webradio

BuddyCasino
Posts: 255
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Webradio

Postby BuddyCasino » Wed Mar 01, 2017 8:05 am

Any progress
Where are you stuck


I'm sending a multipart http message (json + pcm audio) to the Alexa endpoint, but they reset the connection and I have no idea why. When I interrupt my data sending by returning NGHTTP2_ERR_DEFERRED from my data_source_read_callback() to give nghttp2 time to read from the socket to maybe retrieve some error message that would help me, I only get a settings frame and after that its "mbedtls_ssl_write returned -0x50", which means the peer reset the connection.

It works in my Java prototype. Its totally infuriating.

User avatar
Jakobsen
Posts: 57
Joined: Mon Jan 16, 2017 8:12 am

Re: ESP32 Webradio

Postby Jakobsen » Wed Mar 01, 2017 8:43 am

Hi Rudi

I did change the plla_ena in the i2s code as well. It is the jitter that we need to reduce. For audio codec and i2s interface with out faster MCKL in the setup, the jitter on BCK crank up the noise floor in the audio band.

We need more insight to the esp32 clock system to get the apll going - the audio quality is good for now - just no CD quality yet.

Do not down play you hobby approach to this stuff - you got you hand more dirty then most professional has the skills to do.

I am stocked by work and lag of focus - I am working some dsp stuff that also will be needed to do a top notch platform.

Code: Select all

    return ESP_FAIL;
    }
    clkmInteger = clkmdiv;
    clkmDecimals = (clkmdiv - clkmInteger) / denom;
    float mclk = clkmInteger + denom * clkmDecimals;
    bck = factor/(bits * channel);

   // rtc_plla_ena(1, 0, 0,1 , 0);
   I2S[i2s_num]->clkm_conf.clka_en = 1; // jkj was 0
    I2S[i2s_num]->clkm_conf.clkm_div_a = 63;
    I2S[i2s_num]->clkm_conf.clkm_div_b = clkmDecimals;


/j
Analog Digital IC designer / DevOps @ Merus Audio, Copenhagen, Denmark.
We do novel and best in class Audio amplifiers for consumer products.
Programmed assembler for C-64 back in 1980's, learned some electronics - hacking since then

User avatar
rudi ;-)
Posts: 1214
Joined: Fri Nov 13, 2015 3:25 pm

Re: ESP32 Webradio

Postby rudi ;-) » Wed Mar 01, 2017 10:04 am

@Jakobsen

thank you for the friendly words.

have you seen, we have now I2S Theme in ESP32 technical Reference
Update is from today, 2017 March 1
V 1.5

techRefMarch2017_a.jpg
techRefMarch2017_a.jpg (56.14 KiB) Viewed 2208 times


here you get it
visit allways the espressif resource for newer updates

techRefMarch2017_b.jpg
techRefMarch2017_b.jpg (102.95 KiB) Viewed 2208 times


best wishes
rudi ;-)

ps: i am on the road - will come back to your post asap
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

WiFive
Posts: 1912
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 Webradio

Postby WiFive » Fri Mar 03, 2017 1:03 am

Anyone try with 12mhz apll clock? How is jitter?

User avatar
rudi ;-)
Posts: 1214
Joined: Fri Nov 13, 2015 3:25 pm

Re: ESP32 Webradio

Postby rudi ;-) » Fri Mar 03, 2017 2:06 am

WiFive wrote:Anyone try with 12mhz apll clock? How is jitter?


Hi WiFive

1,2,8
12MHz

12MHz.jpg
12MHz.jpg (121.38 KiB) Viewed 2149 times


best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

WiFive
Posts: 1912
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 Webradio

Postby WiFive » Fri Mar 03, 2017 2:28 am

Hmm I see.. and resulting jitter on i2s_bck ?

User avatar
rudi ;-)
Posts: 1214
Joined: Fri Nov 13, 2015 3:25 pm

Re: ESP32 Webradio

Postby rudi ;-) » Fri Mar 03, 2017 2:39 am

asap WiFive (not today) , i am on other place now.

do you see, allways the same buzzy waves, on pos and neg ( inverted )
edit: Like a pattern, watermark noise ;-)
edit: add a play on pic ( cut and paste the pos and neg )

watermark_pattern_bit.jpg
watermark_pattern_bit.jpg (59.39 KiB) Viewed 2145 times


with 32.5 MHz is comming a "compensation".

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

WiFive
Posts: 1912
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 Webradio

Postby WiFive » Fri Mar 03, 2017 3:06 am

Yes but we care about edges and how digital bck compares to jitter from bpll src viewtopic.php?f=17&t=1026&start=20#p4727

dotthree
Posts: 33
Joined: Wed Oct 12, 2016 7:12 pm

Re: ESP32 Webradio

Postby dotthree » Mon Mar 06, 2017 4:19 pm

BuddyCasino wrote:
Any progress
Where are you stuck


I'm sending a multipart http message (json + pcm audio) to the Alexa endpoint, but they reset the connection and I have no idea why. When I interrupt my data sending by returning NGHTTP2_ERR_DEFERRED from my data_source_read_callback() to give nghttp2 time to read from the socket to maybe retrieve some error message that would help me, I only get a settings frame and after that its "mbedtls_ssl_write returned -0x50", which means the peer reset the connection.

It works in my Java prototype. Its totally infuriating.


That sounds bizarre. Have you had any luck with it? Maybe the community could take a look and give offer some assistance?

BuddyCasino
Posts: 255
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Webradio

Postby BuddyCasino » Mon Mar 06, 2017 5:00 pm

That sounds bizarre. Have you had any luck with it? Maybe the community could take a look and give offer some assistance?


It took me 4 days, but I finally found it. Was a very stupid mistake in my network loop.
I'll commit my stuff to Github as soon as its at least a little stable, but for now Alexa thinks I'm not sending any audio for some reason. But at least she is accepting my authorization and json metadata! So yay, making progress.

Who is online

Users browsing this forum: No registered users and 3 guests