[Intel-gfx] [PATCH] TV: add option to set TV connector type
Wang, Zhenyu Z
zhenyu.z.wang at intel.com
Fri Feb 20 01:36:45 CET 2009
On 2009.02.20 02:18:59 +0800, Dan Nicholson wrote:
> On Thu, Feb 19, 2009 at 12:58 AM, Zhenyu Wang <zhenyu.z.wang at intel.com> wrote:
> > This can let user override non-stable driver TV load detect,
> > and set connector type manually, e.g for s-video to component
> > converter, this patch seems must needed to use HD modes.
> > ---
> > man/intel.man | 6 ++++++
> > src/i830_tv.c | 22 ++++++++++++++++++++++
> > 2 files changed, 28 insertions(+), 0 deletions(-)
> >
> > diff --git a/man/intel.man b/man/intel.man
> > index c7a3c61..87ee443 100644
> > --- a/man/intel.man
> > +++ b/man/intel.man
> > @@ -278,6 +278,12 @@ Adjusting these properties allows you to control the placement of your TV output
> > .TP 2
> > This property allows you to control the output standard used on your TV output port. You can select between NTSC-M, NTSC-443, NTSC-J, PAL-M, PAL-N, and PAL.
> >
> > +.PP
> > +.B TV_Connector
> > +- connector type
> > +.TP 2
> > +This property allows you to control the TV output connector type, which bypass load detect. You can select between S-Video, Composite, Component.
>
> Maybe I'm being ignorant, but you have TV_Connector in the man page,
> but the code checks for "TV Connector".
yeah, xf86nameCompare ignores ' ' and '_', I copied TV Format lines but we should be consistent.
>
> > .SS "TMDS-1"
> > First DVI SDVO output
> >
> > diff --git a/src/i830_tv.c b/src/i830_tv.c
> > index 210070c..13a072a 100644
> > --- a/src/i830_tv.c
> > +++ b/src/i830_tv.c
> > @@ -56,6 +56,7 @@ enum tv_margin {
> > /** Private structure for the integrated TV support */
> > struct i830_tv_priv {
> > int type;
> > + Bool force_type;
> > char *tv_format;
> > int margin[4];
> > uint32_t save_TV_H_CTL_1;
> > @@ -1371,6 +1372,9 @@ i830_tv_detect(xf86OutputPtr output)
> > int dpms_mode;
> > int type = dev_priv->type;
> >
> > + if (dev_priv->force_type)
> > + return XF86OutputStatusConnected;
> > +
> > mode = reported_modes[0];
> > xf86SetModeCrtc (&mode, INTERLACE_HALVE_V);
> > crtc = i830GetLoadDetectPipe (output, &mode, &dpms_mode);
> > @@ -1743,6 +1747,7 @@ i830_tv_init(ScrnInfoPtr pScrn)
> > uint32_t tv_dac_on, tv_dac_off, save_tv_dac;
> > XF86OptionPtr mon_option_lst = NULL;
> > char *tv_format = NULL;
> > + char *tv_type = NULL;
> >
> > if (pI830->quirk_flag & QUIRK_IGNORE_TV)
> > return;
> > @@ -1816,6 +1821,23 @@ i830_tv_init(ScrnInfoPtr pScrn)
> > else
> > dev_priv->tv_format = xstrdup (tv_modes[0].name);
> >
> > + tv_type = xf86findOptionValue (mon_option_lst, "TV Connector");
> > + if (tv_type) {
> > + dev_priv->force_type = TRUE;
> > + if (strcmp(tv_type, "S-Video") == 0)
> > + dev_priv->type = TV_TYPE_SVIDEO;
> > + else if (strcmp(tv_type, "Composite") == 0)
> > + dev_priv->type = TV_TYPE_COMPOSITE;
> > + else if (strcmp(tv_type, "Component") == 0)
> > + dev_priv->type = TV_TYPE_COMPONENT;
>
> Maybe use strcasecmp so "s-video" and "component" work?
>
ok, if people really hate to input capitals. ;)
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090220/d4ad3026/attachment.sig>
More information about the Intel-gfx
mailing list