[linux-dvb] Stupid beginner-level code question...

BOUWSMA Barry freebeer.bouwsma at gmail.com
Tue Feb 10 04:02:49 CET 2009


whilst counting interrupts on my machines, I pondered whether
I could double the work one machine could handle by not parsing
a 33Mbit/sec transport stream, but only the PID carrying the
128kbit/sec payload.

I observed the following code for one device, the USB Opera
DVB-S receiver which supposedly delivers the full transponder
stream when attached to a USB2 controller, optionally filtered:

static int opera1_pid_filter_control(struct dvb_usb_adapter *adap, int onoff)
        int u = 0x04;
        u8 b_pid[3];
        struct i2c_msg msg[] = {
                {.addr = ADDR_B1A6_STREAM_CTRL,.buf = b_pid,.len = 3},
        if (dvb_usb_opera1_debug)
                info("%s hw-pidfilter", onoff ? "enable" : "disable");
        for (; u < 0x7e; u += 2) {
                b_pid[0] = u;
                b_pid[1] = 0;
                b_pid[2] = 0x80;
                i2c_transfer(&adap->dev->i2c_adap, msg, 1);
        return 0;

Full source within dvb-usb/opera1.c; in particular the code which
precedes this and actually sets selected PIDs and is quite 

Anyway, what bothers me about the above code is that I can't see
that it acts any different, save for possibly printing out a
different debug message, regardless of the intent to enable the
internal hardware PID filter, or disable it and pass the entire

Or have I been awake too long, and can no longer think or see

barry bouwsma

More information about the linux-dvb mailing list