Hi, this one:
Announcement
Collapse
No announcement yet.
ANNOUNCE: Squeezelite-ESP32 (dedicated thread)
Collapse
X
-
Hi, this one:
https://de.aliexpress.com/item/10050...5a4d4c4dTmCDun
Note: The board is still V2.2; only the chip module seems to be different from old A1S boards. Maybe you can identify the new (ES8338)) A1S by the missing antenna connector. At the old (AC101) modules there should have been a connector. The pictures at aliexpress show the old version although they send the new version.Comment
-
Log:
Code:[0;32mI (6160) DAC core: DAC uses I2C port:0, sda:18, scl:23[0m [0;32mI (6170) DAC external: DAC on I2C @16[0m [0;32mI (6170) I2S: DMA Malloc info, datalen=blocksize=2048, dma_buf_count=12[0m [0;32mI (6180) I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0[0m [00:08:21.578279] output_init_i2s:318 i2s DAC using I2S bck:5, ws:25, do:26, mute:-1:0 (res:0) [00:08:21.589732] output_init_i2s:338 Initializing I2S mode normal with rate: 44100, bits per sample: 16, buffer frames: 512, number of buffers: 12 [00:08:21.601956] set_amp_gpio:180 setting amplifier GPIO 21 (active:1)
Tried also the permutation of i2c:
You can also try i2c = 32, 17 or 34
i2c=32; no sound
i2c=17; no sound
i2c=34; no soundLast edited by jofland; 2021-07-19, 19:47.Comment
-
Let us summarize the documentation for the ESP32-A1S with ES8388 we have so far:
Comment
-
I do not understand if this is only an example or why you chose these values?
This is the ES8388 specification from https://fccid.io/2AHMR-ESP32A1S/User...l-4883471.pdf:
If I read it right I would assume the corresponding part of the dac_config should be:
Code:model=i2s,[B]bck=27,ws=26,do=35,di=25,sda=33,scl=32[/B],i2c=17
Code:[0;31mE (6190) I2S: data_out_num error[0m [00:45:41.684769] output_init_i2s:318 i2s DAC using I2S bck:27, ws:26, do:35, mute:-1:0 (res:-1) [00:45:41.696215] output_init_i2s:325 no DAC configured
Code:model=i2s,bck=27,ws=26,[B]do=25,di=35[/B],sda=33,scl=32,i2c=17
Why is di missing in your dac_config?
Could you please explain where in the manual you found the number of the i2c parameter for the dac_config?Comment
-
Let us systematically start with the dac_config.
I do not understand if this is only an example or why you chose these values?
This is the ES8388 specification from https://fccid.io/2AHMR-ESP32A1S/User...l-4883471.pdf:
If I read it right I would assume the corresponding part of the dac_config should be:
Code:model=i2s,[B]bck=27,ws=26,do=35,di=25,sda=33,scl=32[/B],i2c=17
Code:[0;31mE (6190) I2S: data_out_num error[0m [00:45:41.684769] output_init_i2s:318 i2s DAC using I2S bck:27, ws:26, do:35, mute:-1:0 (res:-1) [00:45:41.696215] output_init_i2s:325 no DAC configured
Code:model=i2s,bck=27,ws=26,[B]do=25,di=35[/B],sda=33,scl=32,i2c=17
Why is di missing in your dac_config?
Could you please explain where in the manual you found the number of the i2c parameter for the dac_config?
and yes DO is 35, my bad (DI is optional)Last edited by philippe_44; 2021-07-19, 20:32.LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3Comment
-
Looking at 8388 datasheet ans espA1 schematics, you have, at least, to put the chip in slave mode reg8, bit7 = 1 and activate DAC reg4, bit 7,6 = 0 and 5,4 = 0 if you use out1 or 3,1 = 0 if you use out 2.
Seems to me you should write a a dac_controlset
Code:"init":[ {"reg":"4","val":128,"mode":"or"}, {"reg":"8","val":0} ]
I will keep my dac_config constant at:
Code:model=i2s,bck=27,ws=26,do=25,di=35,sda=33,scl=32,i2c=16
I read from the manual the following:
* put the chip in slave mode reg8, bit 7 = 0 (1 is for master mode)
* activate DAC reg4, bit 7,6 = 0
* for out1: reg4, bit 5,4 = 1 (0 is to disable)
* for out2: reg4, bit 3,2 = 1 (bit 1 is missing in the doc)
Maybe both outputs activated at same time is working?
So for reg4 I set bits 5, 4, 3, 2 to value 1 equals decimal 120. Is this correct?
Because I will set all 6 bits of reg4 explicitly I assume that I should use the keyword "or"?
Leads to
Code:"init":[{"reg":"4","val":120,"mode":"or"}, {"reg":"8","val":0}]
If I understood the readme right, if we set {"reg":"8","val":0} without the "mode" the whole bite would be written to 00000000. Right?
I do not know how to only set bit 7 without touching the other bits of reg8. Maybe it has to be "and" 11111110? Then it should be decimal 254.
Leads to
Code:"init":[{"reg":"4","val":120,"mode":"and"}, {"reg":"8","val":254,"mode":"and"}]
Code:[0;32mI (6150) DAC core: DAC uses I2C port:0, sda:33, scl:32[0m [0;32mI (6160) DAC external: DAC on I2C @16[0m [0;33mW (6160) DAC external: no i2c controlset found[0m [0;32mI (6170) I2S: DMA Malloc info, datalen=blocksize=2048, dma_buf_count=12[0m [0;32mI (6170) I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0[0m [01:32:13.823989] output_init_i2s:318 i2s DAC using I2S bck:27, ws:26, do:25, mute:-1:0 (res:0) [01:32:13.835468] output_init_i2s:338 Initializing I2S mode normal with rate: 44100, bits per sample: 16, buffer frames: 512, number of buffers: 12 [01:32:13.847832] set_amp_gpio:180 setting amplifier GPIO 21 (active:1) [01:32:13.859161] output_visu_init:75 Initialize VISUEXPORT 512 16 bits samples [01:32:13.859161] output_thread_i2s:452 Output state is -1 [01:32:13.860517] output_init_embedded:98 init completed. [01:32:13.872242] output_thread_i2s:456 switching off amp GPIO 21
==> Maybe someone else could do the next steps.Comment
-
Although I am not sure about the dac_config I would like to have a look at the dac_controlset yet. We need the documentation: http://www.everest-semi.com/pdf/ES8388%20DS.pdf
I will keep my dac_config constant at:
Code:model=i2s,bck=27,ws=26,do=25,di=35,sda=33,scl=32,i2c=16
I read from the manual the following:
* put the chip in slave mode reg8, bit 7 = 0 (1 is for master mode)
* activate DAC reg4, bit 7,6 = 0
* for out1: reg4, bit 5,4 = 1 (0 is to disable)
* for out2: reg4, bit 3,2 = 1 (bit 1 is missing in the doc)
Maybe both outputs activated at same time is working?
So for reg4 I set bits 5, 4, 3, 2 to value 1 equals decimal 120. Is this correct?
Because I will set all 6 bits of reg4 explicitly I assume that I should use the keyword "or"?
Leads to
Code:"init":[{"reg":"4","val":120,"mode":"or"}, {"reg":"8","val":0}]
If I understood the readme right, if we set {"reg":"8","val":0} without the "mode" the whole bite would be written to 00000000. Right?
I do not know how to only set bit 7 without touching the other bits of reg8. Maybe it has to be "and" 11111110? Then it should be decimal 254.
Leads to
Code:"init":[{"reg":"4","val":120,"mode":"and"}, {"reg":"8","val":254,"mode":"and"}]
Code:[0;32mI (6150) DAC core: DAC uses I2C port:0, sda:33, scl:32[0m [0;32mI (6160) DAC external: DAC on I2C @16[0m [0;33mW (6160) DAC external: no i2c controlset found[0m [0;32mI (6170) I2S: DMA Malloc info, datalen=blocksize=2048, dma_buf_count=12[0m [0;32mI (6170) I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0[0m [01:32:13.823989] output_init_i2s:318 i2s DAC using I2S bck:27, ws:26, do:25, mute:-1:0 (res:0) [01:32:13.835468] output_init_i2s:338 Initializing I2S mode normal with rate: 44100, bits per sample: 16, buffer frames: 512, number of buffers: 12 [01:32:13.847832] set_amp_gpio:180 setting amplifier GPIO 21 (active:1) [01:32:13.859161] output_visu_init:75 Initialize VISUEXPORT 512 16 bits samples [01:32:13.859161] output_thread_i2s:452 Output state is -1 [01:32:13.860517] output_init_embedded:98 init completed. [01:32:13.872242] output_thread_i2s:456 switching off amp GPIO 21
==> Maybe someone else could do the next steps.LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3Comment
-
If I understood the readme right, if we set {"reg":"8","val":0} without the "mode" the whole bite would be written to 00000000. Right?
I do not know how to only set bit 7 without touching the other bits of reg8. Maybe it has to be "and" 11111110? Then it should be decimal 254.
Leads to
Code:"init":[{"reg":"4","val":120,"mode":"and"}, {"reg":"8","val":254,"mode":"and"}]
Any "1" bit in the "val" field leaves the corresponding register bit alone.
{"reg":"4","val":120,"mode":"and"} 120 equates to 01111000, so after execution bits 0, 1, 2, and 7 will be "0" in register 4. All other bits will remain
unchanged.
"or" is used to turn individual bits on. Any "1" bit in the "val" field will result in a "1" in the corresponding bit in the register.
Any "0" bit in the "val" field leaves the corresponding register bit alone.
{"reg":"4","val":120,"mode":"or"} 120 equates to 01111000, so after execution bits 3, 4, 5, and 6 will be "1" in register 4. All other bits will remain
unchanged.
Been a LONG time since my S/370 Assembler days, but I think I have that right.
MikeComment
-
Thank you. I have not been programming assembler for over 20 years. And I was not very good in it at all.
So let us summarize what we have:
* do should be 35
* values in quotes; eg: {"reg":"4","val":"60"}
* setting one bit just without the keyword "mode"
* switch off bits with "and"/0
* switch on bits with "or"/1
Let us try something:
If I set do to 35 I get:
Code:[0;31mE (6220) I2S: data_out_num error[0m [00:20:28.171233] output_init_i2s:318 i2s DAC using I2S bck:27, ws:26, do:35, mute:-1:0 (res:-1) [00:20:28.172569] output_init_i2s:325 no DAC configured
Code:[00:30:47.293148] output_init_i2s:318 i2s DAC using I2S bck:27, ws:26, do:25, mute:-1:0 (res:0) [00:30:47.304628] output_init_i2s:338 Initializing I2S mode normal with rate: 44100, bits per sample: 16, buffer frames: 512, number of buffers: 12
Setting the registers; I will start with the default settings of the manual:
* reg8 default 10000000: Only setting bit7 = 0; leave all other bits untouched leads to: 00000000 = {"reg":"8","val":"0"}
* reg4 default 11000000: Inverting the whole bite, except bit0 and bit1 (unsused): both DACs power up; both outputs on both channels enabled: 00111100 = {"reg":"4","val":"60"}
So I do not need the keyword "mode". Leads toCode:"init":[{"reg":"8","val":"0"}, {"reg":"4","val":"60"}]
Comment
-
Could you please explain where in the manual you found the number of the i2c parameter for the dac_config?
What does the i2c parameter mean within the dac_config? Is this the i2c address or something else?
If it would be the address, should´nt it be 0x10 as this post said?
Last edited by jofland; 2021-07-20, 17:32.Comment
-
Thank you. I have not been programming assembler for over 20 years. And I was not very good in it at all.
So let us summarize what we have:
* do should be 35
* values in quotes; eg: {"reg":"4","val":"60"}
* setting one bit just without the keyword "mode"
* switch off bits with "and"/0
* switch on bits with "or"/1
Leave the quotes off the value you are changing to...
{"reg":"4","val":60}
Have you played with the register functions in the browser UI? You can display/change resisters from there as well.
It's in the Advanced section.
MikeLast edited by mboxler; 2021-07-20, 18:29.Comment
-
Could you please explain where in the manual you found the number of the i2c parameter for the dac_config?
I cannot find the number of the i2c parameter of dac_config in this document. In which section did you see it?
What does the i2c parameter mean within the dac_config? Is this the i2c address or something else?
If it would be the address, should´nt it be 0x10 as this post said?
From the ES8388 User Guide
The chip address for I2C is 0x20 if CE pin is pulled down to DGND. The chip address for I2C is 0x22 if CE pin is pulled up to PVDD.
Maybe this will work in dac_config???
model=I2S,bck=27,ws=26,do=25,sda=33,scl=32,i2c=32
MikeLast edited by mboxler; 2021-07-20, 18:54.Comment
-
LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3Comment
Comment