From 3578d3dd0b1e468a44a76a83efe90476a854625d Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 9 Jan 2006 15:25:41 -0200 Subject: V4L/DVB (3214): Calculate the saa7115 AMCLK regs instead of using fixed values - Calculate the audio master clock registers from the actual frequencies. This simplifies the code and it also prepares for adding CGC2 support. - VIDIOC_INT_AUDIO_CLOCK_FREQ now receives an u32 instead of an enum. It is more generic and actually easier to implement. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/video/cx25840/cx25840.h') diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index 40aa59f..4731a19 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h @@ -65,7 +65,7 @@ struct cx25840_state { enum cx25840_cardtype cardtype; enum cx25840_input input; int audio_input; - enum v4l2_audio_clock_freq audclk_freq; + u32 audclk_freq; }; /* ----------------------------------------------------------------------- */ -- cgit v1.1 From a8bbf12ad8a8ad532cea0b67f0127ad90d336b04 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 9 Jan 2006 15:25:42 -0200 Subject: V4L/DVB (3249): Generalized cx25840 video/audio input handling - Added VIDIOC_S_AUDIO to set the audio inputs separately. - Removed AUDC_SET_INPUT. - Made the video inputs much more general. - Removed cardtype CID and replaced with a CID to enable the PVR150 workaround. The cardtype is no longer necessary with the general video input change. - Update VIDIOC_LOG_STATUS output to show the video and audio inputs separately. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840.h | 63 +++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 18 deletions(-) (limited to 'drivers/media/video/cx25840/cx25840.h') diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index 4731a19..3dc67e7 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h @@ -39,32 +39,58 @@ extern int cx25840_debug; printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) -#define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0) - -/* The CARDTYPE_PVR150_WORKAROUND cardtype activates a workaround for a - hardware bug that is present in PVR150 (and possible PVR500) cards that - have certain NTSC tuners (tveeprom model numbers 85, 99 and 112). The +/* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is + present in Hauppauge PVR-150 (and possibly PVR-500) cards that have + certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The audio autodetect fails on some channels for these models and the workaround is to select the audio standard explicitly. Many thanks to Hauppauge for providing this information. */ -enum cx25840_cardtype { - CARDTYPE_PVR150, - CARDTYPE_PG600, - CARDTYPE_PVR150_WORKAROUND, +#define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) + +enum cx25840_video_input { + /* Composite video inputs In1-In8 */ + CX25840_COMPOSITE1 = 1, + CX25840_COMPOSITE2, + CX25840_COMPOSITE3, + CX25840_COMPOSITE4, + CX25840_COMPOSITE5, + CX25840_COMPOSITE6, + CX25840_COMPOSITE7, + CX25840_COMPOSITE8, + + /* S-Video inputs consist of one luma input (In1-In4) ORed with one + chroma input (In5-In8) */ + CX25840_SVIDEO_LUMA1 = 0x10, + CX25840_SVIDEO_LUMA2 = 0x20, + CX25840_SVIDEO_LUMA3 = 0x30, + CX25840_SVIDEO_LUMA4 = 0x40, + CX25840_SVIDEO_CHROMA4 = 0x400, + CX25840_SVIDEO_CHROMA5 = 0x500, + CX25840_SVIDEO_CHROMA6 = 0x600, + CX25840_SVIDEO_CHROMA7 = 0x700, + CX25840_SVIDEO_CHROMA8 = 0x800, + + /* S-Video aliases for common luma/chroma combinations */ + CX25840_SVIDEO1 = 0x510, + CX25840_SVIDEO2 = 0x620, + CX25840_SVIDEO3 = 0x730, + CX25840_SVIDEO4 = 0x840, }; -enum cx25840_input { - CX25840_TUNER, - CX25840_COMPOSITE0, - CX25840_COMPOSITE1, - CX25840_SVIDEO0, - CX25840_SVIDEO1 +enum cx25840_audio_input { + /* Audio inputs: serial or In4-In8 */ + CX25840_AUDIO_SERIAL, + CX25840_AUDIO4 = 4, + CX25840_AUDIO5, + CX25840_AUDIO6, + CX25840_AUDIO7, + CX25840_AUDIO8, }; struct cx25840_state { - enum cx25840_cardtype cardtype; - enum cx25840_input input; - int audio_input; + int pvr150_workaround; + enum cx25840_video_input vid_input; + enum cx25840_audio_input aud_input; u32 audclk_freq; }; @@ -84,6 +110,7 @@ int cx25840_loadfw(struct i2c_client *client); /* ----------------------------------------------------------------------- */ /* cx25850-audio.c */ int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg); +void cx25840_audio_set_path(struct i2c_client *client); /* ----------------------------------------------------------------------- */ /* cx25850-vbi.c */ -- cgit v1.1 From 3faeeae48348959c58f3121d2a6a4fb0bc626da0 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 9 Jan 2006 15:25:44 -0200 Subject: V4L/DVB (3256): When in radio mode ignore VIDIOC_G_TUNER - Detect when AUDC_SET_RADIO is called. - When in radio mode ignore VIDIOC_G_TUNER. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/video/cx25840/cx25840.h') diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index 3dc67e7..dc58d42 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h @@ -89,6 +89,7 @@ enum cx25840_audio_input { struct cx25840_state { int pvr150_workaround; + int radio; enum cx25840_video_input vid_input; enum cx25840_audio_input aud_input; u32 audclk_freq; -- cgit v1.1 From fac9e89999a12f378112fe93764b30196bc03f46 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 9 Jan 2006 15:32:40 -0200 Subject: V4L/DVB (3278): convert diagnostics over to the new v4l2-common.h macros. - Convert diagnostics over to the new v4l2-common.h macros. - deprecated tuner_debug option, the new option is debug. - renamed cx25840_debug to debug. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'drivers/media/video/cx25840/cx25840.h') diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index dc58d42..4260c3f 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h @@ -20,25 +20,9 @@ #ifndef _CX25840_H_ #define _CX25840_H_ - #include #include -extern int cx25840_debug; - -#define cx25840_dbg(fmt, arg...) do { if (cx25840_debug) \ - printk(KERN_INFO "%s debug %d-%04x: " fmt, \ - client->driver->driver.name, \ - i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) - -#define cx25840_err(fmt, arg...) do { \ - printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ - i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) - -#define cx25840_info(fmt, arg...) do { \ - printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ - i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) - /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is present in Hauppauge PVR-150 (and possibly PVR-500) cards that have certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The -- cgit v1.1 From cab462f716cdd522edc71436482d8734e8258489 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 9 Jan 2006 15:53:26 -0200 Subject: V4L/DVB (3307): Some cleanups at I2C modules - i2c names shorten - removed obsoleted flags on newer modules - small cleanups Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/video/cx25840/cx25840.h') diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index 4260c3f..fd22f30 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h @@ -20,6 +20,7 @@ #ifndef _CX25840_H_ #define _CX25840_H_ + #include #include -- cgit v1.1