-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit the code to work on different Hardware Platform #4
Comments
Hi Karim |
Hi Jorgen, thanks a lot for your quick respone. Another question is :) Now I can connect to snapserver and I am getting the following: ` I (14416) SNAPCAST: Codec : flac , Size: 1362 I (14416) SNAPCAST: Opus sampleformat: 570425344:32772:32772 I (14426) SNAPCAST: Failed to init opus coder wait ... buffer : 0 E (14486) SNAPCAST: Decode error : -1 E (14496) SNAPCAST: Decode error : -1 E (14516) SNAPCAST: Decode error : -1 E (14526) SNAPCAST: Decode error : -1 E (14556) SNAPCAST: Decode error : -1 E (14576) SNAPCAST: Decode error : -1 E (14616) SNAPCAST: Decode error : -1 E (14636) SNAPCAST: Decode error : -1 ` So, from menuconfig -> ESP32 audio buffer and I2s pin config I think these configs are not used from components/rtprx/rtprx.c Questions :) 2- In Lyra Board there is, as said before, an internal codec. But in this repo there are built-in decoder opus_decoder_create. So in my case, i must output the audio direct from the DAC and i should avoid pass ringbuffer through the codec which will decode the decoded data again. Do you think am i right or i am missing something. 3- To use Ringbuffer from main.c: Regards, |
Hi Karim
I have fired up my LyraT board and is adapting the code to support that as well. That task is on my do list anyway. /j |
Hi Karim |
Hi Jorgen, very happy for these news :) Best Regards, |
Hi Jorgen, well, unfortunatelly the snapclient on my Lyra is not working yet. There is no error but it can not connect to the snapserver i created on my machine. I tested my snapserver with snapdroid app from google store and it is working. My terminal from Lyra after connecting to the wifi AP is as follows: I gave the host IP of my snapserver and port = 1704. I tried also port = 1705 and port =1780 (http stream) So, it is silly question:)) you were able to connect to snapserver? Thanks in advance Update:
|
Hi This is the log of my snapserver
Last 4 lines is my esp32 client connection Your setup is looping in this code
Try to comment that out and hardcode ip of your snap server here
/j |
I have checked in my snapcast server conf in the directory snapcast |
thanks a lot. I would give my feedback here as I get my board running. |
Also snap volume control to the ADF hal abstration - now need to do a hal driver for my own amp :-) |
well, at least i think that i know where is the problem :=)) |
Hi Jorgen, due to several network problems was my board not working. Now it is working but for maximum 30 seconds then it makes a new restart :) |
Hallo Jorgen, a short question :) In my case, it is almost not working. So i wanted to know if it is from my wifi network or from the code itself on esp32 |
My code is rocking - Is your snapserver on a linux instance running under windows. Can you try to test it vs a client on a nother pc. |
The 30 sec is kind of rare to get. My snapclient on the android is woking fine. So, I think that the wifi configs by me on the esp32 target are some how not set correctly. My snapserver is working now on Raspbian OS in Raspberry pi. |
this is the terminal output after wifi init `I (7640) esp_netif_handlers: sta ip: 192.168.2.104, mask: 255.255.255.0, gw: 192 .168.2.1 I (20690) SNAPCAST: Codec : opus , Size: 12 I (20700) SNAPCAST: Opus sampleformat: 48000:16:2 I (20700) SNAPCAST: Initialized opus Decoder: 0 ELF file SHA256: e4a826abdfe41079 Backtrace: 0x400d9614:0x3ffe7800 0x4008e7a1:0x3fff0a60 |
Hi guys, I just wanted to chime in, and point out, that i'm having a very similar problem. Some times it'll run nicely for minuts, and then suddenly, without further ado, just crash.
At first my setup (just like Karimsad's) would crash, after the opus decodes was increasing in size. - It doesn't as often anymore, and this was on a earlier build anyways. I figure it's stille a buffer issue? It seems, that is the decoder still isn't happy, after the pcm_size is > 960, it'll try and double the size again, crashing the system. Now i'm running into the same problem af karimsad. Whenever i turn off one client the other one dies every time, and panic's and dsp_processor.c line ~170. I hope this might help you out a bit. |
Hi Nicolai, but how did you changed to uplink of 5 GHz though the ESP32 supports (as I know) only 2.5 GHz. Or you are using another Hardware Platform? |
Yes, you're right (unfortunately..) the esp only supports 2.4GHz, however the machine running my server is capable of doing 5GHz. It was very apparent, that drastically reduced the amount of lost packages when I change the server wifi. As I've just moved into a new apartment, I wasn't aware of just how bad the wifi interference is here. The 2.4GHz band seriously crowded. Luckily, very few of my neighbors are using 5GHz wifi! :D |
Hi N and K You mite want to do this optimizations as well. Odd problem with one client taken the other one down as well. |
Aha! Thanks for clarifying, Jørgen. |
Hi. I try to compile and run snapclient for the ESP32_LyraT 4.3 board. What I have done so far (under MacOS Big Sur):
After that I get the log from the end of this post via idf.py monitor. That looks quite OK, but I do not hear any sound from the connected headphones. Two things look suspicious to me:
Can someone give me a hint what I am doing wrong? Best regards,
|
Hi Jorgen,
I have some questions that would help me to run your nice repo on my standard development board ESP32-LyraT V4.3).
In Lyra board, an internal codec ES8388 and internal power amplifier (instead of MerusAudio) are used in the Lyra board.
The internal codec of the Lyra board is connected to the esp32-wrover module via i2s interface for audio and i2c for control.
My approach to let my board work with snapclient was:
I commented code related to MerusAudio
I initialized the codec from ready-to-use APIs from ESP-ADF (PS: ESP-ADF now supports ESP-IDF 4.0 and 4.1 :) )
I choosed the i2s pins which should work on my board
The code was compiled without problems. But when I flash the code, I am getting weird behavior.
My questions: (also understanding questions) :))
Could you please give me tips, how the workflow might be to let the snapclient work on another hardware platform which has for example an internal codec and power amplifier such as Lyra.
The functionality of the codec in your repo is done in opus submodule, that means you are not using a codec-chip?
Thanks in advanced for your answer
Regards,
The text was updated successfully, but these errors were encountered: