Audio Issues with cheap capture cards MS2109

So I acquired a bunch of cheap HDMI to USB capture devices and they all use the same Macrosilicon MS2109 chip to handle audio and video.

Is most of them video capture works as advertised.
Audio also works initially but I found that after about a day of continuous use these capture cards they either lose audio, or more bizarrely the audio sort of converts into a square wave with constant value of intensity.

This chip advertises itself as stereo output however it has a quirk where it actually outputs 96 kHz mono stream which is actually composed of two 48 kHz left and right streams. The linux kernel knows this and strips the mono stream into the two streams.

I’m not sure what causes these audio issues, but I have a feeling the way the mono stream has to be spit may be causing instability long term.

I’ve done some debugging and the only way to solve this issue is to unplug and re plug the USB connection breaking the power line going into the chip. I’ve tried disabling that particular device using:

echo '{video_dev}' |  sudo tee /sys/bus/usb/drivers/usb/unbind
echo '{video_dev}' | sudo tee /sys/bus/usb/drivers/usb/bind

But makes no difference in fixing the audio issues or preventing them.
also tried:

echo 0 > /sys/bus/usb/devices/{video_dev}/power/pm_qos_no_power_off
echo 0 > /sys/bus/usb/devices/{video_dev}/peer/power/pm_qos_no_power_off,
echo auto > /sys/bus/usb/devices/{video_dev}/power/control

but they didn’t fix the issue either.

Has anyone here had these issues with MS2109 based capture devices? If so any solutions?

Cheers

Honestly this sounds like a driver issue in linux or firmware issue on the card, like a number that overflows. Have you tried this on windows, and do you get similar issues?

Also do you happen to know what code is responsible for splitting the stereo to mono, is this in the kernel or a userspace library?

Hi

Sorry for taking so long to reply, I was out of the country on vacation for a week.

On the first topic, no I have not tried this in Windows yet as the purpose of this project is to use it in Linux. Might try using windows on some machines we have here.

On the second topic, the code to split mono to stereo is in the kernel.
Here is a link to the kernel mailing list with this patch:
https://lore.kernel.org/lkml/[email protected]/

Mmm weird.

I guess additionally are you plugging this device directly into the CPU and/or chipset? Or is it going through a USB hub? Also does the earlier kernel without the stereo fix have the same drop out issue?

I think the most sensible way forward is to look into USB debugging. I’d suggest trying to work out if the device is still sending the audio stream after the failure. If you can capture the failure on some kind of dump, there might be some blip in the data. Unfortunately I have no knowledge of USB debugging myself.

https://www.kernel.org/doc/Documentation/usb/usbmon.txt

It’s plugged directly to the motherboard USB.
I haven’t tired with the older kernel 'cause as of now it’s much older than the Ubuntu distribution I’m using in the work PC.

I’ll see what I can do with USB debugging. The strange thing is that video comes through fine, it’s only the audio that changes after working for a few days.

Anyway, thanks for the help!

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.