LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-10-2004, 12:27 PM   #1
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Rep: Reputation: 30
microphone not working with arecord/aplay


To All:

I'm trying to see if I can ever get my microphone to
work. [Actually, I can't get it to work for Skype
(internet phone). This test is just a subproblem,
i.e., to get my microphone to work in general.]

According to "The arecord/aplay Mini-Howto" at

http://linux-sound.org/quick-toots/3...d_rtmix-1.html

I do the followings:

1) unmute my microphone

2) arecord -f dat -d 20 -D hw:0,0 test.wav

3) aplay -f dat test.wav (not music/test.wav)

While recording, I spoke "testing 1 2 3 4 5 ...".
But while playing (using aplay), I get no sound,
just humming.

My console screen says

shengchieh $ arecord -f dat -d 20 -D hw:0,0 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
shengchieh $ aplay -f dat test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

The console gives no clue to what is going wrong.
Fyi, the file, test.wav, is 3840044 byte.

What is the problem on why I get no sound while playing?
Am I doing something wrong or something missing?

Thanks in advanced for any help.

Sheng-Chieh
 
Old 11-10-2004, 12:57 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
in order to record or use microphone you have to turn on a "Capture" device in alsa speak

try:

amixer set Capture cap 8
amixer set Mic cap
 
Old 11-10-2004, 01:44 PM   #3
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Original Poster
Rep: Reputation: 30
It didn't work. Now when I play (using aplay), I get
complete silence, not even a humming sound. Below is
what is on my console.

shengchieh$ amixer set Capture cap 8
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 15
Front Left: Capture 8 [53%] [on]
Front Right: Capture 8 [53%] [on]
shengchieh$ amixer set Mic cap
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [on]
Front Left: Capture [on]
Front Right: Capture [on]
shengchieh$ arecord -f dat -d 20 -D hw:0,0 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
shengchieh$ aplay -f dat test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Am I using the command, amixer, correctly? Do I need to
study my soundcard? Fyi, I have SiS Si 7012 (DUPLEX)
soundcard on this Mercuy 700m laptop by Element Computer.

Sheng-Chieh
 
Old 11-10-2004, 04:31 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
hhhhmmm
yea you used the amixer command correctly and they returned the proper results
use just amixer by itself to look at all the available settings
once you turn on caplure you should be able to hear Mic through speakers.
try also
amixer set Mix cap
???
possibly the arecord command is bad ???
perhaps for some reason 48000 Hz not working ??? (that requires libsamplerate i think ??)
or i think the -D hw:0,0 is wrong
use
arecord -L
and you can see the way alsa names different device names and also how you can make new device names yourself in ~/.asoundrc

try:

arecord -d 10 -f cd -t wav test.wav

this i think will use -D default ???? not sure though

also just make sure you have "Master" "Wave" and "PCM" turned up in amixer for playback
amixer set Master 31
amixer set PCM 31
amixer set Wave 100

alsa mixer is very confusing and takes some getting used to
you can look for a good amixer GUI mixer for your card will help
alsamixerGUI is kind of an ok one
sometinmes you just have to play with the settings
 
Old 11-10-2004, 09:41 PM   #5
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Original Poster
Rep: Reputation: 30
Thanks for replying again.

Do you know of any good docs beside

man amixer ?

The man page doesn't give detailed infos
about the option Mic, Capture, and etc.

I'll have to study abit more.

Sheng-Chieh
 
Old 11-17-2004, 12:43 PM   #6
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Original Poster
Rep: Reputation: 30
To All;

I studied this microphone problem alittle further.
It seems that whenever I use amixer to set something,
it changes the data temporarily, but then the settings
reverts back. For example,

I note the Microphone is not capturing, i.e.,

shengchieh$ amixer get Mic RET
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [on]
Front Left: Capture [off]
Front Right: Capture [off]

so I set it to capture, i.e,

shengchieh$ amixer set Mic cap
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [on]
Front Left: Capture [on]
Front Right: Capture [on]

Everything looks fine. But then if I use amixer to set something
else, e.g., amixer set Line cap, the microphone settings reverts
back, i.e.,

shengchieh$ amixer get Mic RET
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [on]
Front Left: Capture [off]
Front Right: Capture [off]

Do anybody knows what is happening? Why is the settings keep reverting
back?

Bottom Line: the microphone is not working and I need to turn it
on "permamently".

Thanks in advanced for any help.

Sheng-Chieh
 
Old 11-18-2004, 09:51 AM   #7
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Original Poster
Rep: Reputation: 30
*** bump ***

Can someone please help?
 
Old 06-15-2009, 08:09 AM   #8
Karimo
Member
 
Registered: Aug 2007
Location: Valencia
Distribution: slackware64-current
Posts: 63

Rep: Reputation: 15
Try managing through:
alsamixer -V capture
be sure the first level indicator is >0 and the two "Input So"s point to the the Mic.
This solved for me the same problem.
 
  


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
Microphone not working glittle Linux - Laptop and Netbook 7 03-26-2012 07:30 PM
Microphone not working arnott Linux - Hardware 3 12-01-2005 04:22 PM
Microphone Not Working RySk8er30 Mandriva 0 11-12-2005 12:16 PM
microphone not working Abrocadabro Debian 1 12-03-2004 12:37 AM
How to have a microphone working under VMWARE 4? larrykeenan Linux - Software 0 04-04-2004 04:12 AM


All times are GMT -5. The time now is 07:31 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