ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
914 stars 45 forks source link

Microphone not working on Valve Index #215

Open beniwtv opened 5 years ago

beniwtv commented 5 years ago

Your system information

Please describe your issue in as much detail as possible:

The Index microphone is detected on the system via ALSA and Pulseaudio, but no input is generated.

Steps for reproducing this issue:

  1. Plug in Valve Index
  2. Start SteamVR
  3. Try to use Index microphone - no sound
earldbjr commented 3 years ago

Just adding what worked for me in case it helps anyone.

Changed sample rate to 48000 as mentioned above. In pavucontrol->Configuration changed "TU102 High Definition Audio Controller" to the corresponding HDMI output. In pavucontrol->Output Devices changed "TU102..." to the same HDMI.

Only remaining issue is new games don't automatically switch to Index and have to be routed there manually, but I know there's a setting for that.

Scrumplex commented 3 years ago

It seems as if PulseAudio is reporting errors about the device:

Sep 13 16:47:46 andromeda pulseaudio[1282]: E: [alsa-sink-USB Audio] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write.
Sep 13 16:47:46 andromeda pulseaudio[1282]: E: [alsa-sink-USB Audio] alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_usb_audio'. Please report this issue to the ALSA developers.
Sep 13 16:47:46 andromeda pulseaudio[1282]: E: [alsa-sink-USB Audio] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
Note that alsa-sink-USB Audio is actually the Index as it is reported by alsa:

``` index: 3 name: driver: flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: RUNNING suspend cause: (none) priority: 9040 volume: mono: 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 1ch 48000Hz channel map: mono Mono used by: 1 linked by: 1 configured latency: 40.00 ms; range is 0.50 .. 2000.00 ms card: 2 module: 8 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 = "3" alsa.card_name = "Valve VR Radio & HMD Mic" alsa.long_card_name = "Valve Corporation Valve VR Radio & HMD Mic at usb-0000:00:14.0-4.3.3, full spee" alsa.driver_name = "snd_usb_audio" device.bus_path = "pci-0000:00:14.0-usb-0:4.3.3:1.1" sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3.3/1-4.3.3:1.1/sound/card3" udev.id = "usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_CA0E46C33D-LYM-01" device.bus = "usb" device.vendor.id = "28de" device.vendor.name = "Valve Software" device.product.id = "2102" device.product.name = "Valve VR Radio & HMD Mic" device.serial = "Valve_Corporation_Valve_VR_Radio___HMD_Mic_CA0E46C33D-LYM" device.string = "hw:3" device.buffering.buffer_size = "192000" device.buffering.fragment_size = "96000" device.access_mode = "mmap+timer" device.profile.name = "mono-fallback" device.profile.description = "Mono" device.description = "Valve VR Radio & HMD Mic Mono" alsa.mixer_name = "USB Mixer" alsa.components = "USB28de:2102" module-udev-detect.discovered = "1" device.icon_name = "audio-card-usb" ports: analog-input: Analog Input (priority 10000, latency offset 0 usec, available: unknown) properties: active port: ```

