MPD and USB sound card

MPD and USB sound card

Postby lexam » Mon Feb 05, 2018 2:47 pm

Hi all,

OK, I have a weird request: would it be possible to somehow install MPD (https://www.musicpd.org/), plug a simple USB sound card in the front USB port of my NWS2 and have a nice Music Player to connect to some powered speakers?

Any hints?

Thanks
lexam
 
Posts: 16
Joined: Mon Feb 05, 2018 12:26 pm

Re: MPD and USB sound card

Postby fvdw » Mon Feb 05, 2018 3:51 pm

I can try to compile it for you. Playing music should be ok as long as no transcoding is required. I never tried an usb sound card so thats sometning for you to try out.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: MPD and USB sound card

Postby lexam » Mon Feb 05, 2018 4:08 pm

I've installed mpd, via ipkg, however I think I'm missing the kernel module for the USB sound card. I think that if I had that, this might just work... If you can compile it for me, I could give it a try.

Thanks
lexam
 
Posts: 16
Joined: Mon Feb 05, 2018 12:26 pm

Re: MPD and USB sound card

Postby fvdw » Mon Feb 05, 2018 4:16 pm

which sound card are you using ?
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: MPD and USB sound card

Postby lexam » Mon Feb 05, 2018 4:21 pm

I'm using an el-cheapo off of ebay... lsusb doesn't work unfortunately (unable to initialize libusb: -99), but dmesg says the following:

[ 4507.422444] usb 1-1: new full-speed USB device number 4 using orion-ehci
[ 4507.578497] usb 1-1: New USB device found, idVendor=0d8c, idProduct=013c
[ 4507.585213] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4507.592325] usb 1-1: Product: USB PnP Sound Device
[ 4507.597136] usb 1-1: Manufacturer: C-Media Electronics Inc.
[ 4507.644184] input: C-Media Electronics Inc. USB PnP Sound Device as /devices/platform/orion-ehci.0/usb1/1-1/1-1:1.3/0003:0D8C:013C.0003/input/input3
[ 4507.782770] hid-generic 0003:0D8C:013C.0003: input: USB HID v1.00 Device [C-Media Electronics Inc. USB PnP Sound Device] on usb-orion-ehci.0-1/input3

BR
lexam
 
Posts: 16
Joined: Mon Feb 05, 2018 12:26 pm

Re: MPD and USB sound card

Postby fvdw » Mon Feb 05, 2018 4:34 pm

lsub is outated and not working for newer kernels
Give this command
Code: Select all
/usr/bin/usb-devices
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: MPD and USB sound card

Postby lexam » Mon Feb 05, 2018 4:36 pm

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0d8c ProdID=013c Rev=01.00
S: Manufacturer=C-Media Electronics Inc.
S: Product=USB PnP Sound Device
C: #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I: If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I: If#= 3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
lexam
 
Posts: 16
Joined: Mon Feb 05, 2018 12:26 pm

Re: MPD and USB sound card

Postby fvdw » Mon Feb 05, 2018 5:02 pm

from what i read on the internet this requires a kernel recompile, need some time to look at consequences
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: MPD and USB sound card

Postby fvdw » Mon Feb 05, 2018 6:13 pm

Attached the required modules as far as I could find on the internet which ones should be required for this device, please check if they load and work on the current kernel, note that loading of the modules must be in certain sequence, see below

Code: Select all
usbhid.ko
soundcore.ko
snd-mixer-oss.ko
snd-pcm-oss.ko
core/snd.ko
snd-hwdep.ko
snd-timer.ko
snd-pcm.ko
snd-rawmidi.ko
snd-seq.ko
snd-seq-device.ko
snd-seq-midi.ko
snd-seq-midi-event.ko
snd-usb-audio.ko
snd-usbmidi-lib.ko

possible usbhid.ko is already present in the firmware

If they don't load or work in the current kernel, I will post an updated kernel
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: MPD and USB sound card

Postby fvdw » Mon Feb 05, 2018 10:59 pm

out of curiosity I tried to compile mpd

mpd-0.20x will not compile for arm5v
see https://archlinuxarm.org/forum/viewtopi ... 15&t=11311

But I was able to compile version 0.19.21 from dec 2016 :mrgreen:
Code: Select all
root@fvdwsl-5big2:/share/1000/fvdw/mpd-0.19.21/src # ./mpd --help
Usage:
  mpd [OPTION...] [path/to/mpd.conf]

Music Player Daemon - a daemon for playing music.

Options:
  -h, --help        show help options
  --kill            kill the currently running mpd session
  --no-config       don't read from config
  --no-daemon       don't detach from console
  --stderr          print messages to stderr
  -v, --verbose     verbose logging
  -V, --version     print version number
root@fvdwsl-5big2:/share/1000/fvdw/mpd-0.19.21/src #


Code: Select all
root@fvdwsl-5big2:/share/1000/fvdw/mpd-0.19.21/src # ./mpd --version
Music Player Daemon 0.19.21

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2014 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Database plugins:
 simple

Storage plugins:
 local smbclient

Neighbor plugins:
 smbclient

Decoders plugins:
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [dsdiff] dff
 [dsf] dsf
 [pcm]

Output plugins:
 null fifo oss httpd recorder

Encoder plugins:
 null vorbis wave flac

Archive plugins:
 [bz2] bz2

Input plugins:
 file archive curl smbclient

Playlist plugins:
 extm3u m3u pls cue embcue

Protocols:
 file:// http:// https:// smb://
root@fvdwsl-5big2:/share/1000/fvdw/mpd-0.19.21/src #


However are you sure this player can play via usb port ?
Seems to me more a media server accessible via network :scratch
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Next

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 4 guests