aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-encoder.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-11-25 23:53:12 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:02 -0500
commit989eb154eafad00c3b5039a3eca03e108dac1df8 (patch)
tree1a2b0638f473c4d5877188f80bce0efbeee0ded9 /drivers/media/video/pvrusb2/pvrusb2-encoder.c
parent681c739944018d80dbcf7f19997eba97676c7116 (diff)
V4L/DVB (6692): pvrusb2: Centralize device specific attributes into a single place
The pvrusb2 driver currently supports two variants of the Hauppauge PVR USB2. However there are other hardware types potentially supportable, but the driver at the moment is not structured to make it easy to describe these minor variations. This changeset is the first set of changes to make such additional device support possible. Device attributes are held in several tables all contained within pvrusb2-devattr.c; all other device-specific driver behavior now derives from these tables. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-encoder.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-encoder.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index 5ca548cc7e7f..4271b4132664 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -370,13 +370,13 @@ static int pvr2_encoder_prep_config(struct pvr2_hdw *hdw)
370 370
371 /* This ENC_MISC(3,encMisc3Arg) command is critical - without 371 /* This ENC_MISC(3,encMisc3Arg) command is critical - without
372 it there will eventually be video corruption. Also, the 372 it there will eventually be video corruption. Also, the
373 29xxx case is strange - the Windows driver is passing 1 373 saa7115 case is strange - the Windows driver is passing 1
374 regardless of device type but if we have 1 for 29xxx device 374 regardless of device type but if we have 1 for saa7115
375 the video turns sluggish. */ 375 devices the video turns sluggish. */
376 switch (hdw->hdw_type) { 376 if (hdw->hdw_desc->flag_has_cx25840) {
377 case PVR2_HDW_TYPE_24XXX: encMisc3Arg = 1; break; 377 encMisc3Arg = 1;
378 case PVR2_HDW_TYPE_29XXX: encMisc3Arg = 0; break; 378 } else {
379 default: break; 379 encMisc3Arg = 0;
380 } 380 }
381 ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 3, 381 ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 3,
382 encMisc3Arg,0,0); 382 encMisc3Arg,0,0);
@@ -434,7 +434,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw)
434 434
435 /* saa7115: 0xf0 */ 435 /* saa7115: 0xf0 */
436 val = 0xf0; 436 val = 0xf0;
437 if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) { 437 if (hdw->hdw_desc->flag_has_cx25840) {
438 /* ivtv cx25840: 0x140 */ 438 /* ivtv cx25840: 0x140 */
439 val = 0x140; 439 val = 0x140;
440 } 440 }