summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88.h
diff options
context:
space:
mode:
authorlawrence rust <lawrence@softsystem.co.uk>2010-08-23 07:49:58 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 01:04:49 -0200
commitd06b49ed18736d32530067e2cad5a18d3482a2b9 (patch)
treec3fb0784e85c04199bdae96b632c1443da2a0c9c /drivers/media/video/cx88/cx88.h
parent3053814c1cbedb9d2802240f414588009706c74d (diff)
V4L/DVB: cx88: convert core->tvaudio into an enum
Using an enum and removing the default case from switch statements accessing the value enables the compiler to emit a warning (enabled with -Wall) when an audio mode is not handled. This highlights an omission in the function cx88_dsp_detect_stereo_sap() (in cx88-dsp.c) not handling WW_EIAJ and WW_M. Signed-off-by: Lawrence Rust <lawrence@softsystem.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88.h')
-rw-r--r--drivers/media/video/cx88/cx88.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 33d161a1172..d9554090eb6 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -281,6 +281,20 @@ struct cx88_subid {
u32 card;
};
+enum cx88_tvaudio {
+ WW_NONE = 1,
+ WW_BTSC,
+ WW_BG,
+ WW_DK,
+ WW_I,
+ WW_L,
+ WW_EIAJ,
+ WW_I2SPT,
+ WW_FM,
+ WW_I2SADC,
+ WW_M
+};
+
#define INPUT(nr) (core->board.input[nr])
/* ----------------------------------------------------------- */
@@ -352,7 +366,7 @@ struct cx88_core {
/* state info */
struct task_struct *kthread;
v4l2_std_id tvnorm;
- u32 tvaudio;
+ enum cx88_tvaudio tvaudio;
u32 audiomode_manual;
u32 audiomode_current;
u32 input;
@@ -651,18 +665,6 @@ extern void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl);
/* ----------------------------------------------------------- */
/* cx88-tvaudio.c */
-#define WW_NONE 1
-#define WW_BTSC 2
-#define WW_BG 3
-#define WW_DK 4
-#define WW_I 5
-#define WW_L 6
-#define WW_EIAJ 7
-#define WW_I2SPT 8
-#define WW_FM 9
-#define WW_I2SADC 10
-#define WW_M 11
-
void cx88_set_tvaudio(struct cx88_core *core);
void cx88_newstation(struct cx88_core *core);
void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t);