5

I have a USB webcam which have inbuilt microphone.. The camera is working and the mic is detected.. but it is not giving any input.

https://www.amazon.in/TVS-WC-103-HD-Webcam-1080Pixel/dp/B08G4X6TC1/ref=asc_df_B08G4X6TC1/?tag=googleshopdes-21&linkCode=df0&hvadid=396987037596&hvpos=&hvnetw=g&hvrand=626450613447870603&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9040216&hvtargid=pla-947225293670&psc=1&ext_vrnc=hi

Output with pacmd list-sources

3 source(s) available.
  * index: 0
    name: <alsa_input.usb-Jieli_Technology_USB_PHY_2.0-02.mono-fallback>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9040
    volume: mono: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 35466 /  54% / -16.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max rewind: 0 KiB
    sample spec: s16le 1ch 44100Hz
    channel map: mono
                 Mono
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
    card: 0 <alsa_card.usb-Jieli_Technology_USB_PHY_2.0-02>
    module: 7
    properties:
        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 = "2"
        alsa.card_name = "USB PHY 2.0"
        alsa.long_card_name = "Jieli Technology USB PHY 2.0 at usb-0000:02:00.0-6, high speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:02:00.0-usb-0:6:1.2"
        sysfs.path = "/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-6/1-6:1.2/sound/card2"
        udev.id = "usb-Jieli_Technology_USB_PHY_2.0-02"
        device.bus = "usb"
        device.vendor.id = "1224"
        device.vendor.name = "Jieli Technology"
        device.product.id = "2a25"
        device.product.name = "USB PHY 2.0"
        device.serial = "Jieli_Technology_USB_PHY_2.0"
        device.form_factor = "webcam"
        device.string = "hw:2"
        device.buffering.buffer_size = "176400"
        device.buffering.fragment_size = "88200"
        device.access_mode = "mmap+timer"
        device.profile.name = "mono-fallback"
        device.profile.description = "Mono"
        device.description = "USB PHY 2.0 Mono"
        module-udev-detect.discovered = "1"
        device.icon_name = "camera-web-usb"
    ports:
        analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
            properties:
                device.icon_name = "audio-input-microphone"
    active port: <analog-input-mic>
    index: 1
    name: <alsa_output.pci-0000_07_00.1.hdmi-stereo-extra1.monitor>
    driver: <module-alsa-card.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 1030
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max rewind: 0 KiB
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
    monitor_of: 0
    card: 1 <alsa_card.pci-0000_07_00.1>
    module: 8
    properties:
        device.description = "Monitor of GK208 HDMI/DP Audio Controller Digital Stereo (HDMI 2)"
        device.class = "monitor"
        alsa.card = "0"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 77"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:07:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:07:00.1/sound/card0"
        device.bus = "pci"
        device.vendor.id = "10de"
        device.vendor.name = "NVIDIA Corporation"
        device.product.id = "0e0f"
        device.product.name = "GK208 HDMI/DP Audio Controller"
        device.string = "0"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    index: 2
    name: <alsa_output.pci-0000_09_00.4.iec958-stereo.monitor>
    driver: <module-alsa-card.c>
    flags: DECIBEL_VOLUME LATENCY 
    state: SUSPENDED
    suspend cause: IDLE
    priority: 1030
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max rewind: 0 KiB
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    fixed latency: 100.14 ms
    monitor_of: 1
    card: 2 <alsa_card.pci-0000_09_00.4>
    module: 9
    properties:
        device.description = "Monitor of Starship/Matisse HD Audio Controller Digital Stereo (IEC958)"
        device.class = "monitor"
        alsa.card = "1"
        alsa.card_name = "HD-Audio Generic"
        alsa.long_card_name = "HD-Audio Generic at 0xf7400000 irq 79"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:09:00.4"
        sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:09:00.4/sound/card1"
        device.bus = "pci"
        device.vendor.id = "1022"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
        device.product.id = "1487"
        device.product.name = "Starship/Matisse HD Audio Controller"
        device.string = "1"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
4
  • Which version of Ubuntu are you using? The tags show three versions, one of which is EOL. 🤔
    – user1091774
    Commented Jan 29, 2021 at 3:28
  • Ubuntu 20.04 😁.
    – Harry Tom
    Commented Jan 29, 2021 at 3:41
  • Can you update your question to include the output of: pacmd list-sources? This will show some information about the USB camera's microphone, it's state, and properties.
    – user1091774
    Commented Jan 29, 2021 at 4:14
  • Yes i made the edit
    – Harry Tom
    Commented Jan 29, 2021 at 4:28

2 Answers 2

8

Based on the output of pacmd list-sources, all of your microphones are suspended for being idle (which makes sense). What I have found with some USB-connected devices is that once the microphone is set to SUSPENDED they never come back. There are generally two solutions for this problem:

  1. Unplug the webcam, count to five, and plug it back in.
    ⇢ This will cycle the USB device and generally brings all of the devices back online.
  2. Update PulseAudio to not suspend idle audio devices.
    ⇢ This has generally worked well for a number of computers at work where the USB cameras cannot be physically disconnected from the computer without a sharp pair of scissors.

Modifying PulseAudio

To prevent audio devices from being suspended when idle, you will need to comment out a single line in the default.pa file. These are the steps to follow:

  1. Open Terminal (if it's not already open)

  2. Open the default.pa file for editing as root:

    $ sudo vi /etc/pulse/default.pa
    

    Note: Feel free to use something other than vi. This is more a force of habit than an implicit recommendation for which editor to use.

  3. Find the line that reads load-module module-suspend-on-idle and comment it out. This will be about 90% of the way down. Once done, the line should look like this:

    ### Automatically suspend sinks/sources that become idle for too long
    # load-module module-suspend-on-idle
    
  4. Restart PulseAudio:

    $ pulseaudio -k
    
  5. Confirm your audio devices are operational:

    pacmd list-sources
    

    Check for the USB microphone, which may be at index 0 like it is in the output you provided, and confirm the value of state. It should read IDLE. When this is being actively used by an application it will change to RUNNING, then go back to IDLE about 30 seconds after it is no longer in use.

Audio Confusion

One additional issue you might see is that an application may not know which microphone to use automatically and, as a result, the input selection will always be empty. To resolve this, open the PulseAudio Volume Control (pavucontrol) application and click on the "Configuration" tab. Set the output to "Analogue Stereo Output":

PulseAudio - Configuration

Why setting the output resolves an issue with input, I can only guess at. That said, this solution does work for those rare instances when the computer consistently shows no audio input device.

2
  • Hey there @Matigo, i tried it, but it is not working... sorry for the late replay
    – Harry Tom
    Commented Feb 1, 2021 at 2:33
  • This didn't help. My "Settings for selected device" in Input tab from Sound settings greyed out instead Commented Aug 11, 2022 at 16:09
0

In Guvcview->AudioControls was set by default as input device-->pulse. i just changed it to hda intel (my sound card) and worked fine!

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .