Alsa - add delay to usb microphone

OpenSuse Tumbleweed

I am looking for a solution to add a delay to the USB microphone.

The reason: f.e using Zoom Video goes through obs studio with green screen filter and has a delay of about 400 ms.

Zoom is using the video from OBS as a virtual cam. Zoom is using audio direct from the USB microphone.

I am looking for a workaround to set the delay microphone approximately the same as the video delay. The solution could be at konsole level or GUI Level

cat /proc/asound/cards
 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfeaf4000 irq 16
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfebf8000 irq 28
 2 [Loopback       ]: Loopback - Loopback
                      Loopback 1
 3 [Edition        ]: USB-Audio - BRIO 4K Stream Edition
                      BRIO 4K Stream Edition at usb-0000:00:13.2-6, high speed

lsusb --verbose
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0001 1.1 root hub
  bcdDevice            6.02
  iManufacturer           3 Linux 6.2.4-1-default ohci_hcd
  iProduct                2 OHCI PCI host controller
  iSerial                 1 0000:00:12.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1

You mention alsa in your title, but are you using pipewire as part of the multimedia framework, or just using alsa directly?

Just in case this is useful…

I tried to find out how two things with Pipewire:

  1. how to disable the idle mode because I have a 50 Hz sound at stereo speakers with power supply in idle mode of the sound card. At PulseAudio is the solution to disable #load-module module-suspend-on-idle.
    I did not find the corresponding settings at Pipewire.
  2. the delay
    Therefore I got back to Pulseaudio and did not found the solution and asked for alsa.

If the Idle mode could be solved, I can go back to pipewire and use the build in feature of audio delay.

Have a read of the following blog…

Thank you - it is working but as there is no /etc/wireplumber the file to change is /usr/share/wireplumber/main.lua.d/50-alsa-config.lua

Thanks for the update.

Directory /usr/share/wireplumber is owned by package wireplumber. Changes will be overwritten by a newer version.

From Locations of files — WirePlumber 0.4.14 documentation

" WirePlumber’s default locations of its configuration files are determined at compile time by the build system. Typically, those end up being $XDG_CONFIG_DIR/wireplumber, /etc/wireplumber, and /usr/share/wireplumber, in that order of priority. …

The three locations are intended for custom user configuration, host-specific configuration and distribution-provided configuration, respectively. At runtime, WirePlumber will search the directories for the highest-priority directory to contain the needed configuration file. This allows a user or system administrator to easily override the distribution provided configuration files by placing an equally named file in the respective directory."