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
669b67d9
Commit
669b67d9
authored
Jan 04, 2012
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[media] mt2063: Convert it to the DVBv5 way for set_params()
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
parent
d76f28f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
29 deletions
+17
-29
drivers/media/common/tuners/mt2063.c
drivers/media/common/tuners/mt2063.c
+17
-29
No files found.
drivers/media/common/tuners/mt2063.c
View file @
669b67d9
...
@@ -2051,9 +2051,9 @@ static int mt2063_set_analog_params(struct dvb_frontend *fe,
...
@@ -2051,9 +2051,9 @@ static int mt2063_set_analog_params(struct dvb_frontend *fe,
*/
*/
#define MAX_SYMBOL_RATE_6MHz 5217391
#define MAX_SYMBOL_RATE_6MHz 5217391
static
int
mt2063_set_params
(
struct
dvb_frontend
*
fe
,
static
int
mt2063_set_params
(
struct
dvb_frontend
*
fe
)
struct
dvb_frontend_parameters
*
params
)
{
{
struct
dtv_frontend_properties
*
c
=
&
fe
->
dtv_property_cache
;
struct
mt2063_state
*
state
=
fe
->
tuner_priv
;
struct
mt2063_state
*
state
=
fe
->
tuner_priv
;
int
status
;
int
status
;
s32
pict_car
=
0
;
s32
pict_car
=
0
;
...
@@ -2065,37 +2065,25 @@ static int mt2063_set_params(struct dvb_frontend *fe,
...
@@ -2065,37 +2065,25 @@ static int mt2063_set_params(struct dvb_frontend *fe,
s32
if_mid
=
0
;
s32
if_mid
=
0
;
s32
rcvr_mode
=
0
;
s32
rcvr_mode
=
0
;
switch
(
fe
->
ops
.
info
.
type
)
{
if
(
c
->
bandwidth_hz
==
0
)
case
FE_OFDM
:
return
-
EINVAL
;
switch
(
params
->
u
.
ofdm
.
bandwidth
)
{
if
(
c
->
bandwidth_hz
<=
6000000
)
case
BANDWIDTH_6_MHZ
:
ch_bw
=
6000000
;
ch_bw
=
6000000
;
else
if
(
c
->
bandwidth_hz
<=
7000000
)
break
;
ch_bw
=
7000000
;
case
BANDWIDTH_7_MHZ
:
else
ch_bw
=
7000000
;
ch_bw
=
8000000
;
break
;
case
BANDWIDTH_8_MHZ
:
switch
(
c
->
delivery_system
)
{
ch_bw
=
8000000
;
case
SYS_DVBT
:
break
;
default:
return
-
EINVAL
;
}
rcvr_mode
=
MT2063_OFFAIR_COFDM
;
rcvr_mode
=
MT2063_OFFAIR_COFDM
;
pict_car
=
36125000
;
pict_car
=
36125000
;
pict2chanb_vsb
=
-
(
ch_bw
/
2
);
pict2chanb_vsb
=
-
(
ch_bw
/
2
);
pict2snd1
=
0
;
pict2snd1
=
0
;
pict2snd2
=
0
;
pict2snd2
=
0
;
break
;
break
;
case
FE_QAM
:
case
SYS_DVBC_ANNEX_A
:
/*
case
SYS_DVBC_ANNEX_C
:
* Using a 8MHz bandwidth sometimes fail
* with 6MHz-spaced channels, due to inter-carrier
* interference. So, it is better to narrow-down the filter
*/
if
(
params
->
u
.
qam
.
symbol_rate
<=
MAX_SYMBOL_RATE_6MHz
)
ch_bw
=
6000000
;
else
ch_bw
=
8000000
;
rcvr_mode
=
MT2063_CABLE_QAM
;
rcvr_mode
=
MT2063_CABLE_QAM
;
pict_car
=
36125000
;
pict_car
=
36125000
;
pict2snd1
=
0
;
pict2snd1
=
0
;
...
@@ -2115,12 +2103,12 @@ static int mt2063_set_params(struct dvb_frontend *fe,
...
@@ -2115,12 +2103,12 @@ static int mt2063_set_params(struct dvb_frontend *fe,
if
(
status
<
0
)
if
(
status
<
0
)
return
status
;
return
status
;
status
=
MT2063_Tune
(
state
,
(
params
->
frequency
+
(
pict2chanb_vsb
+
(
ch_bw
/
2
))));
status
=
MT2063_Tune
(
state
,
(
c
->
frequency
+
(
pict2chanb_vsb
+
(
ch_bw
/
2
))));
if
(
status
<
0
)
if
(
status
<
0
)
return
status
;
return
status
;
state
->
frequency
=
params
->
frequency
;
state
->
frequency
=
c
->
frequency
;
return
0
;
return
0
;
}
}
...
...
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