LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   microphone not working with arecord/aplay (https://www.linuxquestions.org/questions/linux-newbie-8/microphone-not-working-with-arecord-aplay-253284/)

shengchieh 11-10-2004 12:27 PM

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

foo_bar_foo 11-10-2004 12:57 PM

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

shengchieh 11-10-2004 01:44 PM

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

foo_bar_foo 11-10-2004 04:31 PM

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

shengchieh 11-10-2004 09:41 PM

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

shengchieh 11-17-2004 12:43 PM

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

shengchieh 11-18-2004 09:51 AM

*** bump ***

Can someone please help?

Karimo 06-15-2009 08:09 AM

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.


All times are GMT -5. The time now is 11:05 AM.