notably `alsa.name = "USB Audio"

heregoesmarcel commented 3 years ago

Manjaro Linux here, this issue is still present. Not sure why this hasn't been fixed yet in almost over a year but I can confirm the only needed change is to perform the following command: nano ~/.config/pulse/daemon.conf

I'm experiencing the same issue on my Manjaro machine. Edited both daemon.conf files to no avail. In addition to that (I'm not sure if this only affects the GUI), launching pavucontrol gives the following warning:

(pavucontrol:33418): Gtk-WARNING **: 21:07:53.400: Failed to set text 'Valve VR Radio & HMD Mic' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &amp;

Specs: KERNEL: 5.8.6-1-MANJARO CPU: Ryzen R7 1700 GPU: AMD Radeon RX 5700 GPU DRIVER: Mesa 20.1.7-1 STEAMVR: 1.14.16 HMD: VALVE INDEX

FreeBooteR69-mint commented 3 years ago

(pavucontrol:33418): Gtk-WARNING **: 21:07:53.400: Failed to set text 'Valve VR Radio & HMD Mic' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &

I have this warning too.

System Information

``` Computer Information: Manufacturer: Unknown Model: Unknown Form Factor: Desktop No Touch Input Detected Processor Information: CPU Vendor: AuthenticAMD CPU Brand: AMD Ryzen 7 2700X Eight-Core Processor CPU Family: 0x17 CPU Model: 0x8 CPU Stepping: 0x2 CPU Type: 0x0 Speed: 4000 Mhz 16 logical processors 8 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Supported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported AVX2: Unsupported AVX512F: Unsupported AVX512PF: Unsupported AVX512ER: Unsupported AVX512CD: Unsupported AVX512VNNI: Unsupported SHA: Unsupported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported Operating System Version: Linux Mint 19.3 Tricia (64 bit) Kernel Name: Linux Kernel Version: 5.7.8-steamvr-generic X Server Vendor: The X.Org Foundation X Server Release: 12008000 X Window Manager: Mutter (Muffin) Steam Runtime Version: steam-runtime_0.20201005.0 Video Card: Driver: X.Org AMD Radeon RX 5700 XT (NAVI10, DRM 3.37.0, 5.7.8-steamvr-generic, LLVM 10.0.1) Driver Version: 4.6 (Compatibility Profile) Mesa 20.1.8 - SteamVR PPA OpenGL Version: 4.6 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 30 Hz VendorID: 0x1002 DeviceID: 0x731f Revision Not Detected Number of Monitors: 1 Number of Logical Video Cards: 1 Primary Display Resolution: 3840 x 2160 Desktop Resolution: 3840 x 2160 Primary Display Size: 23.90" x 13.58" (27.48" diag) 60.7cm x 34.5cm (69.8cm diag) Primary VRAM: 8192 MB Sound card: Audio device: ATI R6xx HDMI Memory: RAM: 32081 Mb VR Hardware: Headset: Valve Index (lighthouse) Controller: Valve Knuckles Right (lighthouse) Controller: Valve Knuckles Left (lighthouse) Base station or sensor: Valve Corporation Valve SR Imp (lighthouse) Base station or sensor: Valve Corporation Valve SR Imp (lighthouse) Miscellaneous: UI Language: English LANG: en_CA.UTF-8 Total Hard Disk Space Available: 4730678 Mb Largest Free Hard Disk Block: 2351482 Mb ```

ChristophHaag commented 3 years ago

(pavucontrol:33418): Gtk-WARNING **: 21:07:53.400: Failed to set text 'Valve VR Radio & HMD Mic' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &

This is just a warning in the UI of pavucontrol that should have no effect on functionality. I fixed the warning here https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/merge_requests/24

FreeBooteR69-mint commented 3 years ago

So how do we go about finding out what is causing the mic not to function for some people? I can get get a gaming headset mic to work in alsamixer, but there is no mic control for the Valve Index.

Edit: Looks like my problem was a faulty Index hmd. Plugging another one in and worked no problem.

earldbjr commented 3 years ago

In addition to changing the setting in /etc/pulse/daemon.conf as was mentioned, you need to create ~/.config/pulse/daemon.conf and add default-sample-rate = 48000 to it Then restart pulseaudio with 'pulseaudio -k.'

C0rn3j commented 3 years ago

I had the mic working (with the restart caveat) some months ago, but trying it today I can't get it working at all.

Tried using SteamVR on Linux 1.15.12 and 1.15.13 beta with up-to-date firmware.

Setting default-sample-rate = 48000 actually distorts my audio output and does not fix the mic.

Using an Nvidia card with 455.45.01 and Linux 5.9.11.

Mic works in Windows SteamVR 1.15.13.

ChristophHaag commented 3 years ago

Also of note for those seeking a quick fix: The Microphone will not initialize before SteamVR is started, so don't be disheartened if you don't see activity in the monitor when you yell at the headset before starting SteamVR.

Adding to that, I just saw that the microphone will not record any sound unless the HDMI audio output profile is set to the output with the Valve Index speakers.

Scrumplex commented 3 years ago

I did the following steps in that order:

  1. Switch audio to HDMI (AMD)
  2. Start SteamVR
  3. Start Audacity and try to record

And I am still getting no sound at all. Pulse tells me that the mic is at 48 kHz

Goofybud16 commented 3 years ago

I did the following steps in that order:

1. Switch audio to HDMI (AMD)

2. Start SteamVR

3. Start Audacity and try to record

And I am still getting no sound at all. Pulse tells me that the mic is at 48 kHz

Are you sure that you are outputting to the correct HDMI device?

Start SteamVR, then play some audio source, and then switch it to the AMD HDMI/DP output device. Go to the "Configuration" tab in Pulseaudio Volume Control [pavucontrol] and toggle through the different options for HDMI audio until you have audio playing from the Index.

image

Once audio is playing from the Index, and SteamVR is running, you should be able to get audio from the Valve VR Radio & HMD Mic device.

mpnordland commented 3 years ago

I'm still unable to get microphone input despite attempting all fixes reported in this issue.

I have:

Here's what Pulseaudio knows about the device:

    State: RUNNING
    Name: alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8F0278E1CF-LYM-01.mono-fallback
    Description: Valve VR Radio & HMD Mic Mono
    Driver: module-alsa-card.c
    Sample Specification: s16le 1ch 48000Hz
    Channel Map: mono
    Owner Module: 7
    Mute: no
    Volume: mono: 65536 / 100% / 0.00 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor of Sink: n/a
    Latency: 3359 usec, configured 40000 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY 
    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 = "0"
        alsa.card_name = "Valve VR Radio & HMD Mic"
        alsa.long_card_name = "Valve Corporation Valve VR Radio & HMD Mic at usb-0000:00:14.0-2.3.3, full spee"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:00:14.0-usb-0:2.3.3:1.1"
        sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.3/3-2.3.3/3-2.3.3:1.1/sound/card0"
        udev.id = "usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8F0278E1CF-LYM-01"
        device.bus = "usb"
        device.vendor.id = "28de"
        device.vendor.name = "Valve Software"
        device.product.id = "2102"
        device.product.name = "Valve VR Radio & HMD Mic"
        device.serial = "Valve_Corporation_Valve_VR_Radio___HMD_Mic_8F0278E1CF-LYM"
        device.string = "hw:0"
        device.buffering.buffer_size = "192000"
        device.buffering.fragment_size = "96000"
        device.access_mode = "mmap+timer"
        device.profile.name = "mono-fallback"
        device.profile.description = "Mono"
        device.description = "Valve VR Radio & HMD Mic Mono"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-usb"
    Ports:
        analog-input: Analog Input (type: Analog, priority: 10000, availability unknown)
    Active Port: analog-input
    Formats:
        pcm
earldbjr commented 3 years ago
  • added ~/.config/pulse/daemon.conf with "default-sample-rate = 48000"

Have you added the same to /etc/pulse/daemon.conf? Was the final obscure step for me when I got the index.

mpnordland commented 3 years ago

I added it to /etc/pulse/daemon.conf too. Still doesn't work.

JulianGro commented 3 years ago

Something I just noticed with the Valve Index microphone. For me it only works if SteamVR is on and it is on my head (the proximity sensor covered), then it still takes a couple of seconds to enable the microphone.

dromer commented 3 years ago

What if you don't use pulseaudio?

optlink commented 3 years ago

@dromer It works perfectly out of the box with pipewire

dromer commented 3 years ago

@optlink ok, I was trying to get pipewire to run yesterday. I don't see it appearing in the "stable" Linux world (Debian) for another 2-3 years, but I'll give it some more effort :)

