1 /* 1 2 * dvb_frontend.h 3 * 4 * The Digital TV Frontend kABI defines a driv 5 * registering low-level, hardware specific dr 6 * frontend layer. 7 * 8 * Copyright (C) 2001 convergence integrated m 9 * Copyright (C) 2004 convergence GmbH 10 * 11 * Written by Ralph Metzler 12 * Overhauled by Holger Waechtler 13 * Kernel I2C stuff by Michael Hunold <hunold@ 14 * 15 * This program is free software; you can redi 16 * modify it under the terms of the GNU Lesser 17 * as published by the Free Software Foundatio 18 * of the License, or (at your option) any lat 19 * 20 * This program is distributed in the hope tha 21 * but WITHOUT ANY WARRANTY; without even the 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR 23 * GNU General Public License for more details 24 * 25 26 * You should have received a copy of the GNU 27 * along with this program; if not, write to t 28 * Foundation, Inc., 59 Temple Place - Suite 3 29 * 30 */ 31 32 #ifndef _DVB_FRONTEND_H_ 33 #define _DVB_FRONTEND_H_ 34 35 #include <linux/types.h> 36 #include <linux/sched.h> 37 #include <linux/ioctl.h> 38 #include <linux/i2c.h> 39 #include <linux/module.h> 40 #include <linux/errno.h> 41 #include <linux/delay.h> 42 #include <linux/mutex.h> 43 #include <linux/slab.h> 44 #include <linux/bitops.h> 45 46 #include <linux/dvb/frontend.h> 47 48 #include <media/dvbdev.h> 49 50 /* 51 * Maximum number of Delivery systems per fron 52 * should be smaller or equal to 32 53 */ 54 #define MAX_DELSYS 8 55 56 /* Helper definitions to be used at frontend d 57 #define kHz 1000UL 58 #define MHz 1000000UL 59 60 /** 61 * struct dvb_frontend_tune_settings - paramet 62 * 63 * @min_delay_ms: minimum delay for tuni 64 * @step_size: step size between two 65 * @max_drift: maximum drift 66 * 67 * NOTE: step_size is in Hz, for terrestrial/c 68 */ 69 struct dvb_frontend_tune_settings { 70 int min_delay_ms; 71 int step_size; 72 int max_drift; 73 }; 74 75 struct dvb_frontend; 76 77 /** 78 * struct dvb_tuner_info - Frontend name and m 79 * 80 * @name: name of the Frontend 81 * @frequency_min_hz: minimal frequency supp 82 * @frequency_max_hz: maximum frequency supp 83 * @frequency_step_hz: frequency step in Hz 84 * @bandwidth_min: minimal frontend bandw 85 * @bandwidth_max: maximum frontend bandw 86 * @bandwidth_step: frontend bandwidth ste 87 */ 88 struct dvb_tuner_info { 89 char name[128]; 90 91 u32 frequency_min_hz; 92 u32 frequency_max_hz; 93 u32 frequency_step_hz; 94 95 u32 bandwidth_min; 96 u32 bandwidth_max; 97 u32 bandwidth_step; 98 }; 99 100 /** 101 * struct analog_parameters - Parameters to tu 102 * 103 * @frequency: Frequency used by analog TV tu 104 * for TV, or 62.5 Hz for radio) 105 * @mode: Tuner mode, as defined on enum 106 * @audmode: Audio mode as defined for the 107 * e. g. V4L2_TUNER_MODE_* 108 * @std: TV standard bitmap as defined 109 * 110 * Hybrid tuners should be supported by both V 111 * struct contains the data that are used by t 112 * dependencies from V4L2 headers, all enums h 113 */ 114 struct analog_parameters { 115 unsigned int frequency; 116 unsigned int mode; 117 unsigned int audmode; 118 u64 std; 119 }; 120 121 /** 122 * enum dvbfe_algo - defines the algorithm use 123 * 124 * @DVBFE_ALGO_HW: Hardware Algorithm - 125 * Devices that support this algorithm do 126 * and no software support is needed to h 127 * Requesting these devices to LOCK is th 128 * device is supposed to do everything in 129 * 130 * @DVBFE_ALGO_SW: Software Algorithm - 131 * These are dumb devices, that require softwa 132 * 133 * @DVBFE_ALGO_CUSTOM: Customizable Agorithm - 134 * Devices having this algorithm can be c 135 * algorithms in the frontend driver, rat 136 * software zig-zag. In this case the zig 137 * or it maybe completely done in hardwar 138 * this algorithm, in conjunction with th 139 * callbacks, utilizes the driver specifi 140 * 141 * @DVBFE_ALGO_RECOVERY: Recovery Algorithm - 142 * These devices have AUTO recovery capab 143 */ 144 enum dvbfe_algo { 145 DVBFE_ALGO_HW = BIT( 146 DVBFE_ALGO_SW = BIT( 147 DVBFE_ALGO_CUSTOM = BIT( 148 DVBFE_ALGO_RECOVERY = BIT( 149 }; 150 151 /** 152 * enum dvbfe_search - search callback possibl 153 * 154 * @DVBFE_ALGO_SEARCH_SUCCESS: 155 * The frontend search algorithm complete 156 * 157 * @DVBFE_ALGO_SEARCH_ASLEEP: 158 * The frontend search algorithm is sleep 159 * 160 * @DVBFE_ALGO_SEARCH_FAILED: 161 * The frontend search for a signal faile 162 * 163 * @DVBFE_ALGO_SEARCH_INVALID: 164 * The frontend search algorithm was prob 165 * parameters and the search is an invali 166 * 167 * @DVBFE_ALGO_SEARCH_ERROR: 168 * The frontend search algorithm failed d 169 * 170 * @DVBFE_ALGO_SEARCH_AGAIN: 171 * The frontend search algorithm was requ 172 */ 173 enum dvbfe_search { 174 DVBFE_ALGO_SEARCH_SUCCESS = BIT( 175 DVBFE_ALGO_SEARCH_ASLEEP = BIT( 176 DVBFE_ALGO_SEARCH_FAILED = BIT( 177 DVBFE_ALGO_SEARCH_INVALID = BIT( 178 DVBFE_ALGO_SEARCH_AGAIN = BIT( 179 DVBFE_ALGO_SEARCH_ERROR = BIT( 180 }; 181 182 /** 183 * struct dvb_tuner_ops - Tuner information an 184 * 185 * @info: embedded &struct dvb_t 186 * @release: callback function call 187 * drivers should free an 188 * @init: callback function used 189 * @sleep: callback function used 190 * @suspend: callback function used 191 * suspend. 192 * @resume: callback function used 193 * resuming from suspend. 194 * @set_params: callback function used 195 * into a digital TV chan 196 * are stored at &struct 197 * The tuner demod can ch 198 * the changes needed for 199 * update statistics. Thi 200 * the tuner parameters a 201 * drivers. 202 * @set_analog_params: callback function used 203 * channel on hybrid tune 204 * to the driver. 205 * @set_config: callback function used 206 * parameters. 207 * @get_frequency: get the actual tuned f 208 * @get_bandwidth: get the bandwidth used 209 * @get_if_frequency: get the Intermediate F 210 * should return 0. 211 * @get_status: returns the frontend l 212 * @get_rf_strength: returns the RF signal 213 * analog TV and radio. D 214 * via DVBv5 API (&struct 215 * @get_afc: Used only by analog TV 216 * drift due to AFC. 217 * @calc_regs: callback function used 218 * for simple tuners. Sh 219 * @set_frequency: Set a new frequency. S 220 * @set_bandwidth: Set a new frequency. S 221 * 222 * NOTE: frequencies used on @get_frequency an 223 * terrestrial/cable or kHz for satellite. 224 * 225 */ 226 struct dvb_tuner_ops { 227 228 struct dvb_tuner_info info; 229 230 void (*release)(struct dvb_frontend *f 231 int (*init)(struct dvb_frontend *fe); 232 int (*sleep)(struct dvb_frontend *fe); 233 int (*suspend)(struct dvb_frontend *fe 234 int (*resume)(struct dvb_frontend *fe) 235 236 /* This is the recommended way to set 237 int (*set_params)(struct dvb_frontend 238 int (*set_analog_params)(struct dvb_fr 239 240 int (*set_config)(struct dvb_frontend 241 242 int (*get_frequency)(struct dvb_fronte 243 int (*get_bandwidth)(struct dvb_fronte 244 int (*get_if_frequency)(struct dvb_fro 245 246 #define TUNER_STATUS_LOCKED 1 247 #define TUNER_STATUS_STEREO 2 248 int (*get_status)(struct dvb_frontend 249 int (*get_rf_strength)(struct dvb_fron 250 int (*get_afc)(struct dvb_frontend *fe 251 252 /* 253 * This is support for demods like the 254 * buffer with what to write. 255 * 256 * Don't use on newer drivers. 257 */ 258 int (*calc_regs)(struct dvb_frontend * 259 260 /* 261 * These are provided separately from 262 * facilitate silicon tuners which req 263 * controlling each parameter separate 264 * 265 * Don't use on newer drivers. 266 */ 267 int (*set_frequency)(struct dvb_fronte 268 int (*set_bandwidth)(struct dvb_fronte 269 }; 270 271 /** 272 * struct analog_demod_info - Information stru 273 * 274 * @name: Name of the analog TV demodula 275 */ 276 struct analog_demod_info { 277 char *name; 278 }; 279 280 /** 281 * struct analog_demod_ops - Demodulation inf 282 * analog TV and ra 283 * 284 * @info: pointer to struct anal 285 * @set_params: callback function used 286 * demodulator parameters 287 * radio channel. The pro 288 * &struct analog_params. 289 * @has_signal: returns 0xffff if has 290 * @get_afc: Used only by analog TV 291 * drift due to AFC. 292 * @tuner_status: callback function that 293 * %TUNER_STATUS_LOCKED a 294 * @standby: set the tuner to stand 295 * @release: callback function call 296 * drivers should free an 297 * @i2c_gate_ctrl: controls the I2C gate. 298 * mux support instead. 299 * @set_config: callback function used 300 * parameters. 301 */ 302 struct analog_demod_ops { 303 304 struct analog_demod_info info; 305 306 void (*set_params)(struct dvb_frontend 307 struct analog_param 308 int (*has_signal)(struct dvb_frontend 309 int (*get_afc)(struct dvb_frontend *f 310 void (*tuner_status)(struct dvb_fronte 311 void (*standby)(struct dvb_frontend *f 312 void (*release)(struct dvb_frontend *f 313 int (*i2c_gate_ctrl)(struct dvb_front 314 315 /** This is to allow setting tuner-spe 316 int (*set_config)(struct dvb_frontend 317 }; 318 319 struct dtv_frontend_properties; 320 321 /** 322 * struct dvb_frontend_internal_info - Fronten 323 * 324 * @name: Name of the fr 325 * @frequency_min_hz: Minimal freque 326 * @frequency_max_hz: Minimal freque 327 * @frequency_stepsize_hz: All frequencie 328 * @frequency_tolerance_hz: Frequency tole 329 * @symbol_rate_min: Minimal symbol 330 * (for Cable/Sat 331 * @symbol_rate_max: Maximal symbol 332 * (for Cable/Sat 333 * @symbol_rate_tolerance: Maximal symbol 334 * (for Cable/Sat 335 * @caps: Capabilities s 336 * as specified i 337 */ 338 struct dvb_frontend_internal_info { 339 char name[128]; 340 u32 frequency_min_hz; 341 u32 frequency_max_hz; 342 u32 frequency_stepsize_hz; 343 u32 frequency_tolerance_hz; 344 u32 symbol_rate_min; 345 u32 symbol_rate_max; 346 u32 symbol_rate_tolerance; 347 enum fe_caps caps; 348 }; 349 350 /** 351 * struct dvb_frontend_ops - Demodulation info 352 * ditialt TV 353 * 354 * @info: embedded &struct dvb_t 355 * @delsys: Delivery systems suppo 356 * @detach: callback function call 357 * drivers should clean u 358 * dvb_frontend allocatio 359 * @release: callback function call 360 * freed. 361 * drivers should free an 362 * @release_sec: callback function requ 363 * Control (SEC) driver t 364 * allocated by the drive 365 * @init: callback function used 366 * @sleep: callback function used 367 * @suspend: callback function used 368 * suspend. 369 * @resume: callback function used 370 * resuming from suspend. 371 * @write: callback function used 372 * allow other drivers to 373 * Should not be used on 374 * @tune: callback function used 375 * @DVBFE_ALGO_HW to tune 376 * @get_frontend_algo: returns the desired ha 377 * @set_frontend: callback function used 378 * parameters for demodul 379 * The properties to be u 380 * dvb_frontend.dtv_prope 381 * the parameters to refl 382 * channel to be decoded, 383 * @get_tune_settings: callback function 384 * @get_frontend: callback function used 385 * actuall in use. The pr 386 * &struct dvb_frontend.d 387 * statistics. Please not 388 * an error code if the s 389 * because the demog is n 390 * @read_status: returns the locking st 391 * @read_ber: legacy callback functi 392 * Newer drivers should p 393 * e. g. @set_frontend;/@ 394 * callback only if DVBv3 395 * @read_signal_strength: legacy callback func 396 * strength. Newer driver 397 * DVBv5 API, e. g. @set_ 398 * implementing this call 399 * compatibility is wante 400 * @read_snr: legacy callback functi 401 * rate. Newer drivers sh 402 * DVBv5 API, e. g. @set_ 403 * implementing this call 404 * compatibility is wante 405 * @read_ucblocks: legacy callback functi 406 * Blocks. Newer drivers 407 * DVBv5 API, e. g. @set_ 408 * implementing this call 409 * compatibility is wante 410 * @diseqc_reset_overload: callback function t 411 * FE_DISEQC_RESET_OVERLO 412 * @diseqc_send_master_cmd: callback function 413 * FE_DISEQC_SEND_MASTER_ 414 * @diseqc_recv_slave_reply: callback function 415 * FE_DISEQC_RECV_SLAVE_R 416 * @diseqc_send_burst: callback function to i 417 * FE_DISEQC_SEND_BURST() 418 * @set_tone: callback function to i 419 * FE_SET_TONE() ioctl (o 420 * @set_voltage: callback function to i 421 * FE_SET_VOLTAGE() ioctl 422 * @enable_high_lnb_voltage: callback function 423 * FE_ENABLE_HIGH_LNB_VOL 424 * @dishnetwork_send_legacy_command: callback 425 * FE_DISHNETWORK_SEND_LE 426 * Drivers should not use 427 * core emulation fails t 428 * if @set_voltage takes 429 * when backward compatib 430 * required. 431 * @i2c_gate_ctrl: controls the I2C gate. 432 * mux support instead. 433 * @ts_bus_ctrl: callback function used 434 * @set_lna: callback function to p 435 * @search: callback function used 436 * @tuner_ops: pointer to &struct dvb 437 * @analog_ops: pointer to &struct ana 438 */ 439 struct dvb_frontend_ops { 440 struct dvb_frontend_internal_info info 441 442 u8 delsys[MAX_DELSYS]; 443 444 void (*detach)(struct dvb_frontend *fe 445 void (*release)(struct dvb_frontend* f 446 void (*release_sec)(struct dvb_fronten 447 448 int (*init)(struct dvb_frontend* fe); 449 int (*sleep)(struct dvb_frontend* fe); 450 int (*suspend)(struct dvb_frontend *fe 451 int (*resume)(struct dvb_frontend *fe) 452 453 int (*write)(struct dvb_frontend* fe, 454 455 /* if this is set, it overrides the de 456 int (*tune)(struct dvb_frontend* fe, 457 bool re_tune, 458 unsigned int mode_flags, 459 unsigned int *delay, 460 enum fe_status *status); 461 462 /* get frontend tuning algorithm from 463 enum dvbfe_algo (*get_frontend_algo)(s 464 465 /* these two are only used for the swz 466 int (*set_frontend)(struct dvb_fronten 467 int (*get_tune_settings)(struct dvb_fr 468 469 int (*get_frontend)(struct dvb_fronten 470 struct dtv_fronten 471 472 int (*read_status)(struct dvb_frontend 473 int (*read_ber)(struct dvb_frontend* f 474 int (*read_signal_strength)(struct dvb 475 int (*read_snr)(struct dvb_frontend* f 476 int (*read_ucblocks)(struct dvb_fronte 477 478 int (*diseqc_reset_overload)(struct dv 479 int (*diseqc_send_master_cmd)(struct d 480 int (*diseqc_recv_slave_reply)(struct 481 int (*diseqc_send_burst)(struct dvb_fr 482 enum fe_sec_m 483 int (*set_tone)(struct dvb_frontend *f 484 int (*set_voltage)(struct dvb_frontend 485 enum fe_sec_voltage 486 int (*enable_high_lnb_voltage)(struct 487 int (*dishnetwork_send_legacy_command) 488 int (*i2c_gate_ctrl)(struct dvb_fronte 489 int (*ts_bus_ctrl)(struct dvb_frontend 490 int (*set_lna)(struct dvb_frontend *); 491 492 /* 493 * These callbacks are for devices tha 494 * tuning algorithms, rather than a si 495 */ 496 enum dvbfe_search (*search)(struct dvb 497 498 struct dvb_tuner_ops tuner_ops; 499 struct analog_demod_ops analog_ops; 500 }; 501 502 #ifdef __DVB_CORE__ 503 #define MAX_EVENT 8 504 505 /* Used only internally at dvb_frontend.c */ 506 struct dvb_fe_events { 507 struct dvb_frontend_event events[MAX_E 508 int eventw; 509 int eventr; 510 int overflow; 511 wait_queue_head_t wait_queue; 512 struct mutex mtx; 513 }; 514 #endif 515 516 /** 517 * struct dtv_frontend_properties - contains a 518 * specific t 519 * 520 * @frequency: frequency in Hz for te 521 * Satellite 522 * @modulation: Frontend modulation ty 523 * @voltage: SEC voltage (only Sate 524 * @sectone: SEC tone mode (only Sa 525 * @inversion: Spectral inversion 526 * @fec_inner: Forward error correcti 527 * @transmission_mode: Transmission Mode 528 * @bandwidth_hz: Bandwidth, in Hz. A ze 529 * wants to autodetect. 530 * @guard_interval: Guard Interval 531 * @hierarchy: Hierarchy 532 * @symbol_rate: Symbol Rate 533 * @code_rate_HP: high priority stream c 534 * @code_rate_LP: low priority stream co 535 * @pilot: Enable/disable/autodet 536 * @rolloff: Rolloff factor (alpha) 537 * @delivery_system: FE delivery system (e. 538 * @interleaving: interleaving 539 * @isdbt_partial_reception: ISDB-T partial re 540 * @isdbt_sb_mode: ISDB-T Sound Broadcast 541 * @isdbt_sb_subchannel: ISDB-T SB subc 542 * @isdbt_sb_segment_idx: ISDB-T SB segm 543 * @isdbt_sb_segment_count: ISDB-T SB segm 544 * @isdbt_layer_enabled: ISDB Layer ena 545 * @layer: ISDB per-layer data (o 546 * @layer.segment_count: Segment Count; 547 * @layer.fec: per layer code rate; 548 * @layer.modulation: per layer modulation; 549 * @layer.interleaving: per layer interleavin 550 * @stream_id: If different than zero 551 * hardware supports (DVB 552 * @scrambling_sequence_index: Carries the in 553 * scrambling seq 554 * @atscmh_fic_ver: Version number of the 555 * signaling data (only A 556 * @atscmh_parade_id: Parade identification 557 * @atscmh_nog: Number of MH groups pe 558 * parade (only ATSC-M/H) 559 * @atscmh_tnog: Total number of MH gro 560 * belonging to all MH pa 561 * (only ATSC-M/H) 562 * @atscmh_sgn: Start group number (on 563 * @atscmh_prc: Parade repetition cycl 564 * @atscmh_rs_frame_mode: Reed Solomon ( 565 * @atscmh_rs_frame_ensemble: RS frame ensem 566 * @atscmh_rs_code_mode_pri: RS code mode p 567 * @atscmh_rs_code_mode_sec: RS code mode s 568 * @atscmh_sccc_block_mode: Series Concate 569 * Block Mode (on 570 * @atscmh_sccc_code_mode_a: SCCC code mode 571 * @atscmh_sccc_code_mode_b: SCCC code mode 572 * @atscmh_sccc_code_mode_c: SCCC code mode 573 * @atscmh_sccc_code_mode_d: SCCC code mode 574 * @lna: Power ON/OFF/AUTO the 575 * @strength: DVBv5 API statistics: 576 * @cnr: DVBv5 API statistics: 577 * (main) carrier 578 * @pre_bit_error: DVBv5 API statistics: 579 * @pre_bit_count: DVBv5 API statistics: 580 * @post_bit_error: DVBv5 API statistics: 581 * @post_bit_count: DVBv5 API statistics: 582 * @block_error: DVBv5 API statistics: 583 * @block_count: DVBv5 API statistics: 584 * 585 * NOTE: derivated statistics like Uncorrected 586 * calculated on userspace. 587 * 588 * Only a subset of the properties are needed 589 * For more info, consult the media_api.html w 590 * Userspace API. 591 */ 592 struct dtv_frontend_properties { 593 u32 frequency; 594 enum fe_modulation modulation; 595 596 enum fe_sec_voltage voltage; 597 enum fe_sec_tone_mode sectone; 598 enum fe_spectral_inversion inversion; 599 enum fe_code_rate fec_inner; 600 enum fe_transmit_mode transmission_m 601 u32 bandwidth_hz; 602 enum fe_guard_interval guard_interval 603 enum fe_hierarchy hierarchy; 604 u32 symbol_rate; 605 enum fe_code_rate code_rate_HP; 606 enum fe_code_rate code_rate_LP; 607 608 enum fe_pilot pilot; 609 enum fe_rolloff rolloff; 610 611 enum fe_delivery_system delivery_syste 612 613 enum fe_interleaving interleaving; 614 615 /* ISDB-T specifics */ 616 u8 isdbt_partial_ 617 u8 isdbt_sb_mode; 618 u8 isdbt_sb_subch 619 u32 isdbt_sb_segme 620 u32 isdbt_sb_segme 621 u8 isdbt_layer_en 622 struct { 623 u8 segment_count; 624 enum fe_code_rate fec; 625 enum fe_modulation modulation; 626 u8 interleaving; 627 } layer[3]; 628 629 /* Multistream specifics */ 630 u32 stream_id; 631 632 /* Physical Layer Scrambling specifics 633 u32 scrambling_seq 634 635 /* ATSC-MH specifics */ 636 u8 atscmh_fic_ver 637 u8 atscmh_parade_ 638 u8 atscmh_nog; 639 u8 atscmh_tnog; 640 u8 atscmh_sgn; 641 u8 atscmh_prc; 642 643 u8 atscmh_rs_fram 644 u8 atscmh_rs_fram 645 u8 atscmh_rs_code 646 u8 atscmh_rs_code 647 u8 atscmh_sccc_bl 648 u8 atscmh_sccc_co 649 u8 atscmh_sccc_co 650 u8 atscmh_sccc_co 651 u8 atscmh_sccc_co 652 653 u32 lna; 654 655 /* statistics data */ 656 struct dtv_fe_stats strength; 657 struct dtv_fe_stats cnr; 658 struct dtv_fe_stats pre_bit_error; 659 struct dtv_fe_stats pre_bit_count; 660 struct dtv_fe_stats post_bit_error 661 struct dtv_fe_stats post_bit_count 662 struct dtv_fe_stats block_error; 663 struct dtv_fe_stats block_count; 664 }; 665 666 #define DVB_FE_NO_EXIT 0 667 #define DVB_FE_NORMAL_EXIT 1 668 #define DVB_FE_DEVICE_REMOVED 2 669 #define DVB_FE_DEVICE_RESUME 3 670 671 /** 672 * struct dvb_frontend - Frontend structure to 673 * 674 * @refcount: refcount to keep track 675 * references 676 * @ops: embedded &struct dvb_f 677 * @dvb: pointer to &struct dvb 678 * @demodulator_priv: demod private data 679 * @tuner_priv: tuner private data 680 * @frontend_priv: frontend private data 681 * @sec_priv: SEC private data 682 * @analog_demod_priv: Analog demod private d 683 * @dtv_property_cache: embedded &struct dtv_f 684 * @callback: callback function used 685 * either the tuner or th 686 * @id: Frontend ID 687 * @exit: Used to inform the DVB 688 * thread should exit (us 689 * got disconnected. 690 */ 691 692 struct dvb_frontend { 693 struct kref refcount; 694 struct dvb_frontend_ops ops; 695 struct dvb_adapter *dvb; 696 void *demodulator_priv; 697 void *tuner_priv; 698 void *frontend_priv; 699 void *sec_priv; 700 void *analog_demod_priv; 701 struct dtv_frontend_properties dtv_pro 702 #define DVB_FRONTEND_COMPONENT_TUNER 0 703 #define DVB_FRONTEND_COMPONENT_DEMOD 1 704 int (*callback)(void *adapter_priv, in 705 int id; 706 unsigned int exit; 707 }; 708 709 /** 710 * dvb_register_frontend() - Registers a DVB f 711 * 712 * @dvb: pointer to &struct dvb_adapter 713 * @fe: pointer to &struct dvb_frontend 714 * 715 * Allocate and initialize the private data ne 716 * manage the frontend and calls dvb_register_ 717 * frontend. It also cleans the property cache 718 * parameters and selects the first available 719 */ 720 int dvb_register_frontend(struct dvb_adapter * 721 struct dvb_fr 722 723 /** 724 * dvb_unregister_frontend() - Unregisters a D 725 * 726 * @fe: pointer to &struct dvb_frontend 727 * 728 * Stops the frontend kthread, calls dvb_unreg 729 * private frontend data allocated by dvb_regi 730 * 731 * NOTE: This function doesn't frees the memor 732 * by the SEC driver and by the tuner. In orde 733 * dvb_frontend_detach() is needed, after call 734 */ 735 int dvb_unregister_frontend(struct dvb_fronten 736 737 /** 738 * dvb_frontend_detach() - Detaches and frees 739 * 740 * @fe: pointer to &struct dvb_frontend 741 * 742 * This function should be called after dvb_un 743 * calls the SEC, tuner and demod release func 744 * &dvb_frontend_ops.release_sec, &dvb_fronten 745 * &dvb_frontend_ops.analog_ops.release and &d 746 * 747 * If the driver is compiled with %CONFIG_MEDI 748 * the module reference count, needed to allow 749 * previously used DVB frontend modules. 750 */ 751 void dvb_frontend_detach(struct dvb_frontend * 752 753 /** 754 * dvb_frontend_suspend() - Suspends a Digital 755 * 756 * @fe: pointer to &struct dvb_frontend 757 * 758 * This function prepares a Digital TV fronten 759 * 760 * In order to prepare the tuner to suspend, i 761 * &dvb_frontend_ops.tuner_ops.suspend\(\) is 762 * it will call &dvb_frontend_ops.tuner_ops.sl 763 * 764 * It will also call &dvb_frontend_ops.suspend 765 * if available. Otherwise it will call &dvb_f 766 * 767 * The drivers should also call dvb_frontend_s 768 * handler for the &device_driver.suspend\(\). 769 */ 770 int dvb_frontend_suspend(struct dvb_frontend * 771 772 /** 773 * dvb_frontend_resume() - Resumes a Digital T 774 * 775 * @fe: pointer to &struct dvb_frontend 776 * 777 * This function resumes the usual operation o 778 * 779 * In order to resume the frontend, it calls t 780 * &dvb_frontend_ops.resume\(\) if available. 781 * &dvb_frontend_ops.init\(\). 782 * 783 * If &dvb_frontend_ops.tuner_ops.resume\(\) i 784 * Otherwise,t will call &dvb_frontend_ops.tun 785 * 786 * Once tuner and demods are resumed, it will 787 * tone are restored to their previous values 788 * kthread in order to retune the frontend. 789 * 790 * The drivers should also call dvb_frontend_r 791 * handler for the &device_driver.resume\(\). 792 */ 793 int dvb_frontend_resume(struct dvb_frontend *f 794 795 /** 796 * dvb_frontend_reinitialise() - forces a rein 797 * 798 * @fe: pointer to &struct dvb_frontend 799 * 800 * Calls &dvb_frontend_ops.init\(\) and &dvb_f 801 * and resets SEC tone and voltage (for Satell 802 * 803 * NOTE: Currently, this function is used only 804 * It seems to be due to address some special 805 * frontend. 806 */ 807 void dvb_frontend_reinitialise(struct dvb_fron 808 809 /** 810 * dvb_frontend_sleep_until() - Sleep for the 811 * add_usec parameter 812 * 813 * @waketime: pointer to &struct ktime_t 814 * @add_usec: time to sleep, in microseconds 815 * 816 * This function is used to measure the time r 817 * FE_DISHNETWORK_SEND_LEGACY_CMD() ioctl to w 818 * as possible, as it affects the detection of 819 * satellite subsystem. 820 * 821 * Its used internally by the DVB frontend cor 822 * FE_DISHNETWORK_SEND_LEGACY_CMD() using the 823 * callback. 824 * 825 * NOTE: it should not be used at the drivers, 826 * legacy callback is provided by the Kernel. 827 * should be at the drivers is when there are 828 * would prevent the core emulation to work. O 829 * be writing a &dvb_frontend_ops.dishnetwork_ 830 * calling this function directly. 831 */ 832 void dvb_frontend_sleep_until(ktime_t *waketim 833 834 #endif 835
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.