CuBoxの続きです。
前回までの設定で音出し、MPoDでのアートワーク表示は完了していますので、ここからはチューニング編です。
なお、NASからファイルを読み込んでいる方は、もともとNAS優先の設定になっていますので、以下の内容はあまり意味が無いと思います。以下の設定値は僕の環境下で良いと思った値ですので、これがベストと言う事ではありませんが、音源をeSATA-HDDから取り込んでいる人にはデフォルトから設定を変える価値はあると思います。また、間違っている事があればご指摘頂けると幸いです。
まず、適当に音楽ファイルを再生します。
ここでは、僕の環境で一番負荷のかかる192k/24bitのFLACファイルを再生してみます。
その状態で以下のコマンドを入力します。
[root@cubox ~]# cat /proc/interrupts CPU0 0:????? 21937? orion_irq? orion_tick 7:??????? 383? orion_irq? serial 11:????????? 0? orion_irq? mv64xxx_i2c 24:???? 126494? orion_irq? ehci_hcd:usb1 25:????????? 0? orion_irq? ehci_hcd:usb2 29:????? 19043? orion_irq? eth0 30:???????? 88? orion_irq? mv643xx_eth 31:????????? 0? orion_irq? f1030000.crypto 35:?????? 8987? orion_irq? mmc0 39:????????? 2? orion_irq? f1060800.dma-engine 40:????????? 2? orion_irq? f1060800.dma-engine 42:????????? 2? orion_irq? f1060900.dma-engine 43:????????? 2? orion_irq? f1060900.dma-engine ?62:???? 450456? orion_irq? sata_mv 76:????????? 0? f10d0400.gpio? mmc0
ここで、以下の2つの優先順位を上げてみます。
24:???? 126494? orion_irq? ehci_hcd:usb1? //USB-DACへのデータ受け渡し
62:???? 450456? orion_irq? sata_mv? //eSATA-HDDからファイルの読み込み
#優先度の変更 [root@cubox ~]# vi /etc/init.d/mpdset.conf
デフォルトはこのようになっています。
chrt -f -p 54 `pgrep irq/24-ehci_hcd`
chrt -f -p 55 `pgrep irq/29-eth0`
以下のように変更してみます。
chrt -f -p 54 `pgrep irq/62-sata_mv`
chrt -f -p 56 `pgrep irq/24-ehci_hcd`
chrt -f -p 53 `pgrep irq/29-eth0`
#設定の反映 [root@cubox ~]# chmod 755 /etc/init.d/mpdset.conf
#再起動後、設定が反映されているか確認 [root@cubox ~]# ps -eLo pid,lwp,rtprio,priority,cmd PID?? LWP RTPRIO PRI CMD 1???? 1????? -? 20 /sbin/init --no-log --verbose 2???? 2????? -? 20 [kthreadd] 3???? 3????? 1? -2 [ksoftirqd/0] 4???? 4????? -? 20 [kworker/0:0] 7???? 7????? -?? 0 [kworker/u:0H] 8???? 8???? 99 -100 [posixcputmr/0] 9???? 9????? -?? 0 [khelper] 10??? 10????? -? 20 [kdevtmpfs] 12??? 12????? -? 20 [bdi-default] 13??? 13????? -?? 0 [kblockd] 14??? 14????? -?? 0 [ata_sff] 15??? 15????? -? 20 [khubd] 16??? 16????? -?? 0 [rpciod] 17??? 17????? -? 20 [kswapd0] 18??? 18????? -? 20 [fsnotify_mark] 19??? 19????? -?? 0 [nfsiod] 20??? 20????? -?? 0 [cifsiod] 21??? 21????? -?? 0 [xfsalloc] 22??? 22????? -?? 0 [xfs_mru_cache] 23??? 23????? -?? 0 [xfslogd] 24??? 24????? -?? 0 [crypto] 50??? 50???? 50 -51 [irq/39-f1060800] 51??? 51???? 50 -51 [irq/40-f1060800] 52??? 52???? 50 -51 [irq/42-f1060900] 53??? 53???? 50 -51 [irq/43-f1060900] ?? 54??? 54???? 54 -55 [irq/62-sata_mv] 55??? 55????? -? 20 [scsi_eh_0] 57??? 57????? -? 20 [spi0] 58??? 58????? -? 20 [kworker/u:2] 61??? 61???? 50 -51 [irq/30-mv643xx_] ?? 64??? 64???? 56 -57 [irq/24-ehci_hcd] 65??? 65???? 50 -51 [irq/25-ehci_hcd] 66??? 66???? 50 -51 [irq/11-mv64xxx_] 67??? 67???? 50 -51 [irq/35-mmc0] 68??? 68???? 50 -51 [irq/76-mmc0] 69??? 69????? -? 20 [mv_crypto] 70??? 70???? 50 -51 [irq/31-f1030000] 75??? 75????? -? 20 [mmcqd/0] 76??? 76????? -?? 0 [deferwq] 78??? 78????? -? 20 [kworker/u:3] 79??? 79????? -?? 0 [kworker/0:1H] 80??? 80????? -?? 0 [ext4-dio-unwrit] 107?? 107????? -? 20 /usr/lib/systemd/systemd-journald 122?? 122????? -? 20 [kworker/0:2] 138?? 138????? -? 20 /usr/lib/systemd/systemd-udevd 165?? 165????? -?? 0 [kworker/0:2H] 186?? 186????? -? 20 /usr/sbin/crond -n 191?? 191????? -? 20 /usr/sbin/sshd -D 194?? 194????? -? 20 avahi-daemon: running [cubox.local] 196?? 196????? -? 20 /usr/bin/syslog-ng -F 199?? 199????? -? 20 /usr/bin/dbus-daemon --system --address=systemd: --nofork 203?? 203????? -? 20 /usr/lib/systemd/systemd-logind 211?? 211????? -? 20 /sbin/agetty --noclear tty1 38400 linux 214?? 214????? -? 20 /sbin/agetty -s ttyS0 115200 38400 9600 vt102 218?? 218????? -? 20 avahi-daemon: chroot helper ? 237?? 237???? 53 -54 [irq/29-eth0] 287?? 287???? 50 -51 [irq/7-serial] 303?? 303????? -? 20 dhcpcd -qL -t 10 eth0 311?? 311????? -? 20 /usr/bin/lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf 313?? 313????? -? 20 /usr/sbin/ntpd -s 328?? 328????? -? 20 /usr/sbin/ntpd -s 353?? 353????? -? 20 [kjournald] 455?? 455????? -? 20 /usr/local/bin/mpd /tmp/mpd/mpd.conf 455?? 456????? -? 20 /usr/local/bin/mpd /tmp/mpd/mpd.conf 455?? 457???? 52 -53 /usr/local/bin/mpd /tmp/mpd/mpd.conf 455?? 458???? 49 -50 /usr/local/bin/mpd /tmp/mpd/mpd.conf 455?? 459???? 55 -56 /usr/local/bin/mpd /tmp/mpd/mpd.conf 1429? 1429????? -? 20 /usr/bin/lighttpd -D -f /etc/lighttpd/lighttpd.conf 2151? 2151????? -? 20 sshd: root@pts/0 2155? 2155????? -? 20 -bash 2175? 2175????? -? 20 [flush-179:0] 2176? 2176????? -? 20 ps -eLo pid,lwp,rtprio,priority,cmd
数字が大きいほうが優先して処理されます。
ここでは、USB-DACへ(56) > eSATAから読み込み(54) >? ネットワーク接続(53)としています。
#次に、 MPD動作関係の優先度を変更します。 [root@cubox ~]# vi /etc/mpd.conf
デフォルトはこのようになっています。
main_priority?????????? “OTHER:0”
player_priority???????? “FIFO:52”
decoder_priority??????? “FIFO:49”
update_priority???????? “OTHER:0”
audio_output priority? “FIFO:54”
この中で
audio_output priority? “FIFO:55”
と変更します。
ここでは
PCMデータをドライバーへ送る(55) > プレーヤーのコマンド管理(52) > PCMデータへの変換(49)
としています。
/etc/init.d/mpdset.conf
/etc/mpd.conf
2つの設定をまとめてみると
USB-DACへ(56) > PCMデータをドライバーへ送る(55) > eSATAから読み込み(54) >? ネットワーク接続(53) > プレーヤーのコマンド管理(52) > PCMデータへの変換(49)
となります。僕はFLACファイルを殆ど保有しておりませんので、FLACメインの方であれば、 PCMデータへの変換(49)の優先度が高い方が良いと思います。
以上でチューニングは終わりです。
以下、日常的に良く使うコマンド(自分用メモ)
#再起動と電源OFF [root@cubox ~]# rbt [root@cubox ~]# pof
#mpdの選択 [root@cubox ~]# selmpd? //mpdの再起動 [root@cubox ~]# selmpd 18y //0.18git(2012年09月) [root@cubox ~]# selmpd 18g???? //0.18git(2013年04月) [root@cubox ~]# selmpd 174s?? //0.17.4 stable [root@cubox ~]# selmpd 173s?? //0.17.3 stable
#MPDデータベースのアップデート [root@cubox ~]# mpc update
#eSATA HDDのマウントとアンマウント [root@cubox ~]# mount -t vfat /dev/sda1 /mnt/esata -o utf8 [root@cubox ~]# umount /mnt/esata
#LED消灯 [root@cubox ~]# echo none > /sys/class/leds/Power/trigger
#alsaミキサーの設定 [root@cubox ~]# alsamixer -Dhw
コメント