// SPDX-License-Identifier: GPL-2.0-only /* * vivid-rds-gen.c - rds (radio data system) generator support functions. * * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
/* * This RDS generator creates 57 RDS groups (one group == four RDS blocks). * Groups 0-3, 22-25 and 44-47 (spaced 22 groups apart) are filled with a * standard 0B group containing the PI code and PS name. * * Groups 4-19 and 26-41 use group 2A for the radio text. * * Group 56 contains the time (group 4A). * * All remaining groups use a filler group 15B block that just repeats * the PI and PTY codes.
*/ void vivid_rds_generate(struct vivid_rds_gen *rds)
{ struct v4l2_rds_data *data = rds->data; unsigned grp; unsigned idx; struct tm tm; unsigned date; unsigned time; int l;
void vivid_rds_gen_fill(struct vivid_rds_gen *rds, unsigned freq, bool alt)
{ /* Alternate PTY between Info and Weather */ if (rds->use_rbds) {
rds->picode = 0x2e75; /* 'KLNX' call sign */
rds->pty = alt ? 29 : 2;
} else {
rds->picode = 0x8088;
rds->pty = alt ? 16 : 3;
}
rds->mono_stereo = true;
rds->art_head = false;
rds->compressed = false;
rds->dyn_pty = false;
rds->tp = true;
rds->ta = alt;
rds->ms = true;
snprintf(rds->psname, sizeof(rds->psname), "%6d.%1d",
(freq / 16) % 1000000, (((freq & 0xf) * 10) / 16) % 10); if (alt)
strscpy(rds->radiotext, " The Radio Data System can switch between different Radio Texts ", sizeof(rds->radiotext)); else
strscpy(rds->radiotext, "An example of Radio Text as transmitted by the Radio Data System", sizeof(rds->radiotext));
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.