Raspberry Pi digital audio using piCorePlayer, with a USB DAC, BBC Sounds, Qobuz and Local audio files
Version: 2025-02-04 piCorePlayer 10.0.0, install from scratch. Notes by: John A. Phillips

A. SEE FOR DOWNLOADS AND INFORMATION

·      https://www.picoreplayer.org/ (downloads); and

·      https://docs.picoreplayer.org/ (see getting started etc.).

B. SELECT THE DESIRED CONFIGURATION AND THE REQUIRED SETUP STEPS – OPTION 3 IS THE ONE-BOX SETUP (OPTIONS 1 AND 2 ARE FOR TWO-BOX SETUPS)

·      Option 1: Music player only (Squeezelite): basic setup steps 1 – 6, 9, 14.

·      Option 2: Music server only (LMS): basic setup steps 1 – 2, 4 – 8, 14.

·      Option 3: Integrated player and server (Squeezelite and LMS): basic setup steps 1 – 9, 14.

C. SELECT ANY THE OPTIONAL FUNCTIONS AND THE OPTIONAL SETUP STEPS

·      BBC Sounds: step 10.

·      Qobuz: step 11.

·      Local music files: steps 12 – 13.

D. ASSEMBLE THE EQUIPMENT

Essential for a permanent installation:

·      RPi, power supply, case and µSD card (8 GB is ample – it could be smaller for Option 1).

·      [Options 1 and 3] USB 2.0 cable to connect the player to the DAC.

·      Ethernet or Wireless network connection to the RPi.

·      [Options 2 and 3] Web browser on the network to control the music server (e.g., on a PC or mobile phone); or a specialist control application (e.g., iPeng for the iPhone).

Essential for setup only:

·      Host PC with network access, web browser and µSD card adaptor.

