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
nexedi
linux
Commits
7ece50c9
Commit
7ece50c9
authored
Oct 19, 2018
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/for-4.19' into asoc-4.20
parents
e3a360b8
747df197
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
sound/soc/amd/acp-pcm-dma.c
sound/soc/amd/acp-pcm-dma.c
+14
-8
No files found.
sound/soc/amd/acp-pcm-dma.c
View file @
7ece50c9
...
@@ -1040,16 +1040,22 @@ static snd_pcm_uframes_t acp_dma_pointer(struct snd_pcm_substream *substream)
...
@@ -1040,16 +1040,22 @@ static snd_pcm_uframes_t acp_dma_pointer(struct snd_pcm_substream *substream)
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_CAPTURE
)
{
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_CAPTURE
)
{
period_bytes
=
frames_to_bytes
(
runtime
,
runtime
->
period_size
);
period_bytes
=
frames_to_bytes
(
runtime
,
runtime
->
period_size
);
dscr
=
acp_reg_read
(
rtd
->
acp_mmio
,
rtd
->
dma_curr_dscr
);
if
(
dscr
==
rtd
->
dma_dscr_idx_1
)
pos
=
period_bytes
;
else
pos
=
0
;
bytescount
=
acp_get_byte_count
(
rtd
);
bytescount
=
acp_get_byte_count
(
rtd
);
if
(
bytescount
>
rtd
->
bytescount
)
if
(
bytescount
>
=
rtd
->
bytescount
)
bytescount
-=
rtd
->
bytescount
;
bytescount
-=
rtd
->
bytescount
;
delay
=
do_div
(
bytescount
,
period_bytes
);
if
(
bytescount
<
period_bytes
)
{
runtime
->
delay
=
bytes_to_frames
(
runtime
,
delay
);
pos
=
0
;
}
else
{
dscr
=
acp_reg_read
(
rtd
->
acp_mmio
,
rtd
->
dma_curr_dscr
);
if
(
dscr
==
rtd
->
dma_dscr_idx_1
)
pos
=
period_bytes
;
else
pos
=
0
;
}
if
(
bytescount
>
0
)
{
delay
=
do_div
(
bytescount
,
period_bytes
);
runtime
->
delay
=
bytes_to_frames
(
runtime
,
delay
);
}
}
else
{
}
else
{
buffersize
=
frames_to_bytes
(
runtime
,
runtime
->
buffer_size
);
buffersize
=
frames_to_bytes
(
runtime
,
runtime
->
buffer_size
);
bytescount
=
acp_get_byte_count
(
rtd
);
bytescount
=
acp_get_byte_count
(
rtd
);
...
...
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