LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-10-2006, 04:03 AM   #1
Dragonopolis
LQ Newbie
 
Registered: May 2005
Posts: 9

Rep: Reputation: 0
Need help config Alsa to use my usb mic as capture device


I will be honest and upfront I am using a Slackware variant vectorlinux. Please read on as to why I'm also posting in a Slackware Forum.

There seems to be a shortage of knowledgeable linux sound gurus. I am having trouble finding someone with any real Alsa or linux sound experience. I need someone to show me how to change my capture device from my soundcard to my usb microphone without losing sound to my Soundcard. Vectorlinux recognizes and has the proper usb audio modules so I should be ok there. The usb Mic is properly detected and the mixers are all showing my AK5370. I unmuted all of them and the gain is set high but their is no sound when I talk into my usb mic and I can't record anything with it. I assume it's a configuration problem and I'm hoping that I will find someone with the knowledge to help show me how to edit alsa.
I have posted this on the vectorlinux site as well and am hoping that someone will help me. I promise that if someone helps me fix this that I will post the fix on both forums so we can all benefit. I've been on a mission to fix this issue for almost a year and have yet to find someone to help me get my usb mic working. Vector and Slackware are close enough that the fix should work for both.
I really appreciate any help and will apologize in advance if posting here is offensive to slackware folk. My Linux sound knowledge is extremely weak so please tell me what files you need to see and I will post it.

Last edited by Dragonopolis; 04-10-2006 at 04:10 AM.
 
Old 04-10-2006, 08:51 AM   #2
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Silly question, but are you sure that your microphone is not broken if you can't fix it almost a year? Last microphone I had lasted only 3 days. And, BTW, does it work when you disable your card?

Last edited by Alien_Hominid; 04-10-2006 at 08:53 AM.
 
Old 04-10-2006, 07:18 PM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
What recording program do you use? Be sure that alsamixer don't show your usb device because alsamixer shows the panel of the default soundcard.
Perhaps try "alsamixer -c 1" in order to see if this mic is recognized as a second soundcard.
Post what you see in /dev/sound (type "ls /dev/sound").
 
Old 04-11-2006, 08:48 AM   #4
Dragonopolis
LQ Newbie
 
Registered: May 2005
Posts: 9

Original Poster
Rep: Reputation: 0
I don't see how seeing whats in dev/sound will help but here it is

ls /dev/sound
adsp audio audio1 dsp dsp1 mixer mixer1 sequencer sequencer2


like I said my Linux sound knowledge is weak. My soundcard works fine. I do have a standard Mic that works but I have an HP and well parts fall or break because of use. Microphone is not broken but I don't have a connection for it anymore. I have this usb mic that works really well in Windows and would like to get it working in Linux. I know it works in linux because I've seen success stories but of course none are using Slackware or Vector so I can only go so far with their help.

Bottom-line is that from what information I have gathered on the internet that my usb mic won't work unless the capture device is change from the soundcard to the usb mic. Linux will continue to use the Mic connection on the soundcard until someone tells it to use the usb mic. Unfortunately I have yet found a Linux distro that provides and easy GUI solution to this. I not sure where, how, or what config file I am supposed to edit to tell Linux to use the USB Mic instead of the Mic port on the soundcard. One suggestion was that I need to change alsa to use hw:1 0 inorder to make the soundcard stop being used as a capture device and the usb mic enable. However, I don't know what " hw:1 0 " means and I assume the numbers are refering to dsp and dsp1. I will post the article and maybe somebody can Slacktize the help since this was done on a gentoo system. Here is the article:

Logitech USB Desktop Microphone under Linux
Filed under: Linux — Daniel Lemire @ 21:09

I got my new Logitech USB Desktop Microphone working under Linux. Should have been very easy, but I hit a small nail.

Plug the device in and type “lsusb”, you should see:

Bus 001 Device 004: ID 0556:0001 Asahi Kasei Microsystems Co., Ltd AK5370 I/F A/D Converter

Ah! The device is called AK5370.

Do “dmesg”‘ you should see two lines like those:

