USB microphone on Linux

Antonio T. Sun antoniosun-N9AOi2cAC9ZBDgjK7y7TUQ at public.gmane.org
Wed Sep 9 20:53:02 UTC 2009


Thanks for the reply Lennart.

On Wed, 09 Sep 2009 09:19:12 -0400, Lennart Sorensen wrote:

>> In brief, I'm experiencing exactly the same symptom as the following
>> post:
>> 
>> Can't record from USB Mic using ALSA
>> http://bbs.archlinux.org/viewtopic.php?id=74879
>> 
>> I.e., everything looks perfect, just record from USB Mic get dead
>> silence. . . 
> 
> I have a USB headset, and to get recording I remember I had to specify
> some IECxxx format and pick just the right speed (I think it was 48000hz
> 16bit).  Pick anything else and it did nothing.  It has been a few
> months so I don't remember the setting for sure.

Ah, the right speed! Where do you get the correct value from?
Let me check my log... hmmm... I seem to have set the right speed:

  $ arecord -Ddefault -vv test.wav
  Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
  Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
  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: Direct Snoop PCM
  Its setup is:
    stream       : CAPTURE
    access       : MMAP_INTERLEAVED
    format       : S16_LE
    subformat    : STD
    channels     : 1
    rate         : 48000
    exact rate   : 48000 (48000/1)
    msbits       : 16
    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 'AK5370          ' device 0 subdevice 0
  Its setup is:
    stream       : CAPTURE
    access       : MMAP_INTERLEAVED
    format       : S16_LE
    subformat    : STD
    channels     : 1
    rate         : 48000
    exact rate   : 48000 (48000/1)
    msbits       : 16
    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
  #+                                                 | 00%^C

This is "/proc/asound/card0/stream0" _before_ and _while_ running the 
above
arecord command:

Before running arecord:

  $ cat /proc/asound/card0/stream0 
  AKM              AK5370           at usb-0000:00:02.0-4, full speed : 
USB Audio

  Capture:
    Status: Stop
    Interface 1
      Altset 1
      Format: 0x2
      Channels: 1
      Endpoint: 1 IN (NONE)
      Rates: 8000, 11025, 22050, 44100, 48000

While running arecord:

  $ cat /proc/asound/card0/stream0
  AKM              AK5370           at usb-0000:00:02.0-4, full speed : 
USB Audio

  Capture:
    Status: Running
      Interface = 1
      Altset = 1
      URBs = 8 [ 1 1 1 1 1 1 1 1 ]
      Packet Size = 100
      Momentary freq = 48000 Hz (0x30.0000)
    Interface 1
      Altset 1
      Format: 0x2
      Channels: 1
      Endpoint: 1 IN (NONE)
      Rates: 8000, 11025, 22050, 44100, 48000

  $ cat /proc/asound/card0/stream0 
  AKM              AK5370           at usb-0000:00:02.0-4, full speed : 
USB Audio

  Capture:
    Status: Stop
    Interface 1
      Altset 1
      Format: 0x2
      Channels: 1
      Endpoint: 1 IN (NONE)
      Rates: 8000, 11025, 22050, 44100, 48000

Here is my USB mic. BTW.

 $ cat /proc/asound/cards
  0 [default        ]: USB-Audio - AK5370          
		       AKM              AK5370           at 
usb-0000:00:02.0-4, full speed
  1 [NVidia         ]: HDA-Intel - HDA NVidia
		       HDA NVidia at 0xfe028000 irq 22

So, again, seems that I've done everything right, but just USB mic 
recording on Linux is not working for me. 

Thanks



--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list