From 26d10d4c48eb9dc28507f83de833648dba72f4fe Mon Sep 17 00:00:00 2001 From: Hongguang Date: Mon, 13 Dec 2021 16:01:27 -0800 Subject: [PATCH] Update some comments for tuner. *) Clarify the meaning and unit of FrontendStatus. *) Add comment for STC ready support. *) Support for control signal (e.g. TMCC) change monitoring *) Update MmtpRecordEvent and TsRecordEvent getDataLength() comments Bug: 183634950 Bug: 202247846 Bug: 183630794 Bug: 210845647 Test: Make Change-Id: I6bc35ba723544692c15c0a293eef60215fa74f22 --- .../android/media/tv/tuner/filter/Filter.java | 3 ++- .../tv/tuner/filter/MmtpRecordEvent.java | 2 +- .../media/tv/tuner/filter/TsRecordEvent.java | 2 +- .../tv/tuner/frontend/FrontendStatus.java | 26 +++++++++++++++++++ .../media/tv/tuner/frontend/ScanCallback.java | 7 ++++- 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/media/java/android/media/tv/tuner/filter/Filter.java b/media/java/android/media/tv/tuner/filter/Filter.java index f0f576e90d917..5d71a13bf7012 100644 --- a/media/java/android/media/tv/tuner/filter/Filter.java +++ b/media/java/android/media/tv/tuner/filter/Filter.java @@ -159,7 +159,8 @@ public class Filter implements AutoCloseable { public @interface Status {} /** - * The status of a filter that the data in the filter buffer is ready to be read. + * The status of a filter that the data in the filter buffer is ready to be read. It can also be + * used to know the STC (System Time Clock) ready status if it's PCR filter. */ public static final int STATUS_DATA_READY = DemuxFilterStatus.DATA_READY; /** diff --git a/media/java/android/media/tv/tuner/filter/MmtpRecordEvent.java b/media/java/android/media/tv/tuner/filter/MmtpRecordEvent.java index 58a81d99ff99e..c8bb178253af4 100644 --- a/media/java/android/media/tv/tuner/filter/MmtpRecordEvent.java +++ b/media/java/android/media/tv/tuner/filter/MmtpRecordEvent.java @@ -55,7 +55,7 @@ public class MmtpRecordEvent extends FilterEvent { } /** - * Gets data size in bytes of filtered data. + * Gets the record data offset from the beginning of the record buffer. */ @BytesLong public long getDataLength() { diff --git a/media/java/android/media/tv/tuner/filter/TsRecordEvent.java b/media/java/android/media/tv/tuner/filter/TsRecordEvent.java index bf2c000cb6e8a..12ea222463569 100644 --- a/media/java/android/media/tv/tuner/filter/TsRecordEvent.java +++ b/media/java/android/media/tv/tuner/filter/TsRecordEvent.java @@ -71,7 +71,7 @@ public class TsRecordEvent extends FilterEvent { } /** - * Gets data size in bytes of filtered data. + * Gets the record data offset from the beginning of the record buffer. */ @BytesLong public long getDataLength() { diff --git a/media/java/android/media/tv/tuner/frontend/FrontendStatus.java b/media/java/android/media/tv/tuner/frontend/FrontendStatus.java index 582e4f54e2c38..0527a1a5642ec 100644 --- a/media/java/android/media/tv/tuner/frontend/FrontendStatus.java +++ b/media/java/android/media/tv/tuner/frontend/FrontendStatus.java @@ -645,6 +645,8 @@ public class FrontendStatus { } /** * Gets the current Automatic Gain Control value which is normalized from 0 to 255. + * + * Larger AGC values indicate it is applying more gain. */ public int getAgc() { if (mAgc == null) { @@ -663,6 +665,10 @@ public class FrontendStatus { } /** * Gets the current Error information by layer. + * + * The order of the vectors is in ascending order of the required CNR (Contrast-to-noise ratio). + * The most robust layer is the first. For example, in ISDB-T, vec[0] is the information of + * layer A. vec[1] is the information of layer B. */ @NonNull public boolean[] getLayerErrors() { @@ -736,6 +742,10 @@ public class FrontendStatus { * *

This query is only supported by Tuner HAL 1.1 or higher. Use * {@link TunerVersionChecker#getTunerVersion()} to check the version. + * + * The order of the vectors is in ascending order of the required CNR (Contrast-to-noise ratio). + * The most robust layer is the first. For example, in ISDB-T, vec[0] is the information of + * layer A. vec[1] is the information of layer B. */ @NonNull public int[] getBers() { @@ -752,6 +762,10 @@ public class FrontendStatus { * *

This query is only supported by Tuner HAL 1.1 or higher. Use * {@link TunerVersionChecker#getTunerVersion()} to check the version. + * + * The order of the vectors is in ascending order of the required CNR (Contrast-to-noise ratio). + * The most robust layer is the first. For example, in ISDB-T, vec[0] is the information of + * layer A. vec[1] is the information of layer B. */ @NonNull @FrontendSettings.InnerFec @@ -849,6 +863,10 @@ public class FrontendStatus { * *

This query is only supported by Tuner HAL 1.1 or higher. Use * {@link TunerVersionChecker#getTunerVersion()} to check the version. + * + * The order of the vectors is in ascending order of the required CNR (Contrast-to-noise ratio). + * The most robust layer is the first. For example, in ISDB-T, vec[0] is the information of + * layer A. vec[1] is the information of layer B. */ @NonNull @FrontendInterleaveMode @@ -867,6 +885,10 @@ public class FrontendStatus { * *

This query is only supported by Tuner HAL 1.1 or higher. Use * {@link TunerVersionChecker#getTunerVersion()} to check the version. + * + * The order of the vectors is in ascending order of the required CNR (Contrast-to-noise ratio). + * The most robust layer is the first. For example, in ISDB-T, vec[0] is the information of + * layer A. vec[1] is the information of layer B. */ @NonNull @IntRange(from = 0, to = 0xff) @@ -900,6 +922,10 @@ public class FrontendStatus { * *

This query is only supported by Tuner HAL 1.1 or higher. Use * {@link TunerVersionChecker#getTunerVersion()} to check the version. + * + * The order of the vectors is in ascending order of the required CNR (Contrast-to-noise ratio). + * The most robust layer is the first. For example, in ISDB-T, vec[0] is the information of + * layer A. vec[1] is the information of layer B. */ @NonNull @FrontendModulation diff --git a/media/java/android/media/tv/tuner/frontend/ScanCallback.java b/media/java/android/media/tv/tuner/frontend/ScanCallback.java index f61bd525beb4a..cb35edb15c624 100644 --- a/media/java/android/media/tv/tuner/frontend/ScanCallback.java +++ b/media/java/android/media/tv/tuner/frontend/ScanCallback.java @@ -28,7 +28,12 @@ import android.annotation.SystemApi; @SystemApi public interface ScanCallback { - /** Scan locked the signal. */ + /** + * Scan locked the signal. + * + * It can also be notified after signal is locked if the signal attributes transmission + * parameter of the signal is changed (e.g., Modulation). + */ void onLocked(); /** Scan stopped. */