Macrosilicon 2109: Cheap USB HDMI A/V capture

Right now there are cheap USB HDMI capture devices being sold on AliExpress, ebay, amazon and the likes. They cost less than $10/€10. These dongles expose a standard UVC webcam and a USB audio class soundcard to the system. The video is MJPEG encoded and the audio is lossless stereo 16bit 48kHz PCM.

For anyone running a crossover/convolver/other DSP on a Raspberry Pi this provides an easy method to get sound into your DSP computer. As it's just plain HDMI this works to add DSP processing to Chromecast devices, Apple TV, FireTV sticks and the likes and also regular computers independent of operating systems.

To make stereo capture work with Linux you need a very recent kernel that contains an ALSA configuration quirk. Without this the device is detected as a 16 bit 96000 mono capture device. The quirk has been added to the 5.8 kernel and if I understand correctly will also be backported to LTS kernels.

Even with the quirk in place the left and right channels are swapped but this can easily be dealt with in software - either remapping while grabbing with ffmpeg or system wide with pulseaudio remap-sink for example.

With the RC 6 of kernel 5.8 the audio capture device is detected correctly:

Code:
arien@NBADJ01:~$ pactl list short sources
0       alsa_input.usb-MACROSILICON_2109-02.analog-stereo       module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED

The video part works with any recent kernel and shows up like this:

Code:
arien@NBADJ01:~$ sudo v4l2-ctl --all
Driver Info:
        Driver name      : uvcvideo
        Card type        : UVC Camera (534d:2109): USB Vid
        Bus info         : usb-0000:00:1a.0-1.1
        Driver version   : 5.8.0
        Capabilities     : 0x84a00001
                Video Capture
                Metadata Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : uvcvideo
        Model            : UVC Camera (534d:2109): USB Vid
        Serial           : 
        Bus info         : usb-0000:00:1a.0-1.1
        Media version    : 5.8.0
        Hardware revision: 0x00002100 (8448)
        Driver version   : 5.8.0
Interface Info:
        ID               : 0x03000002
        Type             : V4L Video
Entity Info:
        ID               : 0x00000001 (1)
        Name             : UVC Camera (534d:2109): USB Vid
        Function         : V4L2 I/O
        Flags         : default
        Pad 0x01000007   : 0: Sink
          Link 0x0200000d: from remote pad 0x100000a of entity 'Processing 2': Data, Enabled, Immutable
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
        Width/Height      : 1920/1080
        Pixel Format      : 'YUYV' (YUYV 4:2:2)
        Field             : None
        Bytes per Line    : 3840
        Size Image        : 4147200
        Colorspace        : sRGB
        Transfer Function : Default (maps to sRGB)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Limited Range)
        Flags             : 
Crop Capability Video Capture:
        Bounds      : Left 0, Top 0, Width 1920, Height 1080
        Default     : Left 0, Top 0, Width 1920, Height 1080
        Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1920, Height 1080, Flags: 
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1920, Height 1080, Flags: 
Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 5.000 (5/1)
        Read buffers     : 0
                     brightness 0x00980900 (int)    : min=-128 max=127 step=1 default=-11 value=-11
                       contrast 0x00980901 (int)    : min=0 max=255 step=1 default=148 value=148
                     saturation 0x00980902 (int)    : min=0 max=255 step=1 default=180 value=180
                            hue 0x00980903 (int)    : min=-128 max=127 step=1 default=0 value=0

While capturing is limited to 1080p30 with MJPEG compression (and 5fps lossless), the HDMI input supposedly accepts any signal up to 4k60 12bit. I have not tested this yet.

There is another version that has both an HDMI input and an output so the capture device can be inserted between a playback device and the TV. I ordered one of those to try next as that would allow me to extract audio from the HDMI link for DSP processing while leaving the video signal as it is.
 
Last edited:
Sorry for bringing an old thread back to life but I recently purchased one of these MS2109 devices to try and extract the audio from a Chromecast's HDMI output and feed it to CamillaDSP on Ubuntu 22.04. The device seems to be detected properly in Ubuntu and when I open alsamixer the device is shown as a sound card with capture only capability. However, I don't know what else I would need to configure to get CamillaDSP to accept the audio from it.
 
Thanks for your help. I got it working. I think the device did not like being plugged into a USB 2.0 hub. Switched it to USB 3.0 and it is feeding my Chromecast audio into CamillaDSP and then out of a cheapo CM6206 USB sound card. Very cool.😎
 
  • Like
Reactions: ariendj