General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Mar 23, 2017 6:15 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Aug 27, 2013 5:20 pm 
Offline

Joined: Tue Aug 27, 2013 5:09 pm
Posts: 11
Hi,
It's my first post here, and i like your work, FFp stick is very Nice!!!!
Im trying to connect a soundcard to NAs221 trought USB, im meaning a Creative Xmod.
Now if use lsusb, the soundcard appear in list, but i would like to test it.
I think its necessary to install Alsa, alsa-mixer and derivate on FFp..But i dont know how..
Can you help me for instal allsa or a soundcard manager ?
Thanks, and sorry for my bad English ;)


Top
 Profile  
 
PostPosted: Tue Aug 27, 2013 6:46 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5958
Actually you need only the driver, which is called a 'module' in Linux speak. I *think* it's included in package zyxel_modules-2.6.24.4. Install that, and install module_utils. Then execute (as root)
Code:
modprobe snd-usb-audio
If you now plugin the soundcard, you should see in dmesg that the card is recognized.


Top
 Profile  
 
PostPosted: Tue Aug 27, 2013 10:05 pm 
Offline

Joined: Tue Aug 27, 2013 5:09 pm
Posts: 11
Thanks for the reply Mijzelf, i've installed zyxel-utils and module-utils, but whith modprobe, there is an error:

Code:
root@NSA221:~# modprobe snd-usb-audio
modprobe: chdir(2.6.24.4): No such file or directory

I've used dmesg after modprobe and the soundcard seem recognized:

Code:
In usb_disconnect, and number is 2 .....
usb 1-1.3: USB disconnect, address 6
usb 1-1.3: new full speed USB device using oxnas-ehci and address 7
In hub_port_init, and number is 3, retry 0, port 3 .....
usb 1-1.3: configuration #1 chosen from 1 choice
input: Creative Technology Ltd Creative Xmod Wireless as /class/input/input4
input: USB HID v1.11 Device [Creative Technology Ltd Creative Xmod Wireless] on usb-usb-1.3
input: Creative Technology Ltd Creative Xmod Wireless as /class/input/input5
input: USB HID v1.11 Keyboard [Creative Technology Ltd Creative Xmod Wireless] on usb-usb-1.3


How i can test a sound with command line?

Thanks a lot! :)


Top
 Profile  
 
PostPosted: Wed Aug 28, 2013 8:27 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5958
Quote:
i've installed zyxel-utils
that *should* be zyxel_modules-2.6.24.4. You can (manually) download it here.

zyxel_modules-2.6.24.4 installs kernel modules in /ffp/lib/modules/2.6.24.4/. The modprobe message suggests that directory doesn't exist.

Quote:
How i can test a sound with command line?
First you need to create the device nodes (see here), and AFAIK then you can just echo some raw sound file in a dsp device. Something like
Code:
cat some_file >/dev/adsp0
Make sure you don't amplify too strong, it can sound horrible.

Or you could use something like mpd or madplay. Don't know if they are available yet for FFP 0.7.

/Edit: They were not available. Compiled them, and put them here. Both are dependent on libmad and libid3tag from Uli.


Top
 Profile  
 
PostPosted: Wed Aug 28, 2013 5:13 pm 
Offline

Joined: Tue Aug 27, 2013 5:09 pm
Posts: 11
I've tried all afternoon :roll:
I've uninstall zyxel module 2.6.31.8 and installed zyxel module 2.6.24.4 with funpkg, and now with, "modprobe snd-usb-audio", there is no error.
With "dmesg" i can see:

Code:
usbcore: registered new interface driver snd-usb-audio


With command "cat some_file >/dev/adsp0" , i send a wav file, but i dont hear nothing...with amplifier on ;) .
After cat command i can see a device in /dev/adsp0 and the filesize is exactly the same of file.wav...
I've jumped the guide to made a device nodes, because it dont work for me:
Code:
root@NSA221:/home# mknod -m 660 /dev/adsp0 c 14 0; chgrp audio /dev/adsp0
mknod: `/dev/adsp0': File exists
chgrp: invalid group: `audio'

At this point i've Installed madplay (Thanks for compile Job ) but it need "libmad.so.0 ; libid3tag" and i dont know where find it.
You think i need alsa, alsa-mixer ecc for stream audio to soundcard from tablet?
My idea is to use Nsa221 as an airplay/dlna receiver..
Thanks a lot!


Top
 Profile  
 
PostPosted: Wed Aug 28, 2013 6:21 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5958
Quote:
After cat command i can see a device in /dev/adsp0 and the filesize is exactly the same of file.wav...
I've jumped the guide to made a device nodes, because it dont work for me:
Did you create the device node before catting the wav file? If not, you just copied the wav file. And then you can't create the device node anymore, because the filename is already used.
So delete the file, and try to recreate the device node.
You can just skip the chgrp command. The owner/group of the device node is not very exiting, at this stage.
Quote:
it need "libmad.so.0 ; libid3tag" and i dont know where find it.
It's in Uli's repository. Install uwsiteloader, and use it to add Uli's repository, and then you can use slacker to install libmad and libid3tag.
Quote:
You think i need alsa, alsa-mixer ecc for stream audio to soundcard from tablet?
My idea is to use Nsa221 as an airplay/dlna receiver..
Really? Most people use their nas as dlna server. I don't know what is needed for an airplay target.


Top
 Profile  
 
PostPosted: Thu Aug 29, 2013 2:14 pm 
Offline

Joined: Tue Aug 27, 2013 5:09 pm
Posts: 11
Hi Mz,
Yes, i've first created the node and then catted the file, this is the sequence:
Code:
mknod -m 660 /dev/dsp0 c 14 0

Code:
cat Soldier.mp3 >/dev/dsp0

Only with device dsp0, cat command dont give any error, then in /dev/dsp0 have the same filesize of audio file, and i dont hear nothing..boh.
Thanks for the uli's reporitories, now madplay is installed, but when:
Code:
root@NSA221:/home# madplay Soldier.mp3
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
audio: /dev/dsp: No such file or directory

I've used:
Code:
root@NSA221:/home# cat /proc/asound/devices
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer

I hope its useful for resolve this issue..
Thanks Mijzelz!!


Top
 Profile  
 
PostPosted: Thu Aug 29, 2013 6:02 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5958
Quote:
cat /proc/asound/devices
This lists all available alsa devices. If you insert a 2nd soundcard, you'll get more devices. The numbers are the minors of the devices, the majors are all 116.
So your alsa interface is fully populated with
Code:
mkdir -p /dev/snd/
mknod /dev/snd/controlC0 c 116 0
mknod /dev/snd/pcmC0D0p c 116 16
mknod /dev/snd/pcmC0D0c c 116 24
mknod /dev/snd/timer c 116 33
Quote:
audio: /dev/dsp: No such file or directory
Did you create it?
Code:
mknod /dev/mixer c 14 0
mknod /dev/dsp c 14 3
If you created it, it's possible OSS is not available yet. Try
Code:
modprobe snd-pcm-oss
modprobe snd-mixer-oss
(madplay (and mpd) is compiled without alsa support, so it needs an oss interface)
Quote:
Only with device dsp0, cat command dont give any error, then in /dev/dsp0 have the same filesize of audio file, and i dont hear nothing..boh.
Hm. Now I see dsp0 has the same major/minor as /dev/mixer. I don't know what a mixer is supposed to do with that kind of data. Maybe just buffer it for later use?
BTW, no way that mp3 could be played that way. You are streaming the file into the kernel, and the kernel cannot decode mp3. The best you could get is the file interpreted as raw sound.


Top
 Profile  
 
PostPosted: Fri Aug 30, 2013 10:17 am 
Offline

Joined: Tue Aug 27, 2013 5:09 pm
Posts: 11
After a reboot of nas i try this sequence:
Code:
modprobe snd-usb-audio
mkdir -p /dev/snd/mknod /dev/mixer c 14 0
mknod -m 660 /dev/dsp0 c 14 0
mknod /dev/snd/controlC0 c 116 0
mknod /dev/snd/pcmC0D0p c 116 16
mknod /dev/snd/pcmC0D0c c 116 24
mknod /dev/snd/timer c 116 33
mknod /dev/dsp c 14 3
modprobe snd-pcm-oss
modprobe snd-mixer-oss


after dmesg:
Code:
usbcore: registered new interface driver snd-usb-audio



I finded some true raw file and when i use madplay now there is no error with dsp..but:
Code:
root@NSA221:/home# madplay sample.raw
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
error: frame 0: lost synchronization
0 frames decoded (0:00:00.0), -inf dB peak amplitude, 0 clipped samples

or with other file:
Code:
root@NSA221:/home# madplay test.raw
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
error: frame 0: lost synchronization
output: ioctl(SNDCTL_DSP_SYNC): Broken pipe

mh, from soundcard dont out any sound in the boh case...boh
But if i now see dmesg:
Code:
usbcore: registered new interface driver snd-usb-audio
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth

thank


Top
 Profile  
 
PostPosted: Fri Aug 30, 2013 10:47 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5958
While you could be able to input a raw sound file into /dev/dsp, Madplay is designed to decode mp3's. So reboot, and retry with an mp3.
Quote:
cannot submit datapipe for urb 0, error -28: not enough bandwidth
Who knows what you get when decompressing raw sound as if it was mp3 compressed?


Top
 Profile  
 
PostPosted: Fri Aug 30, 2013 1:00 pm 
Offline

Joined: Tue Aug 27, 2013 5:09 pm
Posts: 11
Ok, sorry, i've tried with mp3:
Quote:
root@NSA221:/home# madplay Bells.mp3
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
Title: Hells Bells
Composer: Angus Young/Brian Johnson/Malcolm Young
Artist: ACDC
Orchestra: AC/DC
Album: Back in Black
Track: 1
Year: 1980
Publisher: EPC
Genre: Other
output: ioctl(SNDCTL_DSP_SYNC): Broken pipe

in dmesg same error:
Quote:
cannot submit datapipe for urb 0, error -28: not enough bandwidt

Im searching for a solution,,, thank Mz


Top
 Profile  
 
PostPosted: Fri Aug 30, 2013 2:48 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5958
That error is spawned by the function start_urbs() in usbaudio.c, and as far as I can see it has nothing to do with the type of data you are trying to send. It just tries to establish a connection to the soundcard, and then a bandwidth error (ENOSPC) is strange.

Are you using an USB hub? Try without.

Does your nas support UPS? If yes, should it be connected to a specific port? In that case you have at least 2 different types of ports. A UPS normally only 'talks' USB 1.1, while the Oxnas chip in your box has 2 USB 2.0 only ports. Try another port, in that case.


Top
 Profile  
 
PostPosted: Fri Aug 30, 2013 4:07 pm 
Offline

Joined: Tue Aug 27, 2013 5:09 pm
Posts: 11
Hi, i dont have a usb hub in the middle, sound card it's connected directly to nas.
I've tried all 3 available port of the nas, with the same result..
Yes nas221 have a Ups support, but this feature its non activable without a real nas plugged..
Thank Mz

Effectly, dmesg speak of an 1.1 usb device . . . :o
Code:
input: Creative Technology Ltd Creative Xmod Wireless as /class/input/input4
input: USB HID v1.11 Device [Creative Technology Ltd Creative Xmod Wireless] on usb-usb-1.1
input: Creative Technology Ltd Creative Xmod Wireless as /class/input/input5
input: USB HID v1.11 Keyboard [Creative Technology Ltd Creative Xmod Wireless] on usb-usb-1.1
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth


Top
 Profile  
 
PostPosted: Tue Dec 31, 2013 12:04 pm 
Offline

Joined: Tue Dec 31, 2013 11:50 am
Posts: 1
I am also interested in using my new NSA-325 as an Airplay Receiver. Aureliax did you have any success with the USB Card? I yes what was the solution?
I'm not that much into Linux so it would be great to have a how to that works at least for someone.


Top
 Profile  
 
PostPosted: Thu Jan 02, 2014 8:52 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5958
For the 325 it's basically the same, you'll only have to use zyxel_modules 2.6.31.8, instead of 2.6.24.4.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group