pikvm / pikvm

Open and inexpensive DIY IP-KVM based on Raspberry Pi
https://pikvm.org
GNU General Public License v3.0
8.24k stars 454 forks source link

Audio not working on PiKVM-A3 #1365

Closed BluishHumility closed 4 months ago

BluishHumility commented 4 months ago

Hello,

I am having some difficulty getting audio working. I have a PiKVM-A3 with a Raspberry Pi 4B. I am using the H.264/WebRTC video mode in a web browser. Everything is working well, except I can't seem to figure out how to get audio working.

I have gone through this document here: https://docs.pikvm.org/audio/

I have not removed the audio jumpers, nor deleted the dtoverlay=tc358743-audio line in /boot/config.txt. Here is the entirety of /boot/config.txt if it is helpful:

# See /boot/overlays/README for all available options
initramfs initramfs-linux.img followkernel

hdmi_force_hotplug=1
gpu_mem=128
enable_uart=1
dtoverlay=tc358743
dtoverlay=disable-bt
dtoverlay=dwc2,dr_mode=peripheral
dtparam=act_led_gpio=13

# HDMI audio capture
dtoverlay=tc358743-audio

# SPI (AUM)
dtoverlay=spi0-1cs

# I2C (display)
dtparam=i2c_arm=on

# Clock
#dtoverlay=i2c-rtc,pcf8563,wakeup-source
dtoverlay=i2c-rtc,ds1307

# Passthrough
dtoverlay=vc4-kms-v3d
disable_overscan=1

The audio block mentioned in the documentation is present in /etc/kvmd/janus/janus.plugin.ustreamer.jcfg:

video: {
    sink = "kvmd::ustreamer::h264"
}
audio: {
    device = "hw:0,0"
    tc358743 = "/dev/kvmd-video"
}

Audio support is enabled in the EDID hex:

[root@pikvm ~]# kvmd-edidconf --set-audio=yes
Manufacturer ID: LNX
Product ID:      0x7771 (30577)
Serial number:   [serial number]
Monitor name:    PiKVM V3
Monitor serial:  [monitor serial]
Audio:           yes

I have rebooted after setting this, then increased the "Audio volume" in the web UI to max, but I do not get any audio.

Probably this is the smoking gun here in the journal, although I have not been able to figure out what the problem is or how to resolve it:

[...]
kvmd.apps.janus.runner            INFO --- => JANUS WebSockets transport plugin initialized!
kvmd.apps.janus.runner            INFO --- => WebSockets thread started
kvmd.apps.janus.runner            INFO --- => Creating new session: 4652817366914926; 0xb0e00bf0
kvmd.apps.janus.runner            INFO --- => Creating new handle in session 4652817366914926: 1388478252258745; 0xb0e00bf0 0xb0e010b8
kvmd.apps.janus.runner            INFO --- => == ustreamer/main      -- Creating session 0xac3011d0 ...
kvmd.apps.janus.runner            INFO --- => [1388478252258745] Creating ICE agent (ICE Full mode, controlling)
kvmd.apps.janus.runner            INFO --- => == ustreamer/video     -- Memsink opened; reading frames ...
kvmd.apps.janus.runner            INFO --- => [WARN] [1388478252258745] Waiting for candidates-done callback... (slow gathering, are you using STUN or TURN for Janus too, instead of just for users? Consider enabling full-trickle instead)
kvmd.apps.janus.runner            INFO --- => [WARN] [1388478252258745] Failed to add some remote candidates (added 1, expected 2)
kvmd.apps.janus.runner            INFO --- => [1388478252258745] The DTLS handshake has been completed
kvmd.apps.janus.runner            INFO --- => [WARN] [1388478252258745] Failed to add some remote candidates (added 0, expected 1)
kvmd.apps.janus.runner            INFO --- => [WARN] [1388478252258745] Failed to add some remote candidates (added 0, expected 1)
kvmd.apps.janus.runner            INFO --- => Destroying session 4652817366914926; 0xb0e00bf0
kvmd.apps.janus.runner            INFO --- => Detaching handle from ustreamer; 0xb0e010b8 0xac3011d0 0xb0e010b8 (nil)
kvmd.apps.janus.runner            INFO --- => [1388478252258745] WebRTC resources freed; 0xb0e010b8 0xb0e00bf0
kvmd.apps.janus.runner            INFO --- => == ustreamer/main      -- Removing session 0xac3011d0 ...
kvmd.apps.janus.runner            INFO --- => [ERR] [janus.c:janus_process_incoming_request:1187] Couldn't find any session 4652817366914926...
kvmd.apps.janus.runner            INFO --- => == ustreamer/video     -- Memsink closed
kvmd.apps.janus.runner            INFO --- => [WSS-0xac301368] Destroying WebSocket client
kvmd.apps.janus.runner            INFO --- => Creating new session: 1378431635575251; 0xac301a70
kvmd.apps.janus.runner            INFO --- => Creating new handle in session 1378431635575251: 4105396450235791; 0xac301a70 0xb0effeb8
kvmd.apps.janus.runner            INFO --- => == ustreamer/main      -- Creating session 0xac301ae8 ...
kvmd.apps.janus.runner            INFO --- => [4105396450235791] Creating ICE agent (ICE Full mode, controlling)
kvmd.apps.janus.runner            INFO --- => == ustreamer/video     -- Memsink opened; reading frames ...
kvmd.apps.janus.runner            INFO --- => [WARN] [4105396450235791] Waiting for candidates-done callback... (slow gathering, are you using STUN or TURN for Janus too, instead of just for users? Consider enabling full-trickle instead)
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- No audio presented from the host
kvmd.apps.janus.runner            INFO --- => [WARN] [4105396450235791] Failed to add some remote candidates (added 2, expected 3)
kvmd.apps.janus.runner            INFO --- => [4105396450235791] The DTLS handshake has been completed
kvmd.apps.janus.runner            INFO --- => [WARN] [4105396450235791] Failed to add some remote candidates (added 0, expected 1)
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- No audio presented from the host
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline closed
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Detected host audio
kvmd.apps.janus.runner            INFO --- => == ustreamer/audio     -- Pipeline configured on 48000Hz; capturing ...
kvmd.apps.janus.runner            INFO --- => [ERR] [src/audio.c:_pcm_thread:224] == ustreamer/audio     -- Fatal: Can't capture PCM frames: Input/output error
[...]

That block at the end repeats over and over and over until the end of the journal.

I did a web search for this error message and found this thread: https://github.com/pikvm/pikvm/issues/1193 It's not quite the same, but somewhat similar...however, that person isn't using PiKVM hardware.

Thanks for taking a look, please let me know if I have made a mistake somewhere or if you need any additional information.

Desktop:

PiKVM info:

mdevaev commented 4 months ago

Hello. You bought a clone. We guarantee the operation of our software only for proven DIY builds and for our own hardware V3 and V4. Audio is an exclusive feature of our own hardware.

Unfortunately, we do not provide any technical support to third-party/clone devices.

BluishHumility commented 4 months ago

This is surprising news because I thought I bought the right thing. However, a quick look at the link you posted confirms I did not. The unit I have looks similar, but not the same.

Too bad, I will certainly be more careful next time. Thanks anyway for taking a look. :slightly_smiling_face:

mdevaev commented 4 months ago

:ok_hand: