diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dib0700_devices.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_devices.c | 118 |
1 files changed, 100 insertions, 18 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index ee2a84beb553..f634d2e784b2 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -486,8 +486,6 @@ static int dib0700_rc_query_old_firmware(struct dvb_usb_device *d) | |||
486 | int i; | 486 | int i; |
487 | struct dib0700_state *st = d->priv; | 487 | struct dib0700_state *st = d->priv; |
488 | 488 | ||
489 | printk("%s\n", __func__); | ||
490 | |||
491 | if (st->fw_version >= 0x10200) { | 489 | if (st->fw_version >= 0x10200) { |
492 | /* For 1.20 firmware , We need to keep the RC polling | 490 | /* For 1.20 firmware , We need to keep the RC polling |
493 | callback so we can reuse the input device setup in | 491 | callback so we can reuse the input device setup in |
@@ -511,8 +509,8 @@ printk("%s\n", __func__); | |||
511 | dib0700_rc_setup(d); /* reset ir sensor data to prevent false events */ | 509 | dib0700_rc_setup(d); /* reset ir sensor data to prevent false events */ |
512 | 510 | ||
513 | d->last_event = 0; | 511 | d->last_event = 0; |
514 | switch (dvb_usb_dib0700_ir_proto) { | 512 | switch (d->props.rc.core.protocol) { |
515 | case 0: | 513 | case IR_TYPE_NEC: |
516 | /* NEC protocol sends repeat code as 0 0 0 FF */ | 514 | /* NEC protocol sends repeat code as 0 0 0 FF */ |
517 | if ((key[3-2] == 0x00) && (key[3-3] == 0x00) && | 515 | if ((key[3-2] == 0x00) && (key[3-3] == 0x00) && |
518 | (key[3] == 0xff)) | 516 | (key[3] == 0xff)) |
@@ -1873,7 +1871,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1873 | .rc.core = { | 1871 | .rc.core = { |
1874 | .rc_interval = DEFAULT_RC_INTERVAL, | 1872 | .rc_interval = DEFAULT_RC_INTERVAL, |
1875 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 1873 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
1876 | .rc_query = dib0700_rc_query_old_firmware | 1874 | .rc_query = dib0700_rc_query_old_firmware, |
1875 | .rc_props = { | ||
1876 | .allowed_protos = IR_TYPE_RC5 | | ||
1877 | IR_TYPE_RC6 | | ||
1878 | IR_TYPE_NEC, | ||
1879 | .change_protocol = dib0700_change_protocol, | ||
1880 | }, | ||
1877 | }, | 1881 | }, |
1878 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 1882 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
1879 | 1883 | ||
@@ -1903,7 +1907,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1903 | .rc.core = { | 1907 | .rc.core = { |
1904 | .rc_interval = DEFAULT_RC_INTERVAL, | 1908 | .rc_interval = DEFAULT_RC_INTERVAL, |
1905 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 1909 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
1906 | .rc_query = dib0700_rc_query_old_firmware | 1910 | .rc_query = dib0700_rc_query_old_firmware, |
1911 | .rc_props = { | ||
1912 | .allowed_protos = IR_TYPE_RC5 | | ||
1913 | IR_TYPE_RC6 | | ||
1914 | IR_TYPE_NEC, | ||
1915 | .change_protocol = dib0700_change_protocol, | ||
1916 | }, | ||
1907 | }, | 1917 | }, |
1908 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 1918 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
1909 | 1919 | ||
@@ -1958,7 +1968,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1958 | .rc.core = { | 1968 | .rc.core = { |
1959 | .rc_interval = DEFAULT_RC_INTERVAL, | 1969 | .rc_interval = DEFAULT_RC_INTERVAL, |
1960 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 1970 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
1961 | .rc_query = dib0700_rc_query_old_firmware | 1971 | .rc_query = dib0700_rc_query_old_firmware, |
1972 | .rc_props = { | ||
1973 | .allowed_protos = IR_TYPE_RC5 | | ||
1974 | IR_TYPE_RC6 | | ||
1975 | IR_TYPE_NEC, | ||
1976 | .change_protocol = dib0700_change_protocol, | ||
1977 | }, | ||
1962 | }, | 1978 | }, |
1963 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 1979 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
1964 | 1980 | ||
@@ -1996,7 +2012,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1996 | .rc_interval = DEFAULT_RC_INTERVAL, | 2012 | .rc_interval = DEFAULT_RC_INTERVAL, |
1997 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2013 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
1998 | .module_name = "dib0700", | 2014 | .module_name = "dib0700", |
1999 | .rc_query = dib0700_rc_query_old_firmware | 2015 | .rc_query = dib0700_rc_query_old_firmware, |
2016 | .rc_props = { | ||
2017 | .allowed_protos = IR_TYPE_RC5 | | ||
2018 | IR_TYPE_RC6 | | ||
2019 | IR_TYPE_NEC, | ||
2020 | .change_protocol = dib0700_change_protocol, | ||
2021 | }, | ||
2000 | }, | 2022 | }, |
2001 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2023 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2002 | 2024 | ||
@@ -2068,7 +2090,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2068 | .rc_interval = DEFAULT_RC_INTERVAL, | 2090 | .rc_interval = DEFAULT_RC_INTERVAL, |
2069 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2091 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2070 | .module_name = "dib0700", | 2092 | .module_name = "dib0700", |
2071 | .rc_query = dib0700_rc_query_old_firmware | 2093 | .rc_query = dib0700_rc_query_old_firmware, |
2094 | .rc_props = { | ||
2095 | .allowed_protos = IR_TYPE_RC5 | | ||
2096 | IR_TYPE_RC6 | | ||
2097 | IR_TYPE_NEC, | ||
2098 | .change_protocol = dib0700_change_protocol, | ||
2099 | }, | ||
2072 | }, | 2100 | }, |
2073 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2101 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2074 | 2102 | ||
@@ -2108,7 +2136,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2108 | .rc_interval = DEFAULT_RC_INTERVAL, | 2136 | .rc_interval = DEFAULT_RC_INTERVAL, |
2109 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2137 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2110 | .module_name = "dib0700", | 2138 | .module_name = "dib0700", |
2111 | .rc_query = dib0700_rc_query_old_firmware | 2139 | .rc_query = dib0700_rc_query_old_firmware, |
2140 | .rc_props = { | ||
2141 | .allowed_protos = IR_TYPE_RC5 | | ||
2142 | IR_TYPE_RC6 | | ||
2143 | IR_TYPE_NEC, | ||
2144 | .change_protocol = dib0700_change_protocol, | ||
2145 | }, | ||
2112 | }, | 2146 | }, |
2113 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2147 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2114 | 2148 | ||
@@ -2172,7 +2206,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2172 | .rc_interval = DEFAULT_RC_INTERVAL, | 2206 | .rc_interval = DEFAULT_RC_INTERVAL, |
2173 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2207 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2174 | .module_name = "dib0700", | 2208 | .module_name = "dib0700", |
2175 | .rc_query = dib0700_rc_query_old_firmware | 2209 | .rc_query = dib0700_rc_query_old_firmware, |
2210 | .rc_props = { | ||
2211 | .allowed_protos = IR_TYPE_RC5 | | ||
2212 | IR_TYPE_RC6 | | ||
2213 | IR_TYPE_NEC, | ||
2214 | .change_protocol = dib0700_change_protocol, | ||
2215 | }, | ||
2176 | }, | 2216 | }, |
2177 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2217 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2178 | 2218 | ||
@@ -2215,7 +2255,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2215 | .rc_interval = DEFAULT_RC_INTERVAL, | 2255 | .rc_interval = DEFAULT_RC_INTERVAL, |
2216 | .rc_codes = RC_MAP_DIB0700_NEC_TABLE, | 2256 | .rc_codes = RC_MAP_DIB0700_NEC_TABLE, |
2217 | .module_name = "dib0700", | 2257 | .module_name = "dib0700", |
2218 | .rc_query = dib0700_rc_query_old_firmware | 2258 | .rc_query = dib0700_rc_query_old_firmware, |
2259 | .rc_props = { | ||
2260 | .allowed_protos = IR_TYPE_RC5 | | ||
2261 | IR_TYPE_RC6 | | ||
2262 | IR_TYPE_NEC, | ||
2263 | .change_protocol = dib0700_change_protocol, | ||
2264 | }, | ||
2219 | }, | 2265 | }, |
2220 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2266 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2221 | 2267 | ||
@@ -2280,7 +2326,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2280 | .rc_interval = DEFAULT_RC_INTERVAL, | 2326 | .rc_interval = DEFAULT_RC_INTERVAL, |
2281 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2327 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2282 | .module_name = "dib0700", | 2328 | .module_name = "dib0700", |
2283 | .rc_query = dib0700_rc_query_old_firmware | 2329 | .rc_query = dib0700_rc_query_old_firmware, |
2330 | .rc_props = { | ||
2331 | .allowed_protos = IR_TYPE_RC5 | | ||
2332 | IR_TYPE_RC6 | | ||
2333 | IR_TYPE_NEC, | ||
2334 | .change_protocol = dib0700_change_protocol, | ||
2335 | }, | ||
2284 | }, | 2336 | }, |
2285 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2337 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2286 | .num_adapters = 1, | 2338 | .num_adapters = 1, |
@@ -2312,7 +2364,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2312 | .rc_interval = DEFAULT_RC_INTERVAL, | 2364 | .rc_interval = DEFAULT_RC_INTERVAL, |
2313 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2365 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2314 | .module_name = "dib0700", | 2366 | .module_name = "dib0700", |
2315 | .rc_query = dib0700_rc_query_old_firmware | 2367 | .rc_query = dib0700_rc_query_old_firmware, |
2368 | .rc_props = { | ||
2369 | .allowed_protos = IR_TYPE_RC5 | | ||
2370 | IR_TYPE_RC6 | | ||
2371 | IR_TYPE_NEC, | ||
2372 | .change_protocol = dib0700_change_protocol, | ||
2373 | }, | ||
2316 | }, | 2374 | }, |
2317 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2375 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2318 | .num_adapters = 1, | 2376 | .num_adapters = 1, |
@@ -2376,7 +2434,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2376 | .rc_interval = DEFAULT_RC_INTERVAL, | 2434 | .rc_interval = DEFAULT_RC_INTERVAL, |
2377 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2435 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2378 | .module_name = "dib0700", | 2436 | .module_name = "dib0700", |
2379 | .rc_query = dib0700_rc_query_old_firmware | 2437 | .rc_query = dib0700_rc_query_old_firmware, |
2438 | .rc_props = { | ||
2439 | .allowed_protos = IR_TYPE_RC5 | | ||
2440 | IR_TYPE_RC6 | | ||
2441 | IR_TYPE_NEC, | ||
2442 | .change_protocol = dib0700_change_protocol, | ||
2443 | }, | ||
2380 | }, | 2444 | }, |
2381 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2445 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2382 | .num_adapters = 1, | 2446 | .num_adapters = 1, |
@@ -2416,7 +2480,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2416 | .rc_interval = DEFAULT_RC_INTERVAL, | 2480 | .rc_interval = DEFAULT_RC_INTERVAL, |
2417 | .rc_codes = RC_MAP_DIB0700_NEC_TABLE, | 2481 | .rc_codes = RC_MAP_DIB0700_NEC_TABLE, |
2418 | .module_name = "dib0700", | 2482 | .module_name = "dib0700", |
2419 | .rc_query = dib0700_rc_query_old_firmware | 2483 | .rc_query = dib0700_rc_query_old_firmware, |
2484 | .rc_props = { | ||
2485 | .allowed_protos = IR_TYPE_RC5 | | ||
2486 | IR_TYPE_RC6 | | ||
2487 | IR_TYPE_NEC, | ||
2488 | .change_protocol = dib0700_change_protocol, | ||
2489 | }, | ||
2420 | }, | 2490 | }, |
2421 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2491 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2422 | .num_adapters = 2, | 2492 | .num_adapters = 2, |
@@ -2461,7 +2531,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2461 | .rc_interval = DEFAULT_RC_INTERVAL, | 2531 | .rc_interval = DEFAULT_RC_INTERVAL, |
2462 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2532 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2463 | .module_name = "dib0700", | 2533 | .module_name = "dib0700", |
2464 | .rc_query = dib0700_rc_query_old_firmware | 2534 | .rc_query = dib0700_rc_query_old_firmware, |
2535 | .rc_props = { | ||
2536 | .allowed_protos = IR_TYPE_RC5 | | ||
2537 | IR_TYPE_RC6 | | ||
2538 | IR_TYPE_NEC, | ||
2539 | .change_protocol = dib0700_change_protocol, | ||
2540 | }, | ||
2465 | }, | 2541 | }, |
2466 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2542 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2467 | .num_adapters = 1, | 2543 | .num_adapters = 1, |
@@ -2494,7 +2570,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2494 | .rc_interval = DEFAULT_RC_INTERVAL, | 2570 | .rc_interval = DEFAULT_RC_INTERVAL, |
2495 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | 2571 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
2496 | .module_name = "dib0700", | 2572 | .module_name = "dib0700", |
2497 | .rc_query = dib0700_rc_query_old_firmware | 2573 | .rc_query = dib0700_rc_query_old_firmware, |
2574 | .rc_props = { | ||
2575 | .allowed_protos = IR_TYPE_RC5 | | ||
2576 | IR_TYPE_RC6 | | ||
2577 | IR_TYPE_NEC, | ||
2578 | .change_protocol = dib0700_change_protocol, | ||
2579 | }, | ||
2498 | }, | 2580 | }, |
2499 | }, | 2581 | }, |
2500 | }; | 2582 | }; |