aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88.h
diff options
context:
space:
mode:
authorlawrence rust <lawrence@softsystem.co.uk>2010-08-23 06:49:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:04:49 -0400
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 33d161a11725..d9554090eb6f 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -281,6 +281,20 @@ struct cx88_subid {
281 u32 card; 281 u32 card;
282}; 282};
283 283
284enum cx88_tvaudio {
285 WW_NONE = 1,
286 WW_BTSC,
287 WW_BG,
288 WW_DK,
289 WW_I,
290 WW_L,
291 WW_EIAJ,
292 WW_I2SPT,
293 WW_FM,
294 WW_I2SADC,
295 WW_M
296};
297
284#define INPUT(nr) (core->board.input[nr]) 298#define INPUT(nr) (core->board.input[nr])
285 299
286/* ----------------------------------------------------------- */ 300/* ----------------------------------------------------------- */
@@ -352,7 +366,7 @@ struct cx88_core {
352 /* state info */ 366 /* state info */
353 struct task_struct *kthread; 367 struct task_struct *kthread;
354 v4l2_std_id tvnorm; 368 v4l2_std_id tvnorm;
355 u32 tvaudio; 369 enum cx88_tvaudio tvaudio;
356 u32 audiomode_manual; 370 u32 audiomode_manual;
357 u32 audiomode_current; 371 u32 audiomode_current;
358 u32 input; 372 u32 input;
@@ -651,18 +665,6 @@ extern void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl);
651/* ----------------------------------------------------------- */ 665/* ----------------------------------------------------------- */
652/* cx88-tvaudio.c */ 666/* cx88-tvaudio.c */
653 667
654#define WW_NONE 1
655#define WW_BTSC 2
656#define WW_BG 3
657#define WW_DK 4
658#define WW_I 5
659#define WW_L 6
660#define WW_EIAJ 7
661#define WW_I2SPT 8
662#define WW_FM 9
663#define WW_I2SADC 10
664#define WW_M 11
665
666void cx88_set_tvaudio(struct cx88_core *core); 668void cx88_set_tvaudio(struct cx88_core *core);
667void cx88_newstation(struct cx88_core *core); 669void cx88_newstation(struct cx88_core *core);
668void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t); 670void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t);