Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
75ab73bc
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
75ab73bc
编写于
12月 02, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/dma' into asoc-fsl
上级
4ded61eb
a22f33b0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
0 deletion
+48
-0
include/sound/dmaengine_pcm.h
include/sound/dmaengine_pcm.h
+4
-0
sound/soc/soc-devres.c
sound/soc/soc-devres.c
+41
-0
sound/soc/soc-generic-dmaengine-pcm.c
sound/soc/soc-generic-dmaengine-pcm.c
+3
-0
未找到文件。
include/sound/dmaengine_pcm.h
浏览文件 @
75ab73bc
...
@@ -140,6 +140,10 @@ int snd_dmaengine_pcm_register(struct device *dev,
...
@@ -140,6 +140,10 @@ int snd_dmaengine_pcm_register(struct device *dev,
unsigned
int
flags
);
unsigned
int
flags
);
void
snd_dmaengine_pcm_unregister
(
struct
device
*
dev
);
void
snd_dmaengine_pcm_unregister
(
struct
device
*
dev
);
int
devm_snd_dmaengine_pcm_register
(
struct
device
*
dev
,
const
struct
snd_dmaengine_pcm_config
*
config
,
unsigned
int
flags
);
int
snd_dmaengine_pcm_prepare_slave_config
(
struct
snd_pcm_substream
*
substream
,
int
snd_dmaengine_pcm_prepare_slave_config
(
struct
snd_pcm_substream
*
substream
,
struct
snd_pcm_hw_params
*
params
,
struct
snd_pcm_hw_params
*
params
,
struct
dma_slave_config
*
slave_config
);
struct
dma_slave_config
*
slave_config
);
...
...
sound/soc/soc-devres.c
浏览文件 @
75ab73bc
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>
#include <sound/soc.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
static
void
devm_component_release
(
struct
device
*
dev
,
void
*
res
)
static
void
devm_component_release
(
struct
device
*
dev
,
void
*
res
)
{
{
...
@@ -84,3 +85,43 @@ int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card)
...
@@ -84,3 +85,43 @@ int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card)
return
ret
;
return
ret
;
}
}
EXPORT_SYMBOL_GPL
(
devm_snd_soc_register_card
);
EXPORT_SYMBOL_GPL
(
devm_snd_soc_register_card
);
#ifdef CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM
static
void
devm_dmaengine_pcm_release
(
struct
device
*
dev
,
void
*
res
)
{
snd_dmaengine_pcm_unregister
(
*
(
struct
device
**
)
res
);
}
/**
* devm_snd_dmaengine_pcm_register - resource managed dmaengine PCM registration
* @dev: The parent device for the PCM device
* @config: Platform specific PCM configuration
* @flags: Platform specific quirks
*
* Register a dmaengine based PCM device with automatic unregistration when the
* device is unregistered.
*/
int
devm_snd_dmaengine_pcm_register
(
struct
device
*
dev
,
const
struct
snd_dmaengine_pcm_config
*
config
,
unsigned
int
flags
)
{
struct
device
**
ptr
;
int
ret
;
ptr
=
devres_alloc
(
devm_dmaengine_pcm_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
if
(
!
ptr
)
return
-
ENOMEM
;
ret
=
snd_dmaengine_pcm_register
(
dev
,
config
,
flags
);
if
(
ret
==
0
)
{
*
ptr
=
dev
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
}
return
ret
;
}
EXPORT_SYMBOL_GPL
(
devm_snd_dmaengine_pcm_register
);
#endif
sound/soc/soc-generic-dmaengine-pcm.c
浏览文件 @
75ab73bc
...
@@ -137,6 +137,9 @@ static int dmaengine_pcm_set_runtime_hwparams(struct snd_pcm_substream *substrea
...
@@ -137,6 +137,9 @@ static int dmaengine_pcm_set_runtime_hwparams(struct snd_pcm_substream *substrea
hw
.
buffer_bytes_max
=
SIZE_MAX
;
hw
.
buffer_bytes_max
=
SIZE_MAX
;
hw
.
fifo_size
=
dma_data
->
fifo_size
;
hw
.
fifo_size
=
dma_data
->
fifo_size
;
if
(
pcm
->
flags
&
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE
)
hw
.
info
|=
SNDRV_PCM_INFO_BATCH
;
ret
=
dma_get_slave_caps
(
chan
,
&
dma_caps
);
ret
=
dma_get_slave_caps
(
chan
,
&
dma_caps
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
if
(
dma_caps
.
cmd_pause
)
if
(
dma_caps
.
cmd_pause
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录