Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
04a94d3c
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
04a94d3c
编写于
12月 27, 2007
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V4L/DVB (6913): Preserve the previous order to make easier to check the conversion
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@infradead.org
>
上级
e5ae3db4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
178 addition
and
177 deletion
+178
-177
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttv-driver.c
+178
-177
未找到文件。
drivers/media/video/bt8xx/bttv-driver.c
浏览文件 @
04a94d3c
...
...
@@ -1442,6 +1442,170 @@ static void bttv_reinit_bt848(struct bttv *btv)
set_input
(
btv
,
btv
->
input
,
btv
->
tvnorm
);
}
static
int
bttv_g_ctrl
(
struct
file
*
file
,
void
*
priv
,
struct
v4l2_control
*
c
)
{
struct
bttv_fh
*
fh
=
priv
;
struct
bttv
*
btv
=
fh
->
btv
;
switch
(
c
->
id
)
{
case
V4L2_CID_BRIGHTNESS
:
c
->
value
=
btv
->
bright
;
break
;
case
V4L2_CID_HUE
:
c
->
value
=
btv
->
hue
;
break
;
case
V4L2_CID_CONTRAST
:
c
->
value
=
btv
->
contrast
;
break
;
case
V4L2_CID_SATURATION
:
c
->
value
=
btv
->
saturation
;
break
;
case
V4L2_CID_AUDIO_MUTE
:
case
V4L2_CID_AUDIO_VOLUME
:
case
V4L2_CID_AUDIO_BALANCE
:
case
V4L2_CID_AUDIO_BASS
:
case
V4L2_CID_AUDIO_TREBLE
:
bttv_call_i2c_clients
(
btv
,
VIDIOC_G_CTRL
,
c
);
break
;
case
V4L2_CID_PRIVATE_CHROMA_AGC
:
c
->
value
=
btv
->
opt_chroma_agc
;
break
;
case
V4L2_CID_PRIVATE_COMBFILTER
:
c
->
value
=
btv
->
opt_combfilter
;
break
;
case
V4L2_CID_PRIVATE_LUMAFILTER
:
c
->
value
=
btv
->
opt_lumafilter
;
break
;
case
V4L2_CID_PRIVATE_AUTOMUTE
:
c
->
value
=
btv
->
opt_automute
;
break
;
case
V4L2_CID_PRIVATE_AGC_CRUSH
:
c
->
value
=
btv
->
opt_adc_crush
;
break
;
case
V4L2_CID_PRIVATE_VCR_HACK
:
c
->
value
=
btv
->
opt_vcr_hack
;
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_UPPER
:
c
->
value
=
btv
->
opt_whitecrush_upper
;
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_LOWER
:
c
->
value
=
btv
->
opt_whitecrush_lower
;
break
;
case
V4L2_CID_PRIVATE_UV_RATIO
:
c
->
value
=
btv
->
opt_uv_ratio
;
break
;
case
V4L2_CID_PRIVATE_FULL_LUMA_RANGE
:
c
->
value
=
btv
->
opt_full_luma_range
;
break
;
case
V4L2_CID_PRIVATE_CORING
:
c
->
value
=
btv
->
opt_coring
;
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
static
int
bttv_s_ctrl
(
struct
file
*
file
,
void
*
f
,
struct
v4l2_control
*
c
)
{
int
err
;
int
val
;
struct
bttv_fh
*
fh
=
f
;
struct
bttv
*
btv
=
fh
->
btv
;
err
=
v4l2_prio_check
(
&
btv
->
prio
,
&
fh
->
prio
);
if
(
0
!=
err
)
return
err
;
switch
(
c
->
id
)
{
case
V4L2_CID_BRIGHTNESS
:
bt848_bright
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_HUE
:
bt848_hue
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_CONTRAST
:
bt848_contrast
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_SATURATION
:
bt848_sat
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_AUDIO_MUTE
:
audio_mute
(
btv
,
c
->
value
);
/* fall through */
case
V4L2_CID_AUDIO_VOLUME
:
if
(
btv
->
volume_gpio
)
btv
->
volume_gpio
(
btv
,
c
->
value
);
bttv_call_i2c_clients
(
btv
,
VIDIOC_S_CTRL
,
c
);
break
;
case
V4L2_CID_AUDIO_BALANCE
:
case
V4L2_CID_AUDIO_BASS
:
case
V4L2_CID_AUDIO_TREBLE
:
bttv_call_i2c_clients
(
btv
,
VIDIOC_S_CTRL
,
c
);
break
;
case
V4L2_CID_PRIVATE_CHROMA_AGC
:
btv
->
opt_chroma_agc
=
c
->
value
;
val
=
btv
->
opt_chroma_agc
?
BT848_SCLOOP_CAGC
:
0
;
btwrite
(
val
,
BT848_E_SCLOOP
);
btwrite
(
val
,
BT848_O_SCLOOP
);
break
;
case
V4L2_CID_PRIVATE_COMBFILTER
:
btv
->
opt_combfilter
=
c
->
value
;
break
;
case
V4L2_CID_PRIVATE_LUMAFILTER
:
btv
->
opt_lumafilter
=
c
->
value
;
if
(
btv
->
opt_lumafilter
)
{
btand
(
~
BT848_CONTROL_LDEC
,
BT848_E_CONTROL
);
btand
(
~
BT848_CONTROL_LDEC
,
BT848_O_CONTROL
);
}
else
{
btor
(
BT848_CONTROL_LDEC
,
BT848_E_CONTROL
);
btor
(
BT848_CONTROL_LDEC
,
BT848_O_CONTROL
);
}
break
;
case
V4L2_CID_PRIVATE_AUTOMUTE
:
btv
->
opt_automute
=
c
->
value
;
break
;
case
V4L2_CID_PRIVATE_AGC_CRUSH
:
btv
->
opt_adc_crush
=
c
->
value
;
btwrite
(
BT848_ADC_RESERVED
|
(
btv
->
opt_adc_crush
?
BT848_ADC_CRUSH
:
0
),
BT848_ADC
);
break
;
case
V4L2_CID_PRIVATE_VCR_HACK
:
btv
->
opt_vcr_hack
=
c
->
value
;
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_UPPER
:
btv
->
opt_whitecrush_upper
=
c
->
value
;
btwrite
(
c
->
value
,
BT848_WC_UP
);
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_LOWER
:
btv
->
opt_whitecrush_lower
=
c
->
value
;
btwrite
(
c
->
value
,
BT848_WC_DOWN
);
break
;
case
V4L2_CID_PRIVATE_UV_RATIO
:
btv
->
opt_uv_ratio
=
c
->
value
;
bt848_sat
(
btv
,
btv
->
saturation
);
break
;
case
V4L2_CID_PRIVATE_FULL_LUMA_RANGE
:
btv
->
opt_full_luma_range
=
c
->
value
;
btaor
((
c
->
value
<<
7
),
~
BT848_OFORM_RANGE
,
BT848_OFORM
);
break
;
case
V4L2_CID_PRIVATE_CORING
:
btv
->
opt_coring
=
c
->
value
;
btaor
((
c
->
value
<<
5
),
~
BT848_OFORM_CORE32
,
BT848_OFORM
);
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
/* ----------------------------------------------------------------------- */
void
bttv_gpio_tracking
(
struct
bttv
*
btv
,
char
*
comment
)
...
...
@@ -1869,170 +2033,6 @@ static int bttv_log_status(struct file *file, void *f)
return
0
;
}
static
int
bttv_g_ctrl
(
struct
file
*
file
,
void
*
priv
,
struct
v4l2_control
*
c
)
{
struct
bttv_fh
*
fh
=
priv
;
struct
bttv
*
btv
=
fh
->
btv
;
switch
(
c
->
id
)
{
case
V4L2_CID_BRIGHTNESS
:
c
->
value
=
btv
->
bright
;
break
;
case
V4L2_CID_HUE
:
c
->
value
=
btv
->
hue
;
break
;
case
V4L2_CID_CONTRAST
:
c
->
value
=
btv
->
contrast
;
break
;
case
V4L2_CID_SATURATION
:
c
->
value
=
btv
->
saturation
;
break
;
case
V4L2_CID_AUDIO_MUTE
:
case
V4L2_CID_AUDIO_VOLUME
:
case
V4L2_CID_AUDIO_BALANCE
:
case
V4L2_CID_AUDIO_BASS
:
case
V4L2_CID_AUDIO_TREBLE
:
bttv_call_i2c_clients
(
btv
,
VIDIOC_G_CTRL
,
c
);
break
;
case
V4L2_CID_PRIVATE_CHROMA_AGC
:
c
->
value
=
btv
->
opt_chroma_agc
;
break
;
case
V4L2_CID_PRIVATE_COMBFILTER
:
c
->
value
=
btv
->
opt_combfilter
;
break
;
case
V4L2_CID_PRIVATE_LUMAFILTER
:
c
->
value
=
btv
->
opt_lumafilter
;
break
;
case
V4L2_CID_PRIVATE_AUTOMUTE
:
c
->
value
=
btv
->
opt_automute
;
break
;
case
V4L2_CID_PRIVATE_AGC_CRUSH
:
c
->
value
=
btv
->
opt_adc_crush
;
break
;
case
V4L2_CID_PRIVATE_VCR_HACK
:
c
->
value
=
btv
->
opt_vcr_hack
;
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_UPPER
:
c
->
value
=
btv
->
opt_whitecrush_upper
;
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_LOWER
:
c
->
value
=
btv
->
opt_whitecrush_lower
;
break
;
case
V4L2_CID_PRIVATE_UV_RATIO
:
c
->
value
=
btv
->
opt_uv_ratio
;
break
;
case
V4L2_CID_PRIVATE_FULL_LUMA_RANGE
:
c
->
value
=
btv
->
opt_full_luma_range
;
break
;
case
V4L2_CID_PRIVATE_CORING
:
c
->
value
=
btv
->
opt_coring
;
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
static
int
bttv_s_ctrl
(
struct
file
*
file
,
void
*
f
,
struct
v4l2_control
*
c
)
{
int
err
;
int
val
;
struct
bttv_fh
*
fh
=
f
;
struct
bttv
*
btv
=
fh
->
btv
;
err
=
v4l2_prio_check
(
&
btv
->
prio
,
&
fh
->
prio
);
if
(
0
!=
err
)
return
err
;
switch
(
c
->
id
)
{
case
V4L2_CID_BRIGHTNESS
:
bt848_bright
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_HUE
:
bt848_hue
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_CONTRAST
:
bt848_contrast
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_SATURATION
:
bt848_sat
(
btv
,
c
->
value
);
break
;
case
V4L2_CID_AUDIO_MUTE
:
audio_mute
(
btv
,
c
->
value
);
/* fall through */
case
V4L2_CID_AUDIO_VOLUME
:
if
(
btv
->
volume_gpio
)
btv
->
volume_gpio
(
btv
,
c
->
value
);
bttv_call_i2c_clients
(
btv
,
VIDIOC_S_CTRL
,
c
);
break
;
case
V4L2_CID_AUDIO_BALANCE
:
case
V4L2_CID_AUDIO_BASS
:
case
V4L2_CID_AUDIO_TREBLE
:
bttv_call_i2c_clients
(
btv
,
VIDIOC_S_CTRL
,
c
);
break
;
case
V4L2_CID_PRIVATE_CHROMA_AGC
:
btv
->
opt_chroma_agc
=
c
->
value
;
val
=
btv
->
opt_chroma_agc
?
BT848_SCLOOP_CAGC
:
0
;
btwrite
(
val
,
BT848_E_SCLOOP
);
btwrite
(
val
,
BT848_O_SCLOOP
);
break
;
case
V4L2_CID_PRIVATE_COMBFILTER
:
btv
->
opt_combfilter
=
c
->
value
;
break
;
case
V4L2_CID_PRIVATE_LUMAFILTER
:
btv
->
opt_lumafilter
=
c
->
value
;
if
(
btv
->
opt_lumafilter
)
{
btand
(
~
BT848_CONTROL_LDEC
,
BT848_E_CONTROL
);
btand
(
~
BT848_CONTROL_LDEC
,
BT848_O_CONTROL
);
}
else
{
btor
(
BT848_CONTROL_LDEC
,
BT848_E_CONTROL
);
btor
(
BT848_CONTROL_LDEC
,
BT848_O_CONTROL
);
}
break
;
case
V4L2_CID_PRIVATE_AUTOMUTE
:
btv
->
opt_automute
=
c
->
value
;
break
;
case
V4L2_CID_PRIVATE_AGC_CRUSH
:
btv
->
opt_adc_crush
=
c
->
value
;
btwrite
(
BT848_ADC_RESERVED
|
(
btv
->
opt_adc_crush
?
BT848_ADC_CRUSH
:
0
),
BT848_ADC
);
break
;
case
V4L2_CID_PRIVATE_VCR_HACK
:
btv
->
opt_vcr_hack
=
c
->
value
;
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_UPPER
:
btv
->
opt_whitecrush_upper
=
c
->
value
;
btwrite
(
c
->
value
,
BT848_WC_UP
);
break
;
case
V4L2_CID_PRIVATE_WHITECRUSH_LOWER
:
btv
->
opt_whitecrush_lower
=
c
->
value
;
btwrite
(
c
->
value
,
BT848_WC_DOWN
);
break
;
case
V4L2_CID_PRIVATE_UV_RATIO
:
btv
->
opt_uv_ratio
=
c
->
value
;
bt848_sat
(
btv
,
btv
->
saturation
);
break
;
case
V4L2_CID_PRIVATE_FULL_LUMA_RANGE
:
btv
->
opt_full_luma_range
=
c
->
value
;
btaor
((
c
->
value
<<
7
),
~
BT848_OFORM_RANGE
,
BT848_OFORM
);
break
;
case
V4L2_CID_PRIVATE_CORING
:
btv
->
opt_coring
=
c
->
value
;
btaor
((
c
->
value
<<
5
),
~
BT848_OFORM_CORE32
,
BT848_OFORM
);
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
#ifdef CONFIG_VIDEO_ADV_DEBUG
static
int
bttv_g_register
(
struct
file
*
file
,
void
*
f
,
struct
v4l2_register
*
reg
)
...
...
@@ -2633,13 +2633,26 @@ static int bttv_querycap(struct file *file, void *priv,
return
0
;
}
static
int
bttv_enum_fmt_vbi
(
struct
file
*
file
,
void
*
priv
,
struct
v4l2_fmtdesc
*
f
)
{
if
(
0
!=
f
->
index
)
return
-
EINVAL
;
f
->
pixelformat
=
V4L2_PIX_FMT_GREY
;
strcpy
(
f
->
description
,
"vbi data"
);
return
0
;
}
static
int
bttv_enum_fmt_cap
(
struct
file
*
file
,
void
*
priv
,
struct
v4l2_fmtdesc
*
f
)
{
if
(
f
->
index
>=
FORMATS
)
return
-
EINVAL
;
strlcpy
(
f
->
description
,
formats
[
f
->
index
].
name
,
sizeof
(
f
->
description
));
strlcpy
(
f
->
description
,
formats
[
f
->
index
].
name
,
sizeof
(
f
->
description
));
f
->
pixelformat
=
formats
[
f
->
index
].
fourcc
;
return
0
;
...
...
@@ -2664,18 +2677,6 @@ static int bttv_enum_fmt_overlay(struct file *file, void *priv,
return
0
;
}
static
int
bttv_enum_fmt_vbi
(
struct
file
*
file
,
void
*
priv
,
struct
v4l2_fmtdesc
*
f
)
{
if
(
0
!=
f
->
index
)
return
-
EINVAL
;
f
->
pixelformat
=
V4L2_PIX_FMT_GREY
;
strcpy
(
f
->
description
,
"vbi data"
);
return
0
;
}
static
int
bttv_g_fbuf
(
struct
file
*
file
,
void
*
f
,
struct
v4l2_framebuffer
*
fb
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录