lightMPD/upnpgw(全部盛り)
私が勝手に付けた名前ですが(笑)全部盛りとは、以下の設定のことです。
1. playerにもupnpgwを使用
2. music dataとplaylistを別のイーサネットでplayerに送る
3. adapterとplayerのpolipo(キャッシュサーバー)をカスケード接続する
<<adapterの設定>>
/lightMPD/lightmpd.conf
"conf"に含まれる"lightmpd.conf-upnpgw-nasgate"を使用
---------------------------------------------------------------
#[network]は各自の環境に合わせる
#
[network]
interface=eth0
address=192.168.0.0
gateway=192.168.0.0
netmask=255.255.255.0
nameserver=192.168.0.0
domain=mydomain.jp
[ntp]
server=ntp.nict.jp
ntpd=no
timezone=Asia/Tokyo
[network:player]
interface=eth1
address=10.0.0.1
netmask=255.255.255.252
[network:nasgate]
interface=eth2
address=10.0.1.1
netmask=255.255.255.252
[cpuaffinity]
type=0
[irqpriority]
setdefault=no
[telnetd]
# yes | no
enable=yes
port=23
[upmpdcli]
enable=yes
upnpiface = eth0
mpdhost=10.0.0.2
mpdport=6600
friendlyname=UpLightMpd
ohproductroom=UpLightMpd
logfilename=/tmp/upmpdcli.log
openhome = 1
ohmetapersist = 1
loglevel = 3
[polipo]
enable=yes
#
proxyAddress = 0.0.0.0
allowedClients = 10.0.1.2
#
chunkHighMark = 1024
chunkLowMark = 256
chunkCriticalMark = 768
objectHighMark = 2048
#
dnsQueryIPv6 = no
cacheIsShared = false
dnsUseGethostbyname = yes
disableConfiguration = true
disableIndexing = true
disableLocalInterface = true
[nat]
masquerade=network:player,network:nasgate
dnsforwarding=yes
ntpforwarding=yes
8023=10.0.0.2:23
*****************************************************************
/lightMPD/mpd.conf
変更なし
*****************************************************************
/boot/grub/menu.lst
以下の部分を変更
---------------------------------------------------------------
# upnpgw
kernel /boot/bzImage-4.6.5rt10-64 root=/dev/ram0 ro console=ttyS0,115200n8 ramdisk_size=98304 rootfstype=romfs rootdelay=5 clocksource=hpet lightmpd.systype=apu1 lightmpd.bootdev=/dev/sda1
# standalone
#kernel /boot/bzImage-4.6.5rt10-64 root=/dev/ram0 ro console=ttyS0,115200n8 ramdisk_size=98304 rootfstype=romfs rootdelay=5 clocksource=tsc idle=poll processor.max_cstate=1 isolcpus=1 nohz_full=1 rcu_nocbs=1 lightmpd.systype=apu1 lightmpd.bootdev=/dev/sda1
<<playerの設定>>
/lightMPD/lightmpd.conf
---------------------------------------------------------------
#
#
[network]
interface=eth0
address=10.0.0.2
gateway=10.0.0.1
netmask=255.255.255.252
nameserver=10.0.0.1
domain=arakinet.jp
[network:nasgate]
interface=eth1
address=10.0.1.2
netmask=255.255.255.252
[route]
# nas-ip/32 = gateway
# 192.168.0.0/32=10.0.1.1
[ntp]
server=10.0.0.1
ntpd=no
timezone=Asia/Tokyo
[mpd]
load_module=mpd-0.19.18rt-native-dsd-upnp
[polipo]
enable = yes
proxyAddress = 127.0.0.1
allowedClients = 127.0.0.1
parentProxy = 10.0.1.1:8123
dnsQueryIPv6 = no
chunkHighMark = 1024
chunkLowMark = 256
chunkCriticalMark = 512
objectHighMark = 2048
cacheIsShared = false
dnsUseGethostbyname = yes
#
# disableVia = false
disableConfiguration = true
disableIndexing = true
disableLocalInterface = true
#
replyUnpipelineTime = 40
smallRequestTime = 20
maxSideBuffering = 15000
[rpcbind]
enable=no
[telnetd]
# yes | no
enable=yes
port=23
[webconsole]
# yes | no
# start page: http://thishost:${port}/index.html
enable=no
port=9000
[cpuaffinity]
# 0 normal
# 1 cpu1: usb irq handler
# 2 cpu1: usb irq handler
type=2
[irqpriority]
setdefault=no
xhci_hcd#0=FIFO:99
[debug]
interfaces=yes
resolvconf=yes
ntpd=yes
ntpconf=yes
ifconfig=yes
cards=yes
mounts=yes
ps=yes
mpdversion=yes
date=yes
ntpq=yes
music=yes
messages=yes
save=no
*****************************************************************
/lightMPD/mpd.conf
変更なし
*****************************************************************
/boot/grub/menu.lst
変更なし
素晴らしい音質の「全部盛り」ですが、環境によっては一部のwavファイルが再生されなかったり、alacでノイズとともに曲がスキップしてしまう不具合が確認されています。
不具合が発生した場合は、「イーサネットを分離」し「playerのpolipoだけを使用」する設定にすれば解消します。
playerのlightmpd.confの設定
---------------------------------------------------------------
[route]
nas-ip-address/32= 10.0.1.1
#parentProxy
*****************************************************************
playerのmpd.confの"curl"の設定
---------------------------------------------------------------
input {
plugin "curl"
proxy "127.0.0.1:8123"
}
---------------------------------------------------------------