Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
977732b0
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看板
提交
977732b0
编写于
6月 05, 2015
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/dma' into asoc-next
上级
4b578955
acde50a7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
22 deletion
+16
-22
include/sound/dmaengine_pcm.h
include/sound/dmaengine_pcm.h
+0
-5
sound/soc/atmel/atmel-pcm-dma.c
sound/soc/atmel/atmel-pcm-dma.c
+1
-2
sound/soc/cirrus/ep93xx-pcm.c
sound/soc/cirrus/ep93xx-pcm.c
+0
-1
sound/soc/fsl/fsl_sai.c
sound/soc/fsl/fsl_sai.c
+1
-2
sound/soc/soc-generic-dmaengine-pcm.c
sound/soc/soc-generic-dmaengine-pcm.c
+14
-11
sound/soc/ux500/ux500_pcm.c
sound/soc/ux500/ux500_pcm.c
+0
-1
未找到文件。
include/sound/dmaengine_pcm.h
浏览文件 @
977732b0
...
...
@@ -90,11 +90,6 @@ void snd_dmaengine_pcm_set_config_from_dai_data(
* makes sense if SND_DMAENGINE_PCM_FLAG_COMPAT is set as well.
*/
#define SND_DMAENGINE_PCM_FLAG_NO_DT BIT(1)
/*
* The platforms dmaengine driver does not support reporting the amount of
* bytes that are still left to transfer.
*/
#define SND_DMAENGINE_PCM_FLAG_NO_RESIDUE BIT(2)
/*
* The PCM is half duplex and the DMA channel is shared between capture and
* playback.
...
...
sound/soc/atmel/atmel-pcm-dma.c
浏览文件 @
977732b0
...
...
@@ -124,8 +124,7 @@ static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = {
int
atmel_pcm_dma_platform_register
(
struct
device
*
dev
)
{
return
snd_dmaengine_pcm_register
(
dev
,
&
atmel_dmaengine_pcm_config
,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE
);
return
snd_dmaengine_pcm_register
(
dev
,
&
atmel_dmaengine_pcm_config
,
0
);
}
EXPORT_SYMBOL
(
atmel_pcm_dma_platform_register
);
...
...
sound/soc/cirrus/ep93xx-pcm.c
浏览文件 @
977732b0
...
...
@@ -60,7 +60,6 @@ int devm_ep93xx_pcm_platform_register(struct device *dev)
{
return
devm_snd_dmaengine_pcm_register
(
dev
,
&
ep93xx_dmaengine_pcm_config
,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE
|
SND_DMAENGINE_PCM_FLAG_NO_DT
|
SND_DMAENGINE_PCM_FLAG_COMPAT
);
}
...
...
sound/soc/fsl/fsl_sai.c
浏览文件 @
977732b0
...
...
@@ -664,8 +664,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
if
(
sai
->
sai_on_imx
)
return
imx_pcm_dma_init
(
pdev
);
else
return
devm_snd_dmaengine_pcm_register
(
&
pdev
->
dev
,
NULL
,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE
);
return
devm_snd_dmaengine_pcm_register
(
&
pdev
->
dev
,
NULL
,
0
);
}
static
const
struct
of_device_id
fsl_sai_ids
[]
=
{
...
...
sound/soc/soc-generic-dmaengine-pcm.c
浏览文件 @
977732b0
...
...
@@ -24,6 +24,12 @@
#include <sound/dmaengine_pcm.h>
/*
* The platforms dmaengine driver does not support reporting the amount of
* bytes that are still left to transfer.
*/
#define SND_DMAENGINE_PCM_FLAG_NO_RESIDUE BIT(31)
struct
dmaengine_pcm
{
struct
dma_chan
*
chan
[
SNDRV_PCM_STREAM_LAST
+
1
];
const
struct
snd_dmaengine_pcm_config
*
config
;
...
...
@@ -222,14 +228,18 @@ static struct dma_chan *dmaengine_pcm_compat_request_channel(
return
snd_dmaengine_pcm_request_channel
(
fn
,
dma_data
->
filter_data
);
}
static
bool
dmaengine_pcm_can_report_residue
(
struct
dma_chan
*
chan
)
static
bool
dmaengine_pcm_can_report_residue
(
struct
device
*
dev
,
struct
dma_chan
*
chan
)
{
struct
dma_slave_caps
dma_caps
;
int
ret
;
ret
=
dma_get_slave_caps
(
chan
,
&
dma_caps
);
if
(
ret
!=
0
)
return
true
;
if
(
ret
!=
0
)
{
dev_warn
(
dev
,
"Failed to get DMA channel capabilities, falling back to period counting: %d
\n
"
,
ret
);
return
false
;
}
if
(
dma_caps
.
residue_granularity
==
DMA_RESIDUE_GRANULARITY_DESCRIPTOR
)
return
false
;
...
...
@@ -289,14 +299,7 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd)
if
(
ret
)
return
ret
;
/*
* This will only return false if we know for sure that at least
* one channel does not support residue reporting. If the DMA
* driver does not implement the slave_caps API we rely having
* the NO_RESIDUE flag set manually in case residue reporting is
* not supported.
*/
if
(
!
dmaengine_pcm_can_report_residue
(
pcm
->
chan
[
i
]))
if
(
!
dmaengine_pcm_can_report_residue
(
dev
,
pcm
->
chan
[
i
]))
pcm
->
flags
|=
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE
;
}
...
...
sound/soc/ux500/ux500_pcm.c
浏览文件 @
977732b0
...
...
@@ -147,7 +147,6 @@ int ux500_pcm_register_platform(struct platform_device *pdev)
pcm_config
=
&
ux500_dmaengine_pcm_config
;
ret
=
snd_dmaengine_pcm_register
(
&
pdev
->
dev
,
pcm_config
,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE
|
SND_DMAENGINE_PCM_FLAG_COMPAT
);
if
(
ret
<
0
)
{
dev_err
(
&
pdev
->
dev
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录