Skip to content
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

ESP32-LyraT V4.3 with ES8388 support #115

Open
Omirax opened this issue Dec 12, 2022 · 9 comments
Open

ESP32-LyraT V4.3 with ES8388 support #115

Omirax opened this issue Dec 12, 2022 · 9 comments

Comments

@Omirax
Copy link

Omirax commented Dec 12, 2022

Hello!

Unfortunately, only headphones work for ESP32-Lyrath V4.3 with ES8388.
The microphone and speaker do not work, although all pinouts are the same:
https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/board-esp32-lyrat-v4.3.html#allocation-of-esp32-pins

Could you take a look at what the problem might be?

Regards,

Send ListeningEvent from toggleOff (dialogueSession)
Enter Listening
Send ListeningEvent from toggleOff (playAudio)
Samplerate: 16000, Channels: 1, Format: 1, Bits per Sample: 16, Start: 44
Send PlayBytesEvent
Send BeginPlayAudioEvent in PlayBytesEvent
BeginPlayAudioEvent in Listening
Enter ListeningPlay
InitI2SSpeakerOrMic -> Speaker
Done
Send StreamAudioEvent
Send EndPlayAudioEvent in StreamAudioEvent
EndPlayAudioEvent in ListeningPlay        
Enter Listening
InitI2SSpeakerOrMic -> Mic
Send IdleEvent from toggleOn (playAudio)
IdleEvent in Listening
Enter Idle
Send IdleEvent from toggleOn (dialogueSession)
Send ErrorEvent from errorTopic
Enter Error
Send ListeningEvent from toggleOff (playAudio)
Samplerate: 16000, Channels: 1, Format: 1, Bits per Sample: 16, Start: 44
Send PlayBytesEvent
Send BeginPlayAudioEvent in PlayBytesEvent
BeginPlayAudioEvent in Error
Enter ErrorPlay
InitI2SSpeakerOrMic -> Speaker
Done
Send StreamAudioEvent
Send EndPlayAudioEvent in StreamAudioEvent
EndPlayAudioEvent in ErrorPlay
Enter Error
InitI2SSpeakerOrMic -> Mic
Send IdleEvent from toggleOn (playAudio)
IdleEvent in Error
Enter Idle
Send IdleEvent from toggleOn (dialogueSession)
@Romkabouter
Copy link
Owner

Hi @Omirax, I do not have such a device so I cannot test it myself. The code seems to work because the logging shows no error.

@Omirax
Copy link
Author

Omirax commented Dec 13, 2022

Hello!
Unfortunately, as I wrote earlier, only the headphone output works. It is possible that this is due to the fact that both ESP32-Lyrath microphones are connected to the ES8388 pin 23/24. While contacts 21/22/23/24 are used on AI

Send ListeningEvent from toggleOff (playAudio)
Samplerate: 16000, Channels: 1, Format: 1, Bits per Sample: 16, Start: 44
Send PlayBytesEvent
Send BeginPlayAudioEvent in PlayBytesEvent
BeginPlayAudioEvent in Error
Enter ErrorPlay

Send IdleEvent from toggleOn (dialogueSession)
Send ErrorEvent from errorTopic
Enter Error

This is ok?

@Romkabouter
Copy link
Owner

Yes, that is ok. That is the state of the state machine.
Your intent was not recognised (no mic is working) and then Rhasspy sends an error (+sound)
That is the logging you see.

It is possible that there is a problem with the pinouts difference, your link at the top is not for the board with ES8388, is that correct?

@Omirax
Copy link
Author

Omirax commented Dec 14, 2022

ESP32-Lyrat V4.3 - board with ES8388
https://dl.espressif.com/dl/schematics/ESP32-LYRAT_V4.3-20220119.pdf

@Omirax
Copy link
Author

Omirax commented Dec 22, 2022

I found all the little problems and shortcomings with the volume and playback quality.
But I still couldn't figure out why the microphones aren't activated.

@Romkabouter Maybe you have some ideas?

@Omirax
Copy link
Author

Omirax commented Dec 24, 2022

@Romkabouter
Work with es8388_write_reg(ES8388_ADDR, ES8388_ADCCONTROL3, 0x02);

@Romkabouter
Copy link
Owner

Well, PR's are welcome but I do not have such a device so I cannot test it and therefore will not change code myself

@Omirax
Copy link
Author

Omirax commented Dec 26, 2022

#define ES8388_ADCCONTROL3 0x0b
...
ES8388 User Guide: es8388_write( 0x0B 0x02); // Reg 0x0B = 0x02 (Select LIN1and RIN1 as differential input pairs)
ESP32-LyraT Use only LIN1and RIN1 for mic input. LIN2and RIN2 - for AUX
https://dl.espressif.com/dl/schematics/ESP32-LYRAT_V4.3-20220119.pdf

@Romkabouter
Copy link
Owner

@Omirax Are you still trying to find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants