sample rate and format for module-echo-cancel (not urgent)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 10 Aug 2017, at 02:05 AM, Per Gunnarsson wrote:
> Hello!
> 
> I bought a microphone (MICO from Trust) and plugged it into the 3.5 jack
> of my computer.
> 
> My OS is Debian testing on an old Acer desktop.
> 
> To begin, I had a lot of static noise which was removed when I tried:
> 
> pactl load-module module-echo-cancel aec_method=webrtc
> 
> without really understanding what I did.
> 
> I have looked into pactl list and see this:
> 
> Source #2
>         State: RUNNING
>         Name: alsa_input.pci-0000_00_14.2.analog-stereo
>         Description: Built-in Audio Analog Stereo
>         Driver: module-alsa-card.c
>         Sample Specification: s16le 2ch 48000Hz
>         Channel Map: front-left,front-right
>         Owner Module: 8
>         Mute: no
>         Volume: front-left: 21845 /  33% / -28.63 dB,   front-right:
> 21845 /  33% / -28.63 dB
>                 balance 0.00
>         Base Volume: 5841 /   9% / -63.00 dB
>         Monitor of Sink: n/a
>         Latency: 2301 usec, configured 66666 usec
>         Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME
>         LATENCY
>         Properties:
>                 alsa.resolution_bits = "16"
>                 device.api = "alsa"
>                 device.class = "sound"
>                 alsa.class = "generic"
>                 alsa.subclass = "generic-mix"
>                 alsa.name = "ALC662 rev1 Analog"
>                 alsa.id = "ALC662 rev1 Analog"
>                 alsa.subdevice = "0"
>                 alsa.subdevice_name = "subdevice #0"
>                 alsa.device = "0"
>                 alsa.card = "1"
>                 alsa.card_name = "HDA ATI SB"
>                 alsa.long_card_name = "HDA ATI SB at 0xfeb40000 irq 16"
>                 alsa.driver_name = "snd_hda_intel"
>                 device.bus_path = "pci-0000:00:14.2"
>                 sysfs.path =
>                 "/devices/pci0000:00/0000:00:14.2/sound/card1"
>                 device.bus = "pci"
>                 device.vendor.id = "1002"
>                 device.vendor.name = "Advanced Micro Devices, Inc.
> [AMD/ATI]"
>                 device.product.id = "4383"
>                 device.product.name = "SBx00 Azalia (Intel HDA)"
>                 device.form_factor = "internal"
>                 device.string = "front:1"
>                 device.buffering.buffer_size = "384000"
>                 device.buffering.fragment_size = "192000"
>                 device.access_mode = "mmap+timer"
>                 device.profile.name = "analog-stereo"
>                 device.profile.description = "Analog Stereo"
>                 device.description = "Built-in Audio Analog Stereo"
>                 alsa.mixer_name = "Realtek ALC662 rev1"
>                 alsa.components = "HDA:10ec0662,10258100,00100101"
>                 module-udev-detect.discovered = "1"
>                 device.icon_name = "audio-card-pci"
>         Ports:
>                 analog-input-front-mic: Front Microphone (priority:
> 8500, not available)
>                 analog-input-rear-mic: Rear Microphone (priority: 8200,
> available)
>                 analog-input-linein: Line In (priority: 8100, not
>                 available)
>         Active Port: analog-input-rear-mic
>         Formats:
>                 pcm
> 
> 
> 
> 
> Source #7
>         State: RUNNING
>         Name: alsa_input.pci-0000_00_14.2.analog-stereo.echo-cancel
>         Description: Built-in Audio Analog Stereo (echo cancelled with
> Built-in Audio Analog Stereo)
>         Driver: module-echo-cancel.c
>         Sample Specification: float32le 1ch 32000Hz
>         Channel Map: mono
>         Owner Module: 31
>         Mute: no
>         Volume: mono: 21845 /  33%
>                 balance 0.00
>         Base Volume: 65536 / 100%
>         Monitor of Sink: n/a
>         Latency: 9221 usec, configured 66666 usec
>         Flags: HW_MUTE_CTRL LATENCY
>         Properties:
>                 device.master_device =
> "alsa_input.pci-0000_00_14.2.analog-stereo"
>                 device.class = "filter"
>                 device.intended_roles = "phone"
>                 device.description = "Built-in Audio Analog Stereo (echo
> cancelled with Built-in Audio Analog Stereo)"
>                 device.icon_name = "audio-input-microphone"
>         Formats:
>                 pcm
> 
> Now I wonder why there is a difference in sample specification between
> the sources.
> 
> 
> Without echo cancellation:
> 
> Sample Specification: s16le 2ch 48000Hz
> 
> 
> With echo cancellation:
> 
> Sample Specification: float32le 1ch 32000Hz

That's just the default (for voice, higher sample rates aren't really
necessary). You can set the rate as a module argument, or set
use_master_format=true to just use what the source provides.

Cheers,
Arun


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux