si476x-reports.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * include/media/si476x-platform.h -- Definitions of the data formats
  4. * returned by debugfs hooks
  5. *
  6. * Copyright (C) 2013 Andrey Smirnov
  7. *
  8. * Author: Andrey Smirnov <[email protected]>
  9. */
  10. #ifndef __SI476X_REPORTS_H__
  11. #define __SI476X_REPORTS_H__
  12. /**
  13. * struct si476x_rsq_status - structure containing received signal
  14. * quality
  15. * @multhint: Multipath Detect High.
  16. * true - Indicatedes that the value is below
  17. * FM_RSQ_MULTIPATH_HIGH_THRESHOLD
  18. * false - Indicatedes that the value is above
  19. * FM_RSQ_MULTIPATH_HIGH_THRESHOLD
  20. * @multlint: Multipath Detect Low.
  21. * true - Indicatedes that the value is below
  22. * FM_RSQ_MULTIPATH_LOW_THRESHOLD
  23. * false - Indicatedes that the value is above
  24. * FM_RSQ_MULTIPATH_LOW_THRESHOLD
  25. * @snrhint: SNR Detect High.
  26. * true - Indicatedes that the value is below
  27. * FM_RSQ_SNR_HIGH_THRESHOLD
  28. * false - Indicatedes that the value is above
  29. * FM_RSQ_SNR_HIGH_THRESHOLD
  30. * @snrlint: SNR Detect Low.
  31. * true - Indicatedes that the value is below
  32. * FM_RSQ_SNR_LOW_THRESHOLD
  33. * false - Indicatedes that the value is above
  34. * FM_RSQ_SNR_LOW_THRESHOLD
  35. * @rssihint: RSSI Detect High.
  36. * true - Indicatedes that the value is below
  37. * FM_RSQ_RSSI_HIGH_THRESHOLD
  38. * false - Indicatedes that the value is above
  39. * FM_RSQ_RSSI_HIGH_THRESHOLD
  40. * @rssilint: RSSI Detect Low.
  41. * true - Indicatedes that the value is below
  42. * FM_RSQ_RSSI_LOW_THRESHOLD
  43. * false - Indicatedes that the value is above
  44. * FM_RSQ_RSSI_LOW_THRESHOLD
  45. * @bltf: Band Limit.
  46. * Set if seek command hits the band limit or wrapped to
  47. * the original frequency.
  48. * @snr_ready: SNR measurement in progress.
  49. * @rssiready: RSSI measurement in progress.
  50. * @afcrl: Set if FREQOFF >= MAX_TUNE_ERROR
  51. * @valid: Set if the channel is valid
  52. * rssi < FM_VALID_RSSI_THRESHOLD
  53. * snr < FM_VALID_SNR_THRESHOLD
  54. * tune_error < FM_VALID_MAX_TUNE_ERROR
  55. * @readfreq: Current tuned frequency.
  56. * @freqoff: Signed frequency offset.
  57. * @rssi: Received Signal Strength Indicator(dBuV).
  58. * @snr: RF SNR Indicator(dB).
  59. * @lassi:
  60. * @hassi: Low/High side Adjacent(100 kHz) Channel Strength Indicator
  61. * @mult: Multipath indicator
  62. * @dev: Who knows? But values may vary.
  63. * @readantcap: Antenna tuning capacity value.
  64. * @assi: Adjacent Channel(+/- 200kHz) Strength Indicator
  65. * @usn: Ultrasonic Noise Inticator in -DBFS
  66. */
  67. struct si476x_rsq_status_report {
  68. __u8 multhint, multlint;
  69. __u8 snrhint, snrlint;
  70. __u8 rssihint, rssilint;
  71. __u8 bltf;
  72. __u8 snr_ready;
  73. __u8 rssiready;
  74. __u8 injside;
  75. __u8 afcrl;
  76. __u8 valid;
  77. __u16 readfreq;
  78. __s8 freqoff;
  79. __s8 rssi;
  80. __s8 snr;
  81. __s8 issi;
  82. __s8 lassi, hassi;
  83. __s8 mult;
  84. __u8 dev;
  85. __u16 readantcap;
  86. __s8 assi;
  87. __s8 usn;
  88. __u8 pilotdev;
  89. __u8 rdsdev;
  90. __u8 assidev;
  91. __u8 strongdev;
  92. __u16 rdspi;
  93. } __packed;
  94. /**
  95. * si476x_acf_status_report - ACF report results
  96. *
  97. * @blend_int: If set, indicates that stereo separation has crossed
  98. * below the blend threshold as set by FM_ACF_BLEND_THRESHOLD
  99. * @hblend_int: If set, indicates that HiBlend cutoff frequency is
  100. * lower than threshold as set by FM_ACF_HBLEND_THRESHOLD
  101. * @hicut_int: If set, indicates that HiCut cutoff frequency is lower
  102. * than the threshold set by ACF_
  103. */
  104. struct si476x_acf_status_report {
  105. __u8 blend_int;
  106. __u8 hblend_int;
  107. __u8 hicut_int;
  108. __u8 chbw_int;
  109. __u8 softmute_int;
  110. __u8 smute;
  111. __u8 smattn;
  112. __u8 chbw;
  113. __u8 hicut;
  114. __u8 hiblend;
  115. __u8 pilot;
  116. __u8 stblend;
  117. } __packed;
  118. enum si476x_fmagc {
  119. SI476X_FMAGC_10K_OHM = 0,
  120. SI476X_FMAGC_800_OHM = 1,
  121. SI476X_FMAGC_400_OHM = 2,
  122. SI476X_FMAGC_200_OHM = 4,
  123. SI476X_FMAGC_100_OHM = 8,
  124. SI476X_FMAGC_50_OHM = 16,
  125. SI476X_FMAGC_25_OHM = 32,
  126. SI476X_FMAGC_12P5_OHM = 64,
  127. SI476X_FMAGC_6P25_OHM = 128,
  128. };
  129. struct si476x_agc_status_report {
  130. __u8 mxhi;
  131. __u8 mxlo;
  132. __u8 lnahi;
  133. __u8 lnalo;
  134. __u8 fmagc1;
  135. __u8 fmagc2;
  136. __u8 pgagain;
  137. __u8 fmwblang;
  138. } __packed;
  139. struct si476x_rds_blockcount_report {
  140. __u16 expected;
  141. __u16 received;
  142. __u16 uncorrectable;
  143. } __packed;
  144. #endif /* __SI476X_REPORTS_H__ */