diff options
Diffstat (limited to 'drivers/media/video/cx25840/cx25840.h')
-rw-r--r-- | drivers/media/video/cx25840/cx25840.h | 81 |
1 files changed, 47 insertions, 34 deletions
diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index 40aa59f9c525..fd22f30dcc1b 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h | |||
@@ -24,48 +24,60 @@ | |||
24 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | 26 | ||
27 | extern int cx25840_debug; | 27 | /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is |
28 | 28 | present in Hauppauge PVR-150 (and possibly PVR-500) cards that have | |
29 | #define cx25840_dbg(fmt, arg...) do { if (cx25840_debug) \ | 29 | certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The |
30 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ | ||
31 | client->driver->driver.name, \ | ||
32 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | ||
33 | |||
34 | #define cx25840_err(fmt, arg...) do { \ | ||
35 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ | ||
36 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | ||
37 | |||
38 | #define cx25840_info(fmt, arg...) do { \ | ||
39 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ | ||
40 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | ||
41 | |||
42 | #define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0) | ||
43 | |||
44 | /* The CARDTYPE_PVR150_WORKAROUND cardtype activates a workaround for a | ||
45 | hardware bug that is present in PVR150 (and possible PVR500) cards that | ||
46 | have certain NTSC tuners (tveeprom model numbers 85, 99 and 112). The | ||
47 | audio autodetect fails on some channels for these models and the workaround | 30 | audio autodetect fails on some channels for these models and the workaround |
48 | is to select the audio standard explicitly. Many thanks to Hauppauge for | 31 | is to select the audio standard explicitly. Many thanks to Hauppauge for |
49 | providing this information. */ | 32 | providing this information. */ |
50 | enum cx25840_cardtype { | 33 | #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) |
51 | CARDTYPE_PVR150, | 34 | |
52 | CARDTYPE_PG600, | 35 | enum cx25840_video_input { |
53 | CARDTYPE_PVR150_WORKAROUND, | 36 | /* Composite video inputs In1-In8 */ |
37 | CX25840_COMPOSITE1 = 1, | ||
38 | CX25840_COMPOSITE2, | ||
39 | CX25840_COMPOSITE3, | ||
40 | CX25840_COMPOSITE4, | ||
41 | CX25840_COMPOSITE5, | ||
42 | CX25840_COMPOSITE6, | ||
43 | CX25840_COMPOSITE7, | ||
44 | CX25840_COMPOSITE8, | ||
45 | |||
46 | /* S-Video inputs consist of one luma input (In1-In4) ORed with one | ||
47 | chroma input (In5-In8) */ | ||
48 | CX25840_SVIDEO_LUMA1 = 0x10, | ||
49 | CX25840_SVIDEO_LUMA2 = 0x20, | ||
50 | CX25840_SVIDEO_LUMA3 = 0x30, | ||
51 | CX25840_SVIDEO_LUMA4 = 0x40, | ||
52 | CX25840_SVIDEO_CHROMA4 = 0x400, | ||
53 | CX25840_SVIDEO_CHROMA5 = 0x500, | ||
54 | CX25840_SVIDEO_CHROMA6 = 0x600, | ||
55 | CX25840_SVIDEO_CHROMA7 = 0x700, | ||
56 | CX25840_SVIDEO_CHROMA8 = 0x800, | ||
57 | |||
58 | /* S-Video aliases for common luma/chroma combinations */ | ||
59 | CX25840_SVIDEO1 = 0x510, | ||
60 | CX25840_SVIDEO2 = 0x620, | ||
61 | CX25840_SVIDEO3 = 0x730, | ||
62 | CX25840_SVIDEO4 = 0x840, | ||
54 | }; | 63 | }; |
55 | 64 | ||
56 | enum cx25840_input { | 65 | enum cx25840_audio_input { |
57 | CX25840_TUNER, | 66 | /* Audio inputs: serial or In4-In8 */ |
58 | CX25840_COMPOSITE0, | 67 | CX25840_AUDIO_SERIAL, |
59 | CX25840_COMPOSITE1, | 68 | CX25840_AUDIO4 = 4, |
60 | CX25840_SVIDEO0, | 69 | CX25840_AUDIO5, |
61 | CX25840_SVIDEO1 | 70 | CX25840_AUDIO6, |
71 | CX25840_AUDIO7, | ||
72 | CX25840_AUDIO8, | ||
62 | }; | 73 | }; |
63 | 74 | ||
64 | struct cx25840_state { | 75 | struct cx25840_state { |
65 | enum cx25840_cardtype cardtype; | 76 | int pvr150_workaround; |
66 | enum cx25840_input input; | 77 | int radio; |
67 | int audio_input; | 78 | enum cx25840_video_input vid_input; |
68 | enum v4l2_audio_clock_freq audclk_freq; | 79 | enum cx25840_audio_input aud_input; |
80 | u32 audclk_freq; | ||
69 | }; | 81 | }; |
70 | 82 | ||
71 | /* ----------------------------------------------------------------------- */ | 83 | /* ----------------------------------------------------------------------- */ |
@@ -84,6 +96,7 @@ int cx25840_loadfw(struct i2c_client *client); | |||
84 | /* ----------------------------------------------------------------------- */ | 96 | /* ----------------------------------------------------------------------- */ |
85 | /* cx25850-audio.c */ | 97 | /* cx25850-audio.c */ |
86 | int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg); | 98 | int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg); |
99 | void cx25840_audio_set_path(struct i2c_client *client); | ||
87 | 100 | ||
88 | /* ----------------------------------------------------------------------- */ | 101 | /* ----------------------------------------------------------------------- */ |
89 | /* cx25850-vbi.c */ | 102 | /* cx25850-vbi.c */ |