Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
df223136
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
df223136
编写于
2月 11, 2009
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into topic/hda
上级
501ca256
a57c0eb6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
34 addition
and
27 deletion
+34
-27
sound/pci/hda/patch_intelhdmi.c
sound/pci/hda/patch_intelhdmi.c
+34
-27
未找到文件。
sound/pci/hda/patch_intelhdmi.c
浏览文件 @
df223136
...
...
@@ -49,11 +49,6 @@ static struct hda_verb pinout_enable_verb[] = {
{}
/* terminator */
};
static
struct
hda_verb
pinout_disable_verb
[]
=
{
{
PIN_NID
,
AC_VERB_SET_PIN_WIDGET_CONTROL
,
0x00
},
{}
};
static
struct
hda_verb
unsolicited_response_verb
[]
=
{
{
PIN_NID
,
AC_VERB_SET_UNSOLICITED_ENABLE
,
AC_USRSP_EN
|
INTEL_HDMI_EVENT_TAG
},
...
...
@@ -248,10 +243,6 @@ static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t nid,
static
void
hdmi_enable_output
(
struct
hda_codec
*
codec
)
{
/* Enable Audio InfoFrame Transmission */
hdmi_set_dip_index
(
codec
,
PIN_NID
,
0x0
,
0x0
);
snd_hda_codec_write
(
codec
,
PIN_NID
,
0
,
AC_VERB_SET_HDMI_DIP_XMIT
,
AC_DIPXMIT_BEST
);
/* Unmute */
if
(
get_wcaps
(
codec
,
PIN_NID
)
&
AC_WCAP_OUT_AMP
)
snd_hda_codec_write
(
codec
,
PIN_NID
,
0
,
...
...
@@ -260,17 +251,24 @@ static void hdmi_enable_output(struct hda_codec *codec)
snd_hda_sequence_write
(
codec
,
pinout_enable_verb
);
}
static
void
hdmi_disable_output
(
struct
hda_codec
*
codec
)
/*
* Enable Audio InfoFrame Transmission
*/
static
void
hdmi_start_infoframe_trans
(
struct
hda_codec
*
codec
)
{
snd_hda_sequence_write
(
codec
,
pinout_disable_verb
);
if
(
get_wcaps
(
codec
,
PIN_NID
)
&
AC_WCAP_OUT_AMP
)
snd_hda_codec_write
(
codec
,
PIN_NID
,
0
,
AC_VERB_SET_AMP_GAIN_MUTE
,
AMP_OUT_MUTE
);
hdmi_set_dip_index
(
codec
,
PIN_NID
,
0x0
,
0x0
);
snd_hda_codec_write
(
codec
,
PIN_NID
,
0
,
AC_VERB_SET_HDMI_DIP_XMIT
,
AC_DIPXMIT_BEST
);
}
/*
* FIXME: noises may arise when playing music after reloading the
* kernel module, until the next X restart or monitor repower.
*/
/*
* Disable Audio InfoFrame Transmission
*/
static
void
hdmi_stop_infoframe_trans
(
struct
hda_codec
*
codec
)
{
hdmi_set_dip_index
(
codec
,
PIN_NID
,
0x0
,
0x0
);
snd_hda_codec_write
(
codec
,
PIN_NID
,
0
,
AC_VERB_SET_HDMI_DIP_XMIT
,
AC_DIPXMIT_DISABLE
);
}
static
int
hdmi_get_channel_count
(
struct
hda_codec
*
codec
)
...
...
@@ -368,11 +366,16 @@ static void hdmi_fill_audio_infoframe(struct hda_codec *codec,
struct
hdmi_audio_infoframe
*
ai
)
{
u8
*
params
=
(
u8
*
)
ai
;
u8
sum
=
0
;
int
i
;
hdmi_debug_dip_size
(
codec
);
hdmi_clear_dip_buffers
(
codec
);
/* be paranoid */
for
(
i
=
0
;
i
<
sizeof
(
ai
);
i
++
)
sum
+=
params
[
i
];
ai
->
checksum
=
-
sum
;
hdmi_set_dip_index
(
codec
,
PIN_NID
,
0x0
,
0x0
);
for
(
i
=
0
;
i
<
sizeof
(
ai
);
i
++
)
hdmi_write_dip_byte
(
codec
,
PIN_NID
,
params
[
i
]);
...
...
@@ -419,13 +422,17 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec,
/*
* CA defaults to 0 for basic stereo audio
*/
if
(
!
eld
->
eld_ver
)
return
0
;
if
(
!
eld
->
spk_alloc
)
return
0
;
if
(
channels
<=
2
)
return
0
;
/*
* HDMI sink's ELD info cannot always be retrieved for now, e.g.
* in console or for audio devices. Assume the highest speakers
* configuration, to _not_ prohibit multi-channel audio playback.
*/
if
(
!
eld
->
spk_alloc
)
eld
->
spk_alloc
=
0xffff
;
/*
* expand ELD's speaker allocation mask
*
...
...
@@ -485,6 +492,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
hdmi_setup_channel_mapping
(
codec
,
&
ai
);
hdmi_fill_audio_infoframe
(
codec
,
&
ai
);
hdmi_start_infoframe_trans
(
codec
);
}
...
...
@@ -562,7 +570,7 @@ static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo,
{
struct
intel_hdmi_spec
*
spec
=
codec
->
spec
;
hdmi_
disable_output
(
codec
);
hdmi_
stop_infoframe_trans
(
codec
);
return
snd_hda_multi_out_dig_close
(
codec
,
&
spec
->
multiout
);
}
...
...
@@ -582,8 +590,6 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
hdmi_setup_audio_infoframe
(
codec
,
substream
);
hdmi_enable_output
(
codec
);
return
0
;
}
...
...
@@ -628,8 +634,7 @@ static int intel_hdmi_build_controls(struct hda_codec *codec)
static
int
intel_hdmi_init
(
struct
hda_codec
*
codec
)
{
/* disable audio output as early as possible */
hdmi_disable_output
(
codec
);
hdmi_enable_output
(
codec
);
snd_hda_sequence_write
(
codec
,
unsolicited_response_verb
);
...
...
@@ -679,6 +684,7 @@ static struct hda_codec_preset snd_hda_preset_intelhdmi[] = {
{
.
id
=
0x80862801
,
.
name
=
"G45 DEVBLC"
,
.
patch
=
patch_intel_hdmi
},
{
.
id
=
0x80862802
,
.
name
=
"G45 DEVCTG"
,
.
patch
=
patch_intel_hdmi
},
{
.
id
=
0x80862803
,
.
name
=
"G45 DEVELK"
,
.
patch
=
patch_intel_hdmi
},
{
.
id
=
0x80862804
,
.
name
=
"G45 DEVIBX"
,
.
patch
=
patch_intel_hdmi
},
{
.
id
=
0x10951392
,
.
name
=
"SiI1392 HDMI"
,
.
patch
=
patch_intel_hdmi
},
{}
/* terminator */
};
...
...
@@ -687,6 +693,7 @@ MODULE_ALIAS("snd-hda-codec-id:808629fb");
MODULE_ALIAS
(
"snd-hda-codec-id:80862801"
);
MODULE_ALIAS
(
"snd-hda-codec-id:80862802"
);
MODULE_ALIAS
(
"snd-hda-codec-id:80862803"
);
MODULE_ALIAS
(
"snd-hda-codec-id:80862804"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10951392"
);
MODULE_LICENSE
(
"GPL"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录