Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d2f927d4
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
d2f927d4
编写于
14年前
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into for-linus
上级
9c77b846
6f0ef6ea
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
40 addition
and
52 deletion
+40
-52
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+20
-13
sound/pci/hda/hda_codec.h
sound/pci/hda/hda_codec.h
+1
-1
sound/pci/hda/hda_eld.c
sound/pci/hda/hda_eld.c
+2
-2
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_conexant.c
+1
-0
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_hdmi.c
+1
-20
sound/pci/hda/patch_intelhdmi.c
sound/pci/hda/patch_intelhdmi.c
+0
-8
sound/pci/hda/patch_nvhdmi.c
sound/pci/hda/patch_nvhdmi.c
+0
-8
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_sigmatel.c
+15
-0
未找到文件。
sound/pci/hda/hda_codec.c
浏览文件 @
d2f927d4
...
...
@@ -589,6 +589,7 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card,
bus
->
ops
=
temp
->
ops
;
mutex_init
(
&
bus
->
cmd_mutex
);
mutex_init
(
&
bus
->
prepare_mutex
);
INIT_LIST_HEAD
(
&
bus
->
codec_list
);
snprintf
(
bus
->
workq_name
,
sizeof
(
bus
->
workq_name
),
...
...
@@ -1068,7 +1069,6 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus,
codec
->
addr
=
codec_addr
;
mutex_init
(
&
codec
->
spdif_mutex
);
mutex_init
(
&
codec
->
control_mutex
);
mutex_init
(
&
codec
->
prepare_mutex
);
init_hda_cache
(
&
codec
->
amp_cache
,
sizeof
(
struct
hda_amp_info
));
init_hda_cache
(
&
codec
->
cmd_cache
,
sizeof
(
struct
hda_cache_head
));
snd_array_init
(
&
codec
->
mixers
,
sizeof
(
struct
hda_nid_item
),
32
);
...
...
@@ -1213,6 +1213,7 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
u32
stream_tag
,
int
channel_id
,
int
format
)
{
struct
hda_codec
*
c
;
struct
hda_cvt_setup
*
p
;
unsigned
int
oldval
,
newval
;
int
i
;
...
...
@@ -1253,10 +1254,12 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
p
->
dirty
=
0
;
/* make other inactive cvts with the same stream-tag dirty */
for
(
i
=
0
;
i
<
codec
->
cvt_setups
.
used
;
i
++
)
{
p
=
snd_array_elem
(
&
codec
->
cvt_setups
,
i
);
if
(
!
p
->
active
&&
p
->
stream_tag
==
stream_tag
)
p
->
dirty
=
1
;
list_for_each_entry
(
c
,
&
codec
->
bus
->
codec_list
,
list
)
{
for
(
i
=
0
;
i
<
c
->
cvt_setups
.
used
;
i
++
)
{
p
=
snd_array_elem
(
&
c
->
cvt_setups
,
i
);
if
(
!
p
->
active
&&
p
->
stream_tag
==
stream_tag
)
p
->
dirty
=
1
;
}
}
}
EXPORT_SYMBOL_HDA
(
snd_hda_codec_setup_stream
);
...
...
@@ -1306,12 +1309,16 @@ static void really_cleanup_stream(struct hda_codec *codec,
/* clean up the all conflicting obsolete streams */
static
void
purify_inactive_streams
(
struct
hda_codec
*
codec
)
{
struct
hda_codec
*
c
;
int
i
;
for
(
i
=
0
;
i
<
codec
->
cvt_setups
.
used
;
i
++
)
{
struct
hda_cvt_setup
*
p
=
snd_array_elem
(
&
codec
->
cvt_setups
,
i
);
if
(
p
->
dirty
)
really_cleanup_stream
(
codec
,
p
);
list_for_each_entry
(
c
,
&
codec
->
bus
->
codec_list
,
list
)
{
for
(
i
=
0
;
i
<
c
->
cvt_setups
.
used
;
i
++
)
{
struct
hda_cvt_setup
*
p
;
p
=
snd_array_elem
(
&
c
->
cvt_setups
,
i
);
if
(
p
->
dirty
)
really_cleanup_stream
(
c
,
p
);
}
}
}
...
...
@@ -3502,11 +3509,11 @@ int snd_hda_codec_prepare(struct hda_codec *codec,
struct
snd_pcm_substream
*
substream
)
{
int
ret
;
mutex_lock
(
&
codec
->
prepare_mutex
);
mutex_lock
(
&
codec
->
bus
->
prepare_mutex
);
ret
=
hinfo
->
ops
.
prepare
(
hinfo
,
codec
,
stream
,
format
,
substream
);
if
(
ret
>=
0
)
purify_inactive_streams
(
codec
);
mutex_unlock
(
&
codec
->
prepare_mutex
);
mutex_unlock
(
&
codec
->
bus
->
prepare_mutex
);
return
ret
;
}
EXPORT_SYMBOL_HDA
(
snd_hda_codec_prepare
);
...
...
@@ -3515,9 +3522,9 @@ void snd_hda_codec_cleanup(struct hda_codec *codec,
struct
hda_pcm_stream
*
hinfo
,
struct
snd_pcm_substream
*
substream
)
{
mutex_lock
(
&
codec
->
prepare_mutex
);
mutex_lock
(
&
codec
->
bus
->
prepare_mutex
);
hinfo
->
ops
.
cleanup
(
hinfo
,
codec
,
substream
);
mutex_unlock
(
&
codec
->
prepare_mutex
);
mutex_unlock
(
&
codec
->
bus
->
prepare_mutex
);
}
EXPORT_SYMBOL_HDA
(
snd_hda_codec_cleanup
);
...
...
This diff is collapsed.
Click to expand it.
sound/pci/hda/hda_codec.h
浏览文件 @
d2f927d4
...
...
@@ -648,6 +648,7 @@ struct hda_bus {
struct
hda_codec
*
caddr_tbl
[
HDA_MAX_CODEC_ADDRESS
+
1
];
struct
mutex
cmd_mutex
;
struct
mutex
prepare_mutex
;
/* unsolicited event queue */
struct
hda_bus_unsolicited
*
unsol
;
...
...
@@ -826,7 +827,6 @@ struct hda_codec {
struct
mutex
spdif_mutex
;
struct
mutex
control_mutex
;
struct
mutex
prepare_mutex
;
unsigned
int
spdif_status
;
/* IEC958 status bits */
unsigned
short
spdif_ctls
;
/* SPDIF control bits */
unsigned
int
spdif_in_enable
;
/* SPDIF input enable? */
...
...
This diff is collapsed.
Click to expand it.
sound/pci/hda/hda_eld.c
浏览文件 @
d2f927d4
...
...
@@ -596,6 +596,8 @@ void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld)
}
EXPORT_SYMBOL_HDA
(
snd_hda_eld_proc_free
);
#endif
/* CONFIG_PROC_FS */
/* update PCM info based on ELD */
void
hdmi_eld_update_pcm_info
(
struct
hdmi_eld
*
eld
,
struct
hda_pcm_stream
*
pcm
,
struct
hda_pcm_stream
*
codec_pars
)
...
...
@@ -644,5 +646,3 @@ void hdmi_eld_update_pcm_info(struct hdmi_eld *eld, struct hda_pcm_stream *pcm,
pcm
->
maxbps
=
min
(
pcm
->
maxbps
,
codec_pars
->
maxbps
);
}
EXPORT_SYMBOL_HDA
(
hdmi_eld_update_pcm_info
);
#endif
/* CONFIG_PROC_FS */
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_conexant.c
浏览文件 @
d2f927d4
...
...
@@ -3059,6 +3059,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
SND_PCI_QUIRK
(
0x17aa
,
0x21b4
,
"Thinkpad Edge"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x215e
,
"Lenovo Thinkpad"
,
CXT5066_THINKPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x38af
,
"Lenovo G series"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x390a
,
"Lenovo S10-3t"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x3938
,
"Lenovo G series (AMD)"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x17aa
,
0x3a0d
,
"ideapad"
,
CXT5066_IDEAPAD
),
{}
...
...
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_hdmi.c
浏览文件 @
d2f927d4
...
...
@@ -707,8 +707,6 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid,
u32
stream_tag
,
int
format
)
{
struct
hdmi_spec
*
spec
=
codec
->
spec
;
int
tag
;
int
fmt
;
int
pinctl
;
int
new_pinctl
=
0
;
int
i
;
...
...
@@ -745,24 +743,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid,
return
-
EINVAL
;
}
tag
=
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_GET_CONV
,
0
)
>>
4
;
fmt
=
snd_hda_codec_read
(
codec
,
nid
,
0
,
AC_VERB_GET_STREAM_FORMAT
,
0
);
snd_printdd
(
"hdmi_setup_stream: "
"NID=0x%x, %sstream=0x%x, %sformat=0x%x
\n
"
,
nid
,
tag
==
stream_tag
?
""
:
"new-"
,
stream_tag
,
fmt
==
format
?
""
:
"new-"
,
format
);
if
(
tag
!=
stream_tag
)
snd_hda_codec_write
(
codec
,
nid
,
0
,
AC_VERB_SET_CHANNEL_STREAMID
,
stream_tag
<<
4
);
if
(
fmt
!=
format
)
snd_hda_codec_write
(
codec
,
nid
,
0
,
AC_VERB_SET_STREAM_FORMAT
,
format
);
snd_hda_codec_setup_stream
(
codec
,
nid
,
stream_tag
,
0
,
format
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_intelhdmi.c
浏览文件 @
d2f927d4
...
...
@@ -69,20 +69,12 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
return
hdmi_setup_stream
(
codec
,
hinfo
->
nid
,
stream_tag
,
format
);
}
static
int
intel_hdmi_playback_pcm_cleanup
(
struct
hda_pcm_stream
*
hinfo
,
struct
hda_codec
*
codec
,
struct
snd_pcm_substream
*
substream
)
{
return
0
;
}
static
struct
hda_pcm_stream
intel_hdmi_pcm_playback
=
{
.
substreams
=
1
,
.
channels_min
=
2
,
.
ops
=
{
.
open
=
hdmi_pcm_open
,
.
prepare
=
intel_hdmi_playback_pcm_prepare
,
.
cleanup
=
intel_hdmi_playback_pcm_cleanup
,
},
};
...
...
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_nvhdmi.c
浏览文件 @
d2f927d4
...
...
@@ -326,13 +326,6 @@ static int nvhdmi_dig_playback_pcm_prepare_8ch(struct hda_pcm_stream *hinfo,
return
0
;
}
static
int
nvhdmi_playback_pcm_cleanup
(
struct
hda_pcm_stream
*
hinfo
,
struct
hda_codec
*
codec
,
struct
snd_pcm_substream
*
substream
)
{
return
0
;
}
static
int
nvhdmi_dig_playback_pcm_prepare_2ch
(
struct
hda_pcm_stream
*
hinfo
,
struct
hda_codec
*
codec
,
unsigned
int
stream_tag
,
...
...
@@ -350,7 +343,6 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch_89 = {
.
ops
=
{
.
open
=
hdmi_pcm_open
,
.
prepare
=
nvhdmi_dig_playback_pcm_prepare_8ch_89
,
.
cleanup
=
nvhdmi_playback_pcm_cleanup
,
},
};
...
...
This diff is collapsed.
Click to expand it.
sound/pci/hda/patch_sigmatel.c
浏览文件 @
d2f927d4
...
...
@@ -6303,6 +6303,21 @@ static struct hda_codec_preset snd_hda_preset_sigmatel[] = {
{
.
id
=
0x111d76b5
,
.
name
=
"92HD71B6X"
,
.
patch
=
patch_stac92hd71bxx
},
{
.
id
=
0x111d76b6
,
.
name
=
"92HD71B5X"
,
.
patch
=
patch_stac92hd71bxx
},
{
.
id
=
0x111d76b7
,
.
name
=
"92HD71B5X"
,
.
patch
=
patch_stac92hd71bxx
},
{
.
id
=
0x111d76c0
,
.
name
=
"92HD89C3"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c1
,
.
name
=
"92HD89C2"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c2
,
.
name
=
"92HD89C1"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c3
,
.
name
=
"92HD89B3"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c4
,
.
name
=
"92HD89B2"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c5
,
.
name
=
"92HD89B1"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c6
,
.
name
=
"92HD89E3"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c7
,
.
name
=
"92HD89E2"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c8
,
.
name
=
"92HD89E1"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76c9
,
.
name
=
"92HD89D3"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76ca
,
.
name
=
"92HD89D2"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76cb
,
.
name
=
"92HD89D1"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76cc
,
.
name
=
"92HD89F3"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76cd
,
.
name
=
"92HD89F2"
,
.
patch
=
patch_stac92hd73xx
},
{
.
id
=
0x111d76ce
,
.
name
=
"92HD89F1"
,
.
patch
=
patch_stac92hd73xx
},
{}
/* terminator */
};
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部