RPi2でVolumio2を試す(設定編)

まだ2日くらいですが、Volumio2は安定して稼働中です。

いくつか設定をしてみましょう。 まずはパッケージをアップデートします。
SSHからユーザー名 volumio、パスワードも volumioでログインします。
suで rootになります。 rootのパスワードも volumioです。

                      /\_ \                        __
         __  __    ___\//\ \    __  __    ___ ___ /\_\    ___
        /\ \/\ \  / __`\\ \ \  /\ \/\ \ /' __` __`\/\ \  / __`\
        \ \ \_/ |/\ \L\ \\_\ \_\ \ \_\ \/\ \/\ \/\ \ \ \/\ \L\ \
         \ \___/ \ \____//\____\\ \____/\ \_\ \_\ \_\ \_\ \____/
          \/__/   \/___/ \/____/ \/___/  \/_/\/_/\/_/\/_/\/___/
 
             Free Audiophile Linux Music Player - Version 2.0
 
          C 2015 Michelangelo Guarise - Volumio Team - Volumio.org
 
 
Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
volumio@volumio:~$ su
Password: volumio
root@volumio:/home/volumio# apt-get update
Get:1 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
Get:2 http://archive.raspbian.org jessie InRelease [14.9 kB]
Get:3 http://archive.raspbian.org jessie/main Sources [7746 kB]
Get:4 http://archive.raspberrypi.org jessie/main Sources [58.9 kB]
Get:5 http://archive.raspberrypi.org jessie/ui Sources [16.9 kB]
Get:6 http://archive.raspberrypi.org jessie/main armhf Packages [145 kB]
Get:7 http://archive.raspbian.org jessie/contrib Sources [64.5 kB]
Get:8 http://archive.raspbian.org jessie/non-free Sources [113 kB]
Get:9 http://archive.raspberrypi.org jessie/ui armhf Packages [57.9 kB]
Get:10 http://archive.raspbian.org jessie/rpi Sources [1132 B]
Get:11 http://archive.raspbian.org jessie/main armhf Packages [8981 kB]
Get:12 http://archive.raspbian.org jessie/contrib armhf Packages [37.5 kB]
Get:13 http://archive.raspbian.org jessie/non-free armhf Packages [70.3 kB]
Get:14 http://archive.raspbian.org jessie/rpi armhf Packages [1356 B]
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://archive.raspbian.org jessie/contrib Translation-en
Ign http://archive.raspbian.org jessie/main Translation-en
Ign http://archive.raspbian.org jessie/non-free Translation-en
Ign http://archive.raspbian.org jessie/rpi Translation-en
Fetched 17.3 MB in 56s (305 kB/s)
Reading package lists... Done

最近は ArchLinuxをベースとするものが多いですが、Volumioは RaspyFiと同じく Raspbianベースなんですね。

まずは何はともあれタイムゾーンの設定。

root@volumio:/home/volumio# dpkg-reconfigure tzdata

volumio2_tz.jpg

「Asia」の「Tokyo」を選びます。

Current default time zone: 'Asia/Tokyo'
Local time is now:      Wed Apr  5 18:40:21 JST 2017.
Universal Time is now:  Wed Apr  5 09:40:21 UTC 2017.

特に必要ではないのですが、ロケールを日本語に設定します。

root@volumio:/home/volumio# dpkg-reconfigure locales
Generating locales (this might take a while)...
  en_US.UTF-8... done
  ja_JP.UTF-8... done
Generation complete.
root@volumio:/home/volumio# export LANG=ja_JP.UTF-8

volumio2_locale.jpg

sambaはインストール済みなので、NETBIOS名と WORKGROUP名を変更します。

root@volumio:/home/volumio# nano /etc/samba/smb.conf
[global]
netbios name = Volumio-2F
server string = Volumio Audiophile Music Player
workgroup = HOME
security = user
map to guest = Bad User
encrypt passwords = yes
wins support = yes
local master = no
preferred master = no
os level = 30
 
[Internal Storage]
        comment = Volumio Internal Music Folder
        path = /data/INTERNAL
        read only = no
        guest ok = yes
 
[USB]
        comment = Volumio Internal Music Folder
        path = /mnt/USB
        read only = no
        guest ok = yes
 
[NAS]
        comment = Volumio Internal Music Folder
        path = /mnt/NAS
        read only = no
        guest ok = yes

編集が終わったら再起動します。
続いて last.fmの設定。

root@volumio:/home/volumio# apt-get install mpdscribble
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dconf-gsettings-backend dconf-service glib-networking glib-networking-common
  glib-networking-services gsettings-desktop-schemas libdconf1 libproxy1
  libsoup2.4-1
The following NEW packages will be installed:
  dconf-gsettings-backend dconf-service glib-networking glib-networking-common
  glib-networking-services gsettings-desktop-schemas libdconf1 libproxy1
  libsoup2.4-1 mpdscribble
0 upgraded, 10 newly installed, 0 to remove and 35 not upgraded.
Need to get 913 kB of archives.
After this operation, 5537 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspbian.org/raspbian/ jessie/main libdconf1 armhf 0.22.0-1 [31.1 kB]
Get:2 http://archive.raspbian.org/raspbian/ jessie/main libproxy1 armhf 0.4.11-4 [55.6 kB]
Get:3 http://archive.raspbian.org/raspbian/ jessie/main glib-networking-common all 2.42.0-2 [52.1 kB]
Get:4 http://archive.raspbian.org/raspbian/ jessie/main glib-networking-services armhf 2.42.0-2 [16.6 kB]
Get:5 http://archive.raspbian.org/raspbian/ jessie/main dconf-service armhf 0.22.0-1 [38.0 kB]
Get:6 http://archive.raspbian.org/raspbian/ jessie/main dconf-gsettings-backend armhf 0.22.0-1 [30.1 kB]
Get:7 http://archive.raspbian.org/raspbian/ jessie/main gsettings-desktop-schemas all 3.14.1-1 [391 kB]
Get:8 http://archive.raspbian.org/raspbian/ jessie/main glib-networking armhf 2.42.0-2 [43.9 kB]
Get:9 http://archive.raspbian.org/raspbian/ jessie/main libsoup2.4-1 armhf 2.48.0-1 [219 kB]
Get:10 http://archive.raspbian.org/raspbian/ jessie/main mpdscribble armhf 0.22-5 [35.2 kB]
Fetched 913 kB in 4s (187 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libdconf1:armhf.
(Reading database ... 18792 files and directories currently installed.)
Preparing to unpack .../libdconf1_0.22.0-1_armhf.deb ...
Unpacking libdconf1:armhf (0.22.0-1) ...
Selecting previously unselected package libproxy1:armhf.
Preparing to unpack .../libproxy1_0.4.11-4_armhf.deb ...
Unpacking libproxy1:armhf (0.4.11-4) ...
Selecting previously unselected package glib-networking-common.
Preparing to unpack .../glib-networking-common_2.42.0-2_all.deb ...
Unpacking glib-networking-common (2.42.0-2) ...
Selecting previously unselected package glib-networking-services.
Preparing to unpack .../glib-networking-services_2.42.0-2_armhf.deb ...
Unpacking glib-networking-services (2.42.0-2) ...
Selecting previously unselected package dconf-service.
Preparing to unpack .../dconf-service_0.22.0-1_armhf.deb ...
Unpacking dconf-service (0.22.0-1) ...
Selecting previously unselected package dconf-gsettings-backend:armhf.
Preparing to unpack .../dconf-gsettings-backend_0.22.0-1_armhf.deb ...
Unpacking dconf-gsettings-backend:armhf (0.22.0-1) ...
Selecting previously unselected package gsettings-desktop-schemas.
Preparing to unpack .../gsettings-desktop-schemas_3.14.1-1_all.deb ...
Unpacking gsettings-desktop-schemas (3.14.1-1) ...
Selecting previously unselected package glib-networking:armhf.
Preparing to unpack .../glib-networking_2.42.0-2_armhf.deb ...
Unpacking glib-networking:armhf (2.42.0-2) ...
Selecting previously unselected package libsoup2.4-1:armhf.
Preparing to unpack .../libsoup2.4-1_2.48.0-1_armhf.deb ...
Unpacking libsoup2.4-1:armhf (2.48.0-1) ...
Selecting previously unselected package mpdscribble.
Preparing to unpack .../mpdscribble_0.22-5_armhf.deb ...
Unpacking mpdscribble (0.22-5) ...
Processing triggers for libglib2.0-0:armhf (2.42.1-1) ...
Processing triggers for systemd (215-17+deb8u6) ...
Setting up libdconf1:armhf (0.22.0-1) ...
Setting up libproxy1:armhf (0.4.11-4) ...
Setting up glib-networking-common (2.42.0-2) ...
Setting up glib-networking-services (2.42.0-2) ...
Setting up dconf-service (0.22.0-1) ...
Setting up dconf-gsettings-backend:armhf (0.22.0-1) ...
Setting up gsettings-desktop-schemas (3.14.1-1) ...
Setting up glib-networking:armhf (2.42.0-2) ...
Setting up libsoup2.4-1:armhf (2.48.0-1) ...
Setting up mpdscribble (0.22-5) ...
 
Creating config file /etc/default/mpdscribble with new version
 
Creating config file /etc/mpdscribble.conf with new version
Processing triggers for libc-bin (2.19-18+deb8u7) ...
Processing triggers for systemd (215-17+deb8u6) ...

設定ファイルを編集します。 Volumioは viが入ってないのでやりにくいですね。

root@volumio:/home/volumio# nano /etc/mpdscribble.conf
[last.fm]
url = http://post.audioscrobbler.com/
username = ********
password = xxxxxxxx

[last.fm]のセクションに、ユーザーIDとパスワードを記入します。

root@volumio:/home/volumio# nano /etc/default/mpdscribble

「MPD_SYSTEMWIDE=0」の値を「1」に変更します。

root@volumio:/home/volumio# /etc/init.d/mpdscribble restart
[ ok ] Restarting mpdscribble (via systemctl): mpdscribble.service.

mpdscribbleサービスをリスタートさせればOKです。

Volumio2には cronが入ってないのでインストールします。

root@volumio:/etc# apt-get install cron
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bsd-mailx exim4 exim4-base exim4-config exim4-daemon-light liblockfile-bin
  liblockfile1
Suggested packages:
  anacron logrotate checksecurity mail-reader eximon4 exim4-doc-html
  exim4-doc-info file spf-tools-perl swaks
Recommended packages:
  mailx
The following NEW packages will be installed:
  bsd-mailx cron exim4 exim4-base exim4-config exim4-daemon-light
  liblockfile-bin liblockfile1
0 upgraded, 8 newly installed, 0 to remove and 35 not upgraded.
Need to get 2332 kB of archives.
After this operation, 4166 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspbian.org/raspbian/ jessie/main cron armhf 3.0pl1-127+deb8u1 [90.4 kB]
Get:2 http://archive.raspbian.org/raspbian/ jessie/main liblockfile-bin armhf 1.09-6 [18.2 kB]
Get:3 http://archive.raspbian.org/raspbian/ jessie/main liblockfile1 armhf 1.09-6 [14.7 kB]
Get:4 http://archive.raspbian.org/raspbian/ jessie/main exim4-config all 4.84.2-2+deb8u3 [502 kB]
Get:5 http://archive.raspbian.org/raspbian/ jessie/main exim4-base armhf 4.84.2-2+deb8u3 [1046 kB]
Get:6 http://archive.raspbian.org/raspbian/ jessie/main exim4-daemon-light armhf 4.84.2-2+deb8u3 [578 kB]
Get:7 http://archive.raspbian.org/raspbian/ jessie/main bsd-mailx armhf 8.1.2-0.20141216cvs-2 [74.3 kB]
Get:8 http://archive.raspbian.org/raspbian/ jessie/main exim4 all 4.84.2-2+deb8u3 [8538 B]
Fetched 2332 kB in 27s (85.6 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package cron.
(Reading database ... 19574 files and directories currently installed.)
Preparing to unpack .../cron_3.0pl1-127+deb8u1_armhf.deb ...
Unpacking cron (3.0pl1-127+deb8u1) ...
Selecting previously unselected package liblockfile-bin.
Preparing to unpack .../liblockfile-bin_1.09-6_armhf.deb ...
Unpacking liblockfile-bin (1.09-6) ...
Selecting previously unselected package liblockfile1:armhf.
Preparing to unpack .../liblockfile1_1.09-6_armhf.deb ...
Unpacking liblockfile1:armhf (1.09-6) ...
Selecting previously unselected package exim4-config.
Preparing to unpack .../exim4-config_4.84.2-2+deb8u3_all.deb ...
Unpacking exim4-config (4.84.2-2+deb8u3) ...
Selecting previously unselected package exim4-base.
Preparing to unpack .../exim4-base_4.84.2-2+deb8u3_armhf.deb ...
Unpacking exim4-base (4.84.2-2+deb8u3) ...
Selecting previously unselected package exim4-daemon-light.
Preparing to unpack .../exim4-daemon-light_4.84.2-2+deb8u3_armhf.deb ...
Unpacking exim4-daemon-light (4.84.2-2+deb8u3) ...
Selecting previously unselected package bsd-mailx.
Preparing to unpack .../bsd-mailx_8.1.2-0.20141216cvs-2_armhf.deb ...
Unpacking bsd-mailx (8.1.2-0.20141216cvs-2) ...
Selecting previously unselected package exim4.
Preparing to unpack .../exim4_4.84.2-2+deb8u3_all.deb ...
Unpacking exim4 (4.84.2-2+deb8u3) ...
Processing triggers for systemd (215-17+deb8u6) ...
Setting up cron (3.0pl1-127+deb8u1) ...
Adding group `crontab' (GID 116) ...
Done.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up liblockfile-bin (1.09-6) ...
Setting up liblockfile1:armhf (1.09-6) ...
Setting up exim4-config (4.84.2-2+deb8u3) ...
Adding system-user for exim (v4)
Setting up exim4-base (4.84.2-2+deb8u3) ...
exim: DB upgrade, deleting hints-db
Setting up exim4-daemon-light (4.84.2-2+deb8u3) ...
Setting up bsd-mailx (8.1.2-0.20141216cvs-2) ...
update-alternatives: using /usr/bin/bsd-mailx to provide /usr/bin/mailx (mailx) in auto mode
Setting up exim4 (4.84.2-2+deb8u3) ...
Processing triggers for systemd (215-17+deb8u6) ...
Processing triggers for libc-bin (2.19-18+deb8u7) ...
root@volumio:/etc# systemctl status cron
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled)
   Active: active (running) since Sun 2017-04-09 19:07:50 JST; 2min 52s ago
     Docs: man:cron(8)
 Main PID: 3731 (cron)
   CGroup: /system.slice/cron.service
           mq3731 /usr/sbin/cron -f
 
Apr 09 19:07:50 Volumio systemd[1]: Started Regular background program p...n.
Apr 09 19:07:50 Volumio cron[3731]: (CRON) INFO (pidfile fd = 3)
Apr 09 19:07:50 Volumio cron[3731]: (CRON) INFO (Running @reboot jobs)
Hint: Some lines were ellipsized, use -l to show in full.

やっぱり viがないと編集しづらいので、vimをインストールします。

root@volumio:/home/volumio# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgpm2 vim-common vim-runtime
Suggested packages:
  gpm ctags vim-doc vim-scripts
The following NEW packages will be installed:
  libgpm2 vim vim-common vim-runtime
0 upgraded, 4 newly installed, 0 to remove and 35 not upgraded.
Need to get 6077 kB of archives.
After this operation, 28.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspbian.org/raspbian/ jessie/main libgpm2 armhf 1.20.4-6.1 [35.1 kB]
Get:2 http://archive.raspbian.org/raspbian/ jessie/main vim-common armhf 2:7.4.488-7+deb8u2 [185 kB]
Get:3 http://archive.raspbian.org/raspbian/ jessie/main vim-runtime all 2:7.4.488-7+deb8u2 [5046 kB]
Get:4 http://archive.raspbian.org/raspbian/ jessie/main vim armhf 2:7.4.488-7+deb8u2 [812 kB]
Fetched 6077 kB in 1min 32s (65.6 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libgpm2:armhf.
(Reading database ... 19831 files and directories currently installed.)
Preparing to unpack .../libgpm2_1.20.4-6.1_armhf.deb ...
Unpacking libgpm2:armhf (1.20.4-6.1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../vim-common_2%3a7.4.488-7+deb8u2_armhf.deb ...
Unpacking vim-common (2:7.4.488-7+deb8u2) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../vim-runtime_2%3a7.4.488-7+deb8u2_all.deb ...
Adding 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:7.4.488-7+deb8u2) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a7.4.488-7+deb8u2_armhf.deb ...
Unpacking vim (2:7.4.488-7+deb8u2) ...
Processing triggers for mime-support (3.58) ...
Setting up libgpm2:armhf (1.20.4-6.1) ...
Setting up vim-common (2:7.4.488-7+deb8u2) ...
Setting up vim-runtime (2:7.4.488-7+deb8u2) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.4.488-7+deb8u2) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/vi.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/vi.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/vi.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/vi.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/vi.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/view.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/view.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/view.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/view.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/view.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/ex.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/ex.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/ex.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/ex.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/ex.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group ex) doesn't exist
Processing triggers for libc-bin (2.19-18+deb8u7) ...

vimといっても起動コマンドは viです。

オーディオデバイスを調べてみます。

root@volumio:/home/volumio# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

オンボードオーディオと HDMI、それと DACドーターボードがありますね。
あまり音質に影響があるとは思いませんが、オンボードオーディオと HDMIは使わないので無効にしたいですね。

root@volumio:/home/volumio# cat /boot/config.txt
initramfs volumio.initrd
gpu_mem=16
max_usb_current=1
disable_splash=1
dtparam=audio=off
dtparam=i2c_arm=on
dtoverlay=hifiberry-dacplus

というように dtparam=audioを offにします。
再起動してもう一度調べてみると、

root@volumio:/home/volumio# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

DACドーターボードだけになりました。

root@volumio:/home/volumio# cat /proc/asound/modules
 0 snd_soc_hifiberry_dacplus

こちらも同様です。