Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
d2a764dd
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
d2a764dd
编写于
10月 08, 2009
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into for-linus
上级
6f775ba0
defb5ab2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
67 addition
and
22 deletion
+67
-22
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c
+67
-22
未找到文件。
sound/pci/hda/patch_realtek.c
浏览文件 @
d2a764dd
...
...
@@ -1332,15 +1332,20 @@ static int alc_subsystem_id(struct hda_codec *codec,
* when the external headphone out jack is plugged"
*/
if (!spec->autocfg.hp_pins[0]) {
hda_nid_t nid;
tmp = (ass >> 11) & 0x3; /* HP to chassis */
if (tmp == 0)
spec->autocfg.hp_pins[0]
= porta;
nid
= porta;
else if (tmp == 1)
spec->autocfg.hp_pins[0]
= porte;
nid
= porte;
else if (tmp == 2)
spec->autocfg.hp_pins[0]
= portd;
nid
= portd;
else
return 1;
for (i = 0; i < spec->autocfg.line_outs; i++)
if (spec->autocfg.line_out_pins[i] == nid)
return 1;
spec->autocfg.hp_pins[0] = nid;
}
alc_init_auto_hp(codec);
...
...
@@ -1362,7 +1367,7 @@ static void alc_ssid_check(struct hda_codec *codec,
}
/*
* Fix-up pin default configurations
* Fix-up pin default configurations
and add default verbs
*/
struct alc_pincfg {
...
...
@@ -1370,9 +1375,14 @@ struct alc_pincfg {
u32 val;
};
static void alc_fix_pincfg(struct hda_codec *codec,
struct alc_fixup {
const struct alc_pincfg *pins;
const struct hda_verb *verbs;
};
static void alc_pick_fixup(struct hda_codec *codec,
const struct snd_pci_quirk *quirk,
const struct alc_
pincfg **pin
fix)
const struct alc_
fixup *
fix)
{
const struct alc_pincfg *cfg;
...
...
@@ -1380,9 +1390,14 @@ static void alc_fix_pincfg(struct hda_codec *codec,
if (!quirk)
return;
cfg = pinfix[quirk->value];
for (; cfg->nid; cfg++)
snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
fix += quirk->value;
cfg = fix->pins;
if (cfg) {
for (; cfg->nid; cfg++)
snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
}
if (fix->verbs)
add_verb(codec->spec, fix->verbs);
}
/*
...
...
@@ -9593,11 +9608,13 @@ static struct alc_pincfg alc882_abit_aw9d_pinfix[] = {
{ }
};
static const struct alc_pincfg *alc882_pin_fixes[] = {
[PINFIX_ABIT_AW9D_MAX] = alc882_abit_aw9d_pinfix,
static const struct alc_fixup alc882_fixups[] = {
[PINFIX_ABIT_AW9D_MAX] = {
.pins = alc882_abit_aw9d_pinfix
},
};
static struct snd_pci_quirk alc882_
pinfix
_tbl[] = {
static struct snd_pci_quirk alc882_
fixup
_tbl[] = {
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX),
{}
};
...
...
@@ -9869,7 +9886,7 @@ static int patch_alc882(struct hda_codec *codec)
board_config = ALC882_AUTO;
}
alc_
fix_pincfg(codec, alc882_pinfix_tbl, alc882_pin_fixe
s);
alc_
pick_fixup(codec, alc882_fixup_tbl, alc882_fixup
s);
if (board_config == ALC882_AUTO) {
/* automatic parse from the BIOS config */
...
...
@@ -12842,12 +12859,15 @@ static int patch_alc268(struct hda_codec *codec)
unsigned int wcap = get_wcaps(codec, 0x07);
int i;
spec->capsrc_nids = alc268_capsrc_nids;
/* get type */
wcap = get_wcaps_type(wcap);
if (spec->auto_mic ||
wcap != AC_WID_AUD_IN || spec->input_mux->num_items == 1) {
spec->adc_nids = alc268_adc_nids_alt;
spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt);
if (spec->auto_mic)
fixup_automic_adc(codec);
if (spec->auto_mic || spec->input_mux->num_items == 1)
add_mixer(spec, alc268_capture_nosrc_mixer);
else
...
...
@@ -12857,7 +12877,6 @@ static int patch_alc268(struct hda_codec *codec)
spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids);
add_mixer(spec, alc268_capture_mixer);
}
spec->capsrc_nids = alc268_capsrc_nids;
/* set default input source */
for (i = 0; i < spec->num_adc_nids; i++)
snd_hda_codec_write_cache(codec, alc268_capsrc_nids[i],
...
...
@@ -14357,15 +14376,16 @@ static void alc861_auto_init_multi_out(struct hda_codec *codec)
static void alc861_auto_init_hp_out(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
hda_nid_t pin;
pin = spec->autocfg.hp_pins[0];
if (pin)
alc861_auto_set_output_and_unmute(codec, pin, PIN_HP,
if (spec->autocfg.hp_outs)
alc861_auto_set_output_and_unmute(codec,
spec->autocfg.hp_pins[0],
PIN_HP,
spec->multiout.hp_nid);
pin = spec->autocfg.speaker_pins[0];
if (pin)
alc861_auto_set_output_and_unmute(codec, pin, PIN_OUT,
if (spec->autocfg.speaker_outs)
alc861_auto_set_output_and_unmute(codec,
spec->autocfg.speaker_pins[0],
PIN_OUT,
spec->multiout.dac_nids[0]);
}
...
...
@@ -15158,7 +15178,7 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = {
SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST),
SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_HP),
SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST),
SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST),
/*SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST),*/ /* auto */
SND_PCI_QUIRK(0x1043, 0x1633, "Asus V1Sn", ALC660VD_ASUS_V1S),
SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660VD_3ST_DIG),
SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST),
...
...
@@ -15551,6 +15571,29 @@ static void alc861vd_auto_init(struct hda_codec *codec)
alc_inithook(codec);
}
enum {
ALC660VD_FIX_ASUS_GPIO1
};
/* reset GPIO1 */
static const struct hda_verb alc660vd_fix_asus_gpio1_verbs[] = {
{0x01, AC_VERB_SET_GPIO_MASK, 0x03},
{0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01},
{0x01, AC_VERB_SET_GPIO_DATA, 0x01},
{ }
};
static const struct alc_fixup alc861vd_fixups[] = {
[ALC660VD_FIX_ASUS_GPIO1] = {
.verbs = alc660vd_fix_asus_gpio1_verbs,
},
};
static struct snd_pci_quirk alc861vd_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1),
{}
};
static int patch_alc861vd(struct hda_codec *codec)
{
struct alc_spec *spec;
...
...
@@ -15572,6 +15615,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) {
/* automatic parse from the BIOS config */
err = alc861vd_parse_auto_config(codec);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录