Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d336905e
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看板
提交
d336905e
编写于
4月 16, 2010
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/asoc' into for-linus
上级
0d0fb0f9
83926099
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
45 addition
and
29 deletion
+45
-29
sound/soc/codecs/wm2000.c
sound/soc/codecs/wm2000.c
+0
-1
sound/soc/imx/imx-pcm-dma-mx2.c
sound/soc/imx/imx-pcm-dma-mx2.c
+14
-1
sound/soc/imx/imx-pcm-fiq.c
sound/soc/imx/imx-pcm-fiq.c
+29
-26
sound/soc/imx/imx-ssi.c
sound/soc/imx/imx-ssi.c
+2
-1
未找到文件。
sound/soc/codecs/wm2000.c
浏览文件 @
d336905e
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/firmware.h>
#include <linux/firmware.h>
...
...
sound/soc/imx/imx-pcm-dma-mx2.c
浏览文件 @
d336905e
...
@@ -71,7 +71,12 @@ static void imx_ssi_dma_callback(int channel, void *data)
...
@@ -71,7 +71,12 @@ static void imx_ssi_dma_callback(int channel, void *data)
static
void
snd_imx_dma_err_callback
(
int
channel
,
void
*
data
,
int
err
)
static
void
snd_imx_dma_err_callback
(
int
channel
,
void
*
data
,
int
err
)
{
{
pr_err
(
"DMA error callback called
\n
"
);
struct
snd_pcm_substream
*
substream
=
data
;
struct
snd_soc_pcm_runtime
*
rtd
=
substream
->
private_data
;
struct
imx_pcm_dma_params
*
dma_params
=
rtd
->
dai
->
cpu_dai
->
dma_data
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
imx_pcm_runtime_data
*
iprtd
=
runtime
->
private_data
;
int
ret
;
pr_err
(
"DMA timeout on channel %d -%s%s%s%s
\n
"
,
pr_err
(
"DMA timeout on channel %d -%s%s%s%s
\n
"
,
channel
,
channel
,
...
@@ -79,6 +84,14 @@ static void snd_imx_dma_err_callback(int channel, void *data, int err)
...
@@ -79,6 +84,14 @@ static void snd_imx_dma_err_callback(int channel, void *data, int err)
err
&
IMX_DMA_ERR_REQUEST
?
" request"
:
""
,
err
&
IMX_DMA_ERR_REQUEST
?
" request"
:
""
,
err
&
IMX_DMA_ERR_TRANSFER
?
" transfer"
:
""
,
err
&
IMX_DMA_ERR_TRANSFER
?
" transfer"
:
""
,
err
&
IMX_DMA_ERR_BUFFER
?
" buffer"
:
""
);
err
&
IMX_DMA_ERR_BUFFER
?
" buffer"
:
""
);
imx_dma_disable
(
iprtd
->
dma
);
ret
=
imx_dma_setup_sg
(
iprtd
->
dma
,
iprtd
->
sg_list
,
iprtd
->
sg_count
,
IMX_DMA_LENGTH_LOOP
,
dma_params
->
dma_addr
,
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
?
DMA_MODE_WRITE
:
DMA_MODE_READ
);
if
(
!
ret
)
imx_dma_enable
(
iprtd
->
dma
);
}
}
static
int
imx_ssi_dma_alloc
(
struct
snd_pcm_substream
*
substream
)
static
int
imx_ssi_dma_alloc
(
struct
snd_pcm_substream
*
substream
)
...
...
sound/soc/imx/imx-pcm-fiq.c
浏览文件 @
d336905e
...
@@ -39,23 +39,24 @@ struct imx_pcm_runtime_data {
...
@@ -39,23 +39,24 @@ struct imx_pcm_runtime_data {
unsigned
long
offset
;
unsigned
long
offset
;
unsigned
long
last_offset
;
unsigned
long
last_offset
;
unsigned
long
size
;
unsigned
long
size
;
struct
timer_list
timer
;
struct
hrtimer
hrt
;
int
poll_time
;
int
poll_time_ns
;
struct
snd_pcm_substream
*
substream
;
atomic_t
running
;
};
};
static
inline
void
imx_ssi_set_next_poll
(
struct
imx_pcm_runtime_data
*
iprtd
)
static
enum
hrtimer_restart
snd_hrtimer_callback
(
struct
hrtimer
*
hrt
)
{
{
iprtd
->
timer
.
expires
=
jiffies
+
iprtd
->
poll_time
;
struct
imx_pcm_runtime_data
*
iprtd
=
}
container_of
(
hrt
,
struct
imx_pcm_runtime_data
,
hrt
);
struct
snd_pcm_substream
*
substream
=
iprtd
->
substream
;
static
void
imx_ssi_timer_callback
(
unsigned
long
data
)
{
struct
snd_pcm_substream
*
substream
=
(
void
*
)
data
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
imx_pcm_runtime_data
*
iprtd
=
runtime
->
private_data
;
struct
pt_regs
regs
;
struct
pt_regs
regs
;
unsigned
long
delta
;
unsigned
long
delta
;
if
(
!
atomic_read
(
&
iprtd
->
running
))
return
HRTIMER_NORESTART
;
get_fiq_regs
(
&
regs
);
get_fiq_regs
(
&
regs
);
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
...
@@ -72,16 +73,14 @@ static void imx_ssi_timer_callback(unsigned long data)
...
@@ -72,16 +73,14 @@ static void imx_ssi_timer_callback(unsigned long data)
/* If we've transferred at least a period then report it and
/* If we've transferred at least a period then report it and
* reset our poll time */
* reset our poll time */
if
(
delta
>=
runtime
->
period_size
)
{
if
(
delta
>=
iprtd
->
period
)
{
snd_pcm_period_elapsed
(
substream
);
snd_pcm_period_elapsed
(
substream
);
iprtd
->
last_offset
=
iprtd
->
offset
;
iprtd
->
last_offset
=
iprtd
->
offset
;
imx_ssi_set_next_poll
(
iprtd
);
}
}
/* Restart the timer; if we didn't report we'll run on the next tick */
hrtimer_forward_now
(
hrt
,
ns_to_ktime
(
iprtd
->
poll_time_ns
));
add_timer
(
&
iprtd
->
timer
);
return
HRTIMER_RESTART
;
}
}
static
struct
fiq_handler
fh
=
{
static
struct
fiq_handler
fh
=
{
...
@@ -99,8 +98,8 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream,
...
@@ -99,8 +98,8 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream,
iprtd
->
period
=
params_period_bytes
(
params
)
;
iprtd
->
period
=
params_period_bytes
(
params
)
;
iprtd
->
offset
=
0
;
iprtd
->
offset
=
0
;
iprtd
->
last_offset
=
0
;
iprtd
->
last_offset
=
0
;
iprtd
->
poll_time
=
HZ
/
(
params_rate
(
params
)
/
params_period_size
(
params
));
iprtd
->
poll_time
_ns
=
1000000000
/
params_rate
(
params
)
*
params_period_size
(
params
);
snd_pcm_set_runtime_buffer
(
substream
,
&
substream
->
dma_buffer
);
snd_pcm_set_runtime_buffer
(
substream
,
&
substream
->
dma_buffer
);
return
0
;
return
0
;
...
@@ -135,8 +134,9 @@ static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
...
@@ -135,8 +134,9 @@ static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
case
SNDRV_PCM_TRIGGER_START
:
case
SNDRV_PCM_TRIGGER_START
:
case
SNDRV_PCM_TRIGGER_RESUME
:
case
SNDRV_PCM_TRIGGER_RESUME
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
imx_ssi_set_next_poll
(
iprtd
);
atomic_set
(
&
iprtd
->
running
,
1
);
add_timer
(
&
iprtd
->
timer
);
hrtimer_start
(
&
iprtd
->
hrt
,
ns_to_ktime
(
iprtd
->
poll_time_ns
),
HRTIMER_MODE_REL
);
if
(
++
fiq_enable
==
1
)
if
(
++
fiq_enable
==
1
)
enable_fiq
(
imx_pcm_fiq
);
enable_fiq
(
imx_pcm_fiq
);
...
@@ -145,11 +145,11 @@ static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
...
@@ -145,11 +145,11 @@ static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
case
SNDRV_PCM_TRIGGER_STOP
:
case
SNDRV_PCM_TRIGGER_STOP
:
case
SNDRV_PCM_TRIGGER_SUSPEND
:
case
SNDRV_PCM_TRIGGER_SUSPEND
:
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
del_timer
(
&
iprtd
->
timer
);
atomic_set
(
&
iprtd
->
running
,
0
);
if
(
--
fiq_enable
==
0
)
if
(
--
fiq_enable
==
0
)
disable_fiq
(
imx_pcm_fiq
);
disable_fiq
(
imx_pcm_fiq
);
break
;
break
;
default:
default:
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -180,7 +180,7 @@ static struct snd_pcm_hardware snd_imx_hardware = {
...
@@ -180,7 +180,7 @@ static struct snd_pcm_hardware snd_imx_hardware = {
.
buffer_bytes_max
=
IMX_SSI_DMABUF_SIZE
,
.
buffer_bytes_max
=
IMX_SSI_DMABUF_SIZE
,
.
period_bytes_min
=
128
,
.
period_bytes_min
=
128
,
.
period_bytes_max
=
16
*
1024
,
.
period_bytes_max
=
16
*
1024
,
.
periods_min
=
2
,
.
periods_min
=
4
,
.
periods_max
=
255
,
.
periods_max
=
255
,
.
fifo_size
=
0
,
.
fifo_size
=
0
,
};
};
...
@@ -194,9 +194,11 @@ static int snd_imx_open(struct snd_pcm_substream *substream)
...
@@ -194,9 +194,11 @@ static int snd_imx_open(struct snd_pcm_substream *substream)
iprtd
=
kzalloc
(
sizeof
(
*
iprtd
),
GFP_KERNEL
);
iprtd
=
kzalloc
(
sizeof
(
*
iprtd
),
GFP_KERNEL
);
runtime
->
private_data
=
iprtd
;
runtime
->
private_data
=
iprtd
;
init_timer
(
&
iprtd
->
timer
);
iprtd
->
substream
=
substream
;
iprtd
->
timer
.
data
=
(
unsigned
long
)
substream
;
iprtd
->
timer
.
function
=
imx_ssi_timer_callback
;
atomic_set
(
&
iprtd
->
running
,
0
);
hrtimer_init
(
&
iprtd
->
hrt
,
CLOCK_MONOTONIC
,
HRTIMER_MODE_REL
);
iprtd
->
hrt
.
function
=
snd_hrtimer_callback
;
ret
=
snd_pcm_hw_constraint_integer
(
substream
->
runtime
,
ret
=
snd_pcm_hw_constraint_integer
(
substream
->
runtime
,
SNDRV_PCM_HW_PARAM_PERIODS
);
SNDRV_PCM_HW_PARAM_PERIODS
);
...
@@ -212,7 +214,8 @@ static int snd_imx_close(struct snd_pcm_substream *substream)
...
@@ -212,7 +214,8 @@ static int snd_imx_close(struct snd_pcm_substream *substream)
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
imx_pcm_runtime_data
*
iprtd
=
runtime
->
private_data
;
struct
imx_pcm_runtime_data
*
iprtd
=
runtime
->
private_data
;
del_timer_sync
(
&
iprtd
->
timer
);
hrtimer_cancel
(
&
iprtd
->
hrt
);
kfree
(
iprtd
);
kfree
(
iprtd
);
return
0
;
return
0
;
...
...
sound/soc/imx/imx-ssi.c
浏览文件 @
d336905e
...
@@ -656,7 +656,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
...
@@ -656,7 +656,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
dai
->
private_data
=
ssi
;
dai
->
private_data
=
ssi
;
if
((
cpu_is_mx27
()
||
cpu_is_mx21
())
&&
if
((
cpu_is_mx27
()
||
cpu_is_mx21
())
&&
!
(
ssi
->
flags
&
IMX_SSI_USE_AC97
))
{
!
(
ssi
->
flags
&
IMX_SSI_USE_AC97
)
&&
(
ssi
->
flags
&
IMX_SSI_DMA
))
{
ssi
->
flags
|=
IMX_SSI_DMA
;
ssi
->
flags
|=
IMX_SSI_DMA
;
platform
=
imx_ssi_dma_mx2_init
(
pdev
,
ssi
);
platform
=
imx_ssi_dma_mx2_init
(
pdev
,
ssi
);
}
else
}
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录