usb 1-3: new full speed USB device using ohci_hcd and address 4

usbcore: registered new driver snd-usb-audio

If you don’t see the second line, you have a problem. In my case, I didn’t have the usbaudio driver so I only got the first line. I had to go compile usbaudio. To do so, I did “uname -a”, it gave me “Linux romeo 2.6.10-gentoo-r6″. I went under /usr/srclinux-2.6.10-gentoo-r6 and typed

genkernel --no-clean --menuconfig all

Next, after the menu opened up, I went under driver/audio and chose usb audio drivers (and loadable modules). Exiting genkernel launched the compilation of the module and all I had to do was to unplug/replug my microphone. You should check that /dev/dsp1 appears.

All I had to do after this was to launch mhwaveedit and choose “hw:1,0″ as my recording device, so that I would not record out of my sound card, but rather from my microphone. Setting the sampling rate to 44100 Hz seemed to be necessary.

To enable the microphone under KDE, you have to launch kmix and choose the appropriate device, if you don’t see the device, quit kmix (through the file menu) and restart it. This being said, I don’t see why you need the microphone under KDE. However, make sure you turn the gain all the way to the maximum for optimal sound quality.


As you can see I have a dsp1: First snag in this help is that ls usb didn't work but here is my dmesg output: (I'm not going paste everything just the usb stuff)


ohci_hcd 0000:00:02.1: nVidia Corporation nForce3 USB 1.1 (#2)
ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 3
ohci_hcd 0000:00:02.1: irq 11, io mem 0xfebfc000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 3 ports detected
USB Universal Host Controller Interface driver v2.3
sl811: driver sl811-hcd, 19 May 2005
usb 2-2: new full speed USB device using ohci_hcd and address 2
usb 2-3: new full speed USB device using ohci_hcd and address 3
usbcore: registered new driver hiddev
usb 3-1: new full speed USB device using ohci_hcd and address 2
usb 3-2: new full speed USB device using ohci_hcd and address 3
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.01:USB HID core driver


usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
usbcore: registered new driver snd-usb-audio
usbcore: registered new driver audio
drivers/usb/class/audio.c: v1.0.0:USB Audio Class driver


As you can see here there are no problems in hardware detection here and I do have the usb audio driver so in theory my usb mic should work if configured properly. The part that's fuzzy in this help is this part:

All I had to do after this was to launch mhwaveedit and choose “hw:1,0″ as my recording device, so that I would not record out of my sound card, but rather from my microphone. Setting the sampling rate to 44100 Hz seemed to be necessary.

Now I don't have this mhwaveedit software that all my sound is pumping through and this would not work for other programs that use their own sound recording software but don't give the option to use a different recording device. What I need is help configuring ALSA so that ALSA disables the soundcard as the capture device and enables usb mic as the capture device. This way, all programs that use a mic will use my usb mic instead of my soundcard mic.

Last edited by Dragonopolis; 04-11-2006 at 09:41 AM.
 
Old 04-11-2006, 12:00 PM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
Mmm. Grab the program named audacity in http://linuxpackages.net/
In the preference menu, you have an easy way to select your input device.
This should be a good start. Audacity is a soundforge-like program.
 
Old 04-11-2006, 03:21 PM   #6
Dragonopolis
LQ Newbie
 
Registered: May 2005
Posts: 9

Original Poster
Rep: Reputation: 0
This may sound like a stupid question but I have to ask

Does Audacity set system wide preferences or does the settings in Audacity work only for Audacity and applications that might use Audacity?

For instance: If I change the input device in Audacity will my usb mic work in Skype.

The other problem I am having after tinkering around at the ALSA site (what a horrible website and where is the forum very unlinux like) I now get a message at boot up that there is an error with the sound server regarding a device (doesn't give me which one) and that the device can't be used for playback. It then says that it will default to the null device. Well based on that info I know my SoundCard is the null device so I am assuming that the device that is in error is the only other sound device I have and thats my usb mic. Why is ALSA trying to use my USB MIC as a playback device. It's a capture device only. This might be the problem also because the Sound Server is automatically disconnected my usb mic because it can't use the device for playback. How do you edit ALSA so that the USB Mic is not a playback device and that it is a capture device (it would also be nice not to see that error on boot up everytime).
 
Old 04-11-2006, 04:55 PM   #7
tct1501
LQ Newbie
 
Registered: Nov 2003
Location: Holland
Distribution: Slackware, LFS
Posts: 16

Rep: Reputation: 0
I had troubles getting an audio capturing USB device as well. After times of searching I found out that versions of prior to 1.0.10rc1 had a bug in it that caused trouble with usb-audio.

So your device is seen by the kernel once plugged in, and the proper driver is being used. You can also check to see whether drivers for your hardware were loaded or not by typing.
Code:
cat /proc/bus/usb/devices
For checking out your version of ALSA, type:
Code:
cat /proc/asound/version
So if it is an older version, I recommend removing all your alsapackages and compile the newest from source. That helped me get rid of the problem. But one important thing, empirically spoken:
When you do the above, be sure to backup your rc.alsa file and sound.state file and place them in their original directories after install. I had a lot of troubles when I didnt.

After you have done so execute
Code:
alsamixer -c 1
and select your mic as recording device, and be sure to unmute it (i overlooked that often).

Then try Audacity to record some with it. Or just with arecord on the CLI. With skype you can make a testcall to user echo123 and thus can find out if you did well.

I hope this can help you out. Good luck.

Last edited by tct1501; 04-11-2006 at 04:58 PM.
 
Old 04-11-2006, 07:15 PM   #8
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
You can't select a default device. All you can do is select the one you need in each app. So audacity, which is simple to use will tell you (if you configure as tct1501 told you) what is the name of your microphone device. An that is a good starting point.
 
Old 04-12-2006, 04:11 AM   #9
Dragonopolis
LQ Newbie
 
Registered: May 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Here is those outputs:

for cat /proc/bus/usb/devices and my usb mic is in bold:

T: Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.13 ohci_hcd
S: Product=nVidia Corporation nForce3 USB 1.1 (#2)
S: SerialNumber=0000:00:02.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=04a9 ProdID=220e Rev= 1.00
S: Manufacturer=Canon
S: Product=CanoScan
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=16ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0556 ProdID=0001 Rev= 0.01
S: Manufacturer=AKM
S: Product=AK5370
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 90mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I: If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=81(I) Atr=01(Isoc) MxPS= 100 Ivl=1ms


T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 3
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.13 ohci_hcd
S: Product=nVidia Corporation nForce3 USB 1.1
S: SerialNumber=0000:00:02.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=058f ProdID=9360 Rev= 1.00
S: Manufacturer=
S: Product=USB Reader
S: SerialNumber=9205291
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=03f0 ProdID=1604 Rev= 1.00
S: Manufacturer=Hewlett-Packard
S: Product=DeskJet 940C
S: SerialNumber=MX15S6D2RKBH
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 6
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.13 ehci_hcd
S: Product=nVidia Corporation nForce3 USB 2.0
S: SerialNumber=0000:00:02.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=256ms

Here's the version

cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.9b.
Compiled on Nov 18 2005 for kernel 2.6.13.

Ah I using a driver Version that's older than 1.0.10rc1
I'll go ahead and try the rest. If it doesn't work I'll just go ahead and see about updating my alsa driver. Thanks for the heads-up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you assign my USB MIC(ak5370) as the capture device Dragonopolis VectorLinux 2 05-06-2006 05:10 AM
Gnome & ALSA Line-In and Mic Not Working after trying KDE spinksj Debian 3 10-15-2004 05:26 AM
audio device fails to open on arch linux, even after alsa config sether Linux - Hardware 1 10-07-2004 12:43 AM
SoundBlaster Audigy..ALSA drivers... mic works but cant hear any sound. punk Linux - Newbie 1 03-25-2004 06:29 PM
usb device detection and config legs Linux - Networking 0 01-01-2004 03:58 PM


All times are GMT -5. The time now is 06:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration