Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
1571720c
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1571720c
编写于
1月 20, 2007
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V4L/DVB (5106): Do some cleanups at cx88-blackbird
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@infradead.org
>
上级
23154f2f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
40 deletion
+29
-40
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-blackbird.c
+29
-40
未找到文件。
drivers/media/video/cx88/cx88-blackbird.c
浏览文件 @
1571720c
...
...
@@ -956,12 +956,31 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
}
case
VIDIOC_S_FREQUENCY
:
{
struct
v4l2_frequency
*
f
=
arg
;
blackbird_api_cmd
(
fh
->
dev
,
CX2341X_ENC_STOP_CAPTURE
,
3
,
0
,
BLACKBIRD_END_NOW
,
BLACKBIRD_MPEG_CAPTURE
,
BLACKBIRD_RAW_BITS_NONE
);
cx88_do_ioctl
(
inode
,
file
,
0
,
dev
->
core
,
cmd
,
arg
,
cx88_ioctl_hook
);
if
(
UNSET
==
core
->
tuner_type
)
return
-
EINVAL
;
if
(
f
->
tuner
!=
0
)
return
-
EINVAL
;
if
(
0
==
radio
&&
f
->
type
!=
V4L2_TUNER_ANALOG_TV
)
return
-
EINVAL
;
if
(
1
==
radio
&&
f
->
type
!=
V4L2_TUNER_RADIO
)
return
-
EINVAL
;
mutex_lock
(
&
core
->
lock
);
core
->
freq
=
f
->
frequency
;
cx88_newstation
(
core
);
cx88_call_i2c_clients
(
core
,
VIDIOC_S_FREQUENCY
,
f
);
/* When changing channels it is required to reset TVAUDIO */
msleep
(
10
);
cx88_set_tvaudio
(
core
);
mutex_unlock
(
&
core
->
lock
);
blackbird_initialize_codec
(
dev
);
cx88_set_scale
(
dev
->
core
,
dev
->
width
,
dev
->
height
,
...
...
@@ -985,11 +1004,17 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
return
blackbird_querymenu
(
dev
,
arg
);
case
VIDIOC_QUERYCTRL
:
{
struct
v4l2_queryctrl
*
c
=
arg
;
struct
v4l2_queryctrl
*
qctrl
=
arg
;
if
(
blackbird_queryctrl
(
dev
,
c
)
==
0
)
if
(
blackbird_queryctrl
(
dev
,
qctrl
)
==
0
)
return
0
;
return
cx88_do_ioctl
(
inode
,
file
,
0
,
dev
->
core
,
cmd
,
arg
,
mpeg_do_ioctl
);
struct
v4l2_queryctrl
*
qctrl
=
arg
;
qctrl
->
id
=
v4l2_ctrl_next
(
ctrl_classes
,
qctrl
->
id
);
if
(
unlikely
(
qctrl
->
id
==
0
))
return
-
EINVAL
;
return
cx8800_ctrl_query
(
qctrl
);
}
default:
...
...
@@ -1164,42 +1189,6 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
return
0
;
}
/* --- controls ---------------------------------------------- */
case
VIDIOC_QUERYCTRL
:
{
struct
v4l2_queryctrl
*
qctrl
=
arg
;
qctrl
->
id
=
v4l2_ctrl_next
(
ctrl_classes
,
qctrl
->
id
);
if
(
unlikely
(
qctrl
->
id
==
0
))
return
-
EINVAL
;
return
cx8800_ctrl_query
(
qctrl
);
}
/* --- tuner ioctls ------------------------------------------ */
case
VIDIOC_S_FREQUENCY
:
{
struct
v4l2_frequency
*
f
=
arg
;
if
(
UNSET
==
core
->
tuner_type
)
return
-
EINVAL
;
if
(
f
->
tuner
!=
0
)
return
-
EINVAL
;
if
(
0
==
radio
&&
f
->
type
!=
V4L2_TUNER_ANALOG_TV
)
return
-
EINVAL
;
if
(
1
==
radio
&&
f
->
type
!=
V4L2_TUNER_RADIO
)
return
-
EINVAL
;
mutex_lock
(
&
core
->
lock
);
core
->
freq
=
f
->
frequency
;
cx88_newstation
(
core
);
cx88_call_i2c_clients
(
core
,
VIDIOC_S_FREQUENCY
,
f
);
/* When changing channels it is required to reset TVAUDIO */
msleep
(
10
);
cx88_set_tvaudio
(
core
);
mutex_unlock
(
&
core
->
lock
);
return
0
;
}
#ifdef CONFIG_VIDEO_ADV_DEBUG
/* ioctls to allow direct acces to the cx2388x registers */
case
VIDIOC_INT_G_REGISTER
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录