Logitech C210 webcam wrong sample rate producing "chipmunk" audio.
Version, Distribution, Desktop Environment: Linux Fedora 34, XFCE4
Description of Problem: Logitech C210 Webcam produces "chipmunk" audio.
How Reproducible: always
Steps to Reproduce:
- open Zoom or Skype
- connect and speak.
Actual Results: Audio high pitched and unintelligible.
Expected Results: Normal audio recording.
I fixed this problem a while ago by setting: default-sample-rate = 16000 in /etc/pulse/daemon.conf
However, I upgraded to fc34 yesterday, and now the problem is back, pipewire is running and /etc/pulse/daemon.conf has disappeared and there appears to be no way to easily set the sample rate for the C210 back to 16k. Only seems to be a global setting in pipewire config.
I managed to find some info to help troubleshoot and installed pipewire-utils:
~ $ pw-cli list-objects | grep -C10 C210
port.id = "1"
port.name = "playback_FR"
port.direction = "in"
port.physical = "true"
port.terminal = "true"
port.alias = "HDA NVidia:playback_FR"
id 51, type PipeWire:Interface:Device/3
factory.id = "14"
client.id = "30"
device.api = "alsa"
device.description = "Webcam C210"
device.name = "alsa_card.usb-046d_0819_A640DAC0-02"
device.nick = "USB Device 0x46d:0x819"
media.class = "Audio/Device"
id 52, type PipeWire:Interface:Port/3
object.path = "alsa:pcm:1:front:1:playback:playback_0"
format.dsp = "32 bit float mono audio"
node.id = "46"
audio.channel = "FL"
port.id = "0"
port.name = "playback_FL"
--
port.direction = "out"
port.monitor = "true"
port.alias = "PulseAudio Volume Control:output_MONO"
id 66, type PipeWire:Interface:Node/3
object.path = "alsa:pcm:0:hw:0:capture"
factory.id = "18"
client.id = "31"
device.id = "51"
priority.session = "2000"
priority.driver = "2000"
node.description = "Webcam C210 Mono"
node.name = "alsa_input.usb-046d_0819_A640DAC0-02.mono-fallback"
node.nick = "USB Device 0x46d 0x819"
media.class = "Audio/Source"
id 67, type PipeWire:Interface:Client/3
module.id = "2"
pipewire.protocol = "protocol-native"
pipewire.sec.pid = "6959"
pipewire.sec.uid = "500"
pipewire.sec.gid = "511"
pipewire.access = "unrestricted"
~ $ pw-cli info 51
id: 51
permissions: rwxm
type: PipeWire:Interface:Device/3
* properties:
* device.enum.api = "udev"
* device.api = "alsa"
* media.class = "Audio/Device"
* api.alsa.path = "hw:0"
* api.alsa.card = "0"
* api.alsa.card.name = "USB Device 0x46d:0x819"
* api.alsa.card.longname = "USB Device 0x46d:0x819 at usb-0000:00:14.0-3.2, high speed"
* device.plugged.usec = "130747867987"
* device.bus-path = "pci-0000:00:14.0-usb-0:3.2:1.2"
* device.sysfs.path = "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.2/1-3.2:1.2/sound/card0"
* device.bus-id = "usb-046d_0819_A640DAC0-02"
* device.bus = "usb"
* device.subsystem = "sound"
* device.vendor.id = "046d"
* device.vendor.name = "Logitech, Inc."
* device.product.id = "0819"
* device.product.name = "Webcam C210"
* device.serial = "046d_0819_A640DAC0"
* device.form-factor = "webcam"
* device.name = "alsa_card.usb-046d_0819_A640DAC0-02"
* device.description = "Webcam C210"
* device.nick = "USB Device 0x46d:0x819"
* device.icon-name = "camera-web-usb"
* api.alsa.use-acp = "true"
* api.acp.auto-profile = "false"
* api.acp.auto-port = "false"
* api.dbus.ReserveDevice1 = "Audio0"
* factory.id = "14"
* client.id = "30"
* object.id = "51"
* object.path = "alsa:pcm:0"
* alsa.card = "0"
* alsa.card_name = "USB Device 0x46d:0x819"
* alsa.long_card_name = "USB Device 0x46d:0x819 at usb-0000:00:14.0-3.2, high speed"
* alsa.driver_name = "snd_usb_audio"
* device.string = "0"
* params: (4)
* 8 (Spa:Enum:ParamId:EnumProfile) r-
* 9 (Spa:Enum:ParamId:Profile) rw
* 12 (Spa:Enum:ParamId:EnumRoute) r-
* 13 (Spa:Enum:ParamId:Route) rw
~ $
~ $ pw-cli info 66
id: 66
permissions: rwxm
type: PipeWire:Interface:Node/3
* input ports: 0/0
* output ports: 1/64
* state: "running"
* properties:
* object.path = "alsa:pcm:0:hw:0:capture"
* api.alsa.path = "hw:0"
* api.alsa.pcm.card = "0"
* api.alsa.pcm.stream = "capture"
* audio.channels = "1"
* audio.position = "MONO"
* device.routes = "1"
* alsa.resolution_bits = "16"
* device.api = "alsa"
* device.class = "sound"
* alsa.class = "generic"
* alsa.subclass = "generic-mix"
* alsa.name = "USB Audio"
* alsa.id = "USB Audio"
* alsa.subdevice = "0"
* alsa.subdevice_name = "subdevice #0"
* alsa.device = "0"
* alsa.card = "0"
* alsa.card_name = "USB Device 0x46d:0x819"
* alsa.long_card_name = "USB Device 0x46d:0x819 at usb-0000:00:14.0-3.2, high speed"
* alsa.driver_name = "snd_usb_audio"
* device.profile.name = "mono-fallback"
* device.profile.description = "Mono"
* card.profile.device = "1"
* device.id = "51"
* factory.name = "api.alsa.pcm.source"
* priority.driver = "2000"
* priority.session = "2000"
* media.class = "Audio/Source"
* node.nick = "USB Device 0x46d 0x819"
* node.name = "alsa_input.usb-046d_0819_A640DAC0-02.mono-fallback"
* node.description = "Webcam C210 Mono"
* device.icon-name = "audio-input-microphone"
* node.pause-on-idle = "false"
* factory.id = "18"
* client.id = "31"
* node.driver = "true"
* factory.mode = "split"
* audio.adapt.follower = ""
* library.name = "audioconvert/libspa-audioconvert"
* object.id = "66"
* node.max-latency = "131072/48000"
* params: (6)
* 3 (Spa:Enum:ParamId:EnumFormat) r-
* 1 (Spa:Enum:ParamId:PropInfo) r-
* 2 (Spa:Enum:ParamId:Props) rw
* 4 (Spa:Enum:ParamId:Format) rw
* 10 (Spa:Enum:ParamId:EnumPortConfig) r-
* 11 (Spa:Enum:ParamId:PortConfig) rw
~ $
I hope this illustrates the problem - the webcam doesn't report its recording sample rate, so we need to specify it somewhere without needing a PhD, and without affecting everything else on the system, but how? (I did a postgrad in digital audio research in the 80s and made my own samplers - this should not be so confusing!)
There will be a lot of other people with a similar problem when they also upgrade, but as I can't use my machine for conferencing until this is fixed, I'll have to revert back to pulse as pipewire is unusable and not ready for primetime.