KawaneRio commented 3 years ago

The problem is that the sample rate requested by the EDID is not respected by the rest of the linux audio stack due to complicated reasons.

To work around the issue, set the following in /etc/pulse/daemon.conf:

default-sample-rate = 48000

Then restart pulseaudio by rebooting or running pulseaudio -k

This..Worked for me... Thank you, so, so, much.

cybik commented 3 years ago

In my case, forcing the sample rate and restarting didn't fix anything. I am also unable to use pipewire at this time.

Scratch that, playing around with the inputs in the PulseAudio UI (pavucontrol-qt) manages to unlock it - if and only if the active output sink is also the Index. Still, super weird.

cybik commented 3 years ago

Update on my update: after some testing it appears that even though PulseAudio sees my device and activates it "properly", and SteamVR Home "detects" my talking even when the input is set properly (after literally more than one starting SteamVR Home), the person I was chatting with did not hear my voice. Another input (Blue Yeti, Jabrak 510) gets the audio through just fine; I'm guessing the sample rate messes the audio transfer up.

cybik commented 3 years ago

Second update on my update: after going down the rabbit hole of experimentation with things I shouldn't, I installed a few pipewire-0.3.24 packages from Debian Sid into my Pop_OS install (word to the wise: do NOT do this), and tried to use the Index microphones again. At the very least just using them in a Meet web browser (after launching SteamVR to initialize them), no other shenanigans were necessary.

Update 1: VRChat through Proton now gets audio input properly.

AlexBMJ commented 3 years ago

This thread is getting fairly long, so it took me some time to go through all the suggested fixes.

Overview:

I will continue to test on different SteamVR versions, but I am getting absolutely nothing on the latest Stable or Beta (1.17.6) versions. Please reply if you have any suggestions!

JulianGro commented 3 years ago

I am pretty sure that the microphone only turns on when the Index' head sensor thingee it tripped, and then it still takes a couple of seconds to turn on.

cybik commented 3 years ago

@AlexBMJ the one last thing to try would be to replace PulseAudio with PipeWire, if you feel adventurous.

AlexBMJ commented 3 years ago

Okay, I might have found the issue. As mentioned above, the problem seems to be the speakers running at a lower sample rate, causing the microphone to constantly reset. Checking pactl it does seem that they are running at 44100Hz instead of 48000Hz. Here is a partial dump:

Sink #6
        State: RUNNING
        Name: alsa_output.pci-0000_26_00.1.hdmi-stereo-extra2
        Description: GP104 High Definition Audio Controller Digital Stereo (HDMI 3)
        Driver: module-alsa-card.c
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Owner Module: 8
        Mute: no
        Volume: front-left: 65524 / 100% / -0.00 dB,   front-right: 65524 / 100% / -0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.pci-0000_26_00.1.hdmi-stereo-extra2.monitor
        Latency: 5560 usec, configured 5805 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
        Properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "HDMI 2"
                alsa.id = "HDMI 2"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "8"
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 103"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:26:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:26:00.1/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "10f0"
                device.product.name = "GP104 High Definition Audio Controller"
                device.string = "hdmi:0,2"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "hdmi-stereo-extra2"
                device.profile.description = "Digital Stereo (HDMI 3)"
                device.description = "GP104 High Definition Audio Controller Digital Stereo (HDMI 3)"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        Ports:
                hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, available)
        Active Port: hdmi-output-2
        Formats:
                pcm

I'm not experienced enough in the linux audio stack to fix this. Since setting the default sample rate in pulse didn't work, I tried configuring ALSA directly, but setting .asoundrc to

pcm.hdmi {
    rate 48000
}

simply gives me : ALSA lib conf.c:1446:(parse_def) hdmi is not a compound

AlexBMJ commented 3 years ago

Last update:

After a full week of struggling with JACK + Pulse, I finally caved and installed PipeWire and it just works out of the box! (thanks @cybik)

kzdixon commented 3 years ago

Running Arch (5.12.15-arch1-1) on Plasma with fairly default pulseaudio settings. Setting the following in my pulseaudio daemon.conf and rebooting worked for me: default-sample-rate = 48000 alternate-sample-rate = 44100

Have to of course make sure the devices are selected in whatever pulseaudio mixer is being used. For me the playback works fine when using HDMI/DisplayPort (GA102 High Definition Audio Controller Digital Stereo (HDMI); Recording device is set to Analog Input (Valve VR Radio & HMD Mic Mono).

Goofybud16 commented 3 years ago

I decided to check out PipeWire recently, and it seems to behave... Strangely.

The microphone does work, but only when actually sending an audio stream to the Index.

To reproduce:

  1. Install Pipewire and Pipewire-pulse (I pulled them from Debian Experimental), switch Pulseaudio to Pipewire
  2. Start SteamVR
  3. Observe no mic input (Something like pavucontrol should work with Pipewire-pulse)
  4. Start playing audio somewhere, and ensure it's directed to the Index headphones
  5. Mic input starts to work
  6. Switch playback to a different device
  7. Mic input stops working

Strangely, even using a module-combine-sink that outputs to the Index (Requires a recent pipewire) that's muted (and has no audio streams playing into it) gets the mic working.

I'm not sure if that's a pipewire issue, or an Index issue; since the mic is quirky and picky on Pulseaudio too.

89Q12 commented 2 years ago

Had the same issue on arch + pulseaudio where the mic wouldn't wanna work, no matter what I tried and the workarounds mentioned by others didn't work for me. I ended up switching to pipewire(v. 0.3.33), it works out of the box since then and I didn't notice any audio artifacts or glitches of any kind. Also I wasn't able to reproduce the behavior mentioned by @Goofybud16 in the latest pipewire version.

ZarathustraDK commented 2 years ago

Just wanted to chime in. Did a fresh install of Arch yesterday using the archinstaller, and mic works out of the box with pipewire 0.3.33. Tested succesfully on VRChat without any tinkering beyond setting the correct audiosinks after SteamVR starts.

DomiStyle commented 2 years ago

Anybody still experiencing this? I'm on Ubuntu 21.10 with Pipewire 0.3.39 and I don't get any sound out of my mic.

I tried with and without EasyEffects but it just won't work, even with SteamVR running. I also checked the sample rate and it's at 48000 for both the speaker and the mic.

cybik commented 2 years ago

@DomiStyle I just tried it, it works - but I did have SteamVR running in the background.

https://youtu.be/0dbO1zd1xak

Note that I'm on Ubu-via-Pop 21.10 with Pipewire 0.3.32 using only repo packages (no PPAs) - but I did have to add pipewire-pulse manually. As well, I did have to "flip on" pipewire and disable pulseaudio via systemd shenaniganeries.

Goofybud16 commented 2 years ago

I've had issues with Pipewire 0.3.39.

Make sure SteamVR is running, and try playing some audio to the headset and make sure it actually audibly plays and the mic should work then.

DomiStyle commented 2 years ago

@cybik Thanks, good to know that everything should work on Ubuntu 21.10 also then.

I'm going to mess around a little bit and downgrade Pipewire if it still doesn't work.

@Goofybud16 Issues with 0.3.39 as in not working at all?

SteamVR is running, the headset is active and the Steam Home environment is running. I think that should be enough to enable the mic?

cybik commented 2 years ago

@Goofybud16 raises a fair point: I initially didn't check the mic feed in before switching my HDMI audio out to the headset.

After verification, if I'm not mistaken:

Meaning somehow the mic state of the Index is dependent the audio-out being active. Looks like a firmware oops to me, if anything.

(Powerdown tests are made easy by putting the Index on an IoT "smart" wall socket :D)

Goofybud16 commented 2 years ago

For some reason, the mic will only work properly under certain conditions (eg the Index has actually played audio at 48Khz, this issue was first created because Pulse was defaulting to 44.1KHz and, while that would play to the speakers, it would break the mic.)

I've found the best way to ensure it works is to ensure that you actually have sound audibly coming out of the Index speakers. Pipewire, helpfully, defaults to 48KHz, vs Pulse's 44.1 on most distros.

DomiStyle commented 2 years ago

Hmm, no luck yet. I downgraded to Pipewire 0.3.32 just to be sure there are no differences there and I also disabled EasyEffects so things are easier.

I connected a second microphone just to make sure the microphone wasn't used before SteamVR started. I also played back a Youtube video so something is coming from the Index speakers.

I also noticed that starting SteamVR adds the HDMI output and selects it by default but the microphone is always there and never automatically selected, not sure if that is normal.

This is what pactl info says:

Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 109
Tile Size: 65472
User Name: domi
Host Name: domi-workstation
Server Name: PulseAudio (on PipeWire 0.3.32)
Server Version: 14.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_0d_00.1.hdmi-stereo-extra2
Default Source: alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8026D1CBCE-LYM-01.mono-fallback
Cookie: 2458:23c8

This is the output file of pw-dot (can be displayed with xdot) pw.dot.txt

cybik commented 2 years ago

@DomiStyle try flipping on SteamVR (I'm assuming it's active but still), then switching the HDMI output to your headunit specifically.

DomiStyle commented 2 years ago

@cybik No dice. Flipping the output device back and forth while SteamVR is running doesn't do anything.

I also dusted off my Windows partition to make sure the mic itself is still working and yes, everything is working there once SteamVR is started.

DomiStyle commented 2 years ago

Unfortunately I still wasn't able to get the mic working.

Could anyone with working mic post their Valve Index entries for pactl list sources and pactl list sinks?

This is mine with SteamVR running, Beat Saber running and OBS trying to record.

Valve Index source ``` Source #47 State: RUNNING Name: alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8026D1CBCE-LYM-01.mono-fallback Description: Valve VR Radio & HMD Mic Mono Driver: PipeWire Sample Specification: s16le 1ch 48000Hz Channel Map: mono Owner Module: 4294967295 Mute: no Volume: mono: 65536 / 100% / 0,00 dB balance 0,00 Base Volume: 65536 / 100% / 0,00 dB Monitor of Sink: n/a Latency: 0 usec, configured 0 usec Flags: HARDWARE DECIBEL_VOLUME LATENCY Properties: object.path = "alsa:pcm:2:hw:2:capture" api.alsa.path = "hw:2" api.alsa.pcm.card = "2" 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 = "2" alsa.card_name = "Valve VR Radio & HMD Mic" alsa.long_card_name = "Valve Corporation Valve VR Radio & HMD Mic at usb-0000:08:00.1-1.3.3, full spee" alsa.driver_name = "snd_usb_audio" device.profile.name = "mono-fallback" device.profile.description = "Mono" card.profile.device = "1" device.id = "40" factory.name = "api.alsa.pcm.source" priority.driver = "1872" priority.session = "1872" media.class = "Audio/Source" node.nick = "Valve VR Radio & HMD Mic" node.name = "alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8026D1CBCE-LYM-01.mono-fallback" device.description = "Valve VR Radio & HMD Mic Mono" device.icon_name = "audio-input-microphone" node.pause-on-idle = "false" factory.id = "18" client.id = "32" node.driver = "true" factory.mode = "split" audio.adapt.follower = "" library.name = "audioconvert/libspa-audioconvert" object.id = "47" node.max-latency = "131072/48000" Ports: analog-input: Analog Input (type: Analog, priority: 10000, availability unknown) Active Port: analog-input Formats: pcm ```
Valve Index sink ``` Sink #48 State: RUNNING Name: alsa_output.pci-0000_0d_00.1.hdmi-stereo-extra2 Description: HDA ATI HDMI Digital Stereo (HDMI 3) Driver: PipeWire Sample Specification: s16le 2ch 48000Hz Channel Map: front-left,front-right Owner Module: 4294967295 Mute: no 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 Monitor Source: alsa_output.pci-0000_0d_00.1.hdmi-stereo-extra2.monitor Latency: 0 usec, configured 0 usec Flags: HARDWARE DECIBEL_VOLUME LATENCY Properties: object.path = "alsa:pcm:0:hdmi:0,2:playback" api.alsa.path = "hdmi:0,2" api.alsa.pcm.card = "0" api.alsa.pcm.stream = "playback" audio.channels = "2" audio.position = "FL,FR" device.routes = "1" alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "HDMI 2" alsa.id = "HDMI 2" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "8" alsa.card = "0" alsa.card_name = "HDA ATI HDMI" alsa.long_card_name = "HDA ATI HDMI at 0xfca24000 irq 153" alsa.driver_name = "snd_hda_intel" device.profile.name = "hdmi-stereo-extra2" device.profile.description = "Digital Stereo (HDMI 3)" card.profile.device = "12" device.id = "44" factory.name = "api.alsa.pcm.sink" priority.driver = "616" priority.session = "616" media.class = "Audio/Sink" node.nick = "HDA ATI HDMI" node.name = "alsa_output.pci-0000_0d_00.1.hdmi-stereo-extra2" device.description = "HDA ATI HDMI Digital Stereo (HDMI 3)" device.icon_name = "audio-card-hdmi" node.pause-on-idle = "false" factory.id = "18" client.id = "32" node.driver = "true" factory.mode = "merge" audio.adapt.follower = "" library.name = "audioconvert/libspa-audioconvert" object.id = "48" node.max-latency = "8192/48000" Ports: hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, availability group: Legacy 3, available) Active Port: hdmi-output-2 Formats: pcm ```
Goofybud16 commented 2 years ago

@DomiStyle To be absolutely 100% sure, you have audio coming out of your Index ear speakers? So the audio is actively being sent over DisplayPort and audibly playing on the Index, correct?

I've found that unless you actually have sound audibly playing on the Index ear speakers first, the mic probably won't work. Sometimes it seems to get angry, and while the audio stack claims to be sending audio, it won't actually audibly play, and the mic won't work until something eventually gets in sync and it starts playing.

DomiStyle commented 2 years ago

@Goofybud16 Yep, Beat Saber is playing a song in the background. I can hear it over the Index speakers just fine but mic stays silent in both OBS and the Gnome sound settings.

cybik commented 2 years ago

Unfortunately I still wasn't able to get the mic working.

Could anyone with working mic post their Valve Index entries for pactl list sources and pactl list sinks?

This is mine with SteamVR running, Beat Saber running and OBS trying to record.

pactl info as well pls

Goofybud16 commented 2 years ago
Valve Index Source ``` Source #54 State: RUNNING Name: alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8766F0F61E-LYM-01.mono-fallback Description: Valve VR Radio & HMD Mic Mono Driver: PipeWire Sample Specification: s16le 1ch 48000Hz Channel Map: mono Owner Module: 4294967295 Mute: no Volume: mono: 65536 / 100% / 0.00 dB balance 0.00 Base Volume: 65536 / 100% / 0.00 dB Monitor of Sink: n/a Latency: 0 usec, configured 0 usec Flags: HARDWARE DECIBEL_VOLUME LATENCY Properties: alsa.card = "3" alsa.card_name = "Valve VR Radio & HMD Mic" alsa.class = "generic" alsa.device = "0" alsa.driver_name = "snd_usb_audio" alsa.id = "USB Audio" alsa.long_card_name = "Valve Corporation Valve VR Radio & HMD Mic at usb-0000:0d:00.3-3.3.3, full spee" alsa.name = "USB Audio" alsa.resolution_bits = "16" alsa.subclass = "generic-mix" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" api.alsa.card.longname = "Valve Corporation Valve VR Radio & HMD Mic at usb-0000:0d:00.3-3.3.3, full spee" api.alsa.card.name = "Valve VR Radio & HMD Mic" api.alsa.headroom = "1024" api.alsa.path = "hw:3" api.alsa.pcm.card = "3" api.alsa.pcm.stream = "capture" audio.channels = "1" audio.position = "MONO" card.profile.device = "1" device.api = "alsa" device.class = "sound" device.id = "48" device.profile.description = "Mono" device.profile.name = "mono-fallback" device.routes = "1" factory.name = "api.alsa.pcm.source" media.class = "Audio/Source" device.description = "Valve VR Radio & HMD Mic Mono" node.name = "alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8766F0F61E-LYM-01.mono-fallback" node.nick = "Valve VR Radio & HMD Mic" node.pause-on-idle = "false" object.path = "alsa:pcm:3:hw:3:capture" priority.driver = "2000" priority.session = "2000" factory.id = "18" client.id = "33" node.driver = "true" factory.mode = "split" audio.adapt.follower = "" library.name = "audioconvert/libspa-audioconvert" object.id = "54" node.max-latency = "131072/48000" Ports: analog-input: Analog Input (type: Analog, priority: 10000, availability unknown) Active Port: analog-input Formats: pcm ```
Valve Index Sink ``` Sink #40 State: RUNNING Name: alsa_output.pci-0000_0b_00.1.hdmi-stereo-extra2 Description: Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] Digital Stereo (HDMI 3) Driver: PipeWire Sample Specification: s16le 2ch 48000Hz Channel Map: front-left,front-right Owner Module: 4294967295 Mute: no Volume: front-left: 42524 / 65% / -11.27 dB, front-right: 42524 / 65% / -11.27 dB balance 0.00 Base Volume: 65536 / 100% / 0.00 dB Monitor Source: alsa_output.pci-0000_0b_00.1.hdmi-stereo-extra2.monitor Latency: 0 usec, configured 0 usec Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS Properties: alsa.card = "0" alsa.card_name = "HDA ATI HDMI" alsa.class = "generic" alsa.device = "8" alsa.driver_name = "snd_hda_intel" alsa.id = "HDMI 2" alsa.long_card_name = "HDA ATI HDMI at 0xfcd20000 irq 139" alsa.name = "HDMI 2" alsa.resolution_bits = "16" alsa.subclass = "generic-mix" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" api.alsa.card.longname = "HDA ATI HDMI at 0xfcd20000 irq 139" api.alsa.card.name = "HDA ATI HDMI" api.alsa.headroom = "1024" api.alsa.path = "hdmi:0,2" api.alsa.pcm.card = "0" api.alsa.pcm.stream = "playback" audio.channels = "2" audio.position = "FL,FR" card.profile.device = "12" device.api = "alsa" device.class = "sound" device.id = "46" device.profile.description = "Digital Stereo (HDMI 3)" device.profile.name = "hdmi-stereo-extra2" device.routes = "1" factory.name = "api.alsa.pcm.sink" media.class = "Audio/Sink" device.description = "Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] Digital Stereo (HDMI 3)" node.name = "alsa_output.pci-0000_0b_00.1.hdmi-stereo-extra2" node.nick = "HDA ATI HDMI" node.pause-on-idle = "false" object.path = "alsa:pcm:0:hdmi:0,2:playback" priority.driver = "616" priority.session = "616" factory.id = "18" client.id = "33" node.driver = "true" factory.mode = "merge" audio.adapt.follower = "" library.name = "audioconvert/libspa-audioconvert" object.id = "40" node.max-latency = "8192/48000" Ports: hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, availability group: Legacy 3, available) Active Port: hdmi-output-2 Formats: pcm ```
pactl info ``` Server String: /run/user/1000/pulse/native Library Protocol Version: 35 Server Protocol Version: 35 Is Local: yes Client Index: 218 Tile Size: 65472 User Name: -snip- Host Name: -snip- Server Name: PulseAudio (on PipeWire 0.3.39) Server Version: 15.0.0 Default Sample Specification: float32le 2ch 48000Hz Default Channel Map: front-left,front-right Default Sink: alsa_output.usb-Yamaha_Corporation_MG-XU-00.analog-stereo Default Source: alsa_input.usb-Yamaha_Corporation_MG-XU-00.analog-stereo Cookie: -snip- ```

These were taken while SteamVR was running, and there was audio visibly coming from the mic in Pavucontrol.

The only configuration change I've made on my system of note is adjusting the Alsa headroom (which resolved some issues with audio playback, but didn't seem to effect the mic) as well as forcing the default clock rate to 48000 in Pipewire, which seemed to improve the reliability of mod-combine-sink, which seems to have issues in 0.3.39.

/etc/pipewire/pipewire.conf ``` # Daemon config file for PipeWire version "0.3.39" # # # Copy and edit this file in /etc/pipewire for system-wide changes # or in ~/.config/pipewire for local changes. context.properties = { ## Configure properties in the system. #library.name.system = support/libspa-support #context.data-loop.library.name.system = support/libspa-support #support.dbus = true #link.max-buffers = 64 link.max-buffers = 16 # version < 3 clients can't handle more #mem.warn-mlock = false #mem.allow-mlock = true #mem.mlock-all = false #clock.power-of-two-quantum = true #log.level = 2 #cpu.zero.denormals = true core.daemon = true # listening for socket connections core.name = pipewire-0 # core name and socket name ## Properties for the DSP configuration. # I uncommented these two lines, which were already in the file once I copied it from the original location to /etc/pipewire/pipewire.conf default.clock.rate = 48000 default.clock.allowed-rates = [ 48000 ] # #default.clock.quantum = 1024 #default.clock.min-quantum = 32 -snip- ```
/usr/share/wireplumber/main.lua.d/50-alsa-config.lua ``` -snip, this is near the bottom of the file- matches = { { -- Matches all sources. { "node.name", "matches", "alsa_input.*" }, }, { -- Matches all sinks. { "node.name", "matches", "alsa_output.*" }, }, }, apply_properties = { --["node.nick"] = "My Node", --["priority.driver"] = 100, --["priority.session"] = 100, --["node.pause-on-idle"] = false, --["resample.quality"] = 4, --["channelmix.normalize"] = false, --["channelmix.mix-lfe"] = false, --["audio.channels"] = 2, --["audio.format"] = "S16LE", --["audio.rate"] = 44100, --["audio.position"] = "FL,FR", --["api.alsa.period-size"] = 1024, -- -- I uncommented this line and set it to 1024 ["api.alsa.headroom"] = 1024, -- --["api.alsa.disable-mmap"] = false, --["api.alsa.disable-batch"] = false, }, }, } ```
DomiStyle commented 2 years ago

