opkg update
opkg install block-mount block-hotplug block-extroot kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-usb-storage kmod-fs-ext4
mkdir / mnt / sda1
mount / dev / sda1 / mnt / sda1
tar -C / overlay -cvf -. | tar -C / mnt / sda1 -xf -
config mount
option target / overlay
option device / dev / sda1
option fstype ext4
option options rw, sync
option enabled 1
option enabled_fsck 0
mount | grep sda
/ dev / sda1 on / overlay type ext4 (rw, sync, relatime, user_xattr, barrier = 1, data = ordered)
opkg install kmod-usb audio kmod-sound-core
dmesg | grep -i audio
[41.080000] usbcore: registered new interface driver snd-usb-audio
opkg install pulseaudio-daemon
load-module module-native-protocol-unix auth-anonymous = 1 # for software running from the router itself
load-module module-alsa-sink device = hw: 0.0 tsched = 0 # tsched = 0 is a dirty hack for eliminating crackles and wheezing
load-module module-simple-protocol-tcp port = 4712 rate = 44100 format = s16le channels = 2 # for playing sound with windows
load-module module-rtp-recv # for playing sound from linux devices over wifi
load-module-module-native-protocol-tcp auth-anonymous = 1 # to play sound from linux devices over ethernet
--- pulseaudio_old 2013-06-19 12:30:18.425539419 +0400 +++ pulseaudio 2013-06-19 12:30:04.077704388 +0400 @@ -19,6 +19,9 @@ chmod 0750 /var/lib/pulse chown pulse:pulse /var/lib/pulse } + [ -d /dev/snd ] && { + chown -R pulse:pulse /dev/snd + } service_start /usr/bin/pulseaudio --daemonize --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 }
/etc/init.d/pulseaudio enable
/etc/init.d/pulseaudio start
pacmd load-module-tunnel-sink server =% serverIP%
pacmd set-default-sink 1 # number may differ depending on the output of pacmd list-sink
svn co svn: //svn.openwrt.org/openwrt/tags/attitude_adjustment_12.09/
cd attitude_adjustment_12.09
make tools / install
make toolchain / install
./scripts/feeds update
./scripts/feeds install pulseaudio
./scripts/feeds install mpd
--- Makefile_old 2013-06-19 12:12:00.458287669 +0400 +++ Makefile 2013-06-19 12:07:43.225298052 +0400 @@ -139,7 +139,8 @@ $(INSTALL_DIR) \ $(1)/usr/lib/pkgconfig \ $(1)/usr/include/pulse \ - $(1)/usr/lib + $(1)/usr/lib \ + $(1)/usr/lib/pulseaudio $(CP) \ $(PKG_INSTALL_DIR)/usr/include/pulse/* \ $(1)/usr/include/pulse @@ -149,6 +150,9 @@ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/*.so* \ $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/*.so* \ + $(1)/usr/lib/pulseaudio/ endef define Package/pulseaudio-daemon/install
--- Makefile_old 2013-06-18 17:47:56.277865458 +0400 +++ Makefile 2013-06-18 17:37:35.037187159 +0400 @@ -49,7 +49,7 @@ DEPENDS+= \ +AUDIO_SUPPORT:alsa-lib \ +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \ - +libmms +libogg +libshout +libsndfile +libvorbis + +libmms +libogg +libshout +libsndfile +libvorbis +pulseaudio-daemon PROVIDES:=mpd VARIANT:=full endef @@ -137,7 +137,7 @@ $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \ TARGET_CFLAGS += -std=gnu99 -TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib +TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio # use gcc instead of g++ to avoid unnecessary linking against libstdc++ TARGET_CXX:=$(TARGET_CC) @@ -160,6 +160,7 @@ --enable-sndfile \ --enable-vorbis \ --enable-vorbis-encoder \ + --enable-pulse \ --with-faad="$(STAGING_DIR)/usr" \ --with-tremor=no \
make package / mpd / compile
make package / mpd / install
opkg update
opkg install curl
rm / tmp / opkg-lists / attitude_adjustment
opkg install /tmp/mpd-full_0.16.5-2_ar71xx.ipk
input {
plugin "curl"
}
audio_output {
type "pulse"
name "My Device"
}
/etc/init.d/mpd enable
/etc/init.d/mpd start
mpc add pub4.di.fm : 80 / di_latinhouse
mpc play
wget dev.openwrt.org/export/34527/packages/libs/faad2/Makefile
make package / faad2 / compile
make package / faad2install
linco.exe -B 16 -C 2 -R 44100 | nc.exe tplink_IP 4712
Source: https://habr.com/ru/post/184110/
All Articles