Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
3fec948e
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看板
提交
3fec948e
编写于
11月 08, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
上级
5196e6ff
10227a94
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
2 addition
and
20 deletion
+2
-20
sound/soc/fsl/imx-pcm-fiq.c
sound/soc/fsl/imx-pcm-fiq.c
+2
-20
未找到文件。
sound/soc/fsl/imx-pcm-fiq.c
浏览文件 @
3fec948e
...
...
@@ -39,8 +39,6 @@ struct imx_pcm_runtime_data {
unsigned
int
period
;
int
periods
;
unsigned
long
offset
;
unsigned
long
last_offset
;
unsigned
long
size
;
struct
hrtimer
hrt
;
int
poll_time_ns
;
struct
snd_pcm_substream
*
substream
;
...
...
@@ -52,9 +50,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
struct
imx_pcm_runtime_data
*
iprtd
=
container_of
(
hrt
,
struct
imx_pcm_runtime_data
,
hrt
);
struct
snd_pcm_substream
*
substream
=
iprtd
->
substream
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
pt_regs
regs
;
unsigned
long
delta
;
if
(
!
atomic_read
(
&
iprtd
->
running
))
return
HRTIMER_NORESTART
;
...
...
@@ -66,19 +62,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
else
iprtd
->
offset
=
regs
.
ARM_r9
&
0xffff
;
/* 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
>=
iprtd
->
period
)
{
snd_pcm_period_elapsed
(
substream
);
iprtd
->
last_offset
=
iprtd
->
offset
;
}
snd_pcm_period_elapsed
(
substream
);
hrtimer_forward_now
(
hrt
,
ns_to_ktime
(
iprtd
->
poll_time_ns
));
...
...
@@ -95,11 +79,9 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream,
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
imx_pcm_runtime_data
*
iprtd
=
runtime
->
private_data
;
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
->
last_offset
=
0
;
iprtd
->
poll_time_ns
=
1000000000
/
params_rate
(
params
)
*
params_period_size
(
params
);
snd_pcm_set_runtime_buffer
(
substream
,
&
substream
->
dma_buffer
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录