View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Jul 06, 2006 3:49 pm 
Offline
Joined: Fri Jun 23, 2006 2:16 pm
Posts: 51
I just plugged my Edirol UA-5 USB Audio interface into my KnoppMyth R5C7 box and it seems to be recognized quite well. Looking in /proc/asound I find lots of interesting files and subdirectorys with human readable text that clearly indicates that this Linux box has learned quite a lot about the Edirol UA-5.

What I don't see, is any connection to /dev which is presumably what I need to configure in mythfrontent. I guess I'll try randomly setting audio to various /dev/dsp# and /dev/adsp# settings, but I don't see why this should be a guessing game.

I assume I must be doing something wrong. My /dev is a cluttered mess. Some examples:

# ls dsp*
dsp dsp0 dsp1 dsp2 dsp3

# ls adsp*
adsp adsp0 adsp1 adsp2 adsp3

# ls hd*
hda hda5 hdb19 hdc14 hdd1 hdd6 hde2 hdf15 hdg10 hdg7 hdh20
hda1 hda6 hdb2 hdc15 hdd10 hdd7 hde20 hdf16 hdg11 hdg8 hdh3
hda10 hda7 hdb20 hdc16 hdd11 hdd8 hde3 hdf17 hdg12 hdg9 hdh4
hda11 hda8 hdb3 hdc17 hdd12 hdd9 hde4 hdf18 hdg13 hdh hdh5
hda12 hda9 hdb4 hdc18 hdd13 hde hde5 hdf19 hdg14 hdh1 hdh6
hda13 hdb hdb5 hdc19 hdd14 hde1 hde6 hdf2 hdg15 hdh10 hdh7
hda14 hdb1 hdb6 hdc2 hdd15 hde10 hde7 hdf20 hdg16 hdh11 hdh8
hda15 hdb10 hdb7 hdc20 hdd16 hde11 hde8 hdf3 hdg17 hdh12 hdh9
hda16 hdb11 hdb8 hdc3 hdd17 hde12 hde9 hdf4 hdg18 hdh13
hda17 hdb12 hdb9 hdc4 hdd18 hde13 hdf hdf5 hdg19 hdh14
hda18 hdb13 hdc hdc5 hdd19 hde14 hdf1 hdf6 hdg2 hdh15
hda19 hdb14 hdc1 hdc6 hdd2 hde15 hdf10 hdf7 hdg20 hdh16
hda2 hdb15 hdc10 hdc7 hdd20 hde16 hdf11 hdf8 hdg3 hdh17
hda20 hdb16 hdc11 hdc8 hdd3 hde17 hdf12 hdf9 hdg4 hdh18
hda3 hdb17 hdc12 hdc9 hdd4 hde18 hdf13 hdg hdg5 hdh19
hda4 hdb18 hdc13 hdd hdd5 hde19 hdf14 hdg1 hdg6 hdh2

# ls sd*
sda sda6 sdb2 sdc12 sdd sdd6 sde2 sdf12 sdg sdg6 sdh2
sda1 sda7 sdb3 sdc13 sdd1 sdd7 sde3 sdf13 sdg1 sdg7 sdh3
sda10 sda8 sdb4 sdc14 sdd10 sdd8 sde4 sdf14 sdg10 sdg8 sdh4
sda11 sda9 sdb5 sdc15 sdd11 sdd9 sde5 sdf15 sdg11 sdg9 sdh5
sda12 sdb sdb6 sdc2 sdd12 sde sde6 sdf2 sdg12 sdh sdh6
sda13 sdb1 sdb7 sdc3 sdd13 sde1 sde7 sdf3 sdg13 sdh1 sdh7
sda14 sdb10 sdb8 sdc4 sdd14 sde10 sde8 sdf4 sdg14 sdh10 sdh8
sda15 sdb11 sdb9 sdc5 sdd15 sde11 sde9 sdf5 sdg15 sdh11 sdh9
sda2 sdb12 sdc sdc6 sdd2 sde12 sdf sdf6 sdg2 sdh12
sda3 sdb13 sdc1 sdc7 sdd3 sde13 sdf1 sdf7 sdg3 sdh13
sda4 sdb14 sdc10 sdc8 sdd4 sde14 sdf10 sdf8 sdg4 sdh14
sda5 sdb15 sdc11 sdc9 sdd5 sde15 sdf11 sdf9 sdg5 sdh15

Look at all that craziness. For audio output this box has the PVR-350 audio and the UA-5's USB audio and that's it. For hard drives this box has a single SATA drive with four partitions, a single IDE CDROM, and a single IDE drive with one partition. Why is my /dev so cluttered with devices that don't exist and have never existed?

Now, the hard disk thing is just a side issue that caught my eye. The real question is where did all those dsp and adsp devices come from and how can I tell which one is my UA-5 audio device other than trying each one like a dumb monkey.

I've also done some web searching but don't know if the docs I found are obsolete or relevant to R5C7. /proc/asound/UA5 is a symlink to /proc/asound/card0 which is a directory whose contents clearly indicate that they're associated with my UA-5. Running "amixer -c 0 controls", "amixer -c 0 contents", "amixer -c 0 scontrols", and "amixer -c 0 scontents" produces no error, but no output.

Other than cat'ing files in /proc/asound, I can't seem to find any evidence that my UA-5 works.

I've also tried running "mpg123 -a /dev/dsp# filename.mp3" for all of the dsp and adsp entries but was unable to get any sound playing.

Perhaps there's a mixer issue. I'm not sure what to make of the following:

# file /dev/mixer
/dev/mixer: symbolic link to `/dev/mixer0'
# aumix -d /dev/mixer
aumix: no device found


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 8:17 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
KM hasn't historically used udev. This means that the various device nodes are precreated "on spec" to avoid people having to create them manually when they add new hardware to the system. You can delete large swaths of those, especially the block devices, if they really bother you, and you're sure you're never going to use the devices they refer to. However you should be far more cautious with the pseudo tty and other character devices since it could lead to some remarkably obscure failure modes.

BTW - The udev stuff on my new workstation box running FC5 has inspired *much* cursing, so be careful what you wish for. ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 7:53 am 
Offline
Joined: Fri Jun 23, 2006 2:16 pm
Posts: 51
Ok, I won't go so far as to say I understand but I get that /dev contains all the devices that COULD exist even if they don't.

That still leaves my original question, though. Does anybody have any idea how to figure out what's connected to my UA-5 USB Audio interface?

I did some trial and error last night. I used mpg123 -a /dev/dsp and I verified that it worked without error but without sound when the UA-5 was on and it generated an error when the UA-5 was off. So I guess /dev/dsp must connect to the UA-5 although I would like to know where that it shown, rather than just trial and error.

That still leaves me without sound. I suspect (wild guess) that it may be a mixer problem resulting in zero volume since mpg123 doesn't generate any error. Any suggestions on what commands to try? Below are some things I tried. The contents of /proc/asound pretty clearly indicate that the UA-5 has been recognized and is card0, experimentation suggests it is also /dev/dsp. I have no idea whether a mixer is involved or if so, how to tell which one.

Right now my video output is to TV via PVR-350 and I haven't tackled my goal of getting X output to my VGA monitor and MythTV to my TV, but if I were to change back to a normal X desktop, is there a GUI application like the Sound Control Panel in MS Windows that would show me all the hardware and configuration info in one place?

# amixer -c 0 controls
# amixer -D /dev/dsp controls
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
amixer: Control /dev/dsp open error: No such file or directory
# file /dev/mixer
/dev/mixer: symbolic link to `/dev/mixer0'
# aumix -d /dev/mixer
aumix: no device found


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 6:26 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
myth@chakobsa.net wrote:
That still leaves my original question, though. Does anybody have any idea how to figure out what's connected to my UA-5 USB Audio interface?

Sorry but my brain is a bit cooked by this part of the week, are you looking for a device id or ... Let me try running through some USB diagnostics and see if any bells ring for you... So first we see what USB devices are connected:
Code:
root@black2:~# lsusb
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500
Bus 001 Device 001: ID 0000:0000

Here we can see the monitoring connection for my UPS. You can find similar informartion by using:
Code:
cat /proc/bus/usb/devices

Also in the same neighborhood you can see directories associated with each device:
Code:
root@black2:~# ls -al /proc/bus/usb/
total 0
drwxr-xr-x  5 root root 0 Jul  2 01:03 .
dr-xr-xr-x  6 root root 0 Jul  2 01:04 ..
dr-xr-xr-x  2 root root 0 Jul  2 01:03 001
dr-xr-xr-x  2 root root 0 Jul  2 01:03 002
dr-xr-xr-x  2 root root 0 Jul  2 01:03 003
-r--r--r--  1 root root 0 Jul  2 01:03 devices

Once you know the bus and device ids from lsusb you can actually get down to a single fille associated with it, here it's:
Code:
root@black2:~# ls -al /proc/bus/usb/001/003
-rw-r--r--  1 root root 52 Jul  2 01:03 /proc/bus/usb/001/003

