1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>
linuxtv.org|DVB Frontend API</title></head><body bgcolor="#000000"
link="#ffcc00" text="#ffffff" vlink="#ffdd00"><table border="0"
cellpadding="0" cellspacing="0" width="100%"><tr><td><table border="0"
cellpadding="0" cellspacing="0" width="100%"><tr><td width="610"><table
border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td><table
border="0" cellpadding="0" cellspacing="0" width="180"><tr align="right"
valign="top"><td><img height="30" src="/images/top01.gif"
width="180"></td></tr><tr><td align="center" height="38"
valign="bottom"><img border="0" height="38" src="/images/cimlogo02.gif"
width="45"></td></tr></table></td><td><table border="0" cellpadding="0"
cellspacing="0" width="50"><tr><td><img height="30"
src="/images/top02.gif" width="284"></td></tr><tr><td><img height="45"
src="/images/top06.gif" width="20">
</td></tr></table></td><td><table border="0" cellpadding="0"
cellspacing="0" width="170"><tr><td background="/images/squares05.gif"
colspan="2"><img height="68" src="/images/squares04.gif"
width="32"></td></tr></table></td></tr><tr><td></td></tr></table></td><td
height="68" valign="top" width="100%"><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr><td background="/images/squares05.gif"
height="68"
width="100%"> </td></tr></table></td></tr></table></td></tr><tr><td height="30">
</td></tr></table><table border="0" cellpadding="0"
cellspacing="0"><tr><td width="181"><table border="0" cellpadding="0"
cellspacing="0" width="181"><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gruen.gif" width="20"></td><td
bgcolor="#003d19" valign="top" width="19"><img height="22"
src="/images/pfeilgruen.gif" width="19"></td><td bgcolor="#000000"
valign="top" width="2"></td><td bgcolor="#003d19" width="120"><a
href="http://www.convergence.de"><font color="#ffcc00"
face="arial, helvetica" size="2"><b>
convergence.de
</b></font></a></td><td align="right" bgcolor="#003d19"
valign="bottom" width="20"><img height="22"
src="/images/eckeswgruen.gif" width="8"></td></tr><tr><td
height="2"></td></tr><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gruen.gif" width="20"></td><td
bgcolor="#003d19" valign="top" width="19"><img height="22"
src="/images/pfeilgruen.gif" width="19"></td><td bgcolor="#000000"
valign="top" width="2"></td><td bgcolor="#003d19" width="120"><a
href="http://www.cryptolabs.org"><font color="#ffcc00"
face="arial, helvetica" size="2"><b>
cryptolabs.org</b></font></a></td><td align="right"
bgcolor="#003d19" valign="bottom" width="20"><img height="22"
src="/images/eckeswgruen.gif" width="8"></td></tr><tr><td
height="2"></td></tr><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gruen.gif" width="20"></td><td
bgcolor="#003d19" valign="top" width="19"><img height="22"
src="/images/pfeilgruen.gif" width="19"></td><td bgcolor="#000000"
valign="top" width="2"></td><td bgcolor="#003d19" width="120"><a
href="http://www.directfb.org"><font color="#ffcc00"
face="arial, helvetica" size="2"><b>
directfb.org
</b></font></a></td><td align="right" bgcolor="#003d19"
valign="bottom" width="20"><img height="22"
src="/images/eckeswgruen.gif" width="8"></td></tr><tr><td
height="2"></td></tr><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td
bgcolor="#ffcc00" valign="top" width="19"><img height="22"
src="/images/pfeilgelb.gif" width="19"></td><td bgcolor="#000000"
valign="top" width="2"></td><td bgcolor="#ffcc00" width="120"><a
href="/"><font color="#003d19" face="arial, helvetica" size="2"><b>
linuxtv.org
</b></font></a></td><td align="right" bgcolor="#ffcc00"
valign="bottom" width="20"><img height="22" src="/images/eckeswgelb.gif"
width="8"></td></tr><tr><td height="2"></td></tr></table></td><td width="20">
</td><td valign="top" width="500"><img height="60"
src="/images/linuxtv.gif" width="245"></td></tr><tr><td align="left"
valign="top" width="181"><table bgcolor="#ffcc00" border="0"
cellpadding="0" cellspacing="0" width="185"><tr><td bgcolor="#000000"
valign="top" width="20"><img height="22" src="/images/gleb.gif"
width="20"></td><td bgcolor="#ffcc00" width="19"><img height="22"
src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000"
width="2"></td><td bgcolor="#ffcc00" width="131">
<a href="/"><font color="#003d19" face="helvetica"
size="2"><b>linuxtv</b></font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" colspan="5"
height="2"></td></tr><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td
bgcolor="#ffcc00" width="19"><img height="22"
src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000"
width="2"></td><td bgcolor="#ffcc00" width="131">
<a href="/projects.xml"><font color="#003d19" face="helvetica"
size="2"><b>projects</b></font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" colspan="5"
height="2"></td></tr><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td
bgcolor="#ffcc00" width="19"><img height="22"
src="/images/arrow_main_open.gif" width="19"></td><td bgcolor="#000000"
width="2"></td><td bgcolor="#ffcc00" width="131">
<a href="/developer/"><font color="#003d19" face="helvetica"
size="2"><b>developer</b></font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td
bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000"
width="2"></td><td width="131"><img height="13"
src="/images/arrow_sub_open.gif" width="13">
<a href="/developer/dvb.xml"><font color="#000000"
face="helvetica" size="2">DVB</font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td
width="19"> </td><td bgcolor="#000000" width="2"></td><td width="131">
<img height="13" src="/images/space_sub.gif" width="13"><img
height="13" src="/images/kulleropen.gif" width="13"><a
href="/developer/dvb_api.xml"><font color="#000000" face="helvetica" size="2">
API</font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td
bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000"
width="2"></td><td width="131"><img height="13"
src="/images/arrow_sub.gif" width="13">
<a href="/developer/dvd.xml"><font color="#000000"
face="helvetica" size="2">DVD</font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td
bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000"
width="2"></td><td width="131"><img height="13"
src="/images/arrow_sub.gif" width="13">
<a href="/developer/mbone.xml"><font color="#000000"
face="helvetica" size="2">Mbone</font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td
bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000"
width="2"></td><td width="131"><img height="13"
src="/images/arrow_sub.gif" width="13">
<a href="/cvs/"><font color="#000000" face="helvetica"
size="2">CVS</font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" colspan="5"
height="2"></td></tr><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td
bgcolor="#ffcc00" width="19"><img height="22"
src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000"
width="2"></td><td bgcolor="#ffcc00" width="131">
<a href="/download/"><font color="#003d19" face="helvetica"
size="2"><b>download</b></font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" colspan="5"
height="2"></td></tr><tr><td bgcolor="#000000" valign="top"
width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td
bgcolor="#ffcc00" width="19"><img height="22"
src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000"
width="2"></td><td bgcolor="#ffcc00" width="131">
<a href="/contact.xml"><font color="#003d19" face="helvetica"
size="2"><b>contact</b></font></a></td><td bgcolor="#000000"
width="9"></td></tr><tr><td bgcolor="#000000" colspan="5"
height="2"></td></tr></table></td><td width="20">
</td><td valign="top" width="500"><font color="#ffcc00" face="arial, helvetica"><h2>DVB Frontend API</h2></font>
<p>
The DVB frontend device controls the frontend of the DVB hardware, e.g.
tuning, symbol rate, error correction, ...
It is accessed through /dev/ost/qpskfe.
</p>
<p>
The function calls defined in the include file
<a href="frontend.h">frontend.h</a> are described in detail below:
</p>
<p>
<font face="arial, helvetica" size="+1">Frontend API IO control calls</font>
<p>
<pre>
int open(const char *deviceName, int flags);
DESCRIPTION
This system call opens a named front-end device (e.g. /dev/qpskfe) for
subsequent use. The device can be opened in read-only mode, which only allows
monitoring of device status and statistics, or read/write mode, which allows
any kind of use (e.g. performing tuning operations.)
In a system with multiple front-ends, it is usually the case that multiple
devices cannot be open in read/write mode simultaneously. As long as a
front-end device is opened in read/write mode, other open() calls in
read/write mode will either fail or block, depending on whether
non-blocking or blocking mode was specified.
A front-end device opened in blocking mode can later be put into non-blocking
mode (and vice versa) using the F_SETFL command of the fcntl system call.
This is a standard system call, documented in the Linux manual page for fcntl.
When an open() call has succeeded, the device will be ready for use in the
specified mode. This implies that the corresponding hardware is powered up,
and that other front-ends may have been powered down to make that possible.
PARAMETERS
const char *deviceName I Name of specific front-end device. In the
current implementation, /dev/qpskfe is the
only one available (QPSK satellite front-end.)
int flags I A bit-wise OR of the following flags:
O_RDONLY read-only access
O_RDWR read/write access
O_NONBLOCK open in non-blocking mode
(blocking mode is the default)
RETURNS
ENODEV Device driver not loaded/available.
EBUSY Device or resource busy.
EINVAL Invalid argument.
</pre>
</p>
<p>
<pre>
int close(int fd);
DESCRIPTION
This system call closes a previously opened front-end device. After closing a
front-end device, its corresponding hardware might be powered down
automatically, but only when this is needed to open another front-end device.
To affect an unconditional power down, it should be done explicitly using
the OST_SET_POWER_STATE ioctl.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
RETURNS
EBADF fd is not a valid open file descriptor
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = OST_SELFTEST);
DESCRIPTION
This ioctl call initiates an automatic self-test of the front-end hardware.
This call requires read/write access to the device.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals OST_SELFTEST for this command.
RETURNS
0 Success
-1 Failure
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = OST_SET_POWER_STATE, uint32_t state);
DESCRIPTION
This ioctl call, implemented in many OST device drivers, enables direct
control over the power state of the hardware device, which may be on, off,
standby, or suspend. The latter two are low-power modes, which disable all
functionality of the device until turned on again. In contrast to the off
state, however, the standby and suspend states resume operation in the same
state as when the device was active. The only difference between the standby
and suspend states is a different tradeoff between resume time and power
consumption ­ power consumption may be lower in the suspend state at the
cost of a longer resume time.
A device that implements this call does not necessarily support two low-power
modes. If it only support one low-power state, or none at all, the
OST_SET_POWER_STATE operation for the missing states will still succeed, but
it will be mapped to an existing state as per this table:
number of low-power requested state resulting state
states supported
1 standby suspend
1 suspend suspend
0 standby on
0 suspend on
For other cases where a required state is missing, an error code will be
returned. This can happen if a device does not support the power-off state,
but nevertheless implements this ioctl operation for control of low-power
states.
When opening a device in read/write mode, the driver ensures that the
corresponding hardware device is turned on initially. If the device is
later turned off or put in suspend mode, it has to be explicitly turned on
again.
This call requires read/write access to the device. (Note that the power
management driver can affect the power state of devices without using this
ioctl operation, so having exclusive read/write access to a device does not
imply total control over the power state.)
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals OST_SET_POWER_STATE for this command.
uint32_t state I Requested power state. One of:
OST_POWER_ON: turn power on
OST_POWER_STANDBY: set device in standby mode
OST_POWER_SUSPEND: set device in suspend mode
OST_POWER_OFF: turn power off
RETURNS
EBADF fd is not a valid open file descriptor
EINVAL illegal state, or not available on this device
EPERM permission denied (needs read/write access)
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = OST_GET_POWER_STATE, uint32_t *state);
DESCRIPTION
This ioctl call, implemented in many OST device drivers, obtains the power
state of the hardware device, which may be on, off, standby, or suspend.
A device that implements this call does not necessarily support all four states.
If there is only one low-power state, the suspend state will be returned for
that state. If there is no low-power state, the on state will be reported
standby and suspend states will be equivalent to the on state.
For this command, read-only access to the device is sufficient.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals OST_GET_POWER_STATE for this command.
uint32_t *state O Pointer to a variable where the power state is
to be stored. Possible values are:
OST_POWER_ON power is on
OST_POWER_STANDBY device in
standby mode
OST_POWER_SUSPEND: device in
suspend mode
OST_POWER_OFF: power is off
RETURNS
EBADF fd is not a valid open file descriptor
EINVAL illegal state, or not available on this device
EFAULT state points to invalid address
EPERM permission denied (needs read/write access)
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = QPSK_READ_STATUS, feStatus *status);
DESCRIPTION
This ioctl call returns status information about the front-end.
This call only requires read-only access to the device.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals FE_READ_STATUS for this command.
struct feStatus *status O Points to the location where the front-end
status word is to be stored.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT status points to invalid address
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = FE_READ_BER, uint32_t *ber);
DESCRIPTION
This ioctl call returns the bit error rate for the signal currently
received/demodulated by the front-end. For this command, read-only access
to the device is sufficient.
FUNCTION PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals FE_READ_BER for this command.
uint32_t *ber O The bit error rate, as a multiple of 10-9, is stored into *ber.
Example: a value of 2500 corresponds to a bit error
rate of 2.5 10-6, or 1 error in 400000 bits.
RETURNS
EBADF fd is not a valid open file descriptor.
EFAULT ber points to invalid address
ENOSIGNAL There is no signal, thus no meaningful bit error
rate. Also returned if the front-end is not turned on.
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl( int fd, int request = FE_READ_SIGNAL_STRENGTH, int32_t *strength);
DESCRIPTION
This ioctl call returns the signal strength value for the signal currently
received by the front-end. For this command, read-only access to the device
is sufficient.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals FE_READ_SIGNAL_STRENGTH for this
command.
int32_t *strength O The signal strength value, as a multiple of 10^-6 dBm,
is stored into *strength.
Example: a value of ­12,500,000 corresponds to a signal
strength value of ­12.5 dBm.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT strength points to invalid address
ENOSIGNAL There is no signal, thus no meaningful signal
strength value. Also returned if front-end is not
turned on.
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = FE_READ_SNR, int32_t *snr);
DESCRIPTION
This ioctl call returns the signal-to-noise ratio for the signal currently
received by the front-end. For this command, read-only access to the device
is sufficient.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals FE_READ_SNR for this command.
int32_t *snr O The signal-to-noise ratio, as a multiple of
10^-6 dB, is stored into *snr.
Example: a value of 12,300,000 corresponds
to a signal-to-noise ratio of 12.3 dB.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT snr points to invalid address
ENOSIGNAL No stable signal, thus no meaningful signal-to-
noise ratio. Also returned if front-end is not
turned on.
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl( int fd, int request = FE_READ_UNCORRECTED_BLOCKS, uint32_t *ublocks);
DESCRIPTION
This ioctl call returns the number of uncorrected blocks detected by the device
driver during its lifetime. For meaningful measurements, the increment in
block count during a specific time interval should be calculated2. For this
command, read-only access to the device is sufficient.
2 Note that the counter will wrap to zero after its maximum count has
been reached (232-1).
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals FE_READ_UNCORRECTED_BLOCKS for this command.
uint32_t *ublocks O The total number of uncorrected blocks seen
by the driver so far.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT ublocks points to invalid address
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl( int fd, int request = FE_GET_NEXT_FREQUENCY, uint32_t *freq);
DESCRIPTION
When scanning a frequency range, it is desirable to use a scanning step size
that is as large as possible, yet small enough to be able to lock to any signal
within the range.
This ioctl operation does just that ­ it increments a given frequency by a
step size suitable for efficient3 scanning.
The step size used by this function may be a quite complex function of the given
frequency, hardware capabilities, and parameter settings of the device. Thus, a
returned result is only valid for the current state of the device.
For this command, read-only access to the device is sufficient.
3 Note that scanning may still be excruciatingly slow on some hardware, for
other reasons than a non-optimal scanning step size.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals FE_GET_NEXT_FREQUENCY for this command.
uint32_t *freq I/O Input: a given frequency
Output: the frequency corresponding to
the next higher frequency setting.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT freq points to invalid address
EINVAL maximum frequency reached
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl( int fd, int request = FE_GET_NEXT_SYMBOL_RATE, uint32_t *symbolRate);
DESCRIPTION
When scanning a range of symbol rates (e.g. for "blind acquisition") it is
desirable to use a scanning step size that is as large as possible, yet
small enough to detect any valid signal within the range. This ioctl
operation does just that ­ it increments a given symbol rate by a step size
suitable for efficient4 scanning.
The step size used by this function may be a quite complex function of the given
symbol rate, hardware capabilities, and parameter settings of the device.
Thus, a returned result is only valid for the current state of the device.
For this command, read-only access to the device is sufficient.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals FE_GET_NEXT_SYMBOL_RATE for this command.
uint32_t *symbolRate I/O Input: a given symbol rate Output: the symbol rate corresponding to the next
higher symbol rate setting.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT symbolRate points to invalid address
EINVAL maximum symbol rate reached
ENOSYS Function not available for this device.
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = QPSK_TUNE, struct qpskParameters *p);
DESCRIPTION
This ioctl call starts a tuning operation using specified parameters.
The result of this call will be successful if the parameters were valid and
the tuning could be initiated.
The result of the tuning operation in itself, however, will arrive
asynchronously as an event (see documentation for QPSK_GET_EVENT and qpskEvent.)
If a new QPSK_TUNE operation is initiated before the previous one was completed,
the previous operation will be aborted in favor of the new one.
This command requires read/write access to the device.
PARAMETERS
int fd File descriptor returned by a previous call to open().
int request Equals QPSK_TUNE for this command.
struct qpskParameters *p Points to parameters for tuning operation.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT p points to invalid address
EINVAL parameter value(s) not valid
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = QPSK_GET_EVENT, struct qpskEvent *ev);
DESCRIPTION
This ioctl call returns an event of type qpskEvent if available. If an event
is not available, the behavior depends on whether the device is in blocking
or non-blocking mode. In the latter case, the call fails immediately with
errno set to EWOULDBLOCK. In the former case, the call blocks until an event
becomes available.
The standard Linux poll() and/or select() system calls can be used with the
device file descriptor to watch for new events. For select(), the file
descriptor should be included in the exceptfds argument, and for poll(),
POLLPRI should be specified as the wake-up condition.
Since the event queue allocated is rather small (room for 8 events), the queue
must be serviced regularly to avoid overflow. If an overflow happens, the
oldest event is discarded from the queue, and an error (EBUFFEROVERFLOW) occurs
the next time the queue is read. After reporting the error condition in this
fashion, subsequent QPSK_GET_EVENT calls will return events from the queue as
usual.
For the sake of implementation simplicity, this command requires read/write
access to the device.
PARAMETERS
int fd File descriptor returned by a previous call to open().
int request I Equals QPSK_GET_EVENT for this command.
struct qpskEvent *ev O Points to the location where the event, if any, is to be stored.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT ev points to invalid address
EWOULDBLOCK There is no event pending, and the device is in
non-blocking mode.
EBUFFEROVERFLOW Overflow in event queue - one or more events were lost.
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = QPSK_FE_INFO, struct qpskFrontendInfo *info);
DESCRIPTION
This ioctl call returns information about the front-end.
This call only requires read-only access to the device.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals QPSK_FE_INFO for this command.
struct qpskFrontendInfo *info O Points to the location where the front-end
information is to be stored.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT info points to invalid address
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = QPSK_WRITE_REGISTER, struct qpskRegister *reg);
DESCRIPTION
This ioctl call is intended for hardware-specific diagnostics. It writes
an 8-bit value at an 8-bit address of a register in a chip identified by an
8-bit index.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals QPSK_WRITE_REGISTER for this command.
struct qpskRegister *reg I Specifies a value that should be written
into a specified register in a specified chip.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT reg points to and invalid address
EINVAL Register specification invalid.
</pre>
</p>
<p>
<pre>
int ioctl(int fd, int request = QPSK_READ_REGISTER, struct qpskRegister *reg);
DESCRIPTION
This ioctl call is intended for hardware-specific diagnostics.
It reads an 8-bit value at an 8-bit address of a register in a chip
identified by an 8-bit index.
PARAMETERS
int fd I File descriptor returned by a previous call to open().
int request I Equals QPSK_READ_REGISTER for this command.
struct qpskRegister *reg I/O I: specifies a register in a specified
chip from which a value should be read.
O: the value is read into the
qpskRegister structure.
RETURNS
EBADF fd is not a valid open file descriptor
EFAULT reg points to and invalid address
EINVAL Register specification invalid.
</pre>
</p>
</p>
</td></tr></table></body></html>
<!-- This page was served in 1919 milliseconds by Cocoon 1.7.4 -->
|