Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3fec948e
Commit
3fec948e
authored
Nov 08, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
parents
5196e6ff
10227a94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
20 deletions
+2
-20
sound/soc/fsl/imx-pcm-fiq.c
sound/soc/fsl/imx-pcm-fiq.c
+2
-20
No files found.
sound/soc/fsl/imx-pcm-fiq.c
View file @
3fec948e
...
@@ -39,8 +39,6 @@ struct imx_pcm_runtime_data {
...
@@ -39,8 +39,6 @@ struct imx_pcm_runtime_data {
unsigned
int
period
;
unsigned
int
period
;
int
periods
;
int
periods
;
unsigned
long
offset
;
unsigned
long
offset
;
unsigned
long
last_offset
;
unsigned
long
size
;
struct
hrtimer
hrt
;
struct
hrtimer
hrt
;
int
poll_time_ns
;
int
poll_time_ns
;
struct
snd_pcm_substream
*
substream
;
struct
snd_pcm_substream
*
substream
;
...
@@ -52,9 +50,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
...
@@ -52,9 +50,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
struct
imx_pcm_runtime_data
*
iprtd
=
struct
imx_pcm_runtime_data
*
iprtd
=
container_of
(
hrt
,
struct
imx_pcm_runtime_data
,
hrt
);
container_of
(
hrt
,
struct
imx_pcm_runtime_data
,
hrt
);
struct
snd_pcm_substream
*
substream
=
iprtd
->
substream
;
struct
snd_pcm_substream
*
substream
=
iprtd
->
substream
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
pt_regs
regs
;
struct
pt_regs
regs
;
unsigned
long
delta
;
if
(
!
atomic_read
(
&
iprtd
->
running
))
if
(
!
atomic_read
(
&
iprtd
->
running
))
return
HRTIMER_NORESTART
;
return
HRTIMER_NORESTART
;
...
@@ -66,19 +62,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
...
@@ -66,19 +62,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
else
else
iprtd
->
offset
=
regs
.
ARM_r9
&
0xffff
;
iprtd
->
offset
=
regs
.
ARM_r9
&
0xffff
;
/* How much data have we transferred since the last period report? */
snd_pcm_period_elapsed
(
substream
);
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
;
}
hrtimer_forward_now
(
hrt
,
ns_to_ktime
(
iprtd
->
poll_time_ns
));
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,
...
@@ -95,11 +79,9 @@ static int snd_imx_pcm_hw_params(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
;
iprtd
->
size
=
params_buffer_bytes
(
params
);
iprtd
->
periods
=
params_periods
(
params
);
iprtd
->
periods
=
params_periods
(
params
);
iprtd
->
period
=
params_period_bytes
(
params
)
;
iprtd
->
period
=
params_period_bytes
(
params
);
iprtd
->
offset
=
0
;
iprtd
->
offset
=
0
;
iprtd
->
last_offset
=
0
;
iprtd
->
poll_time_ns
=
1000000000
/
params_rate
(
params
)
*
iprtd
->
poll_time_ns
=
1000000000
/
params_rate
(
params
)
*
params_period_size
(
params
);
params_period_size
(
params
);
snd_pcm_set_runtime_buffer
(
substream
,
&
substream
->
dma_buffer
);
snd_pcm_set_runtime_buffer
(
substream
,
&
substream
->
dma_buffer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment