Skip to content

Instantly share code, notes, and snippets.

@andersondanilo
Last active October 27, 2024 23:48
Show Gist options
  • Save andersondanilo/3c66fff45e27cbedfb0cb5cc5cc6d0eb to your computer and use it in GitHub Desktop.
Save andersondanilo/3c66fff45e27cbedfb0cb5cc5cc6d0eb to your computer and use it in GitHub Desktop.
ms2109 linux (MacroSilicon USB Video)

Play

ffplay -f video4linux2 -framerate 60 -video_size 1920x1080 -input_format mjpeg /dev/video2

You can try other video number (video3, video4)

Maybe you need:

Create: /etc/udev/rules.d/91-hdmi-to-usb-ms2109.rules With:

# For HDMI-to-USB adaptor:
SUBSYSTEM=="usb", DRIVER=="snd-usb-audio", ATTRS{idProduct}=="2109", ATTRS{idVendor}=="534d", \
    RUN+="/bin/sh -c 'echo -n $kernel > /sys/bus/usb/drivers/snd-usb-audio/unbind'"

SUBSYSTEM=="usb", DRIVER=="snd-usb-audio", ATTRS{idProduct}=="2109", ATTRS{idVendor}=="534d", \
    ATTR{bInterfaceNumber}=="00", RUN+="/bin/sh -c 'sleep 1; echo -n $kernel > /sys/bus/usb/drivers/uvcvideo/bind'"

Reload: sudo udevadm control --reload-rules

then unplug and replug, and it should start working.

Info source

https://www.mjt.me.uk/posts/fixing-missing-macrosilicon-ms2109/ https://bbs.archlinux.org/viewtopic.php?pid=1919811#p1919811

@LuccasPolonio
Copy link

I'm used this code, for my first capture card, so i got a new and forgot to remove because the usb 3.0 video card wont need.

@AnselRS
Copy link

AnselRS commented Nov 9, 2023

Nice!
Using this as a Rpi console (hdmi-usb) on my notebook (Mint. 21.2)
No need for another monitor while installing/configuring...

@kienvo
Copy link

kienvo commented May 18, 2024

Nice.
Actually, no need to touch the udev rules, just add yourself to video and audio groups.

usermod -aG video $USER 
usermod -aG audio $USER 

Refresh without re-login:

newgrp video
newgrp audio

@kjessec
Copy link

kjessec commented Oct 27, 2024

why do you need the unbind audio part? wouldn't this effectively disable audio input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment