aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-07-27 20:57:28 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2014-07-27 20:57:28 +0200
commite9406cd5462abc772e081ab455bbb9b9c275abbc (patch)
treea36d2cb1de2286908a3e4870bd6a3c0ae103060b
parentb000aff8c91a75c7be5c79439119203d5fdfe891 (diff)
rds-ctl: changes in the TA bit weren't detected.
If just the TA bit changed, then nothing was printed by rds-ctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/rds-ctl/rds-ctl.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp
index 0d57b553..bd9cb836 100644
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -661,7 +661,7 @@ static void print_rds_data(const struct v4l2_rds *handle, uint32_t updated_field
}
if (updated_fields & V4L2_RDS_PTY && handle->valid_fields & V4L2_RDS_PTY)
- printf("\nPTY: %0u -> %s",handle->pty, v4l2_rds_get_pty_str(handle));
+ printf("\nPTY: %0u -> %s", handle->pty, v4l2_rds_get_pty_str(handle));
if (updated_fields & V4L2_RDS_PTYN && handle->valid_fields & V4L2_RDS_PTYN) {
printf("\nPTYN: %s", handle->ptyn);
@@ -674,11 +674,12 @@ static void print_rds_data(const struct v4l2_rds *handle, uint32_t updated_field
printf("\nRT: %s", handle->rt);
}
- if (updated_fields & V4L2_RDS_TP && handle->valid_fields & V4L2_RDS_TP)
- printf("\nTP: %s TA: %s", (handle->tp)? "yes":"no",
- handle->ta? "yes":"no");
+ if ((updated_fields & (V4L2_RDS_TP | V4L2_RDS_TA)) &&
+ (handle->valid_fields & (V4L2_RDS_TP | V4L2_RDS_TA)))
+ printf("\nTP: %s TA: %s", (handle->tp) ? "yes" : "no",
+ handle->ta ? "yes" : "no");
if (updated_fields & V4L2_RDS_MS && handle->valid_fields & V4L2_RDS_MS)
- printf("\nMS Flag: %s", (handle->ms)? "Music" : "Speech");
+ printf("\nMS Flag: %s", (handle->ms) ? "Music" : "Speech");
if (updated_fields & V4L2_RDS_ECC && handle->valid_fields & V4L2_RDS_ECC)
printf("\nECC: %X%x, Country: %u -> %s",
handle->ecc >> 4, handle->ecc & 0x0f, handle->pi >> 12,
@@ -691,7 +692,7 @@ static void print_rds_data(const struct v4l2_rds *handle, uint32_t updated_field
if (updated_fields & V4L2_RDS_ODA &&
handle->decode_information & V4L2_RDS_ODA) {
for (int i = 0; i < handle->rds_oda.size; ++i)
- printf("\nODA Group: %02u%c, AID: %08x",handle->rds_oda.oda[i].group_id,
+ printf("\nODA Group: %02u%c, AID: %08x", handle->rds_oda.oda[i].group_id,
handle->rds_oda.oda[i].group_version, handle->rds_oda.oda[i].aid);
}
if (updated_fields & V4L2_RDS_AF && handle->valid_fields & V4L2_RDS_AF)

Privacy Policy