Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
68541cda
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看板
提交
68541cda
编写于
10月 03, 2010
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[media] Add support for Kworld SBTVD board
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
上级
7572f9c5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
133 addition
and
0 deletion
+133
-0
drivers/media/dvb/frontends/mb86a20s.c
drivers/media/dvb/frontends/mb86a20s.c
+23
-0
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-cards.c
+109
-0
drivers/media/video/saa7134/saa7134.h
drivers/media/video/saa7134/saa7134.h
+1
-0
未找到文件。
drivers/media/dvb/frontends/mb86a20s.c
浏览文件 @
68541cda
...
...
@@ -376,6 +376,9 @@ static int mb86a20s_initfe(struct dvb_frontend *fe)
dprintk
(
"
\n
"
);
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
0
);
/* Initialize the frontend */
rc
=
mb86a20s_writeregdata
(
state
,
mb86a20s_init
);
if
(
rc
<
0
)
...
...
@@ -392,6 +395,9 @@ static int mb86a20s_initfe(struct dvb_frontend *fe)
return
rc
;
}
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
1
);
return
0
;
}
...
...
@@ -403,6 +409,9 @@ static int mb86a20s_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
dprintk
(
"
\n
"
);
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
0
);
/* Does a binary search to get RF strength */
rf_max
=
0xfff
;
rf_min
=
0
;
...
...
@@ -426,6 +435,9 @@ static int mb86a20s_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
dprintk
(
"signal strength = %d
\n
"
,
*
strength
);
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
1
);
return
0
;
}
...
...
@@ -437,7 +449,11 @@ static int mb86a20s_read_status(struct dvb_frontend *fe, fe_status_t *status)
dprintk
(
"
\n
"
);
*
status
=
0
;
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
0
);
val
=
mb86a20s_readreg
(
state
,
0x0a
)
&
0xf
;
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
1
);
if
(
val
>=
2
)
*
status
|=
FE_HAS_SIGNAL
;
...
...
@@ -467,8 +483,15 @@ static int mb86a20s_set_frontend(struct dvb_frontend *fe,
dprintk
(
"
\n
"
);
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
1
);
fe
->
ops
.
tuner_ops
.
set_params
(
fe
,
p
);
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
0
);
rc
=
mb86a20s_writeregdata
(
state
,
mb86a20s_reset_reception
);
if
(
fe
->
ops
.
i2c_gate_ctrl
)
fe
->
ops
.
i2c_gate_ctrl
(
fe
,
1
);
return
rc
;
}
...
...
drivers/media/video/saa7134/saa7134-cards.c
浏览文件 @
68541cda
...
...
@@ -5176,6 +5176,47 @@ struct saa7134_board saa7134_boards[] = {
.
amux
=
2
,
},
},
[
SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG
]
=
{
.
name
=
"Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid"
,
.
audio_clock
=
0x00187de7
,
.
tuner_type
=
TUNER_NXP_TDA18271
,
/* TUNER_PHILIPS_TDA8290 */
.
radio_type
=
UNSET
,
.
tuner_addr
=
0x60
,
.
radio_addr
=
ADDR_UNSET
,
.
gpiomask
=
0x8e054000
,
.
mpeg
=
SAA7134_MPEG_DVB
,
.
inputs
=
{
{
.
name
=
name_tv
,
.
vmux
=
1
,
.
amux
=
TV
,
.
tv
=
1
,
#if 0 /* FIXME */
}, {
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
.gpio = 0x200,
}, {
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
.gpio = 0x200,
#endif
}
},
#if 0
.radio = {
.name = name_radio,
.vmux = 1,
.amux = LINE1,
.gpio = 0x100,
},
#endif
.
mute
=
{
.
name
=
name_mute
,
.
vmux
=
0
,
.
amux
=
TV
,
},
},
[
SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS
]
=
{
.
name
=
"Avermedia AVerTV GO 007 FM Plus"
,
.
audio_clock
=
0x00187de7
,
...
...
@@ -6612,6 +6653,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.
subvendor
=
0x17de
,
.
subdevice
=
0x7128
,
.
driver_data
=
SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG
,
},
{
.
vendor
=
PCI_VENDOR_ID_PHILIPS
,
.
device
=
PCI_DEVICE_ID_PHILIPS_SAA7133
,
.
subvendor
=
0x17de
,
.
subdevice
=
0xb136
,
.
driver_data
=
SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG
,
},
{
.
vendor
=
PCI_VENDOR_ID_PHILIPS
,
.
device
=
PCI_DEVICE_ID_PHILIPS_SAA7133
,
...
...
@@ -6831,6 +6878,23 @@ static inline int saa7134_tda18271_hvr11x0_toggle_agc(struct saa7134_dev *dev,
return
0
;
}
static
inline
int
saa7134_kworld_sbtvd_toggle_agc
(
struct
saa7134_dev
*
dev
,
enum
tda18271_mode
mode
)
{
/* toggle AGC switch through GPIO 27 */
switch
(
mode
)
{
case
TDA18271_ANALOG
:
saa7134_set_gpio
(
dev
,
27
,
0
);
break
;
case
TDA18271_DIGITAL
:
saa7134_set_gpio
(
dev
,
27
,
1
);
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
static
int
saa7134_tda8290_18271_callback
(
struct
saa7134_dev
*
dev
,
int
command
,
int
arg
)
{
...
...
@@ -6843,6 +6907,9 @@ static int saa7134_tda8290_18271_callback(struct saa7134_dev *dev,
case
SAA7134_BOARD_HAUPPAUGE_HVR1120
:
ret
=
saa7134_tda18271_hvr11x0_toggle_agc
(
dev
,
arg
);
break
;
case
SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG
:
ret
=
saa7134_kworld_sbtvd_toggle_agc
(
dev
,
arg
);
break
;
default:
break
;
}
...
...
@@ -6863,6 +6930,7 @@ static int saa7134_tda8290_callback(struct saa7134_dev *dev,
case
SAA7134_BOARD_HAUPPAUGE_HVR1150
:
case
SAA7134_BOARD_HAUPPAUGE_HVR1120
:
case
SAA7134_BOARD_AVERMEDIA_M733A
:
case
SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG
:
/* tda8290 + tda18271 */
ret
=
saa7134_tda8290_18271_callback
(
dev
,
command
,
arg
);
break
;
...
...
@@ -7541,6 +7609,47 @@ int saa7134_board_init2(struct saa7134_dev *dev)
dev
->
name
);
break
;
}
case
SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG
:
{
struct
i2c_msg
msg
=
{
.
addr
=
0x4b
,
.
flags
=
0
};
int
i
;
static
u8
buffer
[][
2
]
=
{
{
0x30
,
0x31
},
{
0xff
,
0x00
},
{
0x41
,
0x03
},
{
0x41
,
0x1a
},
{
0xff
,
0x02
},
{
0x34
,
0x00
},
{
0x45
,
0x97
},
{
0x45
,
0xc1
},
};
saa_writel
(
SAA7134_GPIO_GPMODE0
>>
2
,
0x0000
);
saa_writel
(
SAA7134_GPIO_GPSTATUS0
>>
2
,
0x0000
);
saa_writel
(
SAA7134_GPIO_GPMODE0
>>
2
,
0x0000
);
saa_writel
(
SAA7134_GPIO_GPMODE0
>>
2
,
0x4000
);
saa_writel
(
SAA7134_GPIO_GPSTATUS0
>>
2
,
0x0000
);
saa_writel
(
SAA7134_GPIO_GPMODE0
>>
2
,
0x4000
);
saa_writel
(
SAA7134_GPIO_GPSTATUS0
>>
2
,
0x4000
);
saa_writel
(
SAA7134_GPIO_GPMODE0
>>
2
,
0x4000
);
saa_writel
(
SAA7134_GPIO_GPSTATUS0
>>
2
,
0x0000
);
saa_writel
(
SAA7134_GPIO_GPMODE0
>>
2
,
0x4000
);
saa_writel
(
SAA7134_GPIO_GPSTATUS0
>>
2
,
0x4000
);
/*
* FIXME: identify what device is at addr 0x4b and what means
* this initialization
*/
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
buffer
);
i
++
)
{
msg
.
buf
=
&
buffer
[
i
][
0
];
msg
.
len
=
ARRAY_SIZE
(
buffer
[
0
]);
if
(
i2c_transfer
(
&
dev
->
i2c_adap
,
&
msg
,
1
)
!=
1
)
printk
(
KERN_WARNING
"%s: Unable to enable tuner(%i).
\n
"
,
dev
->
name
,
i
);
}
break
;
}
}
/* switch() */
/* initialize tuner */
...
...
drivers/media/video/saa7134/saa7134.h
浏览文件 @
68541cda
...
...
@@ -305,6 +305,7 @@ struct saa7134_format {
#define SAA7134_BOARD_BEHOLD_A7 179
#define SAA7134_BOARD_AVERMEDIA_M733A 180
#define SAA7134_BOARD_TECHNOTREND_BUDGET_T3000 181
#define SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG 182
#define SAA7134_MAXBOARDS 32
#define SAA7134_INPUT_MAX 8
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录