Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
f8fb27bd
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f8fb27bd
编写于
7月 09, 2010
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into topic/hda
上级
afbd9b84
ac0547dc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
36 addition
and
3 deletion
+36
-3
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+27
-0
sound/pci/hda/hda_codec.h
sound/pci/hda/hda_codec.h
+4
-1
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c
+5
-2
未找到文件。
sound/pci/hda/hda_codec.c
浏览文件 @
f8fb27bd
...
...
@@ -784,6 +784,9 @@ static int read_pin_defaults(struct hda_codec *codec)
pin
->
nid
=
nid
;
pin
->
cfg
=
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_GET_CONFIG_DEFAULT
,
0
);
pin
->
ctrl
=
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_GET_PIN_WIDGET_CONTROL
,
0
);
}
return
0
;
}
...
...
@@ -912,15 +915,38 @@ static void restore_pincfgs(struct hda_codec *codec)
void
snd_hda_shutup_pins
(
struct
hda_codec
*
codec
)
{
int
i
;
/* don't shut up pins when unloading the driver; otherwise it breaks
* the default pin setup at the next load of the driver
*/
if
(
codec
->
bus
->
shutdown
)
return
;
for
(
i
=
0
;
i
<
codec
->
init_pins
.
used
;
i
++
)
{
struct
hda_pincfg
*
pin
=
snd_array_elem
(
&
codec
->
init_pins
,
i
);
/* use read here for syncing after issuing each verb */
snd_hda_codec_read
(
codec
,
pin
->
nid
,
0
,
AC_VERB_SET_PIN_WIDGET_CONTROL
,
0
);
}
codec
->
pins_shutup
=
1
;
}
EXPORT_SYMBOL_HDA
(
snd_hda_shutup_pins
);
/* Restore the pin controls cleared previously via snd_hda_shutup_pins() */
static
void
restore_shutup_pins
(
struct
hda_codec
*
codec
)
{
int
i
;
if
(
!
codec
->
pins_shutup
)
return
;
if
(
codec
->
bus
->
shutdown
)
return
;
for
(
i
=
0
;
i
<
codec
->
init_pins
.
used
;
i
++
)
{
struct
hda_pincfg
*
pin
=
snd_array_elem
(
&
codec
->
init_pins
,
i
);
snd_hda_codec_write
(
codec
,
pin
->
nid
,
0
,
AC_VERB_SET_PIN_WIDGET_CONTROL
,
pin
->
ctrl
);
}
codec
->
pins_shutup
=
0
;
}
static
void
init_hda_cache
(
struct
hda_cache_rec
*
cache
,
unsigned
int
record_size
);
static
void
free_hda_cache
(
struct
hda_cache_rec
*
cache
);
...
...
@@ -2917,6 +2943,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
codec
->
afg
?
codec
->
afg
:
codec
->
mfg
,
AC_PWRST_D0
);
restore_pincfgs
(
codec
);
/* restore all current pin configs */
restore_shutup_pins
(
codec
);
hda_exec_init_verbs
(
codec
);
if
(
codec
->
patch_ops
.
resume
)
codec
->
patch_ops
.
resume
(
codec
);
...
...
sound/pci/hda/hda_codec.h
浏览文件 @
f8fb27bd
...
...
@@ -821,6 +821,7 @@ struct hda_codec {
unsigned
int
pin_amp_workaround
:
1
;
/* pin out-amp takes index
* (e.g. Conexant codecs)
*/
unsigned
int
pins_shutup
:
1
;
/* pins are shut up */
unsigned
int
no_trigger_sense
:
1
;
/* don't trigger at pin-sensing */
#ifdef CONFIG_SND_HDA_POWER_SAVE
unsigned
int
power_on
:
1
;
/* current (global) power-state */
...
...
@@ -897,7 +898,9 @@ void snd_hda_codec_resume_cache(struct hda_codec *codec);
/* the struct for codec->pin_configs */
struct
hda_pincfg
{
hda_nid_t
nid
;
unsigned
int
cfg
;
unsigned
char
ctrl
;
/* current pin control value */
unsigned
char
pad
;
/* reserved */
unsigned
int
cfg
;
/* default configuration */
};
unsigned
int
snd_hda_codec_get_pincfg
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
);
...
...
sound/pci/hda/patch_realtek.c
浏览文件 @
f8fb27bd
...
...
@@ -1275,8 +1275,10 @@ static int alc_auto_parse_customize_define(struct hda_codec *codec)
struct alc_spec *spec = codec->spec;
ass = codec->subsystem_id & 0xffff;
if (ass != codec->bus->pci->subsystem_device && (ass & 1))
if (ass != codec->bus->pci->subsystem_device && (ass & 1)) {
spec->cdefine.enable_pcbeep = 1; /* assume always enabled */
goto do_sku;
}
nid = 0x1d;
if (codec->vendor_id == 0x10ec0260)
...
...
@@ -2554,7 +2556,7 @@ static struct snd_kcontrol_new alc_beep_mixer[] = {
static int alc_build_controls(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
struct snd_kcontrol *kctl;
struct snd_kcontrol *kctl
= NULL
;
struct snd_kcontrol_new *knew;
int i, j, err;
unsigned int u;
...
...
@@ -9493,6 +9495,7 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = {
SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24),
SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC885_IMAC91),
SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5),
SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC885_MB5),
/* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2,
* so apparently no perfect solution yet
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录