-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add support for lyrat mini v1.2 and es8311 #165
base: master-cmake
Are you sure you want to change the base?
Conversation
I have requested @philippe44 to have a look, since he wrote that layer. Note that in the 4.3 branch, I have included a new mechanism to provision known configurations via a JSON file that is pulled out of a gist. I will add the lyrat configuration there as well in case you want to give it a try. I chose this path in order to keep the code lean going forward; we're running low on storage with the current partition scheme, which was created to accommodate the widely available 4mb flash boards. |
Just for my information, will 4.3 branch be merged into master soon ? On which branch should I propose my PR in the future (if any) ? |
That branch is the future master and eventually release, but development has slowed down in the past few months due to personal circumstances for both Philippe and myself. I did, however, try to keep it as much as possible in a stable state last time I committed stuff so you are welcome to try it. If you encounter issues during your testing, let me know and I'll do my best to help in a reasonable amount of time. The more official users on that branch, the more I'll be able to stabilize the new network manager and additional features. Thank you! |
Looks good to me but if you can see the latest commit I've made, there is a tweak needed for 32 bits mode on ES8388. Maybe the same would be needed here? |
Eventually, this register do the same job ? : https://github.com/espressif/esp-adf/blob/master/components/audio_hal/driver/es8311/es8311.c#L531 |
You can compile the 32 bits version by doing "idf.py build -DDEPTH=32" |
Hi, I tried to get a LyraT mini v1.2 to work using the dac settings above with I2S-4MFlash.16.2.1290.master-v4, but with no success, the audio output stays silent. I can see the I2S and I2C signals coming to the DAC, but there is no analog signal coming out of the DAC. PA pin1 of NS4150 power CTRL is set to high, and it is amplifying. My settings: Any idea/hint what I am doing wrong? |
When checking register settings in your PR, it seems odd to me that some registers are written twice with the same or also different values, is that correct? |
@CherAlban yes it looks odd, for sure, but I dumped the registers as is, directly from the working software version running on the Lyra Mini T. |
I upgrade to latest release, the version Installed is
It can't write i2c register as the I2C port for the DAC is 0, and Lyrat mini uses port 1. One solution would be to read the i2c port from the dac_config. Let me know if I'm on the right path or not. |
@naguirre are you still in test? |
Bringing this topic up again: We would really like to use the LyraT Mini board for our this year's "Girl's Day" project (April 25). I just tested again with the latest fw: I2S-4MFlash-1670, but with no success, no audio. My settings file: I tried both I2C ports: using port 0, I am getting the following error on the serial interface: when using port 1, there is no I2C error reported, but still I2S MCK complains: It would be really great to finally sort this out. |
|
I configured it according to @naguirre original PR: "dac_config": "model=I2S,bck=5,ws=25,do=26,sda=18,scl=23,i2c=24" "i2c_config": "scl=25,sda=18,speed=400000,port=1" "dac_controlset": "{ "init": [ {"reg":1, "val":48}, {"reg":2, "val":0}, {"reg":3, "val":16}, {"reg":22, "val":36}, {"reg":4, "val":16}, {"reg":5, "val":0}, {"reg":11, "val":0}, {"reg":12, "val":0}, {"reg":16, "val":31}, {"reg":17, "val":127}, {"reg":0, "val":128}, {"reg":0, "val":128}, {"reg":1, "val":63}, {"reg":1, "val":63}, {"reg":2, "val":0}, {"reg":5, "val":0}, {"reg":3, "val":16}, {"reg":4, "val":16}, {"reg":7, "val":0}, {"reg":8, "val":255}, {"reg":6, "val":3}, {"reg":1, "val":63}, {"reg":6, "val":3}, {"reg":19, "val":16}, {"reg":27, "val":10}, {"reg":28, "val":106}, {"reg":9, "val":12}, {"reg":10, "val":12}, {"reg":9, "val":12}, {"reg":10, "val":12}, {"reg":50, "val":178}, {"reg":9, "val":12}, {"reg":10, "val":12}, {"reg":23, "val":191}, {"reg":14, "val":2}, {"reg":18, "val":0}, {"reg":20, "val":26}, {"reg":20, "val":26}, {"reg":13, "val":1}, {"reg":21, "val":64}, {"reg":55, "val":72}, {"reg":69, "val":0}, {"reg":50, "val":200}]}" |
So you have to add MCK to gpio 0. I'm not in from of a computer now but look at my README and it says how to set MCK for a DAC |
mck=0 did the trick, I can hear audio!
@naguirre Many thanks! |
Cool - so tell me, what is "girl's day", if you do t mind me asking? |
It started as Girl's Day https://www.girls-day.de/ Now it has become Girls and Boys Zukunftstag |
Unfortunately I am still having trouble with the Lyrat-Mini board:
I have two LyraT-Mini boards and checked with both of them, with the same results. |
The first problem is known for the LyraT-Mini and based on hardware: |
@sle118 I just installed SqueezeAmp.32.1681.master-v4.3 on my Lyrat v4.3 board. Where do I find the gist you mentioned or how can I use the new provisioning feature? |
I finally got it working, here's a full tested and working nvs file for the Lyrat v4.3 board to save the next guy some time. |
@skiphansen Did you manage to solve the hardware issue with this board? I could either make it boot in stand-alone-mode, or let it accept serial flash, but not both with the same hardware tweak. |
@CherAlban I had no hardware issues at all. Make sure you are powering the board properly but either using two USB cables or with a battery. I've never used the battery myself only two USB cables which is quite odd. Also note that there are multiple versions of the Lyrat board, mine is v4.3 I used the web installer to flash it, again no issues. |
I only saw v4.3 so far. My understanding is that one USB is for power, the other is the USB/serial connection. If only USB power is connected, my board does not boot: |
The reddit link refers to a "ESP32 LyraT-Mini", that's a different board. There's also a v4.2 version of the Lyrat. I just power cycled my board w/o the serial USB and it booted and played audio. Maybe you have bad board? We used at least 4 Lyrat board on my last project, they all worked without any issues. |
@skiphansen Sorry for answering too quickly without thorough reading. The thread originally deals with the LyraT Mini v1.2 board, not with the standard LyraT v4.3, which works flawlessly. |
This PR add initial support for es8311 via the dac_external component.
It also add informations in Readme about support for LyraT Mini v1.2 : https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/get-started-esp32-lyrat-mini.html
Working features for this board :