aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-rds-gen.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-09 13:00:54 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-09 13:00:54 -0400
commita66d05d504a24894a8fdf11e4569752f313e5764 (patch)
tree2bb40c1f6c301b231d7aeaad08c190aa5a82ba1f /drivers/media/platform/vivid/vivid-rds-gen.h
parentbfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff)
parent5563caaf8b8cd22e35997d5d74cb3609df86b223 (diff)
Merge branch 'patchwork' into v4l_for_linus
* patchwork: (544 commits) [media] ir-hix5hd2: fix build on c6x arch [media] pt3: fix DTV FE I2C driver load error paths Revert "[media] media: em28xx - remove reset_resume interface" [media] exynos4-is: fix some warnings when compiling on arm64 [media] usb drivers: use %zu instead of %zd [media] pci drivers: use %zu instead of %zd [media] dvb-frontends: use %zu instead of %zd [media] s5p-mfc: Fix several printk warnings [media] s5p_mfc_opr: Fix warnings [media] ti-vpe: Fix typecast [media] s3c-camif: fix dma_addr_t printks [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 [media] em28xx: Fix identation [media] drxd: remove a dead code [media] saa7146: remove return after BUG() [media] cx88: remove return after BUG() [media] cx88: fix cards table CodingStyle [media] radio-sf16fmr2: declare some structs as static [media] radio-sf16fmi: declare pnp_attached as static ... Conflicts: Documentation/DocBook/media/v4l/compat.xml
Diffstat (limited to 'drivers/media/platform/vivid/vivid-rds-gen.h')
-rw-r--r--drivers/media/platform/vivid/vivid-rds-gen.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-rds-gen.h b/drivers/media/platform/vivid/vivid-rds-gen.h
new file mode 100644
index 000000000000..eff4bf552ed3
--- /dev/null
+++ b/drivers/media/platform/vivid/vivid-rds-gen.h
@@ -0,0 +1,53 @@
1/*
2 * vivid-rds-gen.h - rds (radio data system) generator support functions.
3 *
4 * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
5 *
6 * This program is free software; you may redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
11 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
14 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
15 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
16 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17 * SOFTWARE.
18 */
19
20#ifndef _VIVID_RDS_GEN_H_
21#define _VIVID_RDS_GEN_H_
22
23/*
24 * It takes almost exactly 5 seconds to transmit 57 RDS groups.
25 * Each group has 4 blocks and each block has a payload of 16 bits + a
26 * block identification. The driver will generate the contents of these
27 * 57 groups only when necessary and it will just be played continuously.
28 */
29#define VIVID_RDS_GEN_GROUPS 57
30#define VIVID_RDS_GEN_BLKS_PER_GRP 4
31#define VIVID_RDS_GEN_BLOCKS (VIVID_RDS_GEN_BLKS_PER_GRP * VIVID_RDS_GEN_GROUPS)
32
33struct vivid_rds_gen {
34 struct v4l2_rds_data data[VIVID_RDS_GEN_BLOCKS];
35 bool use_rbds;
36 u16 picode;
37 u8 pty;
38 bool mono_stereo;
39 bool art_head;
40 bool compressed;
41 bool dyn_pty;
42 bool ta;
43 bool tp;
44 bool ms;
45 char psname[8 + 1];
46 char radiotext[64 + 1];
47};
48
49void vivid_rds_gen_fill(struct vivid_rds_gen *rds, unsigned freq,
50 bool use_alternate);
51void vivid_rds_generate(struct vivid_rds_gen *rds);
52
53#endif