level 5
OPENWRT_SKY
楼主
openwrt路由mpd设置故障如下:
etc/mpd.conf配置文件
music_directory "/mnt/sda1/mpn/music"
playlist_directory "/mnt/sda1/mpn/music_playlist"
db_file "/mnt/sda1/mpn/music_bin/mpd.db"
log_file "/mnt/sda1/mpn/music_bin/mpd.log"
pid_file "/var/run/mpd.pid"
state_file "/mnt/sda1/mpn/music_bin/mpdstate"
sticker_file "/mnt/sda1/mpn/music_bin/mpd.sql"
user "root"
group "root"
bind_to_address "0.0.0.0"
port "6600"
log_level "default"
auto_update "yes"
auto_update_depth "8"
audio_output {
type "alsa"
name " USB PnP Sound Device "
device "/dev/dsp"
format "44100:16:2"
mixer_type "hardware"
mixer_device "/dev/mixer"
mixer_control "Speaker"
}
#audio_buffer_size "2048"
buffer_before_play "10%"
connection_timeout "60"
max_connections "4"
max_playlist_length "1024"
max_command_list_size "2048"
max_output_buffer_size "4096"
filesystem_charset "UTF-8"
id3v1_encoding "ISO-8859-1"
initid/mpd配置文件
#!/bin/sh /etc/rc.common
# Copyright (C) 2007-2010 OpenWrt.org
START=93
start() {
#create mpd directories
pld=`grep ^playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
if [ ! -d $pld ]; then
mkdir -p $pld
fi
# Set the initial volume to something manageable
amixer set Speaker 40
#start mpd
if [ -x /bin/nice ]; then
# This has real-time constraints, so let's at least tell the OS
# that this should have higher priority to avoid skipping
# when doing other things in the background.
nice="nice -n -10"
fi
$nice /usr/bin/mpd
}
stop() {
killall mpd
}
mpd启动
root@DreamBox:~# /etc/init.d/mpd start
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch pswitch-joined penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 151
Mono:
Front Left: Playback 40 [26%] [-20.88dB] [on]
Front Right: Playback 40 [26%] [-20.88dB] [on]
root@DreamBox:~#
MPC启动
root@DreamBox:~# mpc
volume: n/a repeat: on random: off single: off consume: off
root@DreamBox:~#
mpd.log内容
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
Dec 25 22:46 : mixer: Failed to read mixer for ' USB PnP Sound Device ': failed to attach to /dev/mixer: No such file or directory
Dec 25 22:46 : client: Max Connections Reached!
Dec 25 22:49 : client: Max Connections Reached!
mpd.db内容
info_begin
format: 1
mpd_version: 0.16.1
fs_charset: UTF-8
tag: Artist
tag: ArtistSort
tag: Album
tag: AlbumArtist
tag: AlbumArtistSort
tag: Title
tag: Track
tag: Name
tag: Genre
tag: Date
tag: Composer
tag: Performer
tag: Disc
tag: MUSICBRAINZ_ARTISTID
tag: MUSICBRAINZ_ALBUMID
tag: MUSICBRAINZ_ALBUMARTISTID
tag: MUSICBRAINZ_TRACKID
info_end
mpdstate内容
sw_volume: 35
audio_device_state:1: USB PnP Sound Device
state: stop
random: 0
repeat: 1
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: nan
playlist_begin
playlist_end
安卓MPDroid客户端能连接但无任何内容;文件mpd.erro、mpd.pid、mpd.sql以及music_playlist内均为空白
请高手给予指点,谢谢了!
2015年12月29日 12点12分
1
etc/mpd.conf配置文件
music_directory "/mnt/sda1/mpn/music"
playlist_directory "/mnt/sda1/mpn/music_playlist"
db_file "/mnt/sda1/mpn/music_bin/mpd.db"
log_file "/mnt/sda1/mpn/music_bin/mpd.log"
pid_file "/var/run/mpd.pid"
state_file "/mnt/sda1/mpn/music_bin/mpdstate"
sticker_file "/mnt/sda1/mpn/music_bin/mpd.sql"
user "root"
group "root"
bind_to_address "0.0.0.0"
port "6600"
log_level "default"
auto_update "yes"
auto_update_depth "8"
audio_output {
type "alsa"
name " USB PnP Sound Device "
device "/dev/dsp"
format "44100:16:2"
mixer_type "hardware"
mixer_device "/dev/mixer"
mixer_control "Speaker"
}
#audio_buffer_size "2048"
buffer_before_play "10%"
connection_timeout "60"
max_connections "4"
max_playlist_length "1024"
max_command_list_size "2048"
max_output_buffer_size "4096"
filesystem_charset "UTF-8"
id3v1_encoding "ISO-8859-1"
initid/mpd配置文件
#!/bin/sh /etc/rc.common
# Copyright (C) 2007-2010 OpenWrt.org
START=93
start() {
#create mpd directories
pld=`grep ^playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
if [ ! -d $pld ]; then
mkdir -p $pld
fi
# Set the initial volume to something manageable
amixer set Speaker 40
#start mpd
if [ -x /bin/nice ]; then
# This has real-time constraints, so let's at least tell the OS
# that this should have higher priority to avoid skipping
# when doing other things in the background.
nice="nice -n -10"
fi
$nice /usr/bin/mpd
}
stop() {
killall mpd
}
mpd启动
root@DreamBox:~# /etc/init.d/mpd start
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch pswitch-joined penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 151
Mono:
Front Left: Playback 40 [26%] [-20.88dB] [on]
Front Right: Playback 40 [26%] [-20.88dB] [on]
root@DreamBox:~#
MPC启动
root@DreamBox:~# mpc
volume: n/a repeat: on random: off single: off consume: off
root@DreamBox:~#
mpd.log内容
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
Dec 25 22:46 : mixer: Failed to read mixer for ' USB PnP Sound Device ': failed to attach to /dev/mixer: No such file or directory
Dec 25 22:46 : client: Max Connections Reached!
Dec 25 22:49 : client: Max Connections Reached!
mpd.db内容
info_begin
format: 1
mpd_version: 0.16.1
fs_charset: UTF-8
tag: Artist
tag: ArtistSort
tag: Album
tag: AlbumArtist
tag: AlbumArtistSort
tag: Title
tag: Track
tag: Name
tag: Genre
tag: Date
tag: Composer
tag: Performer
tag: Disc
tag: MUSICBRAINZ_ARTISTID
tag: MUSICBRAINZ_ALBUMID
tag: MUSICBRAINZ_ALBUMARTISTID
tag: MUSICBRAINZ_TRACKID
info_end
mpdstate内容
sw_volume: 35
audio_device_state:1: USB PnP Sound Device
state: stop
random: 0
repeat: 1
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: nan
playlist_begin
playlist_end
安卓MPDroid客户端能连接但无任何内容;文件mpd.erro、mpd.pid、mpd.sql以及music_playlist内均为空白
请高手给予指点,谢谢了!