Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b5212878
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看板
提交
b5212878
编写于
12月 06, 2011
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda-idt-fix' into fix/hda
上级
cce4aa37
f1a73746
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
21 deletion
+24
-21
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_sigmatel.c
+24
-21
未找到文件。
sound/pci/hda/patch_sigmatel.c
浏览文件 @
b5212878
...
...
@@ -215,6 +215,7 @@ struct sigmatel_spec {
unsigned
int
gpio_mute
;
unsigned
int
gpio_led
;
unsigned
int
gpio_led_polarity
;
unsigned
int
vref_mute_led_nid
;
/* pin NID for mute-LED vref control */
unsigned
int
vref_led
;
/* stream */
...
...
@@ -4318,12 +4319,10 @@ static void stac_store_hints(struct hda_codec *codec)
spec
->
eapd_switch
=
val
;
get_int_hint
(
codec
,
"gpio_led_polarity"
,
&
spec
->
gpio_led_polarity
);
if
(
get_int_hint
(
codec
,
"gpio_led"
,
&
spec
->
gpio_led
))
{
if
(
spec
->
gpio_led
<=
8
)
{
spec
->
gpio_mask
|=
spec
->
gpio_led
;
spec
->
gpio_dir
|=
spec
->
gpio_led
;
if
(
spec
->
gpio_led_polarity
)
spec
->
gpio_data
|=
spec
->
gpio_led
;
}
spec
->
gpio_mask
|=
spec
->
gpio_led
;
spec
->
gpio_dir
|=
spec
->
gpio_led
;
if
(
spec
->
gpio_led_polarity
)
spec
->
gpio_data
|=
spec
->
gpio_led
;
}
}
...
...
@@ -4915,8 +4914,14 @@ static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity)
if
(
sscanf
(
dev
->
name
,
"HP_Mute_LED_%d_%x"
,
&
spec
->
gpio_led_polarity
,
&
spec
->
gpio_led
)
==
2
)
{
if
(
spec
->
gpio_led
<
4
)
unsigned
int
max_gpio
;
max_gpio
=
snd_hda_param_read
(
codec
,
codec
->
afg
,
AC_PAR_GPIO_CAP
);
max_gpio
&=
AC_GPIO_IO_COUNT
;
if
(
spec
->
gpio_led
<
max_gpio
)
spec
->
gpio_led
=
1
<<
spec
->
gpio_led
;
else
spec
->
vref_mute_led_nid
=
spec
->
gpio_led
;
return
1
;
}
if
(
sscanf
(
dev
->
name
,
"HP_Mute_LED_%d"
,
...
...
@@ -5045,15 +5050,12 @@ static int stac92xx_pre_resume(struct hda_codec *codec)
struct
sigmatel_spec
*
spec
=
codec
->
spec
;
/* sync mute LED */
if
(
spec
->
gpio_led
)
{
if
(
spec
->
gpio_led
<=
8
)
{
stac_gpio_set
(
codec
,
spec
->
gpio_mask
,
spec
->
gpio_dir
,
spec
->
gpio_data
);
}
else
{
stac_vrefout_set
(
codec
,
spec
->
gpio_led
,
spec
->
vref_led
);
}
}
if
(
spec
->
vref_mute_led_nid
)
stac_vrefout_set
(
codec
,
spec
->
vref_mute_led_nid
,
spec
->
vref_led
);
else
if
(
spec
->
gpio_led
)
stac_gpio_set
(
codec
,
spec
->
gpio_mask
,
spec
->
gpio_dir
,
spec
->
gpio_data
);
return
0
;
}
...
...
@@ -5064,7 +5066,7 @@ static void stac92xx_set_power_state(struct hda_codec *codec, hda_nid_t fg,
struct
sigmatel_spec
*
spec
=
codec
->
spec
;
if
(
power_state
==
AC_PWRST_D3
)
{
if
(
spec
->
gpio_led
>
8
)
{
if
(
spec
->
vref_mute_led_nid
)
{
/* with vref-out pin used for mute led control
* codec AFG is prevented from D3 state
*/
...
...
@@ -5117,7 +5119,7 @@ static int stac92xx_update_led_status(struct hda_codec *codec)
}
}
/*polarity defines *not* muted state level*/
if
(
spec
->
gpio_led
<=
8
)
{
if
(
!
spec
->
vref_mute_led_nid
)
{
if
(
muted
)
spec
->
gpio_data
&=
~
spec
->
gpio_led
;
/* orange */
else
...
...
@@ -5135,7 +5137,8 @@ static int stac92xx_update_led_status(struct hda_codec *codec)
muted_lvl
=
spec
->
gpio_led_polarity
?
AC_PINCTL_VREF_GRD
:
AC_PINCTL_VREF_HIZ
;
spec
->
vref_led
=
muted
?
muted_lvl
:
notmtd_lvl
;
stac_vrefout_set
(
codec
,
spec
->
gpio_led
,
spec
->
vref_led
);
stac_vrefout_set
(
codec
,
spec
->
vref_mute_led_nid
,
spec
->
vref_led
);
}
return
0
;
}
...
...
@@ -5649,7 +5652,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
#ifdef CONFIG_SND_HDA_POWER_SAVE
if
(
spec
->
gpio_led
)
{
if
(
spec
->
gpio_led
<=
8
)
{
if
(
!
spec
->
vref_mute_led_nid
)
{
spec
->
gpio_mask
|=
spec
->
gpio_led
;
spec
->
gpio_dir
|=
spec
->
gpio_led
;
spec
->
gpio_data
|=
spec
->
gpio_led
;
...
...
@@ -5962,7 +5965,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
#ifdef CONFIG_SND_HDA_POWER_SAVE
if
(
spec
->
gpio_led
)
{
if
(
spec
->
gpio_led
<=
8
)
{
if
(
!
spec
->
vref_mute_led_nid
)
{
spec
->
gpio_mask
|=
spec
->
gpio_led
;
spec
->
gpio_dir
|=
spec
->
gpio_led
;
spec
->
gpio_data
|=
spec
->
gpio_led
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录