Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a0b62329
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看板
提交
a0b62329
编写于
2月 25, 2010
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-2.6.34' of
git://opensource.wolfsonmicro.com/linux-2.6-asoc
into topic/asoc
上级
d62abe56
b4e82b5b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
30 addition
and
10 deletion
+30
-10
sound/soc/imx/imx-pcm-fiq.c
sound/soc/imx/imx-pcm-fiq.c
+30
-10
未找到文件。
sound/soc/imx/imx-pcm-fiq.c
浏览文件 @
a0b62329
...
...
@@ -35,22 +35,25 @@
struct
imx_pcm_runtime_data
{
int
period
;
int
periods
;
unsigned
long
dma_addr
;
int
dma
;
unsigned
long
offset
;
unsigned
long
last_offset
;
unsigned
long
size
;
unsigned
long
period_cnt
;
void
*
buf
;
struct
timer_list
timer
;
int
p
eriod
_time
;
int
p
oll
_time
;
};
static
inline
void
imx_ssi_set_next_poll
(
struct
imx_pcm_runtime_data
*
iprtd
)
{
iprtd
->
timer
.
expires
=
jiffies
+
iprtd
->
poll_time
;
}
static
void
imx_ssi_timer_callback
(
unsigned
long
data
)
{
struct
snd_pcm_substream
*
substream
=
(
void
*
)
data
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
imx_pcm_runtime_data
*
iprtd
=
runtime
->
private_data
;
struct
pt_regs
regs
;
unsigned
long
delta
;
get_fiq_regs
(
&
regs
);
...
...
@@ -59,9 +62,25 @@ static void imx_ssi_timer_callback(unsigned long data)
else
iprtd
->
offset
=
regs
.
ARM_r9
&
0xffff
;
iprtd
->
timer
.
expires
=
jiffies
+
iprtd
->
period_time
;
/* How much data have we transferred since the last period report? */
if
(
iprtd
->
offset
>=
iprtd
->
last_offset
)
delta
=
iprtd
->
offset
-
iprtd
->
last_offset
;
else
delta
=
runtime
->
buffer_size
+
iprtd
->
offset
-
iprtd
->
last_offset
;
/* If we've transferred at least a period then report it and
* reset our poll time */
if
(
delta
>=
runtime
->
period_size
)
{
snd_pcm_period_elapsed
(
substream
);
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 */
add_timer
(
&
iprtd
->
timer
);
snd_pcm_period_elapsed
(
substream
);
}
static
struct
fiq_handler
fh
=
{
...
...
@@ -76,9 +95,10 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream,
iprtd
->
size
=
params_buffer_bytes
(
params
);
iprtd
->
periods
=
params_periods
(
params
);
iprtd
->
period
=
params_period_bytes
(
params
);
iprtd
->
period
=
params_period_bytes
(
params
)
;
iprtd
->
offset
=
0
;
iprtd
->
period_time
=
HZ
/
(
params_rate
(
params
)
/
params_period_size
(
params
));
iprtd
->
last_offset
=
0
;
iprtd
->
poll_time
=
HZ
/
(
params_rate
(
params
)
/
params_period_size
(
params
));
snd_pcm_set_runtime_buffer
(
substream
,
&
substream
->
dma_buffer
);
...
...
@@ -114,7 +134,7 @@ static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
case
SNDRV_PCM_TRIGGER_START
:
case
SNDRV_PCM_TRIGGER_RESUME
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
i
prtd
->
timer
.
expires
=
jiffies
+
iprtd
->
period_time
;
i
mx_ssi_set_next_poll
(
iprtd
)
;
add_timer
(
&
iprtd
->
timer
);
if
(
++
fiq_enable
==
1
)
enable_fiq
(
imx_pcm_fiq
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录