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

No line out, only headphone working on an ESP32 A1S audiokit board, V2.2 A149, ES8388, 2974 #117

Open
KlausMu opened this issue Apr 4, 2022 · 8 comments

Comments

@KlausMu
Copy link

KlausMu commented Apr 4, 2022

Hi,

I successfully compiled and flashed cspot on an ESP32 A1S audiokit board, V2.2 A149, ES8388, 2974.
So far everything works well, I can connect and play Spotify. Great!

But only headphones are working, line out is not working.
Is there anything I can do about this?

Thanks in advance
Klaus

@HeikoGr
Copy link
Contributor

HeikoGr commented Apr 5, 2022

glad to read you managed to compile cspot. i can reproduce your lineout 'experience'.

you can test euphonium: https://github.com/feelfreelinux/euphonium cspot is integrated there and line out is working over there (but no headphone...). But it's more difficult to get it up an running if you are using a windows pc.

For a deep dive in you can compare the slightly different drivers:

line out not working / headphone working:
https://github.com/feelfreelinux/bell/blob/4beaacf8c917255b6ac8219e82bc7a3c920a9b62/src/sinks/esp/ES8388AudioSink.cpp

line out working / headphone not working:
https://github.com/feelfreelinux/euphonium/blob/de9a20fd4e10e1719d265d36c649563d3b9a663e/euphonium/scripts/esp32/dacs/es8388_driver.be

the necessary registers are described here:
http://www.everest-semi.com/pdf/ES8388%20DS.pdf

i would be glad if we could get lineout working.

@KlausMu
Copy link
Author

KlausMu commented Apr 5, 2022

Thanks for the hint. I gave Euphonium a try.
0.2.0 I cannot use, because of the missing DAC settings plugin
In 0.1.5 both headphone and line out are working at the same time. This version is a little bit unstable, maybe 0.2.0 is already better.

@feelfreelinux
Copy link
Owner

Thanks for the hint. I gave Euphonium a try. 0.2.0 I cannot use, because of the missing DAC settings plugin In 0.1.5 both headphone and line out are working at the same time. This version is a little bit unstable, maybe 0.2.0 is already better.

Release v0.2.1 with a fix. I'd love to hear feedback about stability! I'm trying to speed up the development of euphonium currently to resolve such issues.

@KlausMu
Copy link
Author

KlausMu commented Apr 5, 2022

Thanks for the new release, v0.2.1 is running now on my audiokit board. Bluetooth seems to be better, with 0.1.5 no connection was possible. But cspot still seems to be unstable. When surfing through different songs, playing every song for some seconds, after the fifth song or so, cspot crashes.

@feelfreelinux
Copy link
Owner

Thanks for the new release, v0.2.1 is running now on my audiokit board. Bluetooth seems to be better, with 0.1.5 no connection was possible. But cspot still seems to be unstable. When surfing through different songs, playing every song for some seconds, after the fifth song or so, cspot crashes.

thanks for feedback! Can you provide me with the songs / playlists where the software crashes?

@KlausMu
Copy link
Author

KlausMu commented Apr 6, 2022

I think it is not related to any song or playlist. I really get it quite soon when I try to reproduce it. Just take any album and jump around in the songs. Sometimes it is needed to change the album, but I can reproduce it in less than a minute.

With cspot I get something like this:
D SpircController.cpp:50: External play command
D MercuryManager.cpp:296: executing MercuryType SEND
I ChunkedByteStream.cpp:82: Chunk not loaded, waiting for 0
D AudioChunkManager.cpp:96: ID: 23: finalize chunk!
D AudioChunkManager.cpp:83: ID: 24: header finalize!
D AudioChunkManager.cpp:96: ID: 24: finalize chunk!
D AudioChunkManager.cpp:83: ID: 25: header finalize!
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x400fd06c PS : 0x00060e30 A0 : 0x800fd22d A1 : 0x3f8233f0
A2 : 0x00000001 A3 : 0xd98234c8 A4 : 0x0000001b A5 : 0xb33fffff
A6 : 0x3f848a20 A7 : 0x00000008 A8 : 0x00000014 A9 : 0x00000014
A10 : 0x00000000 A11 : 0x3f8234d0 A12 : 0x00000098 A13 : 0x00000014
A14 : 0x00000000 A15 : 0x00000008 SAR : 0x00000001 EXCCAUSE: 0x0000001c
EXCVADDR: 0xd98234c8 LBEG : 0x400fd01e LEND : 0x400fd12b LCOUNT : 0x0000000f

Backtrace:0x400fd069:0x3f8233f00x400fd22a:0x3f8234c0 0x400fd5b9:0x3f823700 0x400fb7a9:0x3f823770 0x400f83ce:0x3f8237b0 0x400f8896:0x3f823800 0x400f8eaf:0x3f823820 0x400ec1a1:0x3f823850 0x400e8ce9:0x3f8238d0 0x400d86d6:0x3f823920

In euphonium I get something like this (core dump shortened)
D [cspot] AudioChunkManager.cpp:96: ID: 90: finalize chunk!
D [cspot] MercuryManager.cpp:213: Received packet with code 181 of length 789
D [cspot] SpircController.cpp:149: Load frame!
I [cspot] PlayerState.cpp:144: ---- Track count 5
CORRUPT HEAP: multi_heap.c:108 detected at 0x3ffe436c

abort() was called at PC 0x4009bfac on core 0

Backtrace:0x40082489:0x3f84aa600x400968e9:0x3f84aa80 0x4009c365:0x3f84aaa0 0x4009bfac:0x3f84ab10 0x4009c09b:0x3f84ab30 0x400828d5:0x3f84ab50 0x4009c485:0x3f84ab70 0x401433a2:0x3f84ab90 0x4013e7c6:0x3f84abf0 0x4013e936:0x3f84ac90 0x40139a37:0x3f84acc0 0x4013b6e2:0x3f84ace0 0x401320f2:0x3f84ad60 0x401321fe:0x3f84adf0 0x400dae86:0x3f84ae10

ELF file SHA256: 7733f97eac86787c

I (17892) esp_core_dump_uart: Press Enter to print core dump to UART...
I (3) esp_core_dump_uart: Print core dump to uart...
================= CORE DUMP START =================
kJgAAAABAAAAAAAAAAAAAAAAAAA=
f0VMRgEBAQAAAAAAAAAAAAQAXgABAAAAAAAAADQAAAAAAAAAAAAAADQAIAA2ACgA

@feelfreelinux
Copy link
Owner

I think it is not related to any song or playlist. I really get it quite soon when I try to reproduce it. Just take any album and jump around in the songs. Sometimes it is needed to change the album, but I can reproduce it in less than a minute.

With cspot I get something like this: D SpircController.cpp:50: External play command D MercuryManager.cpp:296: executing MercuryType SEND I ChunkedByteStream.cpp:82: Chunk not loaded, waiting for 0 D AudioChunkManager.cpp:96: ID: 23: finalize chunk! D AudioChunkManager.cpp:83: ID: 24: header finalize! D AudioChunkManager.cpp:96: ID: 24: finalize chunk! D AudioChunkManager.cpp:83: ID: 25: header finalize! Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump: PC : 0x400fd06c PS : 0x00060e30 A0 : 0x800fd22d A1 : 0x3f8233f0 A2 : 0x00000001 A3 : 0xd98234c8 A4 : 0x0000001b A5 : 0xb33fffff A6 : 0x3f848a20 A7 : 0x00000008 A8 : 0x00000014 A9 : 0x00000014 A10 : 0x00000000 A11 : 0x3f8234d0 A12 : 0x00000098 A13 : 0x00000014 A14 : 0x00000000 A15 : 0x00000008 SAR : 0x00000001 EXCCAUSE: 0x0000001c EXCVADDR: 0xd98234c8 LBEG : 0x400fd01e LEND : 0x400fd12b LCOUNT : 0x0000000f

Backtrace:0x400fd069:0x3f8233f00x400fd22a:0x3f8234c0 0x400fd5b9:0x3f823700 0x400fb7a9:0x3f823770 0x400f83ce:0x3f8237b0 0x400f8896:0x3f823800 0x400f8eaf:0x3f823820 0x400ec1a1:0x3f823850 0x400e8ce9:0x3f8238d0 0x400d86d6:0x3f823920

In euphonium I get something like this (core dump shortened) D [cspot] AudioChunkManager.cpp:96: ID: 90: finalize chunk! D [cspot] MercuryManager.cpp:213: Received packet with code 181 of length 789 D [cspot] SpircController.cpp:149: Load frame! I [cspot] PlayerState.cpp:144: ---- Track count 5 CORRUPT HEAP: multi_heap.c:108 detected at 0x3ffe436c

abort() was called at PC 0x4009bfac on core 0

Backtrace:0x40082489:0x3f84aa600x400968e9:0x3f84aa80 0x4009c365:0x3f84aaa0 0x4009bfac:0x3f84ab10 0x4009c09b:0x3f84ab30 0x400828d5:0x3f84ab50 0x4009c485:0x3f84ab70 0x401433a2:0x3f84ab90 0x4013e7c6:0x3f84abf0 0x4013e936:0x3f84ac90 0x40139a37:0x3f84acc0 0x4013b6e2:0x3f84ace0 0x401320f2:0x3f84ad60 0x401321fe:0x3f84adf0 0x400dae86:0x3f84ae10

ELF file SHA256: 7733f97eac86787c

I (17892) esp_core_dump_uart: Press Enter to print core dump to UART... I (3) esp_core_dump_uart: Print core dump to uart... ================= CORE DUMP START ================= kJgAAAABAAAAAAAAAAAAAAAAAAA= f0VMRgEBAQAAAAAAAAAAAAQAXgABAAAAAAAAADQAAAAAAAAAAAAAADQAIAA2ACgA

ok, new master should improve stability. will make proper release this wekend.

@KlausMu
Copy link
Author

KlausMu commented Apr 8, 2022

Already tried it with cspot. A lot better, no more crashes so far, thanks!
Only two minor issues:

  • when manually changing a song, there is always a short cracking that can be heared between the songs. Maybe it is possible to mute and only playback when audio is valid
  • sometimes (every 10th song or so) when switching to a new song, it plays for the first two seconds, then a one second break, then song continuous
    But as said, only minor issues ...

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

3 participants