USB DVB-S/2 Tuner Performance Issues


#1

Hi Folks

I’m experiencing very choppy playback of a DVB-S H262 Stream on the Hikey Board

My Current Setup is
PCTV 461e DVB-S2 USB Tuner ( externally powered )
HiKey LeMaker 2GB ( powered with a universal power supply )
Custom Build of the Android AOSP Master Branch with TV Support
Custom Build of the 4.9 Kernel with DVB Drivers added

I’ve tried both the Full Size USB port and using an OTG cable on the micro one,
both yield similar results.

I assuming this is something to do with the HiKey USB Stack?
is there anything I can check/test to diagnose this problem further?

Any input would be greatly appreciated.

Thanks
trevd


#2

Can you record and playback separately? It may be a decode performance issue (given Hikey AOSP will be decoding using the CPUs) rather than a USB problem. It might be good to capture the transport stream and play it back on another device…


#3

Hi Daniel
Thanks for the input. I should have mentioned I’ve already done both of those things. It’s definitely the stream coming in from the usb stick.

I’ve also tried it with various media players ( vlc and mx ) .

The stream plays but has lots of discontinuities. I can provide examples of needed.

Thanks
Trev


#4

Hikey uses dwc2 OTG controllers (similer to RPi… you can look for the famous Greg KH quote on this controller).

Anyhow you can try examining the debugfs status of this driver. It is possible (although perhaps not likely) that params_show() might reveal something worth trying to fiddle with…


#5

Actually before you do that… have you backported the lastest fixes (or forwarded ported to v4.11-rcX)? I took a quick look and there are quire a few clean ups for dwc2, including this one: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca8b03324877e1804161fd4e0100d49f03ad9fce

The above is particularly interesting since it also reminds us about Hikey not being able to perform split transactions; it cannot talk to high speed and low speed devices at the same time without dropping everything to low speed mode… Is your controller running in high speed mode for the DVB operations?


#6

Hi Daniel

Thanks for the suggestions. It appears the latest fixes have already been back ported including the speed negotiation fix ( https://android.googlesource.com/kernel/hikey-linaro/+/884863c )

https://android.googlesource.com/kernel/hikey-linaro/+log/android-hikey-linaro-4.9/drivers/usb/dwc2

I was aware of the limitations of the dwc2 chipset, something I discovered the hard way when I found that I could not use an additional Low speed IR receiver at the same time as the DVB stick. Anyway I can confirm that the device is running at High Speed. I’m fairly sure that It doesn’t work at all if it was at any other speed.

I have managed to work around my problem by porting the Virtual DVB tuner driver to the Linaro 4.9 android kernel. This allows me to access dvb remote tuners using standard dvb ioctl’s etc and also confirms the Video decoding is not the problem as the playback is completely smooth.

For reference the patch to add the vtuner driver along with the user space tools can be found here https://github.com/trevd/android_external_vtuner

I think I’m just going to chalk this one up expecting too much from what appears to be a limited USB chip.

Thanks again for your input.