·      µSD card image burner on the host PC (e.g. RPi imager, with piCorePlayer on its “Media Player OS” menu, from https://www.raspberrypi.org/downloads/, but there are others).

Optional but documented in this setup:

·      [Options 2 and 3] BBC Sounds account (via the LMS plugin or iPhone application).

·      [Options 2 and 3] Qobuz subscription (via the LMS plugin or iPhone application).

·      [Options 2 and 3] USB storage for music server library files.

Optional (typically not needed):

·      Spare µSD card(s) for experimenting or to test updates or to back-up a working set-up.

·      µSD card formatter on the host PC (for Windows: SD Card Formatter – from https://www.sdcard.org/downloads/formatter/).

·      SSH terminal application (e.g., PuTTY) on a networked PC to run commands on the RPi’s command line. Alternatively use a USB keyboard, HDMI TV/display and HDMI lead.

·      HDMI TV/display and HDMI lead to check what the RPi is doing during initial boot-up.


E. DO THE REQUIRED SETUP STEPS

1. Create a bootable µSD card and insert it into the RPi. On the host PC. Burn piCorePlayer [1] directly from source onto the µSD card using RPi imager. Alternatively download “piCorePlayer<version>.img.xz” and burn it as a custom image with RPi imager or another image burner (uncompress first if required). For Ethernet set-up safely eject the µSD card and insert it into the RPi but for wireless set-up see step 2 first.

2. Connect the network to the RPi. Ethernet set-up is simplest – wireless can be enabled later if required. For wireless set-up, create a file called wpa_supplicant.conf [2] and copy it onto the top level of the µSD card as burned in step 1 before inserting it into the RPi.

3. [Options 1 and 3] Connect the USB DAC to the RPi and power it up. The DAC needs to be powered up before the RPi.

4. Power up the RPi and open the PCP-homepage with a browser on the host PC. Boot-up takes less than a couple of minutes before you can open PCP-homepage = http://pcp.local [3] (or http://<IP-address> using the IP address allocated to the RPi [4]).

5. Set a login password for piCorePlayer’s user “tc”. On the page that appears set the password. Click “Save”. Assuming it succeeds, click “Continue”.   

6. Follow the “Initial guided setup” (IGS) option. Follow the IGS – don’t click SKIP (but all setup steps can be done manually later if required):

(i)   “Check for critical updates” – either click “No” or click “Yes” and follow any instructions if there are updates.
(ii)  “Set Hostname” – enter a Host name [5] which will become the player name –  click “Save”.
(iii) “Enable SSH” – optional but sometimes useful – either click “No” or optionally enter a server public key (if you want to use one) and click “Yes”.
(iv) “Enable NTP” – [Option 1] leave the NTP server box empty – click “Leave Default” or [Options 2 and 3] leave the NTP server box empty – click “Set and Enable”.
(v)  “Select pCP Mode” – install Lyrion Music server – [Option 1] click “No” or [Options 2 and 3] click “Yes”.
(vi) “Select pCP Theme” – click “Light” or “Dark” as desired.
(vii) “pCP Repo” – was automatically set to “pCP EU Repo” which is OK – click “Next”.
(viii)           “Audio Detection” – [Options 1 and 3] select the auto-detected USB device or [Option 2] select “Setup later on Squeezelite page” – click “Save”.
(ix) “Resize SD Card” – click “Resize”, select a size [6] and click “Resize” (takes some time – ignore any warning about a reboot being required).

Note that after (ii) browser access changes from http://pcp.local to http://<hostname>.local (<hostname> as entered). Use the new hostname in the web browser. But beware of caching if setting up more than one box in quick succession – you may have to use http://<IP-address> temporarily until the cache expires. 

7. [Options 2 and 3] Install and start LMS. Ensure the page footer shows “Player/Server”. Under the Lyrion tab:

(i)   Click “Install LMS”.
(ii)  Make sure ”Set Autostart” is set to yes (normally the default) and click “Start LMS”. A green tick should now be seen beside “LMS is running”.

8. [Options 2 and 3] Do the initial LMS set-up. Open the LMS-homepage at port 9000 with a browser. Use LMS-homepage = http://<hostname>.local:9000 or http://<IP-address>:9000. There is also a “<hostname>^” link at the top of the PCP-homepage. Then:

(i)   Accept the suggested plugins – click ”Next”.
(ii)  Skip setting the Local Music Folder – click “Next”.
(iii) Skip setting the Playlist Folder – click “Next”.
(iv) Click “Finish” and the LMS-homepage using Material Skin should appear.

F. DO THE OPTIONAL SETUP STEPS FOR SQUEEZELITE PLAYER [Options 1 and 3]

9. [Options 1 and 3] Complete the USB DAC configuration if required. Some may have been done automatically by IGS – skip these. However, sometimes extra DAC-specific settings [7] may be needed or useful. With the DAC powered and connected, on the PCP-homepage under the Squeezelite Settings tab, set:

(i)   Audio device output: “Autodetected Hat or USB audio” (from the menu) and “Save” (there may be an INFO message about the OUTPUT field setting – click “OK”). Ignore the reboot warning for now.
(ii)  Output setting: <DAC-specific> (for options click “more>” next to “Output setting”).
(iii) Other DAC settings: <DAC-specific>.

Click “Save”. Reboot may be needed if the Audio output device needed setting in this step.

G. INSTALL THE OPTIONAL SERVICES AND FUNCTIONS [OPTIONS 2 AND 3]

10. Install and configure the BBC Sounds plugin. On the LMS-homepage:

(i)   Under Settings (the “hamburger”, top left) -> Server -> Manage Plugins: enable (tick) “BBC Sounds”. Click “Save Settings” [8]. Click “Restart” when prompted.
(ii)  Wait a few seconds for LMS to re-start. Return to the Manage Plugins page to check that the plugin is active.
(iii) Reload the LMS-homepage to check for the application in “Apps” (Material skin needs a player to be running to check this – Default skin does not).
(iv) Under Settings -> Server -> BBC Sounds: enter the BBC Sounds account and password. Click “Sign In” and wait until you are signed in. Set any preferences [9] and click “Save Settings”.

11. Install and configure the Qobuz plugin. On the LMS-homepage:

(i)   Under Settings (the “hamburger”, top left) -> Server -> Manage Plugins: enable (tick) “Qobuz”. Click “Save Settings” [8]. Click “Restart” when prompted.
(ii)  Wait a few seconds for LMS to re-start. Return to the Manage Plugins page to check that the plugin is active.
(iii) Reload the LMS-homepage to check for the application in “Apps” (Material skin needs a player to be running to check this – Default skin does not).
(iv) Under Settings -> Server-> Qobuz enter the Qobuz account and password. Click “Add”. Set any preferences [10] and click “Save Settings”.
(v)  If Qobuz tracks occasionally get truncated, under Settings -> Server -> Network -> Streaming mode for HTTP(s), select “Persistent mode” or, preferably, “Cache HTTP(S) streams on disk” if using a high endurance µSD card. Click “Save Settings”.

12. Set up local music library on USB memory stick

12a. On the PCP-homepage, under the Main Page tab click “Extensions” and wait for the network checks. Under the “Available” tab select “exfat-utils.tcz” and click “Load”.

12b. Under the Drives tab, under Install and Enable additional File Systems click “Install”.

12c. Connect a USB stick to a RPi USB port.

12d. Under the Drives tab, under Pick … USB disks to mount (may need a page reload to see it):

(i)   Tick the disk mount point (/dev/sda1), name the mount point (/mnt/<name> [11]) and click “Set USB Mount”.
(ii)  For a first time install of the USB stick click “Set Write Permissions”.

12e. On the LMS-homepage, under Settings -> Server -> Basic Settings:

(i)   Browse via the folder symbol and add a Media Folder called /mnt/<name>/ (“Use Selected”).
(ii)  Set the Media Library Name = <name> but it could be left blank or be different. There should be a tick to confirm that it contains music.
(iii) If an existing previously-scanned music library didn’t take a long time to scan, under “Rescan Media Library” select “Clear library and rescan everything”.  
(iv) Click “Save Settings” and click “Rescan” (the rescan may sometimes be automatic). Scanning progress can be viewed if wanted.

12f. If the rescan does not successfully re-scan the library, under “Rescan Media Library” if appropriate select “Clear library and rescan everything” and click “Rescan”.

13. Provide access to the local music library from a Windows or Linux PC

(i)   On the PCP-homepage under the Drives tab and the Setup Samba Share panel click “Install”.
(ii)  Set up Samba: enter Server Name; Server WorkGroup; Share Name; Share Path; and Create File mode [12]. Click “Set Shares”.
(iii) Enter a Samba password for user “tc” (Note: this is not the same password as the host password for user “tc”). Click “Set Password”.
(iv) On a Windows PC add a network location for (or map a network drive to) the shared folder using user “tc” and the password entered above [13].

14. Reboot to finish. On the PCP-homepage under the Main Page tab click “Reboot”. This is a precaution and usually not necessary.

 

H. DO THE RELEVANT VERIFICATION CHECKS (ACCORDING TO SELECTED OPTIONS)

·      Check the browser http://lms.local:9000, http://lms.local:9000/default, http://lms.local:9000/material pages and the iPeng interface.

·      Play BBC radio stations from the LMS web interface.

·      Play Qobuz streams from the LMS web interface.

·      Play LMS library WAV and FLAC PCM files.

·      Check access to the LMS LMSMusic library from windows [15] (after initial credentials).

·      Check access to the Linux Music library from windows [15] (after initial credentials).

·      Check ssh access the RPi [optional].

 

I. NOTES

[1]    The 32-bit Kernel or the 64-bit Kernel depending on the RPi model. A workable rule is for RPi4 and later use 64-bit; for RPi2 and earlier use 32-bit; for RPi3 use either.

[2]    Use the following text in wpa_supplicant.conf, configured for the wireless network’s <country> (<country> = GB in my case), <SSID> and <password>:

# Maintained by piCorePlayer
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=staff
# Two Character Country Code
country=<country>
update_config=1

network={
   ssid="<SSID>"
   psk="<password>"
   key_mgmt=WPA-PSK
   auth_alg=OPEN
}

If this file is created with a text editor as “wpa_supplicant.txt”, view file name extensions, remove the “.txt” extension and replace it with “.conf”. I suspect Unix line termination is required, so Windows line termination, if the file is created on Windows, may need to be fixed. I have not tried this.

Wireless can be set up at the start and disabled later if not finally needed.

Note that using this method the WiFi password is stored unencrypted on the µSD card. This is a potential security risk.

[3]    I think using PCP-homepage = http://pcp.local may not work with some routers if multicast traffic has to pass between Ethernet and WiFi.  Disabling IGMP snooping may help. 

[4]    My network: DHCP is set up on my router to provide a fixed IP address allocation: 192.168.1.71 for the RPi3A+ via wireless; .74 for the RPi4B+ via Ethernet and .75 via wireless. Or .76 and .77 respectively for the RPi5.

[5]    My setup: default hostname => “CDA2” [Option 1] or “LMS” [Options 2 and 3]. Changing the default RPi hostname is essential when more than one piCorePlayer installation exists on a network. Host names are not case-sensitive.

[6]    [Option 1] My player: 200 MByte. This step could be omitted now but a resize will be required later for a Squeezelite “Full Update” if wanted. [Options 2 and 3] My server: 8,000 Mbyte. This step is required to install LMS and plugins, and to accommodate a music library cache and any streamed music cache. For a typical LMS installation the 5,000 MByte default is ample. However, the database for a large music library or the space for cached streaming of long high-resolution classical tracks may require more.

Note that using the whole µSD card is OK but for large cards this may prolong the card backup procedure if used. Any remaining free space on the µSD card can be used for other purposes.

[7]    My USB DAC: Audio output is “Autodetected Hat or USB audio”. Output setting is “hw:CARD=Amanero” or “hw:CARD=Amanero,DEV=0”. Close output setting is 3. Max Sample Rate is “32000,44100,48000,88200,96000,176400,192000,352800,384000:0”.

[8]    Note that there is sometimes a pause at one or more stages in the plugin installation process. The repository may be busy or even sometimes temporarily unavailable. Be patient for at least 60 seconds each time. For some plugins there may be a warning about risks from third party content – if you are happy click “OK” then Click “Restart” when prompted. If patience does not work, the step can be re-tried later.

[9]    My BBC sounds plugin preferences: all default.

[10]  My Qobuz plugin preferences: To be documented.

[11]  My local files set-up: disk mount point <name> is “LocaMusic”.

[12]  My Samba set up: Server Name is “LMS”; Server WorkGroup is “WorkGroup”; Share Name is “LMSmusic”; Share Path is “/mnt/LocalMusic”; Create File mode is “0755”.

[13]  My access from a Windows PC is via running “\\LMS\LMSmusic” or adding this as a network location. If the share does not appear as a network location under “This PC”, use “Map network drive” to the share with “connect using different credentials” ticked then using the Samba password. This should be remembered by Windows in future. The music library on the Linux PC is \\linux\Music (or \\192.168.1.11\Music).