// SPDX-License-Identifier: GPL-2.0-or-later /* * saa7127 - Philips SAA7127/SAA7129 video encoder driver * * Copyright (C) 2003 Roy Bulter <rbulter@hetnet.nl> * * Based on SAA7126 video encoder driver by Gillem & Andreas Oberritter * * Copyright (C) 2000-2001 Gillem <htoa@gmx.net> * Copyright (C) 2002 Andreas Oberritter <obi@saftware.de> * * Based on Stadis 4:2:2 MPEG-2 Decoder Driver by Nathan Laredo * * Copyright (C) 1999 Nathan Laredo <laredo@gnu.org> * * This driver is designed for the Hauppauge 250/350 Linux driver * from the ivtv Project * * Copyright (C) 2003 Kevin Thayer <nufan_wfk@yahoo.com> * * Dual output support: * Copyright (C) 2004 Eric Varsanyi * * NTSC Tuning and 7.5 IRE Setup * Copyright (C) 2004 Chris Kennedy <c@groovy.org> * * VBI additions & cleanup: * Copyright (C) 2004, 2005 Hans Verkuil <hverkuil@xs4all.nl> * * Note: the saa7126 is identical to the saa7127, and the saa7128 is * identical to the saa7129, except that the saa7126 and saa7128 have * macrovision anti-taping support. This driver will almost certainly * work fine for those chips, except of course for the missing anti-taping * support.
*/
static
MODULEDESCRIPTION" /9 video encoder driver")java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
MODULE_DESCRIPTION(
(Kevin java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
MODULE_LICENSE
0
module_param(test_imagejava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
(,0;
MODULE_PARM_DESC0
/* * SAA7127 registers
*/
#define SAA7127_REG_STATUS 0x00 #define SAA7127_REG_WIDESCREEN_CONFIG 0x26 #define SAA7127_REG_WIDESCREEN_ENABLE 0x27 #define SAA7127_REG_BURST_START 0x28 #define SAA7127_REG_BURST_END 0x29
define0java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 # #define java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 #define SAA7127_REG_OUTPUT_PORT_CONTROL 0x2d #efine x38 #define SAA7127_REG_GAIN_COLORDIFF_RGB 0x39 #defineSAA7127_REG_INPUT_PORT_CONTROL_10 #define SAA7129_REG_FADE_KEY_COL2 0java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 #define# x71
define #define SAA7127_REG_GAINV 0x5c #define SAA7127_REG_BLACK_LEVEL 0x5d #define SAA7127_REG_BLANKING_LEVEL 0#efineSAA7127_REG_TTX_ODD_REQ_VERT_END0x77 #define SAA7127_REG_VBI_BLANKING 0x5f #define SAA7127_REG_DAC_CONTROL 0x61define x7a #define SAA7127_REG_BURST_AMP 0x62
0x63 #define SAA7127_REG_SUBC2 0x64 #define SAA7127_REG_SUBC1 0x65 #define SAA7127_REG_SUBC00x66 #define SAA7127_REG_LINE_21_ODD_0 0x67 #define SAA7127_REG_LINE_21_ODD_1 0x68
0x69 #define SAA7127_REG_LINE_21_EVEN_1 0x6a #define SAA7127_REG_RCV_PORT_CONTROL 0x6b #define * *********java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #define; consti2c_reg_value[]= #define SAA7127_REG_CLOSED_CAPTION 0 , x38
define0 #define SAA7127_REG_RCV2_OUTPUT_END 0x71 # SAA7127_REG_RCV2_OUTPUT_MSBS #define SAA7127_REG_TTX_REQUEST_H_START 0x73 # SAA7127_REG_TTX_REQUEST_H_DELAY_LENGTH
SAA7127_REG_CSYNC_ADVANCE_VSYNC_SHIFT #define SAA7127_REG_TTX_ODD_REQ_VERT_START , 0 }java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 #{, xbf
SAA7127_REG_GAIN_LUMINANCE_RGB , # x79
define
java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 #define{, , #define #define x7f
***************************
*Arrays the
*
** SAA7127_REG_TTX_ODD_REQ_VERT_END }
/
staticconststruct i2c_reg_value const [ java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
{ SAA7127_REG_BLACK_LEVEL x39
{,00,
{ SAA7127_REG_COPYGEN_0, 0x77 },
{, x41
, x15
, xbf
{, x00
, x00
{, x80/* for color bars */
, x90
{, x11,
{, 0 }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{, x12 /* BURST_END is also used as a chip ID in saa7127_probe */
{, 0 ,
{ SAA7127_REG_RCV2_OUTPUT_START, 0x41 },
, xc3
, 00}java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
, 0 }
,xb8
{SAA7127_REG_CSYNC_ADVANCE_VSYNC_SHIFT ,
{ SAA7127_REG_TTX_ODD_REQ_VERT_START, 0x15 , x09
{, x16
{, 0 }
{ ,0}
{ SAA7127_REG_FIRST_ACTIVE, 0x1a },
{ , x },
{ java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
{ }
}
};
{, x81
g_value[ java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
, x19 /* BURST_END is also used as a chip ID in saa7127_probe */
, x1d
{ , 0 }
{, 0x90}java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{ java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
{ SAA7127_REG_BLACK_LEVEL, 0x39 },
{ SAA7127_REG_BLANKING_LEVEL *
{ SAA7127_REG_VBI_BLANKING, 0x2e
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ SAA7129
{ SAA7127_REG_SUBC3
{ SAA7127_REG_SUBC2, 0 },
{ struct sd
{ SAA7127_REG_SUBC0 std
{ enum ident
saa7127_input_type ;
{ 0 enum output_type
};
#wss_enable;
u16 w
{ cc_enable /* BURST_END is also used as a chip ID in saa7127_probe */;
{ SAA7127_REG_BURST_ENDu16;
{ SAA7127_REG_CHROMA_PHASE vps_enable;
{ SAA7127_REG_GAINU vps_data;
{ SAA7127_REG_GAINV reg_2d
{SAA7127_REG_BLACK_LEVEL
G_BLANKING_LEVEL x35
u reg_61;
{java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 2
{ SAA7127_REG_BURST_AMP, 0x2f },
{
{ SAA7127_REG_SUBC2, 0x8a },
{ SAA7127_REG_SUBC1, 0x09 },
{ SAA7127_REG_SUBC0 0x2a
{ SAA7127_REG_MULTI
{ SAA7127_REG_CLOSED_CAPTION, 0x00 staticconst *const[]
};
/* ********************************************************************** * * Encoder Struct, holds the configuration state of the encoder * **********************************************************************
*/
enum java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct* =();
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
};
struct
java.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
v4l2_std_id std; enum saa712x_model ident; enum saa7127_input_type input_type; enum saa7127_output_type output_type; int i2c_client* = (sd int ijava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
u16 wss_mode; int ((client, ) =0
u16 cc_data 0 int
u16v4l2_err(,I2CProblemn"; int vps_enable;
u8 vps_data[5];
u8 reg_2d;
u8return1
u8 reg_3a_cb;
u8 reg_61
java.lang.StringIndexOutOfBoundsException: Range [77, 2) out of bounds for length 2
staticinlinestructstruct *egs
{ return container_of(sd, struct saa7127_state, sd);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static
{ "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "Composite", " struct state=to_state(sd); "RGB", "YUV C", "YUV V"
;
static f( && data- ! 0| >line 1) "invalid"java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 "letterbox 14:9 (1 , sd, TurnVPS Signal %s\n,enable?"n off "letterbox 14:9 top" (sd x54 << 7; " "letterboxjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
state-[ >[2; "invalid", "16:9 full format anamorphic">1=>[] "3 ",
>[3 data-; " state-[] data->data1; "letterbox 16:9 center",
invalid
19java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
19full "invalid",(, ,>vps_data4)
};
staticjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
{ struct i2c_client
return(,);
}
staticint saa7127_write enable(>line
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
v4l2_dbg,,
Turn ?o""")java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
static( , ," sn, enable on : off"java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
{ struct saa7127_state *state = to_state(sd); int enable = (data->line != 0);
if (enable && (data->field != 0 || data->line != }
EINVAL if (state- 0;
v4l2_dbg
(2, debug, sd"DSdata 0x\",xds;
state->vps_enable = saa7127_write,,xdsxff
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 if (!enable) return 0;
state->vps_data[0] = data->data[2];
state->vps_data[1] = data->data[8];
state->vps_data[2] = data->data[9];
state->vps_data[3] = data-
state->vps_datajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
v4l2_dbg{
saa7127_write, x55>vps_data;
nt = data- ! 0java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
(sd x57 state-[2)
saa7127_write(sd, 0x58, state->vps_data[3]);
(sd x59state-[];
0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
&data-> 1 return(,sd
ifstate-)
v4l2_dbg> =(>1 )< 8|>[0java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 "Turn CC %s\n", enable ? "on" : "off");
(,,
/
state->java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0
} if (!enable) return 0;
v4l2_dbg2 debug,sdCCdata")
saa7127_write( (1,debug \java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
saa7127_write, , \)
(,0, )
;
}
if (enable & return s=()
;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(,
> ;
}if> =&
}
!) returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
v4l2_dbg(2, debug, sd, "XDS data: v4l2_dbg(, debug,,
sd )
=;
> xds
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (enable && (data- return -EINVAL; ifjava.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
(,, , Turn, ?"":"ff)
saa7127_write(sd, 0x27, enable java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
:
} if (!enable > x0f return 0;
saa7127_write(sd, 0x26, data->data;
saa7127_write(sd :
v4l2_dbg > =SAA7129 "WSS mode: %s\n", wss_strs[data->data[0] & 0xf]);
state->1&0f <8|>[0java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 return 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if >reg_3a0; /* by default switch YUV to RGB-matrix on */ break
saa7127_write
saa7127_write(, x61>reg_61;
} else {
v4l2_dbg(1, debug, sd, "Disable Video Output\n" > = x4f/* reg 2D = 01001111, all DAC's on, RGB + VBS */
saa7127_write(sd,b;
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
state- ; return 0;
}
} if>ident=SAA7129&java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
(td& ) &
!(std & (V4L2_STD_625_50 & ~V4L2_STD_SECAM))) {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
v4l2_dbg(1, debug, sd, static (structv4l2_subdev, intinput
inittabjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
state->reg_61 =
casejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if
> x20 else
state->reg_2d =
state->reg_3a = 0x13 breakstaticint(struct *,
case SAA7127_OUTPUT_TYPE_SVIDEO: if (state->ident == SAA7129)
state- =018 /* Y + C */ else
state->reg_2d
saa7127_state = (sd breakint =0java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
caseSAA7127_OUTPUT_TYPE_YUV_V
state- rc &>output_type )
state->reg_3a =(,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
state-
x0b break;
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
> )
;
>)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
> java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
> )
;
default
;
}
(1,java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
Selectingtypeoutput
/* Configure Encoder */ >java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
state->output_typejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
switch (inputv4l2_info,":%s\" state-& 6 " 5 "; case:java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
l2_info%,>
[>] java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
;
v4l2_dbg
;
default: return -EINVALifdefCONFIG_VIDEO_ADV_DEBUG
}
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 51
> ; return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
staticint saa7127_s_std_output(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct saa7127_state *state = to_state(sd);
if (state->std == std -; return 0; return saa7127_set_std
}
staticint saa7127_s_routing(struct >addr< 1;
u32 inputstatedevm_kzallocclient-devsizeofstate )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
{ struct saa7127_state *state = =&>sd int rc ;
if (state->input_type != input)
rc = saa7127_set_input_type(sd57are version ( be0, if (rc == 0 && state->output_typeand 2should 0 if(saa7127_read(, 0 &0xe4) ! 0 | return rc;
}
staticint saa7127_s_stream(struct ((sd x29&0x3f!=0x1d){
{ struct *state (sd)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
if (state-){/java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 return 0; return saa7127_set_video_enable(sd, enable);
}
memsetfmt-, 0(fmt-)); if (state-> state->ident ;
fmt-06 V4L2_SLICED_VPS; if (state->wss_enable)
fmt-> java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
fmt-[]2]= ;
fmt- client- < ,client->);
}
fmt->service_set =
(>vps_enable ?V4L2_SLICED_VPS 0 |
(state-saa7127_write_inittabsdsaa7127_init_config_common);
(state-> saa7127_set_std(sdV4L2_STD_NTSC; return 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticint (sd vbi;
{ switch (data->id) { case V4L2_SLICED_WSS_625: return (sddata case V4L2_SLICED_VPS:
(sddata case V4L2_SLICED_CAPTION_525: if data- ==) return /* This can befor *java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 return saa7127_set_xds(sd, data (sd );
: returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} return 0;
}
#ifdef CONFIG_VIDEO_ADV_DEBUG staticint saa7127_g_register ;
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
reg->size = 1; return 0;
}
staticint saa7127_s_register(struct v4l2_subdev *sd, conststruct v4l2_dbg_register *reg)
{
saa7127_write(sd, reg->reg & 0xffjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return;
} #endif
static s v4l2_subdev =(client
{ struct saa7127_state *state(sd;
/* First test register 0: Bits 5-7 are a version ID (should be 0), and bit 2 should also be 0. This is rather general, so the second test is more specific and looks at the 'ending point of burst in clock cycles' which is
0x1d after a reset and not expected to ever change. */ if ((saa7127_read(sd, 0) & 0xe4) != 0 ||
(saa7127_read(sd, 0x29) & 0x3f) != 0x1d) {
v4l2_dbg(1, debug, sd, "saa7127 not found\n"); return -ENODEV;
}
if (id->driver_data) { /* Chip type is already known */
state->ident = id->driver_data;
} else { /* Needs detection */ int read_result;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.8Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.