Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7d9ca53b
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
7d9ca53b
编写于
4月 12, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next
上级
280200d6
ac50009f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
77 addition
and
9 deletion
+77
-9
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.c
+75
-9
sound/soc/codecs/wm_adsp.h
sound/soc/codecs/wm_adsp.h
+2
-0
未找到文件。
sound/soc/codecs/wm_adsp.c
浏览文件 @
7d9ca53b
...
...
@@ -193,17 +193,25 @@ static void wm_adsp_buf_free(struct list_head *list)
#define WM_ADSP_NUM_FW 4
#define WM_ADSP_FW_MBC_VSS 0
#define WM_ADSP_FW_TX 1
#define WM_ADSP_FW_TX_SPK 2
#define WM_ADSP_FW_RX_ANC 3
static
const
char
*
wm_adsp_fw_text
[
WM_ADSP_NUM_FW
]
=
{
"MBC/VSS"
,
"Tx"
,
"Tx Speaker"
,
"Rx ANC"
[
WM_ADSP_FW_MBC_VSS
]
=
"MBC/VSS"
,
[
WM_ADSP_FW_TX
]
=
"Tx"
,
[
WM_ADSP_FW_TX_SPK
]
=
"Tx Speaker"
,
[
WM_ADSP_FW_RX_ANC
]
=
"Rx ANC"
,
};
static
struct
{
const
char
*
file
;
}
wm_adsp_fw
[
WM_ADSP_NUM_FW
]
=
{
{
.
file
=
"mbc-vss"
},
{
.
file
=
"tx"
},
{
.
file
=
"tx-spk"
},
{
.
file
=
"rx-anc"
},
[
WM_ADSP_FW_MBC_VSS
]
=
{
.
file
=
"mbc-vss"
},
[
WM_ADSP_FW_TX
]
=
{
.
file
=
"tx"
},
[
WM_ADSP_FW_TX_SPK
]
=
{
.
file
=
"tx-spk"
},
[
WM_ADSP_FW_RX_ANC
]
=
{
.
file
=
"rx-anc"
},
};
static
int
wm_adsp_fw_get
(
struct
snd_kcontrol
*
kcontrol
,
...
...
@@ -549,13 +557,30 @@ static int wm_adsp_setup_algs(struct wm_adsp *dsp)
buf_size
=
sizeof
(
adsp1_id
);
algs
=
be32_to_cpu
(
adsp1_id
.
algs
);
dsp
->
fw_id
=
be32_to_cpu
(
adsp1_id
.
fw
.
id
);
adsp_info
(
dsp
,
"Firmware: %x v%d.%d.%d, %zu algorithms
\n
"
,
be32_to_cpu
(
adsp1_id
.
fw
.
id
)
,
dsp
->
fw_id
,
(
be32_to_cpu
(
adsp1_id
.
fw
.
ver
)
&
0xff0000
)
>>
16
,
(
be32_to_cpu
(
adsp1_id
.
fw
.
ver
)
&
0xff00
)
>>
8
,
be32_to_cpu
(
adsp1_id
.
fw
.
ver
)
&
0xff
,
algs
);
region
=
kzalloc
(
sizeof
(
*
region
),
GFP_KERNEL
);
if
(
!
region
)
return
-
ENOMEM
;
region
->
type
=
WMFW_ADSP1_ZM
;
region
->
alg
=
be32_to_cpu
(
adsp1_id
.
fw
.
id
);
region
->
base
=
be32_to_cpu
(
adsp1_id
.
zm
);
list_add_tail
(
&
region
->
list
,
&
dsp
->
alg_regions
);
region
=
kzalloc
(
sizeof
(
*
region
),
GFP_KERNEL
);
if
(
!
region
)
return
-
ENOMEM
;
region
->
type
=
WMFW_ADSP1_DM
;
region
->
alg
=
be32_to_cpu
(
adsp1_id
.
fw
.
id
);
region
->
base
=
be32_to_cpu
(
adsp1_id
.
dm
);
list_add_tail
(
&
region
->
list
,
&
dsp
->
alg_regions
);
pos
=
sizeof
(
adsp1_id
)
/
2
;
term
=
pos
+
((
sizeof
(
*
adsp1_alg
)
*
algs
)
/
2
);
break
;
...
...
@@ -573,13 +598,38 @@ static int wm_adsp_setup_algs(struct wm_adsp *dsp)
buf_size
=
sizeof
(
adsp2_id
);
algs
=
be32_to_cpu
(
adsp2_id
.
algs
);
dsp
->
fw_id
=
be32_to_cpu
(
adsp2_id
.
fw
.
id
);
adsp_info
(
dsp
,
"Firmware: %x v%d.%d.%d, %zu algorithms
\n
"
,
be32_to_cpu
(
adsp2_id
.
fw
.
id
)
,
dsp
->
fw_id
,
(
be32_to_cpu
(
adsp2_id
.
fw
.
ver
)
&
0xff0000
)
>>
16
,
(
be32_to_cpu
(
adsp2_id
.
fw
.
ver
)
&
0xff00
)
>>
8
,
be32_to_cpu
(
adsp2_id
.
fw
.
ver
)
&
0xff
,
algs
);
region
=
kzalloc
(
sizeof
(
*
region
),
GFP_KERNEL
);
if
(
!
region
)
return
-
ENOMEM
;
region
->
type
=
WMFW_ADSP2_XM
;
region
->
alg
=
be32_to_cpu
(
adsp2_id
.
fw
.
id
);
region
->
base
=
be32_to_cpu
(
adsp2_id
.
xm
);
list_add_tail
(
&
region
->
list
,
&
dsp
->
alg_regions
);
region
=
kzalloc
(
sizeof
(
*
region
),
GFP_KERNEL
);
if
(
!
region
)
return
-
ENOMEM
;
region
->
type
=
WMFW_ADSP2_YM
;
region
->
alg
=
be32_to_cpu
(
adsp2_id
.
fw
.
id
);
region
->
base
=
be32_to_cpu
(
adsp2_id
.
ym
);
list_add_tail
(
&
region
->
list
,
&
dsp
->
alg_regions
);
region
=
kzalloc
(
sizeof
(
*
region
),
GFP_KERNEL
);
if
(
!
region
)
return
-
ENOMEM
;
region
->
type
=
WMFW_ADSP2_ZM
;
region
->
alg
=
be32_to_cpu
(
adsp2_id
.
fw
.
id
);
region
->
base
=
be32_to_cpu
(
adsp2_id
.
zm
);
list_add_tail
(
&
region
->
list
,
&
dsp
->
alg_regions
);
pos
=
sizeof
(
adsp2_id
)
/
2
;
term
=
pos
+
((
sizeof
(
*
adsp2_alg
)
*
algs
)
/
2
);
break
;
...
...
@@ -781,8 +831,24 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
case
(
WMFW_INFO_TEXT
<<
8
):
break
;
case
(
WMFW_ABSOLUTE
<<
8
):
region_name
=
"register"
;
reg
=
offset
;
/*
* Old files may use this for global
* coefficients.
*/
if
(
le32_to_cpu
(
blk
->
id
)
==
dsp
->
fw_id
&&
offset
==
0
)
{
region_name
=
"global coefficients"
;
mem
=
wm_adsp_find_region
(
dsp
,
type
);
if
(
!
mem
)
{
adsp_err
(
dsp
,
"No ZM
\n
"
);
break
;
}
reg
=
wm_adsp_region_to_reg
(
mem
,
0
);
}
else
{
region_name
=
"register"
;
reg
=
offset
;
}
break
;
case
WMFW_ADSP1_DM
:
...
...
sound/soc/codecs/wm_adsp.h
浏览文件 @
7d9ca53b
...
...
@@ -46,6 +46,8 @@ struct wm_adsp {
struct
list_head
alg_regions
;
int
fw_id
;
const
struct
wm_adsp_region
*
mem
;
int
num_mems
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录