Announcement

Collapse
No announcement yet.

ANNOUNCE: Squeezelite-ESP32 (dedicated thread)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CJS
    replied
    Originally posted by sle118 View Post
    The WM8804 is a bit on the expensive side for what it's worth. The PCM9211 is cheaper and for digital out, it is likely just fine
    Instead of buying an IC it may be a better idea to buy an I2S to SPDIF converter board with the IC mounted on it, For example this one:
    DYKB I2S to SPDIF coaxial Fiber output board/IIS input coaxial output support sampling 44.1K~192K I2S to COAX OPT - AliExpress

    I can't read the type number, but I do recognize the Wolfson logo on the IC. So it is probably a WM8804 or WM8805. Board with chip does not cost much more than only the chip.

    When buying a board be sure to buy an I2S to SPDIF converter board. There are also SPDIF to I2S converter boards that use the same chip (i.e. WM8804), but these boards cannot be used to create an SPDIF output.

    Leave a comment:


  • sle118
    replied
    Originally posted by CJS View Post
    Just for information, for I2S to SPDIF conversion the PolyVection DIGI32 uses the TI PCM9211 IC. Another option is the Wolfson / Cirrus Logic WM8804. This IC is used in multiple Hifiberry SPDIF HAT boards for the Raspberry Pi.
    The WM8804 is a bit on the expensive side for what it's worth. The PCM9211 is cheaper and f for digital out, it is likely just fine

    Leave a comment:


  • philippe_44
    replied
    Originally posted by df77 View Post
    Based on Philippe's explanation I understand that this only affects digital output without a dedicated circuit. And even if the I2S backend can be optimised or fixed, the digital outputs could still be sensitive to introduce some jitter. Therefore I would rather avoid this now and use a dedicated IC, like in the DIGI32.
    No this has nothing to do with jitter. I2S works with the pll of the esp32 and uses DMA, so all this is way above any precision you might need or can hear. The problem is due to the fact that I don’t have time to replenish the buffers that are sent over DMA.
    Last edited by philippe_44; 2023-05-31, 17:33.

    Leave a comment:


  • CJS
    replied
    Originally posted by df77 View Post
    Based on Philippe's explanation I understand that this only affects digital output without a dedicated circuit. And even if the I2S backend can be optimised or fixed, the digital outputs could still be sensitive to introduce some jitter. Therefore I would rather avoid this now and use a dedicated IC, like in the DIGI32.
    Just for information, for I2S to SPDIF conversion the PolyVection DIGI32 uses the TI PCM9211 IC. Another option is the Wolfson / Cirrus Logic WM8804. This IC is used in multiple Hifiberry SPDIF HAT boards for the Raspberry Pi.

    Leave a comment:


  • df77
    replied
    Based on Philippe's explanation I understand that this only affects digital output without a dedicated circuit. And even if the I2S backend can be optimised or fixed, the digital outputs could still be sensitive to introduce some jitter. Therefore I would rather avoid this now and use a dedicated IC, like in the DIGI32.

    Leave a comment:


  • philippe_44
    replied
    Originally posted by Rasputin_GY View Post
    I have a question regarding ESP32 (ESP32-DEVKITC-VE using 16 - I2S-4MFlash-1317) /SPDIF(optical) I wired it the following:

    ESP32 - SPDIF
    3,3V -> Vcc
    32 -> Vin
    GND -> GND

    autoexec1: squeezelite -o spdif -b 500:2000 -C 30 -d all=info
    spdif_config: bck=33,ws=25,do=32

    The transmitters data sheet also suggests a 0.1uF capacitor between Vcc and GND which I also put in place.
    While I can play many radio stations through LMS without an issue I encounter constant stutter while playing music using Spotify (cspot).
    I already tried different optical cables but that doesn't seem to be the issue. My amplifier has small indicator on its display saying DIGI./PCM and this one blinks exact same rate as the audio stutters.
    As soon as I end using Spotify eg switch to radio paradise no stutter anymore.
    I'm a little bit confused what might cause this and would like to ask if someone has an idea?
    I had a better look at the issue and although it is not a CPU load problem, it is a complex scheduling situation that happens because we have very few DMA buffers for I2S and we can't increase them significantly. Fixing the issue I think it is requires a rewrite of the I2S backend. The mainline is not a big issue but then when you want to add synchronization it's a whole different problem. I will continue to think about it but because of the sync problem, I'm not very keen to start that.

    Leave a comment:


  • CJS
    replied
    Originally posted by cubii View Post
    concerning the x400:
    connected to an esp32 the volume control (hardware poti) works ...
    perhaps it uses a different approach to control the volume?
    It appears that we had a misunderstanding about hardware volume control .

    When I was talking about hardware volume control in post numbers 1910 and 1912, I was referring to the digital volume control function inside the PCM5122 DAC chip. This I2C controlled digital volume control is located in front of the actual D to A converter function. See PCM5122 datasheet, section 8.2 (Functional Block Diagram). With this hardware volume control function, the audio volume can be controlled between -103dB and +24dB in steps of 0.5dB (see section 8.3.5.4 of the datasheet). The default setting (power-on reset value) is 0dB. What I meant to say is that the squeezelite-esp32 software does not make use of this I2C controlled digital volume control inside the PCM5122 chip. Instead, squeezelite-esp32 uses software volume control. In case of the PCM5122 it does not make a difference for the audio quality if software volume control is used inside the squeezelite-esp32 software, or hardware volume control inside the PCM5122. Software volume control is a multiplier function in software, and hardware volume control is a multiplier function in hardware. In both cases the multiplier function is located in front of the actual D to A converter. Assuming that software and hardware multiplication is done with similar precision, audio quality will be similar.

    It appears that you are talking about a manual analog volume control by means of a stereo potentiometer on the X400 board . I did not know there was a potentiometer on the X400 board . I assume that this potentiometer is connected between the output of the PCM5122 DAC chip and the input of the Class-D Power amplifier chip. Indeed this manual volume control will always work, only it cannot be remote controlled.
    Last edited by CJS; 2023-05-26, 17:32.

    Leave a comment:


  • cubii
    replied
    concerning the x400:

    connected to an esp32 the volume control (hardware poti) works ...

    perhaps it uses a different approach to control the volume?

    Leave a comment:


  • sle118
    replied
    Originally posted by philippe_44 View Post

    Well, I had a SqueezeAMP with me so I did a quick test of spotify and spdif and from a CPU load point of view, everything seems to be fine. I can't do an audio test unfortunately as I don't have anything that would accept optical input.
    And I did have a conversation today with Philippe where he asked me to actually test a couple of things like increasing the priority of the i2s output task. In all cases, I confirm that this is a software issue and that Philippe has a plan to fix it.

    Leave a comment:


  • philippe_44
    replied
    Originally posted by philippe_44 View Post

    If you took the latest build from actions, then you really have the upmost update. There is not much I can do
    Well, I had a SqueezeAMP with me so I did a quick test of spotify and spdif and from a CPU load point of view, everything seems to be fine. I can't do an audio test unfortunately as I don't have anything that would accept optical input.

    Leave a comment:


  • philippe_44
    replied
    Originally posted by Rasputin_GY View Post
    Uh I honestly can't tell if your optimizations went public already but I initially flashed latest release I2S-4MFlash.16.1306.master-v4.3 and afterwards flashed most recent squeezelite.bin from latest action build .
    Is there a better way/configuration/wiring to run SPDIF/Toslink only or anything you might suggest me to try ?
    If you took the latest build from actions, then you really have the upmost update. There is not much I can do

    Leave a comment:


  • CJS
    replied
    Originally posted by Rasputin_GY View Post
    Is there a better way/configuration/wiring to run SPDIF/Toslink only or anything you might suggest me to try ?
    If I understand correctly, SPDIF out uses more CPU power than I2S out, and the combination of SPDIF out and cspot (Spotify Connect function) seems to overload the ESP32 CPU.

    Since you have LMS running, you can also listen to Spotify through LMS by installing the Spotty plugin on LMS, and selecting Spotify tracks via the LMS user interface that you are using. Did you try that? And can you confirm that in this case there is no stutter?

    Leave a comment:


  • Rasputin_GY
    replied
    Uh I honestly can't tell if your optimizations went public already but I initially flashed latest release I2S-4MFlash.16.1306.master-v4.3 and afterwards flashed most recent squeezelite.bin from latest action build .
    Is there a better way/configuration/wiring to run SPDIF/Toslink only or anything you might suggest me to try ?

    Leave a comment:


  • philippe_44
    replied
    Originally posted by Rasputin_GY View Post
    I have a question regarding ESP32 (ESP32-DEVKITC-VE using 16 - I2S-4MFlash-1317) /SPDIF(optical) I wired it the following:

    ESP32 - SPDIF
    3,3V -> Vcc
    32 -> Vin
    GND -> GND

    autoexec1: squeezelite -o spdif -b 500:2000 -C 30 -d all=info
    spdif_config: bck=33,ws=25,do=32

    The transmitters data sheet also suggests a 0.1uF capacitor between Vcc and GND which I also put in place.
    While I can play many radio stations through LMS without an issue I encounter constant stutter while playing music using Spotify (cspot).
    I already tried different optical cables but that doesn't seem to be the issue. My amplifier has small indicator on its display saying DIGI./PCM and this one blinks exact same rate as the audio stutters.
    As soon as I end using Spotify eg switch to radio paradise no stutter anymore.
    I'm a little bit confused what might cause this and would like to ask if someone has an idea?
    Ah... that's a configuration I've not tested, so you might very well hit a CPU limitation because cspot is eating a fair bit of it. Have you tried to update to the latest version? I've done a few optimizations but I don't remember if I released them "officially"

    Leave a comment:


  • Rasputin_GY
    replied
    I have a question regarding ESP32 (ESP32-DEVKITC-VE using 16 - I2S-4MFlash-1317) /SPDIF(optical) I wired it the following:

    ESP32 - SPDIF
    3,3V -> Vcc
    32 -> Vin
    GND -> GND

    autoexec1: squeezelite -o spdif -b 500:2000 -C 30 -d all=info
    spdif_config: bck=33,ws=25,do=32

    The transmitters data sheet also suggests a 0.1uF capacitor between Vcc and GND which I also put in place.
    While I can play many radio stations through LMS without an issue I encounter constant stutter while playing music using Spotify (cspot).
    I already tried different optical cables but that doesn't seem to be the issue. My amplifier has small indicator on its display saying DIGI./PCM and this one blinks exact same rate as the audio stutters.
    As soon as I end using Spotify eg switch to radio paradise no stutter anymore.
    I'm a little bit confused what might cause this and would like to ask if someone has an idea?

    Leave a comment:

Working...
X