Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e22c3980
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e22c3980
编写于
3月 23, 2014
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next
上级
b4d032b3
8de131f2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
106 addition
and
19 deletion
+106
-19
sound/soc/davinci/davinci-evm.c
sound/soc/davinci/davinci-evm.c
+8
-14
sound/soc/davinci/davinci-mcasp.c
sound/soc/davinci/davinci-mcasp.c
+16
-5
sound/soc/davinci/edma-pcm.c
sound/soc/davinci/edma-pcm.c
+57
-0
sound/soc/davinci/edma-pcm.h
sound/soc/davinci/edma-pcm.h
+25
-0
未找到文件。
sound/soc/davinci/davinci-evm.c
浏览文件 @
e22c3980
...
...
@@ -123,35 +123,29 @@ static const struct snd_soc_dapm_route audio_map[] = {
/* Logic for a aic3x as connected on a davinci-evm */
static
int
evm_aic3x_init
(
struct
snd_soc_pcm_runtime
*
rtd
)
{
struct
snd_soc_card
*
card
=
rtd
->
card
;
struct
snd_soc_codec
*
codec
=
rtd
->
codec
;
struct
snd_soc_dapm_context
*
dapm
=
&
codec
->
dapm
;
struct
device_node
*
np
=
codec
->
card
->
dev
->
of_node
;
int
ret
;
/* Add davinci-evm specific widgets */
snd_soc_dapm_new_controls
(
dapm
,
aic3x_dapm_widgets
,
snd_soc_dapm_new_controls
(
&
card
->
dapm
,
aic3x_dapm_widgets
,
ARRAY_SIZE
(
aic3x_dapm_widgets
));
if
(
np
)
{
ret
=
snd_soc_of_parse_audio_routing
(
codec
->
card
,
"ti,audio-routing"
);
ret
=
snd_soc_of_parse_audio_routing
(
card
,
"ti,audio-routing"
);
if
(
ret
)
return
ret
;
}
else
{
/* Set up davinci-evm specific audio path audio_map */
snd_soc_dapm_add_routes
(
dapm
,
audio_map
,
ARRAY_SIZE
(
audio_map
));
snd_soc_dapm_add_routes
(
&
card
->
dapm
,
audio_map
,
ARRAY_SIZE
(
audio_map
));
}
/* not connected */
snd_soc_dapm_disable_pin
(
dapm
,
"MONO_LOUT"
);
snd_soc_dapm_disable_pin
(
dapm
,
"HPLCOM"
);
snd_soc_dapm_disable_pin
(
dapm
,
"HPRCOM"
);
/* always connected */
snd_soc_dapm_enable_pin
(
dapm
,
"Headphone Jack"
);
snd_soc_dapm_enable_pin
(
dapm
,
"Line Out"
);
snd_soc_dapm_enable_pin
(
dapm
,
"Mic Jack"
);
snd_soc_dapm_enable_pin
(
dapm
,
"Line In"
);
snd_soc_dapm_nc_pin
(
&
codec
->
dapm
,
"MONO_LOUT"
);
snd_soc_dapm_nc_pin
(
&
codec
->
dapm
,
"HPLCOM"
);
snd_soc_dapm_nc_pin
(
&
codec
->
dapm
,
"HPRCOM"
);
return
0
;
}
...
...
sound/soc/davinci/davinci-mcasp.c
浏览文件 @
e22c3980
...
...
@@ -1026,6 +1026,7 @@ static struct davinci_mcasp_pdata *davinci_mcasp_set_pdata_from_of(
static
int
davinci_mcasp_probe
(
struct
platform_device
*
pdev
)
{
struct
davinci_pcm_dma_params
*
dma_params
;
struct
snd_dmaengine_dai_dma_data
*
dma_data
;
struct
resource
*
mem
,
*
ioarea
,
*
res
,
*
dat
;
struct
davinci_mcasp_pdata
*
pdata
;
struct
davinci_mcasp
*
mcasp
;
...
...
@@ -1095,6 +1096,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
mcasp
->
dat_port
=
true
;
dma_params
=
&
mcasp
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
];
dma_data
=
&
mcasp
->
dma_data
[
SNDRV_PCM_STREAM_PLAYBACK
];
dma_params
->
asp_chan_q
=
pdata
->
asp_chan_q
;
dma_params
->
ram_chan_q
=
pdata
->
ram_chan_q
;
dma_params
->
sram_pool
=
pdata
->
sram_pool
;
...
...
@@ -1105,7 +1107,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_params
->
dma_addr
=
mem
->
start
+
pdata
->
tx_dma_offset
;
/* Unconditional dmaengine stuff */
mcasp
->
dma_data
[
SNDRV_PCM_STREAM_PLAYBACK
].
addr
=
dma_params
->
dma_addr
;
dma_data
->
addr
=
dma_params
->
dma_addr
;
res
=
platform_get_resource
(
pdev
,
IORESOURCE_DMA
,
0
);
if
(
res
)
...
...
@@ -1113,7 +1115,14 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
else
dma_params
->
channel
=
pdata
->
tx_dma_channel
;
/* dmaengine filter data for DT and non-DT boot */
if
(
pdev
->
dev
.
of_node
)
dma_data
->
filter_data
=
"tx"
;
else
dma_data
->
filter_data
=
&
dma_params
->
channel
;
dma_params
=
&
mcasp
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
];
dma_data
=
&
mcasp
->
dma_data
[
SNDRV_PCM_STREAM_CAPTURE
];
dma_params
->
asp_chan_q
=
pdata
->
asp_chan_q
;
dma_params
->
ram_chan_q
=
pdata
->
ram_chan_q
;
dma_params
->
sram_pool
=
pdata
->
sram_pool
;
...
...
@@ -1124,7 +1133,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_params
->
dma_addr
=
mem
->
start
+
pdata
->
rx_dma_offset
;
/* Unconditional dmaengine stuff */
mcasp
->
dma_data
[
SNDRV_PCM_STREAM_CAPTURE
].
addr
=
dma_params
->
dma_addr
;
dma_data
->
addr
=
dma_params
->
dma_addr
;
if
(
mcasp
->
version
<
MCASP_VERSION_3
)
{
mcasp
->
fifo_base
=
DAVINCI_MCASP_V2_AFIFO_BASE
;
...
...
@@ -1140,9 +1149,11 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
else
dma_params
->
channel
=
pdata
->
rx_dma_channel
;
/* Unconditional dmaengine stuff */
mcasp
->
dma_data
[
SNDRV_PCM_STREAM_PLAYBACK
].
filter_data
=
"tx"
;
mcasp
->
dma_data
[
SNDRV_PCM_STREAM_CAPTURE
].
filter_data
=
"rx"
;
/* dmaengine filter data for DT and non-DT boot */
if
(
pdev
->
dev
.
of_node
)
dma_data
->
filter_data
=
"rx"
;
else
dma_data
->
filter_data
=
&
dma_params
->
channel
;
dev_set_drvdata
(
&
pdev
->
dev
,
mcasp
);
...
...
sound/soc/davinci/edma-pcm.c
0 → 100644
浏览文件 @
e22c3980
/*
* edma-pcm.c - eDMA PCM driver using dmaengine for AM3xxx, AM4xxx
*
* Copyright (C) 2014 Texas Instruments, Inc.
*
* Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
*
* Based on: sound/soc/tegra/tegra_pcm.c
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#include <linux/module.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
#include <linux/edma.h>
static
const
struct
snd_pcm_hardware
edma_pcm_hardware
=
{
.
info
=
SNDRV_PCM_INFO_MMAP
|
SNDRV_PCM_INFO_MMAP_VALID
|
SNDRV_PCM_INFO_BATCH
|
SNDRV_PCM_INFO_PAUSE
|
SNDRV_PCM_INFO_RESUME
|
SNDRV_PCM_INFO_INTERLEAVED
,
.
buffer_bytes_max
=
128
*
1024
,
.
period_bytes_min
=
32
,
.
period_bytes_max
=
64
*
1024
,
.
periods_min
=
2
,
.
periods_max
=
19
,
/* Limit by edma dmaengine driver */
};
static
const
struct
snd_dmaengine_pcm_config
edma_dmaengine_pcm_config
=
{
.
pcm_hardware
=
&
edma_pcm_hardware
,
.
prepare_slave_config
=
snd_dmaengine_pcm_prepare_slave_config
,
.
compat_filter_fn
=
edma_filter_fn
,
.
prealloc_buffer_size
=
128
*
1024
,
};
int
edma_pcm_platform_register
(
struct
device
*
dev
)
{
return
devm_snd_dmaengine_pcm_register
(
dev
,
&
edma_dmaengine_pcm_config
,
SND_DMAENGINE_PCM_FLAG_COMPAT
);
}
EXPORT_SYMBOL_GPL
(
edma_pcm_platform_register
);
MODULE_AUTHOR
(
"Peter Ujfalusi <peter.ujfalusi@ti.com>"
);
MODULE_DESCRIPTION
(
"eDMA PCM ASoC platform driver"
);
MODULE_LICENSE
(
"GPL"
);
sound/soc/davinci/edma-pcm.h
0 → 100644
浏览文件 @
e22c3980
/*
* edma-pcm.h - eDMA PCM driver using dmaengine for AM3xxx, AM4xxx
*
* Copyright (C) 2014 Texas Instruments, Inc.
*
* Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
*
* Based on: sound/soc/tegra/tegra_pcm.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#ifndef __EDMA_PCM_H__
#define __EDMA_PCM_H__
int
edma_pcm_platform_register
(
struct
device
*
dev
);
#endif
/* __EDMA_PCM_H__ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录