diff options
Diffstat (limited to 'drivers/media/video/cx25840/cx25840.h')
-rw-r--r-- | drivers/media/video/cx25840/cx25840.h | 63 |
1 files changed, 45 insertions, 18 deletions
diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index 4731a19092a6..3dc67e79c856 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h | |||
@@ -39,32 +39,58 @@ extern int cx25840_debug; | |||
39 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ | 39 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ |
40 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 40 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
41 | 41 | ||
42 | #define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0) | 42 | /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is |
43 | 43 | present in Hauppauge PVR-150 (and possibly PVR-500) cards that have | |
44 | /* The CARDTYPE_PVR150_WORKAROUND cardtype activates a workaround for a | 44 | certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The |
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 | 45 | 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 | 46 | is to select the audio standard explicitly. Many thanks to Hauppauge for |
49 | providing this information. */ | 47 | providing this information. */ |
50 | enum cx25840_cardtype { | 48 | #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) |
51 | CARDTYPE_PVR150, | 49 | |
52 | CARDTYPE_PG600, | 50 | enum cx25840_video_input { |
53 | CARDTYPE_PVR150_WORKAROUND, | 51 | /* Composite video inputs In1-In8 */ |
52 | CX25840_COMPOSITE1 = 1, | ||
53 | CX25840_COMPOSITE2, | ||
54 | CX25840_COMPOSITE3, | ||
55 | CX25840_COMPOSITE4, | ||
56 | CX25840_COMPOSITE5, | ||
57 | CX25840_COMPOSITE6, | ||
58 | CX25840_COMPOSITE7, | ||
59 | CX25840_COMPOSITE8, | ||
60 | |||
61 | /* S-Video inputs consist of one luma input (In1-In4) ORed with one | ||
62 | chroma input (In5-In8) */ | ||
63 | CX25840_SVIDEO_LUMA1 = 0x10, | ||
64 | CX25840_SVIDEO_LUMA2 = 0x20, | ||
65 | CX25840_SVIDEO_LUMA3 = 0x30, | ||
66 | CX25840_SVIDEO_LUMA4 = 0x40, | ||
67 | CX25840_SVIDEO_CHROMA4 = 0x400, | ||
68 | CX25840_SVIDEO_CHROMA5 = 0x500, | ||
69 | CX25840_SVIDEO_CHROMA6 = 0x600, | ||
70 | CX25840_SVIDEO_CHROMA7 = 0x700, | ||
71 | CX25840_SVIDEO_CHROMA8 = 0x800, | ||
72 | |||
73 | /* S-Video aliases for common luma/chroma combinations */ | ||
74 | CX25840_SVIDEO1 = 0x510, | ||
75 | CX25840_SVIDEO2 = 0x620, | ||
76 | CX25840_SVIDEO3 = 0x730, | ||
77 | CX25840_SVIDEO4 = 0x840, | ||
54 | }; | 78 | }; |
55 | 79 | ||
56 | enum cx25840_input { | 80 | enum cx25840_audio_input { |
57 | CX25840_TUNER, | 81 | /* Audio inputs: serial or In4-In8 */ |
58 | CX25840_COMPOSITE0, | 82 | CX25840_AUDIO_SERIAL, |
59 | CX25840_COMPOSITE1, | 83 | CX25840_AUDIO4 = 4, |
60 | CX25840_SVIDEO0, | 84 | CX25840_AUDIO5, |
61 | CX25840_SVIDEO1 | 85 | CX25840_AUDIO6, |
86 | CX25840_AUDIO7, | ||
87 | CX25840_AUDIO8, | ||
62 | }; | 88 | }; |
63 | 89 | ||
64 | struct cx25840_state { | 90 | struct cx25840_state { |
65 | enum cx25840_cardtype cardtype; | 91 | int pvr150_workaround; |
66 | enum cx25840_input input; | 92 | enum cx25840_video_input vid_input; |
67 | int audio_input; | 93 | enum cx25840_audio_input aud_input; |
68 | u32 audclk_freq; | 94 | u32 audclk_freq; |
69 | }; | 95 | }; |
70 | 96 | ||
@@ -84,6 +110,7 @@ int cx25840_loadfw(struct i2c_client *client); | |||
84 | /* ----------------------------------------------------------------------- */ | 110 | /* ----------------------------------------------------------------------- */ |
85 | /* cx25850-audio.c */ | 111 | /* cx25850-audio.c */ |
86 | int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg); | 112 | int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg); |
113 | void cx25840_audio_set_path(struct i2c_client *client); | ||
87 | 114 | ||
88 | /* ----------------------------------------------------------------------- */ | 115 | /* ----------------------------------------------------------------------- */ |
89 | /* cx25850-vbi.c */ | 116 | /* cx25850-vbi.c */ |