OpenWrt Forum Archive

Topic: Problems with MPD and TP-Link WR1043ND

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I successfully tried to flash the firmware of my TP-Link WR1043ND. Everything works fine excepting MPD. If I try to start the music playback different MPD clients I get disconnected and nothing else happens. Using aplay for testing if the audiointerface works results in a positive result. wink Here's my mpd.conf:


music_directory        "/usb"
playlist_directory        "/usb/playlists"
db_file            "/usb/tag_cache"
log_file            "/usb/mpd.log"
pid_file            "/usb/run/mpd/pid"
state_file            "/usb/lib/mpd/state"


# General music daemon options ################################################
bind_to_address        "192.168.2.9"
port                "6600"


zeroconf_enabled        "yes"

password                        "xxx@read,add,control,admin"


# Audio Output ################################################################

audio_output {
    type        "alsa"
    name        "My ALSA Device"
    device        "hw:0,0"    # optional
    format        "44100:16:2"    # optional
    mixer_device    "default"    # optional
    mixer_control    "PCM"        # optional
    mixer_index    "0"        # optional
}

filesystem_charset        "UTF-8"
id3v1_encoding            "UTF-8"

I played with the mpd.conf and now I get the following error. I think that's the point. Maybe the alsa.conf is not correct? Can anyone help?



ALSA lib pcm_direct.c:1605:(snd1_pcm_direct_parse_open_conf) The field ipc_gid must be a valid group (create group audio)

@Schmafu

How have you installed mpd, because if I want to install it, their would be too much libaries and so the space of the Router is too less.

Thank you very much!

You have to compile it by yourself otherwise it won't work. wink

Ok...

Could you please post your config file of mpd?

Would be very helpful.

Now I have the "polish" Image (Gargoyle 1.3.5 + Backfire 10.3.1-RC3)  and extended the space to the usb stick.
I have a USB-Hub 1.1 with the following devices:

root@Gargoyle:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MP3 [Sound Blaster MP3+], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

dmseg output

Linux version 2.6.32.16 (root@archeo) (gcc version 4.3.3 (GCC) ) #14 Wed Sep 29 13:12:19 CEST 2010
prom: fw_arg0=00000007, fw_arg1=a1f77fb0, fw_arg2=a1f78440, fw_arg3=00000008
MyLoader: sysp=008110c6, boardp=00020400, parts=00000002
bootconsole [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR9132 rev 2, CPU:400.000 MHz, AHB:200.000 MHz, DDR:400.000 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat 802bfbb0, node_mem_map 81000000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 board=TL-WR1043ND
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29384k/32768k available (2043k kernel code, 3384k reserved, 390k data, 152k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:56
Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is TP-LINK TL-WR1043ND
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs Sep 29 2010 13:09:21 Installing. 
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console [ttyS0] enabled, bootconsole disabled
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: s25sl064a (8192 Kbytes)
spi0.0: searching for MyLoader partition table at offset 0x10000
spi0.0: searching for MyLoader partition table at offset 0x20000
spi0.0: searching for MyLoader partition table at offset 0x30000
spi0.0: searching for MyLoader partition table at offset 0x40000
spi0.0: no MyLoader partition table found
Searching for RedBoot partition table in spi0.0 at offset 0x7e0000
Searching for RedBoot partition table in spi0.0 at offset 0x7f0000
No RedBoot partition table detected in spi0.0
spi0.0: no WRT160NL signature found
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000160000 : "kernel"
0x000000160000-0x0000007f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=520000, len=2D0000 
0x000000520000-0x0000007f0000 : "rootfs_data"
0x0000007f0000-0x000000800000 : "art"
0x000000020000-0x0000007f0000 : "firmware"
Realtek RTL8366RB ethernet switch driver version 0.2.2
rtl8366rb rtl8366rb: using GPIO pins 18 (SDA) and 19 (SCK)
rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found
rtl8366rb: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth0: using fixed link parameters
Atheros AR71xx hardware watchdog driver version 0.1.0
ar71xx-wdt: timeout=15 secs (max=21)
TCP westwood registered
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 152k freed
Please be patient, while OpenWrt loads ...
gpio-buttons driver version 0.1.2
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
Button Hotplug driver version 0.3.1
ar71xx: pll_reg 0xb8050014: 0x1a000000
eth0: link up (1000Mbps/Full duplex)
Registered led device: tl-wr1043nd:green:usb
Registered led device: tl-wr1043nd:green:system
Registered led device: tl-wr1043nd:green:qss
Registered led device: tl-wr1043nd:green:wlan
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ar71xx-ehci ar71xx-ehci: Atheros AR91xx built-in EHCI controller
ar71xx-ehci ar71xx-ehci: new USB bus registered, assigned bus number 1
ar71xx-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
ar71xx-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 1-1: new full speed USB device using ar71xx-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 1-1.1: new full speed USB device using ar71xx-ehci and address 3
usb 1-1.1: configuration #1 chosen from 1 choice
usb 1-1.3: new full speed USB device using ar71xx-ehci and address 4
usb 1-1.3: not running at top speed; connect to a high speed hub
usb 1-1.3: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Mini      0.1  PQ: 0 ANSI: 2
usb-storage: device scan complete
sd 0:0:0:0: [sda] 501759 512-byte logical blocks: (256 MB/244 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
eth0: link down
ar71xx: pll_reg 0xb8050014: 0x1a000000
eth0: link up (1000Mbps/Full duplex)
device eth0.1 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.1) entering forwarding state
Compat-wireless backport release: compat-wireless-2010-07-13-4-g04898a5
Backport based on wireless-2.6.git v2.6.35-rc6-48432-gdce358e
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
ath: EEPROM regdomain: 0x0
ath: EEPROM indicates default country code should be used
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x3a
ath: Country alpha2 being used: US
ath: Regpair used: 0x3a
phy0: Selected rate control algorithm 'minstrel_ht'
phy0: Atheros AR9100 MAC/BB Rev:0 AR2133 RF Rev:a2 mem=0xb80c0000, irq=2
cfg80211: Calling CRDA for country: US
NTFS driver 2.1.29 [Flags: R/O MODULE].
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
cfg80211: Regulatory domain changed to country: US
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
    (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (461 buckets, 1844 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
xt_time: kernel timezone is -0000
    Hooked IMQ after mangle on PREROUTING
    Hooked IMQ after nat on POSTROUTING
IMQ driver loaded successfully.
Ebtables v2.0 registered
usbcore: registered new interface driver snd-usb-audio
ar71xx-wdt: enabling watchdog timer

I still get the following error:

root@Gargoyle:~# mpd --create-db
output: line 198: No such audio output plugin: oss
Aborted

I have no idea why.. because also alsa is not working sad

Can someone please help me?

Thank you very much!

(Last edited by c147258 on 7 Oct 2010, 02:08)

It looks like you have enabled OSS support but you have to enable alsa support. Maybe you could try playing a wav-file using aplay?

Thank you for your response.

Now I activated ALSA again.

following outcome with mp3:

root@Gargoyle:~# mpc play
Clara Luzia - Narrow Margin
[paused]  #1/1   0:00/3:48 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ERROR: problems opening audio device

mpd.conf

audio_output {
    type        "alsa"
    name        "My ALSA Device"
    device        "hw:0,0"    # optional
    format        "44100:16:2"    # optional
    mixer_device    "Master"    # optional
    mixer_control    "Master"        # optional
    mixer_index    "0"        # optional
}

...muss leider erst mal ein wave file auftreiben sad

Vielen Dank für die Hifle!




root@Gargoyle:~# mpd --create-db
root@Gargoyle:~# mpd add Neu Wavesound.wav
too many arguments
Aborted
root@Gargoyle:~# cd /mp3/
root@Gargoyle:/mp3# mpd add Neu\ Wavesound.wav
too many arguments
Aborted

Test with wavefile

root@Gargoyle:/mp3# mpc play 1
Neu Wavesound.wav
[playing] #1/1   0:00/0:00 (100%)
volume: n/a   repeat: off   random: off   single: off   consume: off
root@Gargoyle:/mp3# mpc
Neu Wavesound.wav
[paused]  #1/1   0:00/0:00 (100%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ERROR: problems opening audio device
root@Gargoyle:/mp3#

EDIT: solved with ALSA

(Last edited by c147258 on 8 Oct 2010, 00:56)

Hello,

I am trying to get a package of mpd with all supports of mediafiles.

Would their be one?

Thank you very much!

The discussion might have continued from here.