Please refer to the mercurial tree: http://linuxtv.org/hg/~mkrufky/dvb-pll for the following changesets: - dvb-pll: pass dvb_frontend_parameters to generic set() function - tuv1236d: move rf input switching code into dvb-pll dvb/dvb-usb/dvb-usb-i2c.c | 2 dvb/frontends/dvb-pll.c | 120 ++++++++++++------------ dvb/frontends/dvb-pll.h | 4 dvb/frontends/nxt200x.c | 22 +--- dvb/frontends/nxt200x.h | 3 dvb/ttpci/budget-av.c | 3 video/cx88/cx88-dvb.c | 14 -- video/saa7134/saa7134-dvb.c | 14 -- 8 files changed, 76 insertions(+), 106 deletions(-) The function dvb_pll_configure has been altered to accept struct dvb_frontend_parameters, instead of having to pass both params->frequency and params->u.ofdm.bandwidth, which are both broken out of the dvb_frontend_parameters structure. Passing the dvb_frontend_parameters structure is advantageous to us, as it will allow for better support of these tuners. Now, instead of passing the broken out frequency and bandwidth into the setbw() function, we can pass the dvb_frontend_parameters structure. Quoting Trent Piepho: "Instead of of the set() function getting the bandwidth and frequency broken out of the dvb_frontend_parameters structure, just pass it the f_e_p pointer. It's less code and more efficient that way. Then if some tuner needs to know the modulation to select a SAW filter, modulation doesn't need to be added to setbw() like frequency had to be added when bandwidth wasn't enough." In addition to the above benefits, now the setbw() function can be used in a more generic way. For DVB applications, we will most often use this function to set the bandwidth based on the data inside params->u.ofdm.bandwidth. However, in ATSC applications, some tuners have multiple rf inputs... This design was intended so that a single tuner can be used to receive OTA broadcasts using VSB modulation and digital cable broadcasts using QAM modulation, without having to disconnect and reconnect cabling. In order to determine which modulation is in use, we must look at params->u.vsb.modulation In order to support this functionality, the setbw() function has been renamed to set(), and the function prototype has been altered accordingly. The second changeset moves the rf input selection function for the TUV1236d out of cx88-dvb.c and saa7134-dvb.c ... There was some confusion in the past, due to the fact that the nxt200x_set_pll_input function was duplicated in these two modules. Since the dvb-pll module is the driver that programs the TUV1236d pll, and the set_pll_input function only modifies the pll buffer in order to set the input, the code is consolidated all into the dvb-pll module. This function is _not_ specific to the nxt200x, rather, it is specific only to the TUV1236d tuner. These changes do not alter the behavior of the current driver. This is merely a logistical improvement, designed to improve code readability and efficiency. Now, all code for the TUV1236d tuner is located in a single module, and we also have a generic set() function that can be used by dvb-pll to handle modulation-specific needs. If there aren't any concerns about these changesets, I will issue a pull request for the master branch tomorrow. Thanks to Trent Piepho for his suggestions and review. Thanks also to Linus Torvalds for pushing me to make this cleanup. Cheers, Michael Krufky _______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb