Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
f1b82970
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看板
提交
f1b82970
编写于
7月 10, 2011
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[media] drxk: Simplify the DVB-C set mode logic
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
上级
cf694b14
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
81 addition
and
84 deletion
+81
-84
drivers/media/dvb/frontends/drxk_hard.c
drivers/media/dvb/frontends/drxk_hard.c
+81
-84
未找到文件。
drivers/media/dvb/frontends/drxk_hard.c
浏览文件 @
f1b82970
...
...
@@ -1806,57 +1806,59 @@ static int SetOperationMode(struct drxk_state *state,
if
(
status
<
0
)
goto
error
;
if
(
state
->
m_OperationMode
!=
oMode
)
{
switch
(
state
->
m_OperationMode
)
{
/* OM_NONE was added for start up */
case
OM_NONE
:
break
;
case
OM_DVBT
:
status
=
MPEGTSStop
(
state
);
if
(
status
<
0
)
goto
error
;
status
=
PowerDownDVBT
(
state
,
true
);
if
(
status
<
0
)
goto
error
;
state
->
m_OperationMode
=
OM_NONE
;
break
;
case
OM_QAM_ITU_A
:
/* fallthrough */
case
OM_QAM_ITU_C
:
status
=
MPEGTSStop
(
state
);
if
(
status
<
0
)
goto
error
;
status
=
PowerDownQAM
(
state
);
if
(
status
<
0
)
goto
error
;
state
->
m_OperationMode
=
OM_NONE
;
break
;
case
OM_QAM_ITU_B
:
default:
status
=
-
EINVAL
;
/* Device is already at the required mode */
if
(
state
->
m_OperationMode
==
oMode
)
return
0
;
switch
(
state
->
m_OperationMode
)
{
/* OM_NONE was added for start up */
case
OM_NONE
:
break
;
case
OM_DVBT
:
status
=
MPEGTSStop
(
state
);
if
(
status
<
0
)
goto
error
;
}
status
=
PowerDownDVBT
(
state
,
true
);
if
(
status
<
0
)
goto
error
;
state
->
m_OperationMode
=
OM_NONE
;
break
;
case
OM_QAM_ITU_A
:
/* fallthrough */
case
OM_QAM_ITU_C
:
status
=
MPEGTSStop
(
state
);
if
(
status
<
0
)
goto
error
;
status
=
PowerDownQAM
(
state
);
if
(
status
<
0
)
goto
error
;
state
->
m_OperationMode
=
OM_NONE
;
break
;
case
OM_QAM_ITU_B
:
default:
status
=
-
EINVAL
;
goto
error
;
}
/*
Power up new standard
*/
switch
(
oMode
)
{
case
OM_DVBT
:
state
->
m_OperationMode
=
oMode
;
status
=
SetDVBTStandard
(
state
,
oMode
);
if
(
status
<
0
)
goto
error
;
break
;
case
OM_QAM_ITU_A
:
/* fallthrough */
case
OM_QAM_ITU_C
:
state
->
m_OperationMode
=
oMode
;
status
=
SetQAMStandard
(
state
,
oMode
);
if
(
status
<
0
)
goto
error
;
break
;
case
OM_QAM_ITU_B
:
default:
status
=
-
EINVAL
;
}
/*
Power up new standard
*/
switch
(
oMode
)
{
case
OM_DVBT
:
state
->
m_OperationMode
=
oMode
;
status
=
SetDVBTStandard
(
state
,
oMode
);
if
(
status
<
0
)
goto
error
;
break
;
case
OM_QAM_ITU_A
:
/* fallthrough */
case
OM_QAM_ITU_C
:
state
->
m_OperationMode
=
oMode
;
status
=
SetQAMStandard
(
state
,
oMode
);
if
(
status
<
0
)
goto
error
;
break
;
case
OM_QAM_ITU_B
:
default:
status
=
-
EINVAL
;
}
error:
if
(
status
<
0
)
...
...
@@ -3086,35 +3088,28 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
clpCyclen
=
500
;
clpSumMax
=
1023
;
if
(
IsQAM
(
state
))
{
/* Standard specific settings */
clpSumMin
=
8
;
clpDirTo
=
(
u16
)
-
9
;
clpCtrlMode
=
0
;
snsSumMin
=
8
;
snsDirTo
=
(
u16
)
-
9
;
kiInnergainMin
=
(
u16
)
-
1030
;
}
else
{
status
=
-
EINVAL
;
goto
error
;
}
if
(
IsQAM
(
state
))
{
ifIaccuHiTgtMax
=
0x2380
;
ifIaccuHiTgt
=
0x2380
;
ingainTgtMin
=
0x0511
;
ingainTgt
=
0x0511
;
ingainTgtMax
=
5119
;
fastClpCtrlDelay
=
state
->
m_qamIfAgcCfg
.
FastClipCtrlDelay
;
}
else
{
ifIaccuHiTgtMax
=
0x1200
;
ifIaccuHiTgt
=
0x1200
;
ingainTgtMin
=
13424
;
ingainTgt
=
13424
;
ingainTgtMax
=
30000
;
fastClpCtrlDelay
=
state
->
m_dvbtIfAgcCfg
.
FastClipCtrlDelay
;
/* AGCInit() not available for DVBT; init done in microcode */
if
(
!
IsQAM
(
state
))
{
printk
(
KERN_ERR
"drxk: %s: mode %d is not DVB-C
\n
"
,
__func__
,
state
->
m_OperationMode
);
return
-
EINVAL
;
}
/* FIXME: Analog TV AGC require different settings */
/* Standard specific settings */
clpSumMin
=
8
;
clpDirTo
=
(
u16
)
-
9
;
clpCtrlMode
=
0
;
snsSumMin
=
8
;
snsDirTo
=
(
u16
)
-
9
;
kiInnergainMin
=
(
u16
)
-
1030
;
ifIaccuHiTgtMax
=
0x2380
;
ifIaccuHiTgt
=
0x2380
;
ingainTgtMin
=
0x0511
;
ingainTgt
=
0x0511
;
ingainTgtMax
=
5119
;
fastClpCtrlDelay
=
state
->
m_qamIfAgcCfg
.
FastClipCtrlDelay
;
status
=
write16
(
state
,
SCU_RAM_AGC_FAST_CLP_CTRL_DELAY__A
,
fastClpCtrlDelay
);
if
(
status
<
0
)
goto
error
;
...
...
@@ -3238,13 +3233,13 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
status
=
read16
(
state
,
SCU_RAM_AGC_KI__A
,
&
data
);
if
(
status
<
0
)
goto
error
;
if
(
IsQAM
(
state
))
{
data
=
0x0657
;
data
&=
~
SCU_RAM_AGC_KI_RF__M
;
data
|=
(
DRXK_KI_RAGC_QAM
<<
SCU_RAM_AGC_KI_RF__B
);
data
&=
~
SCU_RAM_AGC_KI_IF__M
;
data
|=
(
DRXK_KI_IAGC_QAM
<<
SCU_RAM_AGC_KI_IF__B
);
}
data
=
0x0657
;
data
&=
~
SCU_RAM_AGC_KI_RF__M
;
data
|=
(
DRXK_KI_RAGC_QAM
<<
SCU_RAM_AGC_KI_RF__B
);
data
&=
~
SCU_RAM_AGC_KI_IF__M
;
data
|=
(
DRXK_KI_IAGC_QAM
<<
SCU_RAM_AGC_KI_IF__B
);
status
=
write16
(
state
,
SCU_RAM_AGC_KI__A
,
data
);
error:
if
(
status
<
0
)
...
...
@@ -5627,6 +5622,8 @@ static int SetQAMStandard(struct drxk_state *state,
#undef DRXK_QAMA_TAPS_SELECT
#endif
dprintk
(
1
,
"
\n
"
);
/* added antenna switch */
SwitchAntennaToQAM
(
state
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录