Announce: Squeezelite - a small headless squeezeplay emulator for linux (alsa only)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Krisbee
    Senior Member
    • Feb 2013
    • 381

    Originally posted by d6jg
    Are there any other DACs that are recommended?
    This might be of interest:http://www.raspyfi.com/supported-dacs/

    The consensus seems to be that playback of resolutions higher than 16/44 on a PI can cause problems. Ask here: http://forums.slimdevices.com/showth...1-Raspberry-Pi

    Comment

    • d6jg
      Senior Member
      • Feb 2011
      • 8776

      Good info TA muchly
      Jim



      VB2.4 storage QNAP TS419p (NFS)
      Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
      Office Joggler & Pi3 -> Onkyo CRN775 -> Celestion F10s
      Dining Room SB Radio
      Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
      Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
      Guest Room Joggler > Denon RCFN8 -> Wharfedale Modus Cubes

      Comment

      • tobia5
        Junior Member
        • Mar 2013
        • 3

        Hi guys, I really need some help here. As a linux noob the learning curve as been quite steep.

        My setup is a fanless mini-itx running Xubuntu 12.10 - Logitech Media Server 7.8.0 - Local Player (v0.10) - USB connected DacMagicPlus

        LMS was installed via dpkg, and Local Player installed via LMS - Plugins. User 'squeezeserver' added to the 'audio' group, and manually added to 'nogroup'.

        It plays music, but when I check the debugging log for errors, this comes up:

        Starting Squeezelite: /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/LocalPlayer/Bin/squeezelite-i386 -o hw:CARD=C10,DEV=0 -d output=debug -f /var/log/squeezeboxserver/localplayer.log -r 96000
        [14:39:13.262032] output_init:1298 init output
        [14:39:13.262357] output_init:1301 outputbuf size: 3528000
        [14:39:13.262445] output_init:1333 requested buffer_time: 20000 period_count: 4 format: any mmap: 1
        [14:39:13.262504] output_init:1357 output: hw:CARD=C10,DEV=0 maxrate: 96000
        [14:39:13.262762] output_init:1365 unable to lock memory: Cannot allocate memory
        [14:39:13.270260] output_init:1388 unable to set output sched fifo: Operation not permitted
        [14:39:13.283257] output_flush:1402 flush output buffer
        Home directory /usr/share/squeezeboxserver not ours.
        [14:39:13.318442] output_thread:576 open output device: hw:CARD=C10,DEV=0
        [14:39:13.319633] alsa_open:262 opened device hw:CARD=C10,DEV=0 using format: S24_3LE sample rate: 44100 mmap: 1
        [14:39:13.319838] alsa_open:310 buffer time: 20045 period count: 4 buffer size: 884 period size: 221


        Running as 'root' the 'unable to' entries are gone:

        [14:41:10.850364] output_init:1298 init output
        [14:41:10.850693] output_init:1301 outputbuf size: 3528000
        [14:41:10.850770] output_init:1333 requested buffer_time: 20000 period_count: 4 format: any mmap: 1
        [14:41:10.850811] output_init:1357 output: hw:CARD=C10,DEV=0 maxrate: 96000
        [14:41:10.859521] output_init:1367 memory locked
        [14:41:10.860018] output_init:1390 set output sched fifo rt: 45
        [14:41:10.867979] output_flush:1402 flush output buffer
        [14:41:11.795372] output_thread:576 open output device: hw:CARD=C10,DEV=0
        [14:41:11.796120] alsa_open:262 opened device hw:CARD=C10,DEV=0 using format: S24_3LE sample rate: 44100 mmap: 1
        [14:41:11.796249] alsa_open:310 buffer time: 20045 period count: 4 buffer size: 884 period size: 221


        Does running as user 'squeezeserver' have any impact that I should try to correct?




        /Tobias

        Comment

        • JackOfAll
          Senior Member
          • Dec 2005
          • 2749

          It isn't absolutely essential for squeezelite to lock memory or run the output thread at a higher priority.

          If you want to give the squeezeserver user privileges to be able to do so. Create /etc/security/limits.d/99-squeezeserver.conf

          Code:
          squeezeserver   -  rtprio    50
          squeezeserver   -  memlock    unlimited

          Comment

          • sle118
            Senior Member
            • Dec 2009
            • 626

            Originally posted by Triode
            Linux users may be interested in a small headless client I've been working on called Squeezelite. It's scope is constrained to offering a headless (Squeezeslave like) player which runs on linux desktops and potentially small linux devices using alsa for audio output.
            [/code]
            Triode,

            I compiled SqueezeLite on a RK3066 (arhmf) based device, but I am also getting a segment fault error.

            I have all the logs here


            here is the summary of phpsysinfo
            Kernel Version 3.0.8+ (SMP) armv7l
            Distro Name Ubuntu 12.10

            ARDWARE INFORMATION
            Processors
            0
            CPU Speed: 1.63 GHz
            1
            CPU Speed: 1.63 GHz
            USB Devices
            (2x) Linux Foundation 2.0 root hub
            (2x) NEC Corp. HighSpeed Hub
            Creative Technology, Ltd SoundBlaster Live! 24-bit External SB0490
            Primax Electronics, Ltd HP Optical Mouse
            Chicony Electronics Co., Ltd
            SimpleTech SP-U25/120G

            Physical Memory
            Free 42.58 MiB Used 800.58 MiB Total 843.16 MiB

            Kernel + applications 70% 582.55 MiB
            Buffers 3% 20.15 MiB
            Cached 24% 197.88 MiB


            Can you please get me in the right direction for troubleshooting?
            LMS 7.9 - 1xRadio, 1xBoom, 5xDuet,3xTouch, 1 SB2. Sony PlayStation, Emby, Chromecast v1 and v2 and...
            6xSqueezeAmp, several other ESP32-Wrover boards with jumper wires flying around, some with ethernet!

            Comment

            • tobia5
              Junior Member
              • Mar 2013
              • 3

              Originally posted by JackOfAll
              It isn't absolutely essential for squeezelite to lock memory or run the output thread at a higher priority.

              If you want to give the squeezeserver user privileges to be able to do so. Create /etc/security/limits.d/99-squeezeserver.conf

              Code:
              squeezeserver   -  rtprio    50
              squeezeserver   -  memlock    unlimited
              Thanks JackOfAll,

              I've tried your solution for realtime scheduling using PAM with no luck I'm afraid. I also tried the solution drafted in this post: http://www.jackaudio.org/linux_rt_config

              From what I can understand this has something to do with the use of a kernel that has the option RT_GROUP_SCHED enabled, and now I'm in way over my head.

              I'll try do do some read-up on this (found the broken wiki link), but I think it's strange if this is an unusal "error" as I'm using a very default distribution.

              Comment

              • JackOfAll
                Senior Member
                • Dec 2005
                • 2749

                Originally posted by tobia5
                From what I can understand this has something to do with the use of a kernel that has the option RT_GROUP_SCHED enabled, and now I'm in way over my head.
                If you don't get the "errors" running as root, you have a preemptible kernel. So it is a config issue. Whatever user is used to run squeeselite when started as local player does not have rt privs.

                Add your user/login to the audio group. Add /etc/security/limits.d/99-audio.conf

                Code:
                @audio   -  rtprio    50
                @audio   -  memlock    unlimited
                Log out. Log back in. (If you are running an X session, log out and start a new one. If ssh, log out and back in again, otherwise it wont pick up the settings.) Run "ulimit -a". Does it say "real-time priority = 50"? Does it say, "max locked memory = unlimited"?

                Stop LocalPlayer Plugin. Run "/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/LocalPlayer/Bin/squeezelite-i386 -o hw:CARD=C10,DEV=0 -d all=debug" from the comand line. Do you see the errors?

                Comment

                • Triode
                  Senior Member
                  • Apr 2005
                  • 8410

                  Originally posted by sle118
                  Triode,

                  I compiled SqueezeLite on a RK3066 (arhmf) based device, but I am also getting a segment fault error.

                  I have all the logs here


                  here is the summary of phpsysinfo
                  Kernel Version 3.0.8+ (SMP) armv7l
                  Distro Name Ubuntu 12.10

                  ARDWARE INFORMATION
                  Processors
                  0
                  CPU Speed: 1.63 GHz
                  1
                  CPU Speed: 1.63 GHz
                  USB Devices
                  (2x) Linux Foundation 2.0 root hub
                  (2x) NEC Corp. HighSpeed Hub
                  Creative Technology, Ltd SoundBlaster Live! 24-bit External SB0490
                  Primax Electronics, Ltd HP Optical Mouse
                  Chicony Electronics Co., Ltd
                  SimpleTech SP-U25/120G

                  Physical Memory
                  Free 42.58 MiB Used 800.58 MiB Total 843.16 MiB

                  Kernel + applications 70% 582.55 MiB
                  Buffers 3% 20.15 MiB
                  Cached 24% 197.88 MiB


                  Can you please get me in the right direction for troubleshooting?
                  Don't see a segfault in the logs? As you compilied it yourself can you run with gdb to find where it crashes?

                  Comment

                  • tobia5
                    Junior Member
                    • Mar 2013
                    • 3

                    Originally posted by JackOfAll
                    If you don't get the "errors" running as root, you have a preemptible kernel. So it is a config issue. Whatever user is used to run squeeselite when started as local player does not have rt privs.

                    Add your user/login to the audio group. Add /etc/security/limits.d/99-audio.conf

                    Code:
                    @audio   -  rtprio    50
                    @audio   -  memlock    unlimited
                    Log out. Log back in. (If you are running an X session, log out and start a new one. If ssh, log out and back in again, otherwise it wont pick up the settings.) Run "ulimit -a". Does it say "real-time priority = 50"? Does it say, "max locked memory = unlimited"?

                    Stop LocalPlayer Plugin. Run "/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/LocalPlayer/Bin/squeezelite-i386 -o hw:CARD=C10,DEV=0 -d all=debug" from the comand line. Do you see the errors?
                    Thank you again,

                    Did just what you proposed and I got no errors. Then I tried to add 'squeezeboxserver' to the audio group, but then I still have the "error". Any other group memberships for 'squeezeboxserver' I should look at? Does 'nogroup' have anything to do with this?

                    Comment

                    • sle118
                      Senior Member
                      • Dec 2009
                      • 626

                      Originally posted by Triode
                      Don't see a segfault in the logs? As you compilied it yourself can you run with gdb to find where it crashes?
                      I recompiled with debugging symbols. Here is what I get when running using gdb

                      [Thread debugging using libthread_db enabled]
                      Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
                      [New Thread 0x40033470 (LWP 2428)]
                      [New Thread 0x4535b470 (LWP 2429)]
                      [Thread 0x4535b470 (LWP 2429) exited]
                      [New Thread 0x40b6e470 (LWP 2430)]
                      [New Thread 0x4535b470 (LWP 2431)]
                      [New Thread 0x40d23470 (LWP 2432)]

                      Program received signal SIGSEGV, Segmentation fault.
                      [Switching to Thread 0x40d23470 (LWP 2432)]
                      0x40bd1760 in mad_layer_III () from /usr/lib/arm-linux-gnueabihf/libmad.so.0

                      (gdb) backtrace
                      #0 0x40bd1760 in mad_layer_III () from /usr/lib/arm-linux-gnueabihf/libmad.so.0
                      #1 0x00000000 in ?? ()

                      seems like a crash in libmad... I'll try to do additional research unless you have a quick solution?
                      LMS 7.9 - 1xRadio, 1xBoom, 5xDuet,3xTouch, 1 SB2. Sony PlayStation, Emby, Chromecast v1 and v2 and...
                      6xSqueezeAmp, several other ESP32-Wrover boards with jumper wires flying around, some with ethernet!

                      Comment

                      • Triode
                        Senior Member
                        • Apr 2005
                        • 8410

                        Originally posted by sle118
                        I recompiled with debugging symbols. Here is what I get when running using gdb

                        [Thread debugging using libthread_db enabled]
                        Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
                        [New Thread 0x40033470 (LWP 2428)]
                        [New Thread 0x4535b470 (LWP 2429)]
                        [Thread 0x4535b470 (LWP 2429) exited]
                        [New Thread 0x40b6e470 (LWP 2430)]
                        [New Thread 0x4535b470 (LWP 2431)]
                        [New Thread 0x40d23470 (LWP 2432)]

                        Program received signal SIGSEGV, Segmentation fault.
                        [Switching to Thread 0x40d23470 (LWP 2432)]
                        0x40bd1760 in mad_layer_III () from /usr/lib/arm-linux-gnueabihf/libmad.so.0

                        (gdb) backtrace
                        #0 0x40bd1760 in mad_layer_III () from /usr/lib/arm-linux-gnueabihf/libmad.so.0
                        #1 0x00000000 in ?? ()

                        seems like a crash in libmad... I'll try to do additional research unless you have a quick solution?
                        no - sorry - not seen it crash there before

                        Comment

                        • sle118
                          Senior Member
                          • Dec 2009
                          • 626

                          Originally posted by Triode
                          no - sorry - not seen it crash there before
                          I am researching the issue. It seems like this is a known bug in libmad (arm specific optimizations).

                          This is an 12.04 armhf install on a B7 BeagleBoard. mpd version is 0.16.5-1ubuntu4 libmad version is 0.15.1b-7ubuntu1 What happens: mpd will start and allow local and remote clients to connect as expected. Requesting a database update with an attached client (ie 'mpc update') causes mpd to crash. Attaching gdb reveals seg fault occurs in call to libmad. What should happen: Database should update and mpd should continue to run. Installing armhf build of libmad0 (0.15.1b-7) from Debian...
                          LMS 7.9 - 1xRadio, 1xBoom, 5xDuet,3xTouch, 1 SB2. Sony PlayStation, Emby, Chromecast v1 and v2 and...
                          6xSqueezeAmp, several other ESP32-Wrover boards with jumper wires flying around, some with ethernet!

                          Comment

                          • Triode
                            Senior Member
                            • Apr 2005
                            • 8410

                            Originally posted by sle118
                            I am researching the issue. It seems like this is a known bug in libmad (arm specific optimizations).

                            https://bugs.launchpad.net/ubuntu/+s...ad/+bug/989846
                            OK will leave you with this as it looks specific to that library and archiecture rather than anything in squeezelite.

                            Comment

                            • sle118
                              Senior Member
                              • Dec 2009
                              • 626

                              Originally posted by Triode
                              OK will leave you with this as it looks specific to that library and archiecture rather than anything in squeezelite.
                              Triode, I resolved the issue and will leave a trace here in case someone else encounters a segment fault error on these little devices that are becoming more and more popular (imagine a fully functional, FLAC capable, sub $45 assembly that can also act as a portable server).

                              The issue is resolved in the newest version of libmad, so I went ahead and re-compiled to the latest source with the help of a procedure that was written by user purch in the forum link below.


                              They have submitted the fix and it is in the next Ubuntu version only. Let's build it for our Ubuntu Quantal.
                              Code:
                              mkdir -p ~/build/libmad
                              cd ~/build/libmad
                              sudo apt-get install fakeroot dpkg-dev build-essential
                              sudo apt-get source libmad0
                              sudo apt-get build-dep libmad0
                              sudo chown your_user.your_user libmad* -R
                              dpkg-source -x libmad_0.15.1b-7ubuntu1.dsc
                              cd libmad-0.15.1b/
                              dpkg-buildpackage -rfakeroot -b
                              sudo dpkg -i ../libmad0_0.15.1b-7ubuntu1_armhf.deb
                              sudo apt-get hold libmad0
                              sudo service mpd restart
                              mpc update

                              I had to make some additional tweaks for my environment, but now I have SqueezeLite working!
                              LMS 7.9 - 1xRadio, 1xBoom, 5xDuet,3xTouch, 1 SB2. Sony PlayStation, Emby, Chromecast v1 and v2 and...
                              6xSqueezeAmp, several other ESP32-Wrover boards with jumper wires flying around, some with ethernet!

                              Comment

                              • ReValveiT
                                Member
                                • Apr 2012
                                • 93

                                Just done a total reinstall of Win7 64bit, LMS and SqueezeLite-win.

                                I'm STILL getting crazy clipping with all volumes at 100%. Bringing SqueezeLite to 99% volume via iPeng the clipping completely disappears.

                                I get no clipping with any of the other Squeeze players under Windows under the same circumstances.

                                Surely a problem inherit in SqueezeLite? Can someone try playing some heavily compressed (ie. modern) music under SqueezeLite-win with all volumes at 100%? Can't be just me.

                                Comment

                                Working...