WIP FPC-III support
[linux/fpc-iii.git] / drivers / media / test-drivers / vivid / vivid-rds-gen.h
blob35ac5742302bc5879dbdf4d7256396cc55fb1180
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * vivid-rds-gen.h - rds (radio data system) generator support functions.
5 * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
6 */
8 #ifndef _VIVID_RDS_GEN_H_
9 #define _VIVID_RDS_GEN_H_
12 * It takes almost exactly 5 seconds to transmit 57 RDS groups.
13 * Each group has 4 blocks and each block has a payload of 16 bits + a
14 * block identification. The driver will generate the contents of these
15 * 57 groups only when necessary and it will just be played continuously.
17 #define VIVID_RDS_GEN_GROUPS 57
18 #define VIVID_RDS_GEN_BLKS_PER_GRP 4
19 #define VIVID_RDS_GEN_BLOCKS (VIVID_RDS_GEN_BLKS_PER_GRP * VIVID_RDS_GEN_GROUPS)
20 #define VIVID_RDS_NSEC_PER_BLK (u32)(5ull * NSEC_PER_SEC / VIVID_RDS_GEN_BLOCKS)
22 struct vivid_rds_gen {
23 struct v4l2_rds_data data[VIVID_RDS_GEN_BLOCKS];
24 bool use_rbds;
25 u16 picode;
26 u8 pty;
27 bool mono_stereo;
28 bool art_head;
29 bool compressed;
30 bool dyn_pty;
31 bool ta;
32 bool tp;
33 bool ms;
34 char psname[8 + 1];
35 char radiotext[64 + 1];
38 void vivid_rds_gen_fill(struct vivid_rds_gen *rds, unsigned freq,
39 bool use_alternate);
40 void vivid_rds_generate(struct vivid_rds_gen *rds);
42 #endif