diff options
author | Mike Isely <isely@pobox.com> | 2007-11-25 22:53:12 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2007-11-25 22:53:12 -0600 |
commit | 2446fc6debfd93e7b8b9cad4b22083994f686e59 (patch) | |
tree | fa19199cc5340b991b332af336dddd9e078cbf6c /linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c | |
parent | 1cd04c75ca99803aa0a1bd9b4952f2d61e72c4f4 (diff) | |
download | mediapointer-dvb-s2-2446fc6debfd93e7b8b9cad4b22083994f686e59.tar.gz mediapointer-dvb-s2-2446fc6debfd93e7b8b9cad4b22083994f686e59.tar.bz2 |
pvrusb2: Centralize device specific attributes into a single place.
From: Mike Isely <isely@pobox.com>
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>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c index f4394d610..4c52855e8 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c @@ -403,13 +403,13 @@ static int pvr2_encoder_prep_config(struct pvr2_hdw *hdw) /* This ENC_MISC(3,encMisc3Arg) command is critical - without it there will eventually be video corruption. Also, the - 29xxx case is strange - the Windows driver is passing 1 - regardless of device type but if we have 1 for 29xxx device - the video turns sluggish. */ - switch (hdw->hdw_type) { - case PVR2_HDW_TYPE_24XXX: encMisc3Arg = 1; break; - case PVR2_HDW_TYPE_29XXX: encMisc3Arg = 0; break; - default: break; + saa7115 case is strange - the Windows driver is passing 1 + regardless of device type but if we have 1 for saa7115 + devices the video turns sluggish. */ + if (hdw->hdw_desc->flag_has_cx25840) { + encMisc3Arg = 1; + } else { + encMisc3Arg = 0; } ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 3, encMisc3Arg,0,0); @@ -467,7 +467,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw) /* saa7115: 0xf0 */ val = 0xf0; - if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) { + if (hdw->hdw_desc->flag_has_cx25840) { /* ivtv cx25840: 0x140 */ val = 0x140; } |