little clicks and pops

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
User avatar
pasdesignal
Posts: 20
Joined: Sat Oct 02, 2010 2:31 am

Re: little clicks and pops

Post by pasdesignal »

The setup:

Asus WL-520gu, 1 x powered usb2 hub, 1 x 2 gig usb 'thumb drive', logitech generic usb audio adaptor (for testing, my decent one is one the bench at the mo...) and of course a network nfs server with lots of FLAC files on it (1TB).

Heres what my notes from the install say:

- Install fresh build Backfire 10.03.1-rc4 brcm47xx (latest trunk version actually)

- Basically follow step four of Mightyohm blog, but adapt as you must to latest version of Openwrt. Disabling wifi is the major difference.

- Install kmod-usb-core kmod-usb-ohci kmod-scsi-core kmod-usb-storage kmod-usb2

*I always reboot every so often when installing a few packages

- install kmod-fs-ext3

- Get extroot setup - its easy and is pretty painless if you READ and FOLLOW these instructions: http://wiki.openwrt.org/doc/howto/extroot#after.r26109

*check dmesg/logread after every reboot and just have a browse of messages to do with each section ie: usb.... all working good?good.

- Install sound modules and drivers: opkg-install kmod-sound-core kmod-usb-audio

- Install mpd: (includes... alsa-lib, mpd, libaudiofile, FAAD2, libfaad2, libmad, glib2, libcurl, libopenssl, libflac, libmms, libshout, libshout, libspeex, librt...)
**************************************************************************
ran out of memory. Try doing it one package/library at a time.
#######################################################
opkg update
opkg install alsa-lib
reboot
opkg update
opkg install libaudiofile
reboot
opkg install faad2
reboot
opkg install libflac
reboot
etc
etc
etc

- opkg install mpd mpc

*rebooting all the time remember...

- Edit /etc/mpd.conf and /etc/init.d/mpd to do basic mpd config stuff, you know the drill. Google it.

- work out a few basic little errors, nothing unmanageable...

- Seems to work! It least for internet radio....:-)

MY FLAC FILES ARE ON A NETWORK DRIVE, RUNNING NFS:

MOUNT NFS DRIVE:
opkg install kmod-fs-nfs portmap
portmap start
portmap enable
edit /etc/init.d/mpd
sleep 10
mount -t nfs 192.168.1.1:/mnt /music -o rw,nolock,proto=udp
reboot
mpc update
mpc listall
[then use remote device to control mpd. FUN FUN FUN!]
OMG it works.

To see output paramaters including output samplerate etc, use: cat /proc/asound/card0/pcm0p/sub0/hw_params

User avatar
mightyohm
Site Admin
Posts: 1016
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: little clicks and pops

Post by mightyohm »

pasdesignal wrote:Success!


ONE PROBLEM: wifi still doesn't work for the ASUS WL-520GU using the 2.6 Kernel. Shouldn't be long though....(?) So for now the device is using cat5 between player and FLAC server. Not a big issue for the moment, but ultimately this will be a wireless solution.

Arghhhh... I was hoping that when I went back to compile from the trunk wireless would be working with 2.6 now....

When are they ever going to fix this.... :x

philipp
Posts: 3
Joined: Thu Apr 14, 2011 7:37 am

Re: little clicks and pops

Post by philipp »

I have the same proble with little clicks and pops. I run mpd on an Linksys WRT160NL. What I have recognized is that the problem is only with mpd. If I play the same file at the same location with madplay the sound quality is excellent.

My question is what a backend madplay uses. I tried to find it out, but didn't find an answer, maybe it usese also alsa like my mpd.conf but then it's confusing why madplay work and mpd not.

Can anyone post his mpd.conf which is in use with the latest trunk of openWrt=

My mpd.conf:

Code: Select all

# Input #######################################################################
#
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}
###############################################################################

# Audio Output ################################################################
#
audio_output {
        type            "alsa"
        name            "local alsa"
        mixer_device    "default"
        mixer_control   "PCM"
}
###############################################################################

philipp
Posts: 3
Joined: Thu Apr 14, 2011 7:37 am

Re: little clicks and pops

Post by philipp »

I found a solution which works for me. I use OSS instead of ALSA. Because OSS is per default disabled in the latest trunk you have to modify the makefile for mpd.

You can find the Makefile here: trunk/feeds/packages/sound/mpd/
Look for the following line: --disable-oss and change it to --enable-oss. Then recompile the firmware and try it. (This works only if you directly compile mpd into the firmware binary) :P

philipp
Posts: 3
Joined: Thu Apr 14, 2011 7:37 am

Re: little clicks and pops

Post by philipp »

I forgot to post my actual mpd.conf file:

Code: Select all

# Input #######################################################################
#
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}
###############################################################################

# Audio Output ################################################################
#
audio_output {
       type            "oss"
       name            "My OSS Device"
       device          "/dev/dsp"      # optional
#      format          "44100:16:2"    # optional
#      mixer_type      "hardware"      # optional
#      mixer_device    "/dev/mixer"    # optional
#      mixer_control   "PCM"           # optional
}
###############################################################################

User avatar
pasdesignal
Posts: 20
Joined: Sat Oct 02, 2010 2:31 am

Re: little clicks and pops

Post by pasdesignal »

philipp wrote:I found a solution which works for me. I use OSS instead of ALSA. Because OSS is per default disabled in the latest trunk you have to modify the makefile for mpd.
Nice one!

I will post my mpd conf file when I get home.

User avatar
mightyohm
Site Admin
Posts: 1016
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: little clicks and pops

Post by mightyohm »

Any luck?

User avatar
pasdesignal
Posts: 20
Joined: Sat Oct 02, 2010 2:31 am

Re: little clicks and pops

Post by pasdesignal »

Sorry, got distracted! :mrgreen:
audio_output {
type "alsa"
name "Alsa Output"
device "hw:0,0" #optional
format "44100:16:2" #optional
mixer_type "software" #optional
mixer_device "default" #optional
mixer_control "PCM" #optional
# mixer_index "0" #optional
}

dumghen
Posts: 1
Joined: Thu May 12, 2011 7:24 am

Re: little clicks and pops

Post by dumghen »

Hi,

Does anyone managed to get working playing internet AAC streams on OpenWRT?
Mp3 and Ogg streams work well with wget | madplay,
It would be very helpful if some player had this functionality. (No killall wget for stopping player, safer stopping method)
I don't need a relay or streaming mp3 player (like mpd, streamripper, icecast which are working as streaming players but are not good for me).
I just want to play streams locally (I'm having a USB Sound Adapter).
libfaad2 and faad2 are in OpenWRT repository but faad2 is just a converter.
mocp knows libfaad2 but it's still not included in OpenWRT repo.
Any ideas?

mieczotronix
Posts: 14
Joined: Tue Nov 23, 2010 2:48 pm

Re: little clicks and pops

Post by mieczotronix »

I've just managed to install everything on

openwrt-brcm47xx-squashfs-10.03.1-rc5

with extroot, nfs, samba, alsa drivers

However I think, I've been still hearing some tiny clicks on .flacs, but this may now be caused due to files being copied in the background onto my new drive. I will check it more thoroughly later and let you know...
I was also wondering whether I could put a simple web mpd frontend to control my player from my Kindle.
I am not sure however if I could install php to run with the existing uhttpd...and if it won't overload the system.
Last edited by mieczotronix on Mon Aug 01, 2011 4:17 am, edited 1 time in total.

Post Reply