Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
26917499
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看板
提交
26917499
编写于
10月 11, 2009
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into topic/hda
上级
0afe5f89
f0613d57
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
92 addition
and
28 deletion
+92
-28
sound/pci/hda/patch_nvhdmi.c
sound/pci/hda/patch_nvhdmi.c
+25
-6
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c
+67
-22
未找到文件。
sound/pci/hda/patch_nvhdmi.c
浏览文件 @
26917499
...
...
@@ -29,6 +29,9 @@
#include "hda_codec.h"
#include "hda_local.h"
/* define below to restrict the supported rates and formats */
#define LIMITED_RATE_FMT_SUPPORT
struct
nvhdmi_spec
{
struct
hda_multi_out
multiout
;
...
...
@@ -60,6 +63,22 @@ static struct hda_verb nvhdmi_basic_init[] = {
{}
/* terminator */
};
#ifdef LIMITED_RATE_FMT_SUPPORT
/* support only the safe format and rate */
#define SUPPORTED_RATES SNDRV_PCM_RATE_48000
#define SUPPORTED_MAXBPS 16
#define SUPPORTED_FORMATS SNDRV_PCM_FMTBIT_S16_LE
#else
/* support all rates and formats */
#define SUPPORTED_RATES \
(SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |\
SNDRV_PCM_RATE_192000)
#define SUPPORTED_MAXBPS 24
#define SUPPORTED_FORMATS \
(SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE)
#endif
/*
* Controls
*/
...
...
@@ -258,9 +277,9 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch = {
.
channels_min
=
2
,
.
channels_max
=
8
,
.
nid
=
Nv_Master_Convert_nid
,
.
rates
=
S
NDRV_PCM_RATE_48000
,
.
maxbps
=
16
,
.
formats
=
S
NDRV_PCM_FMTBIT_S16_LE
,
.
rates
=
S
UPPORTED_RATES
,
.
maxbps
=
SUPPORTED_MAXBPS
,
.
formats
=
S
UPPORTED_FORMATS
,
.
ops
=
{
.
open
=
nvhdmi_dig_playback_pcm_open
,
.
close
=
nvhdmi_dig_playback_pcm_close_8ch
,
...
...
@@ -273,9 +292,9 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_2ch = {
.
channels_min
=
2
,
.
channels_max
=
2
,
.
nid
=
Nv_Master_Convert_nid
,
.
rates
=
S
NDRV_PCM_RATE_48000
,
.
maxbps
=
16
,
.
formats
=
S
NDRV_PCM_FMTBIT_S16_LE
,
.
rates
=
S
UPPORTED_RATES
,
.
maxbps
=
SUPPORTED_MAXBPS
,
.
formats
=
S
UPPORTED_FORMATS
,
.
ops
=
{
.
open
=
nvhdmi_dig_playback_pcm_open
,
.
close
=
nvhdmi_dig_playback_pcm_close_2ch
,
...
...
sound/pci/hda/patch_realtek.c
浏览文件 @
26917499
...
...
@@ -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];
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);
}
/*
...
...
@@ -9594,11 +9609,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),
{}
};
...
...
@@ -9870,7 +9887,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 */
...
...
@@ -12834,12 +12851,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
...
...
@@ -12849,7 +12869,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],
...
...
@@ -14347,15 +14366,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]);
}
...
...
@@ -15148,7 +15168,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),
...
...
@@ -15534,6 +15554,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;
...
...
@@ -15555,6 +15598,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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录