@cybik Here's the pactl info output:

pactl info ``` Server String: /run/user/1000/pulse/native Library Protocol Version: 35 Server Protocol Version: 35 Is Local: yes Client Index: 64 Tile Size: 65472 User Name: domi Host Name: domi-workstation Server Name: PulseAudio (on PipeWire 0.3.32) Server Version: 14.0.0 Default Sample Specification: float32le 2ch 48000Hz Default Channel Map: front-left,front-right Default Sink: alsa_output.pci-0000_0d_00.1.hdmi-stereo-extra2 Default Source: alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8026D1CBCE-LYM-01.mono-fallback Cookie: a3b7:c736 ```

@Goofybud16

I don't really have any default config for Pipewire but I guess I could copy the default config to /etc/pipewire and set the default rate to 48000 as well just to be sure. No /usr/share/wireplumber on my system but I assume it's not necessary for this to work?

I have Fedora 35 running on a different SSD so I might just try with that soon.

Goofybud16 commented 2 years ago

Prior to setting it in Wireplumber, Debian had used media-session, which the file was

/etc/pipewire/media-session.d/alsa-monitor.conf ``` -snip, the end of the file- actions = { update-props = { #node.nick = "My Node" #node.nick = null #priority.driver = 100 #priority.session = 100 node.pause-on-idle = false #resample.quality = 4 #channelmix.normalize = false #channelmix.mix-lfe = false #audio.channels = 2 #audio.format = "S16LE" #audio.rate = 44100 #audio.position = "FL,FR" #session.suspend-timeout-seconds = 5 # 0 disables suspend #monitor.channel-volumes = false #latency.internal.rate = 0 # internal latency in samples #latency.internal.ns = 0 # internal latency in nanoseconds #api.alsa.period-size = 1024 # This line here api.alsa.headroom = 1024 # #api.alsa.start-delay = 0 #api.alsa.disable-mmap = false #api.alsa.disable-batch = false #api.alsa.use-chmap = false #iec958.codecs = [ PCM DTS AC3 MPEG MPEG2-AAC EAC3 TrueHD DTS-HD ] } } } ] ``` That was to resolve issues with audio cutting out and such on the Index ear speakers, which may be something specific to my GPU (6700XT) or system. Didn't seem to effect the mic, but maybe it did effect something. The mic was working prior to this; just had XRUN issues.
DomiStyle commented 2 years ago

That was to resolve issues with audio cutting out and such on the Index ear speakers, which may be something specific to my GPU (6700XT) or system.

Didn't really notice any audio cut outs on my 6900 XT but there is some crackling here and there.

/etc/pipewire/media-session.d/ exists but is empty.

~/.config/pipewire/media-session.d/ is not empty but seems to only contain application default settings.

DomiStyle commented 2 years ago

So I tried with a fresh Fedora 35 installation now and I still have no sound from my mic.

Not sure what's going on but the steam overlay as well as the settings are also not working on Fedora 35, so I can't even check the mic settings there.

DomiStyle commented 2 years ago

I removed pipewire-pulse to switch back to Pulseaudio and the microphone is also not working with Pulseudio, even with default-sample-rate = 48000 set.

If the mic didn't work under Windows I would have been sure that this is a hardware issue by now.