Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f1b82970
Commit
f1b82970
authored
Jul 10, 2011
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[media] drxk: Simplify the DVB-C set mode logic
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
parent
cf694b14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
84 deletions
+81
-84
drivers/media/dvb/frontends/drxk_hard.c
drivers/media/dvb/frontends/drxk_hard.c
+81
-84
No files found.
drivers/media/dvb/frontends/drxk_hard.c
View file @
f1b82970
...
@@ -1806,7 +1806,10 @@ static int SetOperationMode(struct drxk_state *state,
...
@@ -1806,7 +1806,10 @@ static int SetOperationMode(struct drxk_state *state,
if
(
status
<
0
)
if
(
status
<
0
)
goto
error
;
goto
error
;
if
(
state
->
m_OperationMode
!=
oMode
)
{
/* Device is already at the required mode */
if
(
state
->
m_OperationMode
==
oMode
)
return
0
;
switch
(
state
->
m_OperationMode
)
{
switch
(
state
->
m_OperationMode
)
{
/* OM_NONE was added for start up */
/* OM_NONE was added for start up */
case
OM_NONE
:
case
OM_NONE
:
...
@@ -1857,7 +1860,6 @@ static int SetOperationMode(struct drxk_state *state,
...
@@ -1857,7 +1860,6 @@ static int SetOperationMode(struct drxk_state *state,
default:
default:
status
=
-
EINVAL
;
status
=
-
EINVAL
;
}
}
}
error:
error:
if
(
status
<
0
)
if
(
status
<
0
)
printk
(
KERN_ERR
"drxk: Error %d on %s
\n
"
,
status
,
__func__
);
printk
(
KERN_ERR
"drxk: Error %d on %s
\n
"
,
status
,
__func__
);
...
@@ -3086,7 +3088,14 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
...
@@ -3086,7 +3088,14 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
clpCyclen
=
500
;
clpCyclen
=
500
;
clpSumMax
=
1023
;
clpSumMax
=
1023
;
if
(
IsQAM
(
state
))
{
/* 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 */
/* Standard specific settings */
clpSumMin
=
8
;
clpSumMin
=
8
;
clpDirTo
=
(
u16
)
-
9
;
clpDirTo
=
(
u16
)
-
9
;
...
@@ -3094,27 +3103,13 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
...
@@ -3094,27 +3103,13 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
snsSumMin
=
8
;
snsSumMin
=
8
;
snsDirTo
=
(
u16
)
-
9
;
snsDirTo
=
(
u16
)
-
9
;
kiInnergainMin
=
(
u16
)
-
1030
;
kiInnergainMin
=
(
u16
)
-
1030
;
}
else
{
status
=
-
EINVAL
;
goto
error
;
}
if
(
IsQAM
(
state
))
{
ifIaccuHiTgtMax
=
0x2380
;
ifIaccuHiTgtMax
=
0x2380
;
ifIaccuHiTgt
=
0x2380
;
ifIaccuHiTgt
=
0x2380
;
ingainTgtMin
=
0x0511
;
ingainTgtMin
=
0x0511
;
ingainTgt
=
0x0511
;
ingainTgt
=
0x0511
;
ingainTgtMax
=
5119
;
ingainTgtMax
=
5119
;
fastClpCtrlDelay
=
fastClpCtrlDelay
=
state
->
m_qamIfAgcCfg
.
FastClipCtrlDelay
;
state
->
m_qamIfAgcCfg
.
FastClipCtrlDelay
;
}
else
{
ifIaccuHiTgtMax
=
0x1200
;
ifIaccuHiTgt
=
0x1200
;
ingainTgtMin
=
13424
;
ingainTgt
=
13424
;
ingainTgtMax
=
30000
;
fastClpCtrlDelay
=
state
->
m_dvbtIfAgcCfg
.
FastClipCtrlDelay
;
}
status
=
write16
(
state
,
SCU_RAM_AGC_FAST_CLP_CTRL_DELAY__A
,
fastClpCtrlDelay
);
status
=
write16
(
state
,
SCU_RAM_AGC_FAST_CLP_CTRL_DELAY__A
,
fastClpCtrlDelay
);
if
(
status
<
0
)
if
(
status
<
0
)
goto
error
;
goto
error
;
...
@@ -3238,13 +3233,13 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
...
@@ -3238,13 +3233,13 @@ static int InitAGC(struct drxk_state *state, bool isDTV)
status
=
read16
(
state
,
SCU_RAM_AGC_KI__A
,
&
data
);
status
=
read16
(
state
,
SCU_RAM_AGC_KI__A
,
&
data
);
if
(
status
<
0
)
if
(
status
<
0
)
goto
error
;
goto
error
;
if
(
IsQAM
(
state
))
{
data
=
0x0657
;
data
=
0x0657
;
data
&=
~
SCU_RAM_AGC_KI_RF__M
;
data
&=
~
SCU_RAM_AGC_KI_RF__M
;
data
|=
(
DRXK_KI_RAGC_QAM
<<
SCU_RAM_AGC_KI_RF__B
);
data
|=
(
DRXK_KI_RAGC_QAM
<<
SCU_RAM_AGC_KI_RF__B
);
data
&=
~
SCU_RAM_AGC_KI_IF__M
;
data
&=
~
SCU_RAM_AGC_KI_IF__M
;
data
|=
(
DRXK_KI_IAGC_QAM
<<
SCU_RAM_AGC_KI_IF__B
);
data
|=
(
DRXK_KI_IAGC_QAM
<<
SCU_RAM_AGC_KI_IF__B
);
}
status
=
write16
(
state
,
SCU_RAM_AGC_KI__A
,
data
);
status
=
write16
(
state
,
SCU_RAM_AGC_KI__A
,
data
);
error:
error:
if
(
status
<
0
)
if
(
status
<
0
)
...
@@ -5627,6 +5622,8 @@ static int SetQAMStandard(struct drxk_state *state,
...
@@ -5627,6 +5622,8 @@ static int SetQAMStandard(struct drxk_state *state,
#undef DRXK_QAMA_TAPS_SELECT
#undef DRXK_QAMA_TAPS_SELECT
#endif
#endif
dprintk
(
1
,
"
\n
"
);
/* added antenna switch */
/* added antenna switch */
SwitchAntennaToQAM
(
state
);
SwitchAntennaToQAM
(
state
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment