home-assistant / plugin-audio

Pulseaudio implementation for Home Assistant
Apache License 2.0
24 stars 13 forks source link

USB Microphone not detected by ha audio #154

Closed skylatian closed 8 months ago

skylatian commented 8 months ago

My USB microphone is not recognized as an input device in Home Assistant. Pulseaudio doesn't see it, by extension neither does HA. It is detected properly in settings (homeassistant.local:8123/config/hardware), and disappears when unplugged.

In homeassistant.local:8123/config/hardware:

controlC2
/dev/snd/by-id/usb-BLUE_MICROPHONE_Blue_Snowball_201306-00
Subsystem:
sound
Device path:
/dev/snd/controlC2
ID:
/dev/snd/by-id/usb-BLUE_MICROPHONE_Blue_Snowball_201306-00
Attributes:
DEVLINKS: >-
  /dev/snd/by-id/usb-BLUE_MICROPHONE_Blue_Snowball_201306-00
  /dev/snd/by-path/pci-0000:00:14.0-usb-0:2:1.0
DEVNAME: /dev/snd/controlC2
DEVPATH: /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/sound/card2/controlC2
ID_BUS: usb
ID_MODEL: Blue_Snowball
ID_MODEL_ENC: Blue\x20Snowball\x20
ID_MODEL_ID: '0005'
ID_PATH: pci-0000:00:14.0-usb-0:2:1.0
ID_PATH_TAG: pci-0000_00_14_0-usb-0_2_1_0
ID_REVISION: '0100'
ID_SERIAL: BLUE_MICROPHONE_Blue_Snowball_201306
ID_SERIAL_SHORT: '201306'
ID_TYPE: audio
ID_USB_DRIVER: snd-usb-audio
ID_USB_INTERFACES: ':010100:010200:030000:'
ID_USB_INTERFACE_NUM: '00'
ID_USB_MODEL: Blue_Snowball
ID_USB_MODEL_ENC: Blue\x20Snowball\x20
ID_USB_MODEL_ID: '0005'
ID_USB_REVISION: '0100'
ID_USB_SERIAL: BLUE_MICROPHONE_Blue_Snowball_201306
ID_USB_SERIAL_SHORT: '201306'
ID_USB_TYPE: audio
ID_USB_VENDOR: BLUE_MICROPHONE
ID_USB_VENDOR_ENC: BLUE\x20MICROPHONE
ID_USB_VENDOR_ID: 0d8c
ID_VENDOR: BLUE_MICROPHONE
ID_VENDOR_ENC: BLUE\x20MICROPHONE
ID_VENDOR_ID: 0d8c
MAJOR: '116'
MINOR: '12'
SUBSYSTEM: sound
SYSTEMD_USER_WANTS: sound.target
SYSTEMD_WANTS: sound.target
TAGS: ':systemd:'
USEC_INITIALIZED: '112966843604'

command outputs:

~ pactl list short sources                                                        
0       alsa_output.pci-0000_00_1b.0.analog-stereo.monitor      module-alsa-card.c      s16le 2ch 48000Hz       RUNNING
~ ha audio info
audio:
  application:
  - addon: 47701997_assist_microphone
    index: 3
    mute: false
    name: ALSA plug-in [aplay]
    stream_index: 0
    stream_type: input
    volume: 1
  card:
  - driver: module-alsa-card.c
    index: 0
    name: alsa_card.pci-0000_00_03.0
    profiles:
    - active: true
      description: "Off"
      name: "off"
  - driver: module-alsa-card.c
    index: 1
    name: alsa_card.pci-0000_00_1b.0
    profiles:
    - active: true
      description: Analog Stereo Output
      name: output:analog-stereo
    - active: false
      description: Analog Stereo Duplex
      name: output:analog-stereo+input:analog-stereo
    - active: false
      description: "Off"
      name: "off"
  input: []
  output:
  - applications: []
    card: 1
    default: true
    description: Built-in Audio Analog Stereo
    index: 0
    mute: false
    name: alsa_output.pci-0000_00_1b.0.analog-stereo
    volume: 1
host: x.x.x.x
update_available: false
version: 2023.06.0
version_latest: 2023.06.0
~ dmesg | grep -E 'usb'
[93607.330050] usb 3-1: New USB device found, idVendor=0d8c, idProduct=0005, bcdDevice= 1.00
[93607.330064] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[93607.330070] usb 3-1: Product: Blue Snowball 
[93607.330075] usb 3-1: Manufacturer: BLUE MICROPHONE
[93607.330079] usb 3-1: SerialNumber: 201306
[93607.337452] hid-generic 0003:0D8C:0005.0001: hidraw0: USB HID v1.11 Device [BLUE MICROPHONE Blue Snowball ] on usb-0000:00:14.0-1/input2
agners commented 8 months ago

Does restarting the Audio plug-in helps (ha audio restart)? There was a bug in hot-plugging which should be resolved with the latest Supervisor 2023.10.1 release.

skylatian commented 8 months ago

looks like the update fixed it! will update if anything changes, seems to be working for now.