1

Currently I am working on a DVB-T2 dongle which is connected to my Ubuntu laptop 14.04 using USB

interface.

I am using following applications to perform scanning and channel play. 1. w_scan - which scans and gives me a channel.conf file 2. vlc ./channel.conf - plays a channel using modulation parameters in channel.conf

Things work fine when Pid filtering is disabled. But when Pid filtering is enabled, I see

macroblocks on the screen instead of smooth AV. Even AV is breaking a lot.

After going through the driver code, I tried increasing the URB buffer size from 3K (21*188) to

64K (348*188). The AV became smooth.

This urb buffer size is buffer_length (lenght of transport buffer) in below function.

void usb_fill_bulk_urb (struct urb * urb, struct usb_device * dev, unsigned int pipe, void * transfer_buffer, int buffer_length, usb_complete_t complete_fn, void * context);

As you can see the driver uses bulk mode of usb transfer.

Could anyone explain me why increasing the buffer is solving the macroblock issue ?

Give me some pointers to understand this issue better.

Thanks in advance, Murali

  • One important observation, when i checked for the syncbyte 0x47 in the captured buffer from completion handler, I see garbage valued.I tried printing urb->status in the completion handler and observe the return urb->status is 0xffffff1b for corrupted packets. Any idea why this is happening ? – Murali Marimekala Feb 05 '15 at 21:22
  • I decoded the return value 0xffffff1b as -79 which is EOVERFLOW in our platform. Any idea why I am observing this issue ? – Murali Marimekala Feb 10 '15 at 21:43
  • Today I was able to advance bit further and found that ACKs are missing during IN transactions. Its a bulk transfer mode. So, The transmitter expects ACK from receiver after data transfer. – Murali Marimekala Feb 12 '15 at 21:33
  • possible duplicate of [Android USB Host - bulkTransfer() is losing data](http://stackoverflow.com/questions/9108548/android-usb-host-bulktransfer-is-losing-data) – bummi Feb 13 '15 at 00:30

1 Answers1

1

finally found soultion for this issue, the usb frame size and urb buffer size should be same (in my case 21x188). In my code, found that USB frame size was set to (348x188) and urb buffer size was (21x188) which was causing the issue.