Squeezebox

From sheep
Jump to navigation Jump to search

installing spotify and squeezelight on raspian

installing raspotify

raspotify is great but locks the audio card and won't share

the solution duplicated below

The sound config below can be used to make alsa allow two applications share the sound card raspotify and squeezelight

configure raspotify for device spotify

# /etc/asound.conf

# use aplay -l to determine the below.

# Change to the card number or name that you want to be the default control card.
# Default: 0
defaults.ctl.card 0

# Change to the card number or name that you want to be the default playback card.
# It should usually be the same as defaults.ctl.card.
# Default: 0
defaults.pcm.card 0

# Change to the device number that you want to be the default device on the default card.
# 0 or 1 is usually the correct device number.
# Default: 0
defaults.pcm.device 0

# Change to the subdevice number that you want to be the default subdevice on the default device.
# Should rarely need to be changed.
# Default: -1
defaults.pcm.subdevice -1

pcm.!default {
    type plug
    slave {
        channels 2
        rate 44100
        format S16_LE
        pcm {
            type softvol
            slave.pcm {
                type dmix
                ipc_key 1024
                ipc_perm 0660
                ipc_gid audio
                slowptr true
                hw_ptr_alignment roundup
                slave {
                    pcm {
                        type hw
                        card {
                            @func refer
                            name defaults.pcm.card
                        }
                        device {
                            @func refer
                            name defaults.pcm.device
                        }
                        subdevice {
                            @func refer
                            name defaults.pcm.subdevice
                        }
                    }
                    channels 2
                    period_size 0
                    buffer_size 0
                    buffer_time 0
                    period_time 250000
                    periods 4
                    rate 44100
                    format S16_LE
                }
                bindings {
                    0 0
                    1 1
                }
            }
            control {
                name PCM
                card {
                    @func refer
                    name defaults.ctl.card
                }
            }
        }
    }
}

pcm.spotify {
    type plug
    slave {
        channels 2
        rate 44100
        format S16_LE
        pcm {
            type softvol
            slave.pcm default
            control {
                name spotify
                card {
                    @func refer
                    name defaults.ctl.card
                }
            }
        }
    }
}

pcm.alexa {
    type plug
    slave {
        channels 2
        rate 44100
        format S16_LE
        pcm {
            type softvol
            slave.pcm default
            control {
                name alexa
                card {
                    @func refer
                    name defaults.ctl.card
                }
            }
        }
    }
}

Setup with no display

  • Plug in the ethernet cable and pull out the power plug.
  • Do a factory reset. Point the remote at the display while pressing the ADD ("+") button. Plug in the power plug and count to 7, then release the ADD button on the remote.
  • Welcome to Squeezebox. Wait 15 seconds and it will push right by itself.
  • Language selection. Press right-arrow to select English.
  • Set up networking. Press right-arrow.
  • Choose wireless or ethernet. Press down-arrow once, then right-arrow for ethernet.
  • IP address. Press right-arrow to choose DHCP.
  • Wait 30 seconds. Press right-arrow to select your SqueezeCenter server that (hopefully) it will have found.


The timing isn't really critical. For the factory setup you have to hold the button pressed for (I'm guessing) at least 5 seconds, but if you hold it too long you end up forcing another factory reset after it reboots. The 15 seconds just means wait at least 15 seconds. DHCP negotiation usually takes only a few seconds, but I've sometimes seen it take 10-20 seconds on my network.

Factory reset, right, right, down, right, right, right.

NET-UDAP perl script for setup

wifi cards

SAMSUMG NP-R40 17-000660 Sony Vaio VGN-FS515H Internal WLAN WIFI Wireless Card Board 178901432 AR5BMB5 search for AR5BMB5 in the description

squeezebox boom problems

https://broadlyuseless.info/tech/how-to-fix-unresponsive-squeezebox-boom/

picoreplayer

For bluetooth:

  1. tweaks page - configure hostname - this will appear as the bluetooth device to pair with
  2. configure output device (note you can click on the text on the right when you expand)
  3. make discoverable
  4. turn on all codecs
  5. pair
  6. set type as player

it should then play

build your own

Make sure you have enough power if driving a touch screen and the pi or you get nasty pops

configure the screen

Edit the config.txt in the first partition add the lines for your touch device e.g.

 hdmi_group=2
 hdmi_mode=1
 hdmi_mode=87
 hdmi_cvt 1024 600 60 6 0 0 0


device

my black dac from ebay is PCM5122 and works as the iqaudio dac+

 dtoverlay=iqaudio-dacplus

calibrate touch screen

not required if you change the input type to TSLIB see below

/usr/local/bin/ts_calibrate

make jivelite use the touch library and the right input

install jivelight and restart

copy /opt/jivelite/bin/jivelite.sh to /mnt/mmcblk0p2/tce/jivelite.sh

edit and add after the first line the following:

   export SDL_MOUSEDEV=/dev/input/event0
   export SDL_MOUSEDRV=TSLIB

my device the screen is off so I can't select the resolution

copy your /mnt/mmcblk0p2/tce/mydata.tgz file off the pi

(extract as root so you keep the uids into a new directory `tar -xzf ../ydata.tgz`)

create the file home/tc/.jivelite/userpath/settings/SelectSkin.lua with the contents:

 settings = {skin="PiGridSkin_1024x600",}

rearchive the file `tar -czf ../mydata.tgz .`) and copy back onto the pi

add spotify

https://forums.slimdevices.com/showthread.php?107755-A-simple-how-to-for-quot-Spotty-quot-and-pCP

bluetooth audio input

now supported by the UI but you need to use 5gz wifi