LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   ALSA: microphone works, but I can't record (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/alsa-microphone-works-but-i-cant-record-694726/)

bvandeenen 01-03-2009 02:42 PM

ALSA: microphone works, but I can't record
 
Hi all

I am using Kubuntu 8.10, on an Asus Aspire 7730Z laptop. Sound playback is perfect since installation without any hassles, but recording is a different story.

Using alsamixer, I've found out that 'Front Mic' and 'Front Mic Boost' handle the built-in microphone on the top of the screen. I know this by scratching my finger on the mike, and hearing the feedback through the speaker. I can even make it squeal very loudly with audio feedback ;-). So that stuff works.

The simplest recorder for alsa is 'arecord', so I tried

arecord -fdat foo.wav
aplay foo.wav

There's nothing in the file, not the faintest whisper.

acer:/etc/modprobe.d$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 4: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

I've tried with many options of -D hw:0,0 -D hw:0,4 -D plughw:0,0 etc... but still nothing in my foo.wav file.

I've also tried more complicated applications like audacity and ardour2 but still no luck.

My questions:

  • Any specific pointers on how to proceed to get my recording working ? I know about www.alsa-project.org and http://alsa.opensrc.org and I can't find my problem solution there.
  • How does the name 'Front Mic' in alsamixer relate to the channel designation hw:x,y?
  • What is plughw:x,y vs hw:x,y ?
  • How come the microphone is immediately piped to the speakers, how is that linked?

Thanks

Bart

P.S.

In /var/lib/alsa/asound.state I have the following sections related to 'Front Mic'
control.19 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -3450
comment.dbmax 1200
iface MIXER
name 'Front Mic Playback Volume'
value.0 27
value.1 27
}
control.20 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 3'
comment.dbmin 0
comment.dbmax 3000
iface MIXER
name 'Front Mic Boost'
value.0 2
value.1 2
}
control.21 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Front Mic Playback Switch'
value.0 false
value.1 false
}


From one post on the web, I have two options in /etc/modprobe.d/
Edit: I've now also tried the same without these options, and the problem is exactly the same
---

My name is bart, I always use that to tag system config file changes
acer:/etc/modprobe.d$ grep -A3 bart *
aliases:# bart
aliases-alias snd-card-0 snd-hda-intel
aliases-alias snd-slot snd-hda-intel
--
alsa-base:# bart
alsa-base-#
alsa-base-options snd-hda-intel model=acer

bvandeenen 01-03-2009 04:12 PM

getting somewhere
 
Hi myself

I'm getting somewhere! I'm now recording some hugely distorted sound.

amixer sset Capture cap "Front Mic"
amixer get "Front Mic"
amixer sset Capture noplayback
amixer sset "Front Mic" noplayback
arecord foo.wav
arecord -vv foo.wav
aplay foo.wav

I've found some interesting links:
http://ubuntuforums.org/archive/index.php/t-506515.html
http://alsa.opensrc.org/index.php/Amixer
http://alsa.opensrc.org/index.php/Record_from_mic

All of them point to how to set the capture device onto the microphone, something that apparently can't be done via KMix :-(

The sound still sounds like s**t, but I'll let y'all know when I've got it sorted. I still don't know exactly which magical incantations are needed.

Bart

13eastie 04-09-2009 02:54 PM

I have a similar problem with Intrepid on my new Aspire One.

Having installed the ALSA drivers and tested it with gnome sound recorder,

it seems that the fault is only apparent when the file type is set to .wav

I can record successfully from the mike in all the other available formats.

When trying to record a .wav file, the record level indicator is always zero and on going to the ALSA mixer, I find that the mike has been muted. It is only then possible to unmute it after a different file type has been selected.

I'm no nearer to fixing this, but I'd be interested to know whether you have tried any other formats than .wav?

threaderslash 04-19-2009 01:19 AM

* Suggestion 1:
Save into any other format, then convert to wav.
http://gimpel.gi.funpic.de/wiki/inde...3/ogg_on_Linux

* Suggestion 2:
I got a similar problem with my microphone while trying to use it for my skype web-conference. It worked, but with no sound, or with a loud noise. The fix was to make the proper set up.

Look how to make the proper kmix setup at:
http://forum.skype.com/index.php?showtopic=66109

After done the tuning - it worked for me. :D


All times are GMT -5. The time now is 01:12 PM.