Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5e8338db
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看板
提交
5e8338db
编写于
5月 26, 2017
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus
上级
08332893
0a716776
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
97 addition
and
76 deletion
+97
-76
sound/soc/intel/skylake/skl-sst-ipc.c
sound/soc/intel/skylake/skl-sst-ipc.c
+5
-0
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.c
+1
-1
sound/soc/intel/skylake/skl.c
sound/soc/intel/skylake/skl.c
+88
-74
sound/soc/intel/skylake/skl.h
sound/soc/intel/skylake/skl.h
+3
-1
未找到文件。
sound/soc/intel/skylake/skl-sst-ipc.c
浏览文件 @
5e8338db
...
...
@@ -413,8 +413,11 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
u32
reply
=
header
.
primary
&
IPC_GLB_REPLY_STATUS_MASK
;
u64
*
ipc_header
=
(
u64
*
)(
&
header
);
struct
skl_sst
*
skl
=
container_of
(
ipc
,
struct
skl_sst
,
ipc
);
unsigned
long
flags
;
spin_lock_irqsave
(
&
ipc
->
dsp
->
spinlock
,
flags
);
msg
=
skl_ipc_reply_get_msg
(
ipc
,
*
ipc_header
);
spin_unlock_irqrestore
(
&
ipc
->
dsp
->
spinlock
,
flags
);
if
(
msg
==
NULL
)
{
dev_dbg
(
ipc
->
dev
,
"ipc: rx list is empty
\n
"
);
return
;
...
...
@@ -456,8 +459,10 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
}
}
spin_lock_irqsave
(
&
ipc
->
dsp
->
spinlock
,
flags
);
list_del
(
&
msg
->
list
);
sst_ipc_tx_msg_reply_complete
(
ipc
,
msg
);
spin_unlock_irqrestore
(
&
ipc
->
dsp
->
spinlock
,
flags
);
}
irqreturn_t
skl_dsp_irq_thread_handler
(
int
irq
,
void
*
context
)
...
...
sound/soc/intel/skylake/skl-topology.c
浏览文件 @
5e8338db
...
...
@@ -2502,7 +2502,7 @@ static int skl_tplg_get_manifest_tkn(struct device *dev,
if
(
ret
<
0
)
return
ret
;
tkn_count
+
=
ret
;
tkn_count
=
ret
;
tuple_size
+=
tkn_count
*
sizeof
(
struct
snd_soc_tplg_vendor_string_elem
);
...
...
sound/soc/intel/skylake/skl.c
浏览文件 @
5e8338db
...
...
@@ -410,7 +410,7 @@ static int skl_free(struct hdac_ext_bus *ebus)
struct
skl
*
skl
=
ebus_to_skl
(
ebus
);
struct
hdac_bus
*
bus
=
ebus_to_hbus
(
ebus
);
skl
->
init_
failed
=
1
;
/* to be sure */
skl
->
init_
done
=
0
;
/* to be sure */
snd_hdac_ext_stop_streams
(
ebus
);
...
...
@@ -428,8 +428,10 @@ static int skl_free(struct hdac_ext_bus *ebus)
snd_hdac_ext_bus_exit
(
ebus
);
cancel_work_sync
(
&
skl
->
probe_work
);
if
(
IS_ENABLED
(
CONFIG_SND_SOC_HDAC_HDMI
))
snd_hdac_i915_exit
(
&
ebus
->
bus
);
return
0
;
}
...
...
@@ -566,6 +568,84 @@ static const struct hdac_bus_ops bus_core_ops = {
.
get_response
=
snd_hdac_bus_get_response
,
};
static
int
skl_i915_init
(
struct
hdac_bus
*
bus
)
{
int
err
;
/*
* The HDMI codec is in GPU so we need to ensure that it is powered
* up and ready for probe
*/
err
=
snd_hdac_i915_init
(
bus
);
if
(
err
<
0
)
return
err
;
err
=
snd_hdac_display_power
(
bus
,
true
);
if
(
err
<
0
)
dev_err
(
bus
->
dev
,
"Cannot turn on display power on i915
\n
"
);
return
err
;
}
static
void
skl_probe_work
(
struct
work_struct
*
work
)
{
struct
skl
*
skl
=
container_of
(
work
,
struct
skl
,
probe_work
);
struct
hdac_ext_bus
*
ebus
=
&
skl
->
ebus
;
struct
hdac_bus
*
bus
=
ebus_to_hbus
(
ebus
);
struct
hdac_ext_link
*
hlink
=
NULL
;
int
err
;
if
(
IS_ENABLED
(
CONFIG_SND_SOC_HDAC_HDMI
))
{
err
=
skl_i915_init
(
bus
);
if
(
err
<
0
)
return
;
}
err
=
skl_init_chip
(
bus
,
true
);
if
(
err
<
0
)
{
dev_err
(
bus
->
dev
,
"Init chip failed with err: %d
\n
"
,
err
);
goto
out_err
;
}
/* codec detection */
if
(
!
bus
->
codec_mask
)
dev_info
(
bus
->
dev
,
"no hda codecs found!
\n
"
);
/* create codec instances */
err
=
skl_codec_create
(
ebus
);
if
(
err
<
0
)
goto
out_err
;
if
(
IS_ENABLED
(
CONFIG_SND_SOC_HDAC_HDMI
))
{
err
=
snd_hdac_display_power
(
bus
,
false
);
if
(
err
<
0
)
{
dev_err
(
bus
->
dev
,
"Cannot turn off display power on i915
\n
"
);
return
;
}
}
/* register platform dai and controls */
err
=
skl_platform_register
(
bus
->
dev
);
if
(
err
<
0
)
return
;
/*
* we are done probing so decrement link counts
*/
list_for_each_entry
(
hlink
,
&
ebus
->
hlink_list
,
list
)
snd_hdac_ext_bus_link_put
(
ebus
,
hlink
);
/* configure PM */
pm_runtime_put_noidle
(
bus
->
dev
);
pm_runtime_allow
(
bus
->
dev
);
skl
->
init_done
=
1
;
return
;
out_err:
if
(
IS_ENABLED
(
CONFIG_SND_SOC_HDAC_HDMI
))
err
=
snd_hdac_display_power
(
bus
,
false
);
}
/*
* constructor
*/
...
...
@@ -593,6 +673,7 @@ static int skl_create(struct pci_dev *pci,
snd_hdac_ext_bus_init
(
ebus
,
&
pci
->
dev
,
&
bus_core_ops
,
io_ops
);
ebus
->
bus
.
use_posbuf
=
1
;
skl
->
pci
=
pci
;
INIT_WORK
(
&
skl
->
probe_work
,
skl_probe_work
);
ebus
->
bus
.
bdl_pos_adj
=
0
;
...
...
@@ -601,27 +682,6 @@ static int skl_create(struct pci_dev *pci,
return
0
;
}
static
int
skl_i915_init
(
struct
hdac_bus
*
bus
)
{
int
err
;
/*
* The HDMI codec is in GPU so we need to ensure that it is powered
* up and ready for probe
*/
err
=
snd_hdac_i915_init
(
bus
);
if
(
err
<
0
)
return
err
;
err
=
snd_hdac_display_power
(
bus
,
true
);
if
(
err
<
0
)
{
dev_err
(
bus
->
dev
,
"Cannot turn on display power on i915
\n
"
);
return
err
;
}
return
err
;
}
static
int
skl_first_init
(
struct
hdac_ext_bus
*
ebus
)
{
struct
skl
*
skl
=
ebus_to_skl
(
ebus
);
...
...
@@ -684,20 +744,7 @@ static int skl_first_init(struct hdac_ext_bus *ebus)
/* initialize chip */
skl_init_pci
(
skl
);
if
(
IS_ENABLED
(
CONFIG_SND_SOC_HDAC_HDMI
))
{
err
=
skl_i915_init
(
bus
);
if
(
err
<
0
)
return
err
;
}
skl_init_chip
(
bus
,
true
);
/* codec detection */
if
(
!
bus
->
codec_mask
)
{
dev_info
(
bus
->
dev
,
"no hda codecs found!
\n
"
);
}
return
0
;
return
skl_init_chip
(
bus
,
true
);
}
static
int
skl_probe
(
struct
pci_dev
*
pci
,
...
...
@@ -706,7 +753,6 @@ static int skl_probe(struct pci_dev *pci,
struct
skl
*
skl
;
struct
hdac_ext_bus
*
ebus
=
NULL
;
struct
hdac_bus
*
bus
=
NULL
;
struct
hdac_ext_link
*
hlink
=
NULL
;
int
err
;
/* we use ext core ops, so provide NULL for ops here */
...
...
@@ -729,7 +775,7 @@ static int skl_probe(struct pci_dev *pci,
if
(
skl
->
nhlt
==
NULL
)
{
err
=
-
ENODEV
;
goto
out_
display_power_off
;
goto
out_
free
;
}
err
=
skl_nhlt_create_sysfs
(
skl
);
...
...
@@ -760,56 +806,24 @@ static int skl_probe(struct pci_dev *pci,
if
(
bus
->
mlcap
)
snd_hdac_ext_bus_get_ml_capabilities
(
ebus
);
snd_hdac_bus_stop_chip
(
bus
);
/* create device for soc dmic */
err
=
skl_dmic_device_register
(
skl
);
if
(
err
<
0
)
goto
out_dsp_free
;
/* register platform dai and controls */
err
=
skl_platform_register
(
bus
->
dev
);
if
(
err
<
0
)
goto
out_dmic_free
;
/* create codec instances */
err
=
skl_codec_create
(
ebus
);
if
(
err
<
0
)
goto
out_unregister
;
if
(
IS_ENABLED
(
CONFIG_SND_SOC_HDAC_HDMI
))
{
err
=
snd_hdac_display_power
(
bus
,
false
);
if
(
err
<
0
)
{
dev_err
(
bus
->
dev
,
"Cannot turn off display power on i915
\n
"
);
return
err
;
}
}
/*
* we are done probling so decrement link counts
*/
list_for_each_entry
(
hlink
,
&
ebus
->
hlink_list
,
list
)
snd_hdac_ext_bus_link_put
(
ebus
,
hlink
);
/* configure PM */
pm_runtime_put_noidle
(
bus
->
dev
);
pm_runtime_allow
(
bus
->
dev
);
schedule_work
(
&
skl
->
probe_work
);
return
0
;
out_unregister:
skl_platform_unregister
(
bus
->
dev
);
out_dmic_free:
skl_dmic_device_unregister
(
skl
);
out_dsp_free:
skl_free_dsp
(
skl
);
out_mach_free:
skl_machine_device_unregister
(
skl
);
out_nhlt_free:
skl_nhlt_free
(
skl
->
nhlt
);
out_display_power_off:
if
(
IS_ENABLED
(
CONFIG_SND_SOC_HDAC_HDMI
))
snd_hdac_display_power
(
bus
,
false
);
out_free:
skl
->
init_failed
=
1
;
skl_free
(
ebus
);
return
err
;
...
...
@@ -828,7 +842,7 @@ static void skl_shutdown(struct pci_dev *pci)
skl
=
ebus_to_skl
(
ebus
);
if
(
skl
->
init_failed
)
if
(
!
skl
->
init_done
)
return
;
snd_hdac_ext_stop_streams
(
ebus
);
...
...
sound/soc/intel/skylake/skl.h
浏览文件 @
5e8338db
...
...
@@ -46,7 +46,7 @@ struct skl {
struct
hdac_ext_bus
ebus
;
struct
pci_dev
*
pci
;
unsigned
int
init_
failed
:
1
;
/* delayed init failed
*/
unsigned
int
init_
done
:
1
;
/* delayed init status
*/
struct
platform_device
*
dmic_dev
;
struct
platform_device
*
i2s_dev
;
struct
snd_soc_platform
*
platform
;
...
...
@@ -64,6 +64,8 @@ struct skl {
const
struct
firmware
*
tplg
;
int
supend_active
;
struct
work_struct
probe_work
;
};
#define skl_to_ebus(s) (&(s)->ebus)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录