Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow optional acap property - sampling_rate #304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shantur
Copy link

@shantur shantur commented Feb 15, 2025

This is needed when using audio capture from a device other than tc358743 such as a UAC2 Capture device to have two way audio over USB

When sampling_rate is provided, janus plugin don't try to query tc358743

This is needed when using audio capture from a device other than tc358743
such as a UAC2 Capture device to have two way audio over USB

When sampling_rate is provided, janus plugin don't try to query tc358743
@shantur
Copy link
Author

shantur commented Feb 15, 2025

With this change, one can create UAC2 capture device for audio input rather than using HDMI->CSI2 -> I2S audio

Sample configs that I tested with

/etc/kvmd/janus/janus.plugin.ustreamer.jcfg

video: {
	sink = "kvmd::ustreamer::h264"
}
acap: {
	device = "plughw:UAC2Gadget,0"
	tc358743 = "/dev/kvmd-video"
    sampling_rate = 48000
}
aplay: {
	device = "plughw:UAC2Gadget,0"
	check = "/run/kvmd/otg/uac2.usb0@meta.json"
}

Replace - https://github.com/pikvm/kvmd/blob/master/kvmd/apps/otg/__init__.py#L119

with

        _write(join(func_path, "c_chmask"), 0b11)
        _write(join(func_path, "c_srate"), 48000)
        _write(join(func_path, "c_ssize"), 2)

shantur added a commit to shantur/kvmd that referenced this pull request Feb 16, 2025
Along with pikvm/ustreamer#304 this
allows audio capture with hdmiusb devices and HDMI->CSI Bridges without adding any more cables.
shantur added a commit to shantur/kvmd that referenced this pull request Feb 16, 2025
Along with pikvm/ustreamer#304 this
allows audio capture with hdmiusb devices and HDMI->CSI Bridges without adding any more cables.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant