aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dib0700_devices.c
diff options
context:
space:
mode:
authorOlivier Grenie <olivier.grenie@dibcom.fr>2009-09-18 03:08:43 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:40:03 -0500
commitf8731f4ddedb78693ae05e40aac5c4817f740518 (patch)
tree56100674dd3a1c2935ca234fd8086f24322ab163 /drivers/media/dvb/dvb-usb/dib0700_devices.c
parent8171c2059cc4b0507faf3a0e0fdf28cc83d8ac62 (diff)
V4L/DVB (13049): dib8000: SNR in 10th of dB
dib7000p/dib8000: added pid filtering dib8000: the SNR is in 10th of dB (not in dB) dib7000p and dib8000: added the pid filtering. This feature is enabled by module option (dvb-usb module). Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr> Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dib0700_devices.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index bf8e83187cba..cda60291c06e 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -1252,6 +1252,16 @@ static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap)
1252 return 0; 1252 return 0;
1253} 1253}
1254 1254
1255static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff)
1256{
1257 return dib7000p_pid_filter(adapter->fe, index, pid, onoff);
1258}
1259
1260static int stk70x0p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
1261{
1262 return dib7000p_pid_filter_ctrl(adapter->fe, onoff);
1263}
1264
1255static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz = { 1265static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz = {
1256 60000, 15000, // internal, sampling 1266 60000, 15000, // internal, sampling
1257 1, 20, 3, 1, 0, // pll_cfg: prediv, ratio, range, reset, bypass 1267 1, 20, 3, 1, 0, // pll_cfg: prediv, ratio, range, reset, bypass
@@ -1543,6 +1553,15 @@ static int dib807x_tuner_attach(struct dvb_usb_adapter *adap)
1543 return 0; 1553 return 0;
1544} 1554}
1545 1555
1556static int stk807x_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff)
1557{
1558 return dib8000_pid_filter(adapter->fe, index, pid, onoff);
1559}
1560
1561static int stk807x_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
1562{
1563 return dib8000_pid_filter_ctrl(adapter->fe, onoff);
1564}
1546 1565
1547/* STK807x */ 1566/* STK807x */
1548static int stk807x_frontend_attach(struct dvb_usb_adapter *adap) 1567static int stk807x_frontend_attach(struct dvb_usb_adapter *adap)
@@ -1938,6 +1957,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
1938 .num_adapters = 1, 1957 .num_adapters = 1,
1939 .adapter = { 1958 .adapter = {
1940 { 1959 {
1960 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
1961 .pid_filter_count = 32,
1962 .pid_filter = stk70x0p_pid_filter,
1963 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
1941 .frontend_attach = stk7700p_frontend_attach, 1964 .frontend_attach = stk7700p_frontend_attach,
1942 .tuner_attach = stk7700p_tuner_attach, 1965 .tuner_attach = stk7700p_tuner_attach,
1943 1966
@@ -2019,11 +2042,19 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2019 .num_adapters = 2, 2042 .num_adapters = 2,
2020 .adapter = { 2043 .adapter = {
2021 { 2044 {
2045 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2046 .pid_filter_count = 32,
2047 .pid_filter = stk70x0p_pid_filter,
2048 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2022 .frontend_attach = stk7700d_frontend_attach, 2049 .frontend_attach = stk7700d_frontend_attach,
2023 .tuner_attach = stk7700d_tuner_attach, 2050 .tuner_attach = stk7700d_tuner_attach,
2024 2051
2025 DIB0700_DEFAULT_STREAMING_CONFIG(0x02), 2052 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2026 }, { 2053 }, {
2054 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2055 .pid_filter_count = 32,
2056 .pid_filter = stk70x0p_pid_filter,
2057 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2027 .frontend_attach = stk7700d_frontend_attach, 2058 .frontend_attach = stk7700d_frontend_attach,
2028 .tuner_attach = stk7700d_tuner_attach, 2059 .tuner_attach = stk7700d_tuner_attach,
2029 2060
@@ -2066,6 +2097,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2066 .num_adapters = 1, 2097 .num_adapters = 1,
2067 .adapter = { 2098 .adapter = {
2068 { 2099 {
2100 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2101 .pid_filter_count = 32,
2102 .pid_filter = stk70x0p_pid_filter,
2103 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2069 .frontend_attach = stk7700P2_frontend_attach, 2104 .frontend_attach = stk7700P2_frontend_attach,
2070 .tuner_attach = stk7700d_tuner_attach, 2105 .tuner_attach = stk7700d_tuner_attach,
2071 2106
@@ -2098,6 +2133,14 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2098 .num_adapters = 1, 2133 .num_adapters = 1,
2099 .adapter = { 2134 .adapter = {
2100 { 2135 {
2136 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2137 .pid_filter_count = 32,
2138 .pid_filter = stk70x0p_pid_filter,
2139 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2140 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2141 .pid_filter_count = 32,
2142 .pid_filter = stk70x0p_pid_filter,
2143 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2101 .frontend_attach = stk7070p_frontend_attach, 2144 .frontend_attach = stk7070p_frontend_attach,
2102 .tuner_attach = dib7070p_tuner_attach, 2145 .tuner_attach = dib7070p_tuner_attach,
2103 2146
@@ -2200,6 +2243,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2200 .num_adapters = 2, 2243 .num_adapters = 2,
2201 .adapter = { 2244 .adapter = {
2202 { 2245 {
2246 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2247 .pid_filter_count = 32,
2248 .pid_filter = stk70x0p_pid_filter,
2249 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2203 .frontend_attach = stk7070pd_frontend_attach0, 2250 .frontend_attach = stk7070pd_frontend_attach0,
2204 .tuner_attach = dib7070p_tuner_attach, 2251 .tuner_attach = dib7070p_tuner_attach,
2205 2252
@@ -2207,6 +2254,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2207 2254
2208 .size_of_priv = sizeof(struct dib0700_adapter_state), 2255 .size_of_priv = sizeof(struct dib0700_adapter_state),
2209 }, { 2256 }, {
2257 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2258 .pid_filter_count = 32,
2259 .pid_filter = stk70x0p_pid_filter,
2260 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2210 .frontend_attach = stk7070pd_frontend_attach1, 2261 .frontend_attach = stk7070pd_frontend_attach1,
2211 .tuner_attach = dib7070p_tuner_attach, 2262 .tuner_attach = dib7070p_tuner_attach,
2212 2263
@@ -2253,6 +2304,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2253 .num_adapters = 1, 2304 .num_adapters = 1,
2254 .adapter = { 2305 .adapter = {
2255 { 2306 {
2307 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2308 .pid_filter_count = 32,
2309 .pid_filter = stk70x0p_pid_filter,
2310 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2256 .frontend_attach = stk7700ph_frontend_attach, 2311 .frontend_attach = stk7700ph_frontend_attach,
2257 .tuner_attach = stk7700ph_tuner_attach, 2312 .tuner_attach = stk7700ph_tuner_attach,
2258 2313
@@ -2365,6 +2420,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2365 .num_adapters = 1, 2420 .num_adapters = 1,
2366 .adapter = { 2421 .adapter = {
2367 { 2422 {
2423 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2424 .pid_filter_count = 32,
2425 .pid_filter = stk70x0p_pid_filter,
2426 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
2368 .frontend_attach = stk7070p_frontend_attach, 2427 .frontend_attach = stk7070p_frontend_attach,
2369 .tuner_attach = dib7770p_tuner_attach, 2428 .tuner_attach = dib7770p_tuner_attach,
2370 2429
@@ -2396,6 +2455,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2396 .num_adapters = 1, 2455 .num_adapters = 1,
2397 .adapter = { 2456 .adapter = {
2398 { 2457 {
2458 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2459 .pid_filter_count = 32,
2460 .pid_filter = stk807x_pid_filter,
2461 .pid_filter_ctrl = stk807x_pid_filter_ctrl,
2399 .frontend_attach = stk807x_frontend_attach, 2462 .frontend_attach = stk807x_frontend_attach,
2400 .tuner_attach = dib807x_tuner_attach, 2463 .tuner_attach = dib807x_tuner_attach,
2401 2464
@@ -2427,6 +2490,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2427 .num_adapters = 2, 2490 .num_adapters = 2,
2428 .adapter = { 2491 .adapter = {
2429 { 2492 {
2493 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2494 .pid_filter_count = 32,
2495 .pid_filter = stk807x_pid_filter,
2496 .pid_filter_ctrl = stk807x_pid_filter_ctrl,
2430 .frontend_attach = stk807xpvr_frontend_attach0, 2497 .frontend_attach = stk807xpvr_frontend_attach0,
2431 .tuner_attach = dib807x_tuner_attach, 2498 .tuner_attach = dib807x_tuner_attach,
2432 2499
@@ -2436,6 +2503,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
2436 sizeof(struct dib0700_adapter_state), 2503 sizeof(struct dib0700_adapter_state),
2437 }, 2504 },
2438 { 2505 {
2506 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
2507 .pid_filter_count = 32,
2508 .pid_filter = stk807x_pid_filter,
2509 .pid_filter_ctrl = stk807x_pid_filter_ctrl,
2439 .frontend_attach = stk807xpvr_frontend_attach1, 2510 .frontend_attach = stk807xpvr_frontend_attach1,
2440 .tuner_attach = dib807x_tuner_attach, 2511 .tuner_attach = dib807x_tuner_attach,
2441 2512