Press "Enter" to skip to content

SqueezeCore: a minimal audio OS running Squeezelite.

The purpose of this project:

I built SqueezeCore because I needed a lightweight, minimal, plug&play OS to use it as a squeezelite player. The whole OS is 17MB and when running it occupies around 60MB of RAM; SqueezeCore must be installed on a USB drive and will run completely in RAM. Perfect to be installed on a thin client!

Requirements

  • RAM: 128MB
  • CPU: 32bit or 64bit, every CPU is ok, it can run on a toaster too
  • USB flash drive: 32MB
  • An ethernet port
  • A monitor for first setup (optional)
  • A keyboard for first setup (optional)
  • A computer running Logitech Media Server

Installation:

Download SqueezeCore .IMG from here: SqueezeCore
Flash the .IMG using Etcher or a similar software

Which version should I download?

1st rule: if you are unsure download the generic .img. It is usually more stable, and has less specific hardware requirements.
If you want to try the RT version please read all the FAQs before. Since the generic image is stable enough all the development will be on the RT.

Changelog

—Generic—
v0.1-ALPHA: initial release
v0.2-BETA: fixed a bug that caused squeezelite not being able to lock on the specified output device
v0.3-BETA: minor fixes
v1.0-STABLE: added support for static ip
v1.1-STABLE: added more debug options. Fixed a network bug
—Real Time Kernel—
v0.1-RT-BETA: initial release
v0.2-RT-BETA: added support to setup static ip
v0.3-RT-BETA: candidate release. added more debug info

First Setup:

Using monitor and keyboard (recommended):

Plug into your computer the USB flash drive with SqueezeCore, an ethernet cable (wifi not supported at the moment), a keyboard and a monitor.
Power on and boot from USB.
Now you will have to enter some squeezelite settings like: what audio device use as output, buffer settings and so on; if you have any doubts leave all settings as default and just select your audio output device. (Important: read carefully the options during the setup)
From now on every time you power on your computer squeezelite will start at boot with the defined settings.

Headless setup:

Plug the SqueezeCore USB drive to your computer. Create a file named squeeze.conf inside the “/config” directory. Open squeeze.conf with Notepad++ (or a similar editor that allows you to set the UNIX(LF) newline) and insert the squeezelite options following this example:

Output=hw:CARD=UD501,DEV=0 #1st line: output device
PlayerName=SqueezeCore         #2nd line: Player Name
ModelName=SqueezeCore           #3rd line: Model Name
Server=                                     #4th line: [server_address:port], empty to autodiscover
AlsaParams=40:4::0                  #5th line: ALSA parameters [buffer:period_count:sample_format:mmap]
Buffer=4096:3072                      #6th line: [stream_buffer:output_buffer]
Priority=45                                 #7th line: process priority [1-99]
 AdditionalOptions=                  #8th line: [OPTIONAL] additional commands

In the same way create a file named network.conf with the following syntax:

IP=192.168.1.200
Netmask=255.255.255.0 
Broadcast=192.168.1.255
DefaultRoute=192.168.1.1 

In the IP field you can type DHCP to automatically get an IP address, in this case leave all the other fields empty. See example:

IP=DHCP
Netmask= 
Broadcast=
DefaultRoute= 

Save, plug your SqueezeCore USB flash drive to your PC, power on, profit!

F.A.Q.

I want bit-perfect audio but in the output device list my dac does not appear as “hw:CARD=card_name” but only “default:CARD=card_name”
You can try to type 0 during output selection to not choose any option, then, in additional options (last question) type “-o hw:CARD=card_name,DEV=0”

I want to reset my configuration! How can I do it?
Directly on SqueezeCore: “rm -f /squeezecore/config/squeeze.conf && sync”
From Windows: delete /config/squeeze.conf

But, what about the RT version?
It is a specific build with a custom Real Time kernel; the hardware requirements are different from the generic version:
Minimal Hardware Requirements for RT:
CPU: Only Intel, Only Core2Duo and newer (Xeon, Core i3 i5 i7, new Pentium and Celeron). 2 core 4 thread (recommended 4 physical cores).
The Other requirements are the same of the generic one.

In the RT version the difference is not only in the kernel but there are other tweaks under the hood like:
The player runs on a isolated core with round robin scheduler.
All the DAC USB interrupts are isolated on one core.
The remaining core are for kernel and the remaining interrupts and software running.

Since the RT version has more strict hardware requirements do you have any suggestion for the hardware setup?
I really like mini-ITX and thin-ITX motherboards with Pentium and Celeron N-series (like N3160) or J-series (like j4105 j3455). Those models have 4 cores and very low power consuption.
About bios settings you can try to disable multi-threading and C-states (but I really don’t know if this can affect the sound performance, you can try and come back here to write your feedback)

Thanks to:

  • Marco Curti for Squeezelite-R2
  • TinyCoreLinux team for their awesome distro. Squeezecore is based on Tinycorelinux.

If you are using SqueezeCore and you like it consider to buy me a coffee: paypal.me

31 Comments

  1. Luca Marchetti Luca Marchetti 10 Febbraio 2020

    ciao lo sto provando, intanto devo che i dsd non li riproduce esatto? altrimenti sbaglio io. grazie cmq funziona da dio velocissimo bravo

    • Simone Simone 10 Febbraio 2020

      Ciao Luca! Ho appena testato e i DSD li riproduce senza problemi, sia in DSD nativo che in DoP. Quindi possiamo provare a risolvere, ti chiedo qualche informazione così da capire dove è il problema:
      Il file che stai riproducendo è in formato .dsf?
      Che DAC stai utilizzando, è connesso in USB?
      Collega la chiavetta di SqueezeCore al tuo computer, nella cartella “config” è presente il file “squeeze.conf”, aprilo con il blocco note e copiane il contenuto e scrivimelo.
      Grazie mille!

  2. Luca Marchetti Luca Marchetti 13 Febbraio 2020

    Ciao come dac uso un topping d30 legge in nativo fino a dsd 128. Si i file sono dsf, appena riesco Ti giro il contenuto del file. Grazie

  3. Luca Marchetti Luca Marchetti 13 Febbraio 2020

    default:CARD=D30
    SqueezeCore
    SqueezeCore
    auto
    40:4::0
    4096:4096
    45

    eccoti il contenuto del file
    ciao

    • Simone Simone 14 Febbraio 2020

      prova a sostituire default:CARD=D30 con hw:CARD=D30,DEV=0

  4. Luca Marchetti Luca Marchetti 14 Febbraio 2020

    perfetto funziona adesso, ora provo a far comparazione con daphile usando lo stesso server e cambiando il player. grazie ancora.

    • Simone Simone 14 Febbraio 2020

      Perfetto, tieni d’occhio la pagina che entro 7/10gg dovrei rilasciare una nuova versione!

  5. Marcus Marcus 20 Ottobre 2020

    Hi Nice work it really is simple to get going, I had several HP thin clients lying around and instead of installing ubuntu I just use this on the internal drive. Using Ubuntu usb stick to boot and dd command to setup your image in the internal drive. Superb work I would though prefer a separate dialog question for the palyer name now it sett as an option -n name. Is there anyway to see volumes in this distro i tried alsa and ossmix but nothing exsist. I assuem pretty much everything is clened out to make it som small, but could be interesting to know which commands exist.

    • Simone Simone 22 Giugno 2021

      The script at start-up already lists any audio devices available

  6. Marcus Karlsson Marcus Karlsson 21 Ottobre 2020

    Hi nice work I had a bunch och HP thin clients lying around and instead of installing ubuntu and the run squeexelite player this comes more handy. I have 2 problems thoug I have installed image on clients built in flash memory and it all starts and run first time after removing config file but after reboot it shows up it server but doesn’t get any audio output.

    Second question is about master volume that boots up to 55% and I can set it ti 100 with amixer sset Master 100% but alsactl store doesn’t store the settings, must be something im missing.

    • Simone Simone 22 Giugno 2021

      Try to set the output device as “hw:” like in the example of the article. In this way the volume is fixed at 100%

  7. Thomas Thomas 22 Agosto 2022

    Hello,
    I would like to limit the CPU freq, how can i do that ?
    I see that squeezelite use the turbo freq 2,1ghz and i prefer to stay at the base freq wich is 1,5ghz (celeron J3455),
    Thanks a lot

    • Simone Simone 6 Settembre 2022

      Diaable turbo boost in bios settings

  8. Thomas Thomas 23 Agosto 2022

    i try this :
    remove intel_pstate=disable from syslinux.cfg
    put this 2 lines in /opt/bootlocal.sh :
    echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    echo 1500000 | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

    now the frequency doesn’t go up to 1500000 but it is changing whereas it should stay fixed

  9. Thomas Thomas 27 Agosto 2022

    Hello,
    I would like to install SqueezeCore on a hard drive,
    I try to copy the usb disk on a partition and chainload from grub, but it doesn’t boot,
    What can i do ?
    Thanks

    • Simone Simone 6 Settembre 2022

      You can write the img in the same way like you did with the usb drive: Using Rufus or any similar software

  10. Thomas Thomas 16 Settembre 2022

    Hello,
    i tried to raise the squeezelite buffer :
    Buffer=524288:524288

    But the sound is chopped, i don’t understand why
    This settings works fine on other os

    • Simone Simone 16 Settembre 2022

      Can you post here the content of squeeze.conf and the specs of the pc you are using?

  11. Thomas Thomas 16 Settembre 2022

    NUC NUC6CAYH
    Intel® Celeron® Processor J3455
    with 8go RAM

    Output=hw:0,0
    PlayerName=SqueezeCore
    ModelName=SqueezeCore
    Server=
    AlsaParams=30:3:32:1
    Buffer=524288:524288
    Priority=75

    Thanks

    • Simone Simone 16 Settembre 2022

      Perfect. I just need one more info and then I can write you some settings to try to isolate the problem. Are you using the version with real time kernel?

  12. Thomas Thomas 16 Settembre 2022

    yes i use the realtime kernel

    one other thing i notice : i have 8 go RAM, but i see Squeezecore uses only 2 go (with free command), it is the size of my usb key…

    thanks

    • Simone Simone 16 Settembre 2022

      Very weird. Do you get the same ram size even with top command?
      To solve the problem you reported I advise you to first always test with normal version, not the real time one which can be unpredictable and nasty to debug. Start with the recommended config and then tweak from it. The buffer size in particular if you want to have all files in RAM you just need to raise the stream buffer and not the output buffer. Please let me know about the result of testing

  13. Thomas Thomas 17 Settembre 2022

    Same thing with top command

    With the no realtime version, the sound is ok (no more chopped) with the buffer 524288:524288. I will stay with that.

    Thanks
    Thomas

  14. Gf Gf 23 Marzo 2023

    hi, is there any updated version of SqueezeCore, with the new tinycore version and the new version of squeezelite client? appreciate you work, thanks

  15. Gf Gf 23 Marzo 2023

    and can you add roon bridge to the image and autostart it like squeezelite , it will be very helpful

    • Simone Simone 23 Marzo 2023

      As a Roon user myself this is actually a very good idea. I’ll think about it.

  16. Thomas Dejean Thomas Dejean 31 Marzo 2023

    Hello,

    I have noticed that squeezelite doesn’t sound as good as aplay (with the same parameters).
    i found that very akward. In github they responded me that it is the same result in squezzelite and aplay, and they doesn’t want to dig that. Maybe with your knowledge, you can find something.

    to play with aplay, i do that :
    flac -c -d /home/hifi/Audio/Musique/’Youn Sun Nah – Same Girl’/01* | aplay -D plughw:0,0 -B 200000 -F 50000

    to play with squeeelite, i use these parameters :
    ARGS=-o hw:0,0 -p 75 -a 200:4:: -b 15360:20480 -c pcm,flac,aac,mp3 -r 44100,48000,88200,96000:100

    Thanks
    Thomas

  17. PoweredByTea PoweredByTea 22 Novembre 2023

    Fantastic idea for upcycling old laptops; doesn’t completely function, however.

    Using a 32GB Sandisk USB stick, followed the instructions for a Dell Inspiron 910 (Dell Mini 9).

    Audio output is through the headphone jack, as the internal speakers no longer function on the Dell Mini.

    As the Dell does not meet the system requirements for the RT version, used:
    SqueezeCore-1.1-generic-STABLE.img 2020-07-13 15:33

    Initially works, however, the volume is very low.

    After reboot – there is no audio at all.

    So, two issues need to be addressed:

    1. Functionality needs to be present after reboot

    2. Some way to adjust the volume.

    • Thomas Dejean Thomas Dejean 23 Novembre 2023

      Hello

      First of all you have to set the correct audio card,

      try this in squeeze.conf :
      Output=hw:0,0
      or maybe
      Output=hw:1,0

      or if you have problems to play some audio formats :
      Output=plughw:0,0
      or
      Output=plughw:1,0

      The command “aplay -L” can let you know the number of the card

      Then you can change the volume with the command “alsamixer”
      Use the arrow keys to set the volume and press esc

  18. PoweredByTea PoweredByTea 28 Novembre 2023

    “First of all you have to set the correct audio card,

    This try in squeeze.conf :
    Output?hw: 0,0
    or maybe
    Output?hw:1,0”

    Followed these instructions to the letter – no audio output.

    Thinking the syntax might be incorrect, tried the following:

    Output=hw: 0,0

    No audio.

    Output=hw:0,0

    No audio.

    Output=hw:1,0

    No audio.

    “Then you can change the volume with the command ‘alsamixer’”

    When I attempt this, the following is generated:

    root@SqueezeCore:~#alsamixer
    alsamixer: error while loading shared libraries: libformw.so.6: cannot open shared object file: No such file or directory

    Again – if I go with the default audio card selection during setup, this functions, but the volume is low.

    After reboot, there is no audio output.

    If I edit /SQUEEZECORE/config/squeeze.conf, the device no longer shows up as an audio output option in Logitech Media Server.

    I have attempted to edit /SQUEEZECORE/config/squeeze.conf directly from the command line on the device in question, but nano is not installed in Squeezecore – I don’t know what editor is installed, as there is no mention of one on this page [the only instructions I’ve been able to find in the supplied documentation is as follows: “Open squeeze.conf with Notepad++ (or a similar editor that you to set the UNIX(LF) newline)”].

    To edit /SQUEEZECORE/config/squeeze.conf, I select to shut down the machine, take the USB stick and connect it to my primary desktop machine, and edit /SQUEEZECORE/config/squeeze.conf using nano in the CLI. I then save the changes, then move it back to the Dell Mini and reboot to test my changes.

    The issue doesn’t appear to be hardware specific; I can boot the machine from a USB stick with AntiX installed ( 23 “Arditi del Popolo” ) running Squeezeplay – https://sourceforge.net/projects/lmsclients/files/squeezeplay/linux/squeezeplay-8.0.1-1402-i386.tgz/download – with absolutely no issue.

    That said – I would prefer to use SqueezeCore as it is a far more lightweight, and thus, more elegant solution.

    Thanks for your assistance.

Rispondi

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.

%d blogger hanno fatto clic su Mi Piace per questo: