Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
b265faed
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b265faed
编写于
4月 14, 2010
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into topic/hda
上级
60508abe
3d83e577
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
80 addition
and
25 deletion
+80
-25
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c
+56
-8
sound/pci/hda/patch_via.c
sound/pci/hda/patch_via.c
+24
-17
未找到文件。
sound/pci/hda/patch_realtek.c
浏览文件 @
b265faed
...
...
@@ -1459,22 +1459,31 @@ struct alc_fixup {
static void alc_pick_fixup(struct hda_codec *codec,
const struct snd_pci_quirk *quirk,
const struct alc_fixup *fix)
const struct alc_fixup *fix,
int pre_init)
{
const struct alc_pincfg *cfg;
quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk);
if (!quirk)
return;
fix += quirk->value;
cfg = fix->pins;
if (cfg) {
if (pre_init && cfg) {
#ifdef CONFIG_SND_DEBUG_VERBOSE
snd_printdd(KERN_INFO "hda_codec: %s: Apply pincfg for %s\n",
codec->chip_name, quirk->name);
#endif
for (; cfg->nid; cfg++)
snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
}
if (fix->verbs)
if (!pre_init && fix->verbs) {
#ifdef CONFIG_SND_DEBUG_VERBOSE
snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-verbs for %s\n",
codec->chip_name, quirk->name);
#endif
add_verb(codec->spec, fix->verbs);
}
}
static int alc_read_coef_idx(struct hda_codec *codec,
...
...
@@ -10535,7 +10544,8 @@ static int patch_alc882(struct hda_codec *codec)
board_config = ALC882_AUTO;
}
alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups);
if (board_config == ALC882_AUTO)
alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 1);
if (board_config == ALC882_AUTO) {
/* automatic parse from the BIOS config */
...
...
@@ -10610,6 +10620,9 @@ static int patch_alc882(struct hda_codec *codec)
if (spec->cdefine.enable_pcbeep)
set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
if (board_config == ALC882_AUTO)
alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 0);
spec->vmaster_nid = 0x0c;
codec->patch_ops = alc_patch_ops;
...
...
@@ -14192,6 +14205,27 @@ static void alc269_auto_init(struct hda_codec *codec)
alc_inithook(codec);
}
enum {
ALC269_FIXUP_SONY_VAIO,
};
const static struct hda_verb alc269_sony_vaio_fixup_verbs[] = {
{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREFGRD},
{}
};
static const struct alc_fixup alc269_fixups[] = {
[ALC269_FIXUP_SONY_VAIO] = {
.verbs = alc269_sony_vaio_fixup_verbs
},
};
static struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
{}
};
/*
* configuration and preset
*/
...
...
@@ -14251,7 +14285,7 @@ static struct snd_pci_quirk alc269_cfg_tbl[] = {
ALC269_DMIC),
SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005HA", ALC269_DMIC),
SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_DMIC),
SND_PCI_QUIRK(0x104d, 0x9071, "S
ONY XTB", ALC269_DMIC
),
SND_PCI_QUIRK(0x104d, 0x9071, "S
ony VAIO", ALC269_AUTO
),
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK),
SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_DMIC),
SND_PCI_QUIRK(0x1734, 0x115d, "FSC Amilo", ALC269_FUJITSU),
...
...
@@ -14405,6 +14439,9 @@ static int patch_alc269(struct hda_codec *codec)
board_config = ALC269_AUTO;
}
if (board_config == ALC269_AUTO)
alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 1);
if (board_config == ALC269_AUTO) {
/* automatic parse from the BIOS config */
err = alc269_parse_auto_config(codec);
...
...
@@ -14458,6 +14495,9 @@ static int patch_alc269(struct hda_codec *codec)
if (spec->cdefine.enable_pcbeep)
set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
if (board_config == ALC269_AUTO)
alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 0);
spec->vmaster_nid = 0x02;
codec->patch_ops = alc_patch_ops;
...
...
@@ -15548,7 +15588,8 @@ static int patch_alc861(struct hda_codec *codec)
board_config = ALC861_AUTO;
}
alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups);
if (board_config == ALC861_AUTO)
alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 1);
if (board_config == ALC861_AUTO) {
/* automatic parse from the BIOS config */
...
...
@@ -15585,6 +15626,9 @@ static int patch_alc861(struct hda_codec *codec)
spec->vmaster_nid = 0x03;
if (board_config == ALC861_AUTO)
alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 0);
codec->patch_ops = alc_patch_ops;
if (board_config == ALC861_AUTO) {
spec->init_hook = alc861_auto_init;
...
...
@@ -16519,7 +16563,8 @@ static int patch_alc861vd(struct hda_codec *codec)
board_config = ALC861VD_AUTO;
}
alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups);
if (board_config == ALC861VD_AUTO)
alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 1);
if (board_config == ALC861VD_AUTO) {
/* automatic parse from the BIOS config */
...
...
@@ -16567,6 +16612,9 @@ static int patch_alc861vd(struct hda_codec *codec)
spec->vmaster_nid = 0x02;
if (board_config == ALC861VD_AUTO)
alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 0);
codec->patch_ops = alc_patch_ops;
if (board_config == ALC861VD_AUTO)
...
...
sound/pci/hda/patch_via.c
浏览文件 @
b265faed
...
...
@@ -476,7 +476,7 @@ static struct snd_kcontrol_new *via_clone_control(struct via_spec *spec,
knew
->
name
=
kstrdup
(
tmpl
->
name
,
GFP_KERNEL
);
if
(
!
knew
->
name
)
return
NULL
;
return
0
;
return
knew
;
}
static
void
via_free_kctls
(
struct
hda_codec
*
codec
)
...
...
@@ -1215,14 +1215,13 @@ static struct snd_kcontrol_new via_hp_mixer[2] = {
},
};
static
int
via_hp_build
(
struct
via_spec
*
sp
ec
)
static
int
via_hp_build
(
struct
hda_codec
*
cod
ec
)
{
struct
via_spec
*
spec
=
codec
->
spec
;
struct
snd_kcontrol_new
*
knew
;
hda_nid_t
nid
;
knew
=
via_clone_control
(
spec
,
&
via_hp_mixer
[
0
]);
if
(
knew
==
NULL
)
return
-
ENOMEM
;
int
nums
;
hda_nid_t
conn
[
HDA_MAX_CONNECTIONS
];
switch
(
spec
->
codec_type
)
{
case
VT1718S
:
...
...
@@ -1239,6 +1238,14 @@ static int via_hp_build(struct via_spec *spec)
break
;
}
nums
=
snd_hda_get_connections
(
codec
,
nid
,
conn
,
HDA_MAX_CONNECTIONS
);
if
(
nums
<=
1
)
return
0
;
knew
=
via_clone_control
(
spec
,
&
via_hp_mixer
[
0
]);
if
(
knew
==
NULL
)
return
-
ENOMEM
;
knew
->
subdevice
=
HDA_SUBDEV_NID_FLAG
|
nid
;
knew
->
private_value
=
nid
;
...
...
@@ -2561,7 +2568,7 @@ static int vt1708_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
via_smart51_build
(
spec
);
return
1
;
...
...
@@ -3087,7 +3094,7 @@ static int vt1709_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
via_smart51_build
(
spec
);
return
1
;
...
...
@@ -3654,7 +3661,7 @@ static int vt1708B_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
via_smart51_build
(
spec
);
return
1
;
...
...
@@ -4140,7 +4147,7 @@ static int vt1708S_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
via_smart51_build
(
spec
);
return
1
;
...
...
@@ -4510,7 +4517,7 @@ static int vt1702_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
return
1
;
}
...
...
@@ -4930,7 +4937,7 @@ static int vt1718S_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
via_smart51_build
(
spec
);
...
...
@@ -5425,7 +5432,7 @@ static int vt1716S_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
via_smart51_build
(
spec
);
...
...
@@ -5781,7 +5788,7 @@ static int vt2002P_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
return
1
;
}
...
...
@@ -6000,12 +6007,12 @@ static int vt1812_auto_create_multi_out_ctls(struct via_spec *spec,
/* Line-Out: PortE */
err
=
via_add_control
(
spec
,
VIA_CTL_WIDGET_VOL
,
"
Master
Front Playback Volume"
,
"Front Playback Volume"
,
HDA_COMPOSE_AMP_VAL
(
0x8
,
3
,
0
,
HDA_OUTPUT
));
if
(
err
<
0
)
return
err
;
err
=
via_add_control
(
spec
,
VIA_CTL_WIDGET_BIND_PIN_MUTE
,
"
Master
Front Playback Switch"
,
"Front Playback Switch"
,
HDA_COMPOSE_AMP_VAL
(
0x28
,
3
,
0
,
HDA_OUTPUT
));
if
(
err
<
0
)
return
err
;
...
...
@@ -6130,7 +6137,7 @@ static int vt1812_parse_auto_config(struct hda_codec *codec)
spec
->
input_mux
=
&
spec
->
private_imux
[
0
];
if
(
spec
->
hp_mux
)
via_hp_build
(
sp
ec
);
via_hp_build
(
cod
ec
);
return
1
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录