[pulseaudio-discuss] changing sample rate for webcam microphone

Tanu Kaskinen tanuk at iki.fi
Thu Jul 16 13:53:45 PDT 2009


to, 2009-07-16 kello 22:30 +0200, Malte Gell kirjoitti:
> Hello,
> 
> I have to change the sample rate for my USB webcam microphone in order to use 
> it. So far I used ALSA:
> 
> pcm.usbmic {
>         type rate
>         slave {
>                 pcm "hw:1,0"
>                 rate 16000
>         }
>         converter "samplerate_best"
> }
> 
> Which gives me a device "usbmic".
> 
> How do I achieve the same with pulse audio, so I can use the webcam mic with 
> pulse?

So does pulseaudio currently fail to open the mic? The global default
sample rate can be set in daemon.conf, but that's probably not what you
want.

If pulseaudio can't open the device by default, you should be able to
create the source just by inserting this line somewhere in your
default.pa:

load-module module-alsa-source source_name=mic device=front:<alsa card
index> rate=16000

That should be on one line. You can find the card index
in /proc/asound/cards. Unfortunately the index may not be stable across
reboots. Instead of the index you should be able to use the card name.
For example my /proc/asound/cards contains this:

 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfe024000 irq 16

The string in the brackets, in this case "SB", is the card name. So I
could use front:SB as the device.

-- 
Tanu Kaskinen




More information about the pulseaudio-discuss mailing list