and given the driver info obtained from the devices file (it says Driver=usbhid) the device should be one of:
Code:
root@black2:~# lsof /dev/usb/hiddev*
COMMAND  PID USER   FD   TYPE DEVICE SIZE    NODE NAME
apcupsd 2756 root    4u   CHR 180,96      1605260 /dev/usb/hiddev0

Hope this helps!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 10:16 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

Can you run alsamixer to check if things are muted / levels ?

Mike


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 10:16 pm 
Offline
Joined: Fri Jun 23, 2006 2:16 pm
Posts: 51
I guess I'm not sure exactly what I'm looking for, which is part of the problem. I've used this Edirol UA-5 many times with Windows for both recording and playback but I've never used it with Linux.

It appears to me that Linux is talking to it successfully, but I can't get any sound out of it. For example:

$ amixer info
Card default 'UA5'/'Roland EDIROL UA-5 at usb-0000:00:1d.3-1, full speed'
Mixer name : 'USB Mixer'
Components : 'USB0582:0011'
Controls : 0
Simple ctrls : 0
$ amixer controls
$ amixer scontrols
$ amixer contents
$ amixer scontents
$

I didn't do any explicit configuration, I just plugged in the USB cable and turned on the UA-5. Apparently Linux figured out for itself the brand, model and function of the device.

I'm not sure exactly what the output of the amixer command is supposed to look like, but I don't think the results above are correct. I think if it were working correctly there would be various controls that I could set.

I thinks this is also suspicious:

$ aumix -d /dev/mixer
aumix: no device found

I don't know where to look for errors, but I think that somehow the audio data isn't getting from a program (e.g. mpg123) to the sound outputs. I'm not sure if this is because the output is muted or volume very low, or because the mixer is broken or something else. I'm not sure how to proceed with troubleshooting.

I found some links that indicate that the UA-5 works well with Linux:

http://www.setcolor.de/linux/ua-5/index.htm
http://he.fi/audio/edirol-ua5-linux.shtml

And I created a .asoundrc file as suggested in one of those links. Still no luck. I did find the following error:

$ alsamixer
No mixer elems found

Which seems to suggest that there's a problem with the mixer. I found the following in Google but no luck with the apt-gets that it suggests.

http://www.linuxforums.org/forum/periph ... tiixp.html


# apt-get install alsa-base
Reading Package Lists... Done
Building Dependency Tree... Done
alsa-base is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# apt-get install alsa-headers
Reading Package Lists... Done
Building Dependency Tree... Done
alsa-headers is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# apt-get install alsa-utils
Reading Package Lists... Done
Building Dependency Tree... Done
alsa-utils is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Last edited by myth@chakobsa.net on Fri Jul 07, 2006 10:37 pm, edited 2 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 10:32 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi myth@chakobsa.net,

Quote:
aumix: no device found
Nope, not a good message. alsamixer will probably give you the same message. Can you pop in a pci audio card? If so, run # alsaconf to set it up. Other wise maybe some kind person on the forum has an answer.

Best of luck.
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 11:15 pm 
Offline
Joined: Fri Jun 23, 2006 2:16 pm
Posts: 51
Ok, the story gets weirder.

After getting no sound from my UA-5, I plugged it into a Windows box to double check. I got no sound from the Windows box so I started to wonder if the UA-5 itself had been damaged (unlikely, since I last used it to record and playback on July 5th 2006).

So, I took it downstairs and connected it to my Mac running OS X and it worked just fine for playback. So I took it back upstairs and connected it to the same Windows box and it also worked fine for playback and recording.

Next I connected it back to my KnoppMyth R5C7 box and tried using mpg123 to play an mp3 file and aplay to play a wav file. Neither produced any sound. Then I unplugged it from Linux and plugged it into the same Windows box and I didn't get any sound.

Next I powered it off and back on while still connected to the Windows box. That resulted in me re-gaining the ability to play sound.

My best guess is that Linux is deliberately muting the volume and that setting carries over even into Windows unless I power the UA-5 off and on. The mysteries are why and how Linux is accomplishing the mute.

I did find this interesting link:

http://alsa.opensrc.org/index.php?page=alsamixer

which contains the following quote:

Quote:
Common errors

alsamixer -c 3

alsamixer: function snd_ctl_open failed for hw:3: No such device

-> no card 3 found

alsamixer -c 1

No mixer elems found

-> card 1 has no mixer interface, as typical on external ( usb ) devices like Edirol UA-5



Anybody know how volume is controlled on a card with no mixer? Apparently this is "typical" of usb devices.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




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

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu