ESP32 Webradio

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

Re: ESP32 Webradio

Postby BuddyCasino » Thu Mar 30, 2017 9:22 pm

I've been on vacation for two weeks an pulled the latest version today, I only noticed the startup time is much faster now. How do you profile your code?

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

Re: ESP32 Webradio

Postby Jakobsen » Fri Mar 31, 2017 8:46 am

Hi Buddy
Just did some simple ccount sampling pre and post code block. I have a float and a fixed point version of my DSP/Biquad. Initial did the profiling to learn dif between float and fixed math.
Look forward to see your re-factored code.
/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
Jakobsen
Posts: 89
Joined: Mon Jan 16, 2017 8:12 am

Re: ESP32 Webradio

Postby Jakobsen » Sat Apr 08, 2017 9:52 pm

Hi Buddy

I have added 32 bit audio support and setup procedure for Merus audio amplifier. I have adds some files and commited the change to my local repo - Now I want to push the stuff to your master branch - what to do ? git push gives me access denied - other options.

In my old develop branch i have added - DSP audio processing, mdns and websocket html UI from external webserver.
I thing it makes good sense to add the mdns/websocket stuff. I use it for volume and DSP debugging stuff. But we can easy to a station selector that will soon become handy.

/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

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

Re: ESP32 Webradio

Postby BuddyCasino » Sun Apr 09, 2017 7:03 am

Fantastic! Wanted to add mDNS and web UI anyway.
Per default you cannot directly push to other people's repositories, but you can create a "pull request" so they can review and merge the changes themselves.
So you can either do that, but I would be willing to add you as a collaborator to this repository, which would give you direct commit rights. Whats your Github account?

If the code with your old development branch has diverged to much to merge it in, you can also just send me a zip and I'll port it.

Note that I'll be away hiking in the mountains today but could probably have a look this evening.

P.S.: Regarding station selection, in the long term this could be done via Alexa voice control? In the meantime, maybe adding "buttons" via the touch control peripheral would be easiest, because all you need is a wire? Not sure.
The refactorings that I made were specifically targeted at making starting/stopping the decoder possible (and therefore changing the station). You can test start/stop with the "boot" button, its quite responsive.

P.P.S.: did you ever implement a Phase Vocoder? This should help with clock stretching/compression when the ESP32s and the remote stations clocks run out of sync, without changing the pitch. It could probably use the MP3's DCT data directly. Also could be used to change Alexa's voice. ^_^

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

Re: ESP32 Webradio

Postby Jakobsen » Sun Apr 09, 2017 8:15 pm

Hi Buddy

Hop you got some fresh air - I am jorgenkraghjakobsen at github - Stil working on by git foo - think I have seen the light at the end of the tunnel but still a couple of nights before I will get there.

Just let me start to do a pull request - I only change 2 files and added 2. Still not sure here the best place for the Merus stuff will be placed.
I also did a review of the i2s driver in the esp-idf - it has still not been fixed.

Yes for the long term Alexa station look up will be cool but think we need to be focused and beat one beast at a time.

No I have not worked with re sampling phase stuff - guess you thing of supporting other stream formats.
Start/stop fits perfectly on a small side project building an audio generator for speaker test and calibration.

/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

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

Re: ESP32 Webradio

Postby WiFive » Mon Apr 10, 2017 2:30 am

So you guys play with apll clk freq at all or did you conclude you need rev1 apll full precision to improve jitter by any meaningful amount?

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

Re: ESP32 Webradio

Postby BuddyCasino » Mon Apr 10, 2017 6:54 am

Jakobsen wrote: Just let me start to do a pull request - I only change 2 files and added 2. Still not sure here the best place for the Merus stuff will be placed.
Ok, just in case you already created a pull request: its not showing up for me yet.

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

Re: ESP32 Webradio

Postby BuddyCasino » Mon Apr 10, 2017 6:55 am

WiFive wrote:So you guys play with apll clk freq at all or did you conclude you need rev1 apll full precision to improve jitter by any meaningful amount?
There were multiple attempts at getting APPL clock source to work, as far as I understood it none of them worked. Espressif staff couldn't help us either.

User avatar
supersat
Posts: 10
Joined: Tue Apr 11, 2017 10:17 pm

Re: ESP32 Webradio

Postby supersat » Tue Apr 11, 2017 10:42 pm

Has anyone obtained decent quality using the built-in DAC in I2S mode? I tried modifying this demo and I do get audio out, but it's extremely distorted. Looking at the DAC_1 and DAC_2 lines on my scope, they look like square waves and not analog signals. It doesn't look like a PDM signal either. Is there a trick to getting analog output? I noticed the dac_out_voltage function sets the DAC pins into analog mode (using the dac_out_enable function), but the dac_out_enable function isn't exported, and calling dac_out_voltage before setting up the I2S mode doesn't help.

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

Re: ESP32 Webradio

Postby BuddyCasino » Wed Apr 12, 2017 6:40 am

The DAC_BUILTIN mode isn't really working unfortunately, I suspect the driver is buggy. I stopped investigating the issue when it became clear that we should be able to get better sound via the I2S PDM mode instead of the 8 bit DAC, but again the driver doesn't support PDM yet.

Only thing we can do is wait, Espressif developers are trying hard but I guess they simply have too much on their plate right now.

Who is online

Users browsing this forum: No registered users and 41 guests