LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-04-2015, 08:19 PM   #1
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Rep: Reputation: 20
Microphone problems, arecord will not work


Hi,

I am having an issue getting my microphone to work so that I can record sound. I have been trying to do a screencast, and no method I used (several ffmpeg variations, recordmydesktop) would give me working audio. Other audio playback works fine.

I tried to test the mic with arecord, and got an error. Here is some information:

Code:
bash-4.2# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Code:
bash-4.2# arecord -d 10 test.wav
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
arecord: main:722: audio open error: Invalid argument
Code:
bash-4.2# cat /etc/asound.conf
     pcm.!default {
            type hw
            card 0
    }
    ctl.!default {
            type hw
            card 0
    }
    pcm.!default {
            type plug
            slave.pcm "softvol"
    }
    pcm.softvol {
            type softvol
            slave {
                    pcm "dmix"
            }
            control {
                    name "Pre-Amp"
                    card 0
            }
            min_dB -5.0
            max_dB 20.0
            resolution 6
    }
Code:
bash-4.2# lspci               
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:04.0 Signal processing controller: Intel Corporation 3rd Gen Core Processor Thermal Subsystem (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
00:1f.6 Signal processing controller: Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller (rev 04)
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)
I googled the dmix error and got a few results, but I did not see anything I could decipher about my exact situation. I seem to be out of my depth with audio, as this is the first time I have dealt with such an issue. Help would be much appreciated.

Thank you in advance.
 
Old 12-05-2015, 02:39 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,051

Rep: Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771Reputation: 1771
A few things for you to try.
Run 'alsamixer' and check that the microphone is unmuted and that the microphone and capture levels are raised. (I start by pushing them all the way up, then backing off as appropriate.)
For recording, I find that I need to specify the plughw device.
Code:
arecord -d 5 -D plughw:0,0 foobar.wav
You may also want to try moving that /etc/asound.conf out of the way, then rebooting.
 
1 members found this post helpful.
Old 12-05-2015, 09:30 AM   #3
_peter
Member
 
Registered: Sep 2014
Distribution: slackware
Posts: 32

Rep: Reputation: Disabled
it should just work. I use it all the time like this
Code:
arecord -vv -f dat -t raw | oggenc - -q=10 -r -R48000 -o audio.ogg
As allend said, starts from a pristine /etc/asound.conf and adjust the capture levels with alsamixer. Within alsamixer press space bar to enable the capture channel.

Your capture device seems a bit different (PCH) than mine and the reference to the module snd_pcm_dmix_open in the error message is weird.

Code:
arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 2: ALC272 Alt Analog [ALC272 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 
1 members found this post helpful.
Old 12-05-2015, 09:08 PM   #4
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Thanks guys. I should have tried moving that asound.conf earlier. I did it, and that stopped the error, but I still am not able to record. The below gave me two 10 second files with no sound.

I tried playing both my test files with various media players with no success. I'm not sure it's related, but on a side note I discovered that vlc will not play audio at all. I'm using Alien's build and it has worked fine in the past.

Code:
bash-4.2$ arecord -vv -d 10 mytest.wav
Recording WAVE 'mytest.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=U8)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : U8
  subformat    : STD
  channels     : 1
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 8
  buffer_size  : 2730
  period_size  : 170
  period_time  : 21333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 170
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 2730
  silence_threshold: 0
  silence_size : 0
  boundary     : 768426686420090880
Slave: Route conversion PCM (sformat=S32_LE)
  Transformation table:
    0 <- 0
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : U8
  subformat    : STD
  channels     : 1
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 8
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 6
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Slave: Soft volume PCM
Control: Digital Capture Volume
min_dB: -30
max_dB: 30
resolution: 121
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 6
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Slave: Direct Snoop PCM
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 6
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : ENABLE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 4611686018427387904
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0
#+                                                 | 00%
bash-4.2$ aplay mytest.wav 
Playing WAVE 'mytest.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
bash-4.2$ 
bash-4.2$ 
bash-4.2$ arecord -d 10 -D plughw:0,0 test2.wav
Recording WAVE 'test2.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
bash-4.2$ aplay test2.wav
Playing WAVE 'test2.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
bash-4.2$
I forgot to mention before that I am on a multilib 14.1 system.
 
Old 12-05-2015, 09:10 PM   #5
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Oh, the relevant alsamixer levels are all at max too. The only thing is, many releases ago I added the asound.conf to enable pre-amp functionality because my laptop sound is too weak without it. However, even when I removed it, the pre-amp remained. In fact, as you can see, I have 2. I wonder why this is? Did alsamixer change defaults? But why 2 pre-amps? My asound.conf is renamed and moved to my home directory.

screenshot: http://postimg.org/image/cgxgf217j/

Last edited by Miranden; 12-05-2015 at 09:22 PM.
 
Old 12-06-2015, 04:33 AM   #6
_peter
Member
 
Registered: Sep 2014
Distribution: slackware
Posts: 32

Rep: Reputation: Disabled
hi Miranden,
on your alsamixer snapshot from you last post the capture channel looks muted to me.
Go back to alsamixer, move to this channel and press space bar to unmute it.
 
1 members found this post helpful.
Old 12-06-2015, 05:58 AM   #7
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Oh, wow, you're right! I had no idea those little dashed lines by that control meant it was muted. I didn't even notice them. I guess you can tell I don't do much recording!

I feel like an idiot. But a happy one at least, since I can finally get this done. Thanks for the help!
 
Old 12-06-2015, 06:10 AM   #8
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Alright, this is off topic, but I just have to admit, this is not the first time something like this has happened to me. I once had a TV that suddenly stopped making sound, so I took it apart and tried to figure out what the problem was. I had no success. Finally I called a friend (who happens to be an electrical engineer at SpaceX), and he set to the task. Neither of us had any clue what was wrong. After several hours, just as we were about to give up, we discovered, hidden on the back, a small push button toggle that said "speakers."

So it figures. Maybe this time I will learn my lesson!
 
  


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
Cannot get microphone to work. solid_reign Linux - Laptop and Netbook 1 09-02-2012 10:52 PM
[SOLVED] Can't get my microphone to work fetal Linux - Newbie 1 11-29-2011 06:44 PM
microphone not working with arecord/aplay shengchieh Linux - Newbie 7 06-15-2009 09:09 AM
need help getting the microphone to work ksgill Linux - Newbie 11 02-10-2005 07:40 PM
10.1 Microphone not work riscphree Mandriva 8 12-21-2004 08:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration