Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
9737731d
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看板
提交
9737731d
编写于
9月 07, 2010
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into topic/hda
上级
7b315bb4
4d155641
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
59 addition
and
0 deletion
+59
-0
Documentation/sound/alsa/HD-Audio-Models.txt
Documentation/sound/alsa/HD-Audio-Models.txt
+1
-0
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_conexant.c
+58
-0
未找到文件。
Documentation/sound/alsa/HD-Audio-Models.txt
浏览文件 @
9737731d
...
@@ -296,6 +296,7 @@ Conexant 5051
...
@@ -296,6 +296,7 @@ Conexant 5051
Conexant 5066
Conexant 5066
=============
=============
laptop Basic Laptop config (default)
laptop Basic Laptop config (default)
hp-laptop HP laptops, e g G60
dell-laptop Dell laptops
dell-laptop Dell laptops
dell-vostro Dell Vostro
dell-vostro Dell Vostro
olpc-xo-1_5 OLPC XO 1.5
olpc-xo-1_5 OLPC XO 1.5
...
...
sound/pci/hda/patch_conexant.c
浏览文件 @
9737731d
...
@@ -116,6 +116,7 @@ struct conexant_spec {
...
@@ -116,6 +116,7 @@ struct conexant_spec {
unsigned
int
dell_vostro
:
1
;
unsigned
int
dell_vostro
:
1
;
unsigned
int
ideapad
:
1
;
unsigned
int
ideapad
:
1
;
unsigned
int
thinkpad
:
1
;
unsigned
int
thinkpad
:
1
;
unsigned
int
hp_laptop
:
1
;
unsigned
int
ext_mic_present
;
unsigned
int
ext_mic_present
;
unsigned
int
recording
;
unsigned
int
recording
;
...
@@ -2299,6 +2300,18 @@ static void cxt5066_ideapad_automic(struct hda_codec *codec)
...
@@ -2299,6 +2300,18 @@ static void cxt5066_ideapad_automic(struct hda_codec *codec)
}
}
}
}
/* toggle input of built-in digital mic and mic jack appropriately */
static
void
cxt5066_hp_laptop_automic
(
struct
hda_codec
*
codec
)
{
unsigned
int
present
;
present
=
snd_hda_jack_detect
(
codec
,
0x1b
);
snd_printdd
(
"CXT5066: external microphone present=%d
\n
"
,
present
);
snd_hda_codec_write
(
codec
,
0x17
,
0
,
AC_VERB_SET_CONNECT_SEL
,
present
?
1
:
3
);
}
/* toggle input of built-in digital mic and mic jack appropriately
/* toggle input of built-in digital mic and mic jack appropriately
order is: external mic -> dock mic -> interal mic */
order is: external mic -> dock mic -> interal mic */
static
void
cxt5066_thinkpad_automic
(
struct
hda_codec
*
codec
)
static
void
cxt5066_thinkpad_automic
(
struct
hda_codec
*
codec
)
...
@@ -2407,6 +2420,20 @@ static void cxt5066_ideapad_event(struct hda_codec *codec, unsigned int res)
...
@@ -2407,6 +2420,20 @@ static void cxt5066_ideapad_event(struct hda_codec *codec, unsigned int res)
}
}
}
}
/* unsolicited event for jack sensing */
static
void
cxt5066_hp_laptop_event
(
struct
hda_codec
*
codec
,
unsigned
int
res
)
{
snd_printdd
(
"CXT5066_hp_laptop: unsol event %x (%x)
\n
"
,
res
,
res
>>
26
);
switch
(
res
>>
26
)
{
case
CONEXANT_HP_EVENT
:
cxt5066_hp_automute
(
codec
);
break
;
case
CONEXANT_MIC_EVENT
:
cxt5066_hp_laptop_automic
(
codec
);
break
;
}
}
/* unsolicited event for jack sensing */
/* unsolicited event for jack sensing */
static
void
cxt5066_thinkpad_event
(
struct
hda_codec
*
codec
,
unsigned
int
res
)
static
void
cxt5066_thinkpad_event
(
struct
hda_codec
*
codec
,
unsigned
int
res
)
{
{
...
@@ -2989,6 +3016,14 @@ static struct hda_verb cxt5066_init_verbs_portd_lo[] = {
...
@@ -2989,6 +3016,14 @@ static struct hda_verb cxt5066_init_verbs_portd_lo[] = {
{
}
/* end */
{
}
/* end */
};
};
static
struct
hda_verb
cxt5066_init_verbs_hp_laptop
[]
=
{
{
0x14
,
AC_VERB_SET_CONNECT_SEL
,
0x0
},
{
0x19
,
AC_VERB_SET_UNSOLICITED_ENABLE
,
AC_USRSP_EN
|
CONEXANT_HP_EVENT
},
{
0x1b
,
AC_VERB_SET_UNSOLICITED_ENABLE
,
AC_USRSP_EN
|
CONEXANT_MIC_EVENT
},
{
}
/* end */
};
/* initialize jack-sensing, too */
/* initialize jack-sensing, too */
static
int
cxt5066_init
(
struct
hda_codec
*
codec
)
static
int
cxt5066_init
(
struct
hda_codec
*
codec
)
{
{
...
@@ -3004,6 +3039,8 @@ static int cxt5066_init(struct hda_codec *codec)
...
@@ -3004,6 +3039,8 @@ static int cxt5066_init(struct hda_codec *codec)
cxt5066_ideapad_automic
(
codec
);
cxt5066_ideapad_automic
(
codec
);
else
if
(
spec
->
thinkpad
)
else
if
(
spec
->
thinkpad
)
cxt5066_thinkpad_automic
(
codec
);
cxt5066_thinkpad_automic
(
codec
);
else
if
(
spec
->
hp_laptop
)
cxt5066_hp_laptop_automic
(
codec
);
}
}
cxt5066_set_mic_boost
(
codec
);
cxt5066_set_mic_boost
(
codec
);
return
0
;
return
0
;
...
@@ -3031,6 +3068,7 @@ enum {
...
@@ -3031,6 +3068,7 @@ enum {
CXT5066_DELL_VOSTO
,
/* Dell Vostro 1015i */
CXT5066_DELL_VOSTO
,
/* Dell Vostro 1015i */
CXT5066_IDEAPAD
,
/* Lenovo IdeaPad U150 */
CXT5066_IDEAPAD
,
/* Lenovo IdeaPad U150 */
CXT5066_THINKPAD
,
/* Lenovo ThinkPad T410s, others? */
CXT5066_THINKPAD
,
/* Lenovo ThinkPad T410s, others? */
CXT5066_HP_LAPTOP
,
/* HP Laptop */
CXT5066_MODELS
CXT5066_MODELS
};
};
...
@@ -3041,6 +3079,7 @@ static const char *cxt5066_models[CXT5066_MODELS] = {
...
@@ -3041,6 +3079,7 @@ static const char *cxt5066_models[CXT5066_MODELS] = {
[
CXT5066_DELL_VOSTO
]
=
"dell-vostro"
,
[
CXT5066_DELL_VOSTO
]
=
"dell-vostro"
,
[
CXT5066_IDEAPAD
]
=
"ideapad"
,
[
CXT5066_IDEAPAD
]
=
"ideapad"
,
[
CXT5066_THINKPAD
]
=
"thinkpad"
,
[
CXT5066_THINKPAD
]
=
"thinkpad"
,
[
CXT5066_HP_LAPTOP
]
=
"hp-laptop"
,
};
};
static
struct
snd_pci_quirk
cxt5066_cfg_tbl
[]
=
{
static
struct
snd_pci_quirk
cxt5066_cfg_tbl
[]
=
{
...
@@ -3052,8 +3091,10 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
...
@@ -3052,8 +3091,10 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
SND_PCI_QUIRK
(
0x1028
,
0x02d8
,
"Dell Vostro"
,
CXT5066_DELL_VOSTO
),
SND_PCI_QUIRK
(
0x1028
,
0x02d8
,
"Dell Vostro"
,
CXT5066_DELL_VOSTO
),
SND_PCI_QUIRK
(
0x1028
,
0x0402
,
"Dell Vostro"
,
CXT5066_DELL_VOSTO
),
SND_PCI_QUIRK
(
0x1028
,
0x0402
,
"Dell Vostro"
,
CXT5066_DELL_VOSTO
),
SND_PCI_QUIRK
(
0x1028
,
0x0408
,
"Dell Inspiron One 19T"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x1028
,
0x0408
,
"Dell Inspiron One 19T"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x103c
,
0x360b
,
"HP G60"
,
CXT5066_HP_LAPTOP
),
SND_PCI_QUIRK
(
0x1179
,
0xff50
,
"Toshiba Satellite P500-PSPGSC-01800T"
,
CXT5066_OLPC_XO_1_5
),
SND_PCI_QUIRK
(
0x1179
,
0xff50
,
"Toshiba Satellite P500-PSPGSC-01800T"
,
CXT5066_OLPC_XO_1_5
),
SND_PCI_QUIRK
(
0x1179
,
0xffe0
,
"Toshiba Satellite Pro T130-15F"
,
CXT5066_OLPC_XO_1_5
),
SND_PCI_QUIRK
(
0x1179
,
0xffe0
,
"Toshiba Satellite Pro T130-15F"
,
CXT5066_OLPC_XO_1_5
),
SND_PCI_QUIRK
(
0x17aa
,
0x20f2
,
"Lenovo T400s"
,
CXT5066_THINKPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x21b2
,
"Thinkpad X100e"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x21b2
,
"Thinkpad X100e"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x21b3
,
"Thinkpad Edge 13 (197)"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x21b3
,
"Thinkpad Edge 13 (197)"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x21b4
,
"Thinkpad Edge"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x21b4
,
"Thinkpad Edge"
,
CXT5066_IDEAPAD
),
...
@@ -3116,6 +3157,23 @@ static int patch_cxt5066(struct hda_codec *codec)
...
@@ -3116,6 +3157,23 @@ static int patch_cxt5066(struct hda_codec *codec)
spec
->
num_init_verbs
++
;
spec
->
num_init_verbs
++
;
spec
->
dell_automute
=
1
;
spec
->
dell_automute
=
1
;
break
;
break
;
case
CXT5066_HP_LAPTOP
:
codec
->
patch_ops
.
init
=
cxt5066_init
;
codec
->
patch_ops
.
unsol_event
=
cxt5066_hp_laptop_event
;
spec
->
init_verbs
[
spec
->
num_init_verbs
]
=
cxt5066_init_verbs_hp_laptop
;
spec
->
num_init_verbs
++
;
spec
->
hp_laptop
=
1
;
spec
->
mixers
[
spec
->
num_mixers
++
]
=
cxt5066_mixer_master
;
spec
->
mixers
[
spec
->
num_mixers
++
]
=
cxt5066_mixers
;
/* no S/PDIF out */
spec
->
multiout
.
dig_out_nid
=
0
;
/* input source automatically selected */
spec
->
input_mux
=
NULL
;
spec
->
port_d_mode
=
0
;
spec
->
mic_boost
=
3
;
/* default 30dB gain */
break
;
case
CXT5066_OLPC_XO_1_5
:
case
CXT5066_OLPC_XO_1_5
:
codec
->
patch_ops
.
init
=
cxt5066_olpc_init
;
codec
->
patch_ops
.
init
=
cxt5066_olpc_init
;
codec
->
patch_ops
.
unsol_event
=
cxt5066_olpc_unsol_event
;
codec
->
patch_ops
.
unsol_event
=
cxt5066_olpc_unsol_event
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录