Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
b909005c
Commit
b909005c
authored
Jun 16, 2009
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/intel8x0' into for-linus
* topic/intel8x0: ALSA: intel8x0 - Fix PCM position craziness
parents
7998d90a
f708eb1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
sound/pci/intel8x0.c
sound/pci/intel8x0.c
+12
-12
No files found.
sound/pci/intel8x0.c
View file @
b909005c
...
...
@@ -356,8 +356,6 @@ struct ichdev {
unsigned
int
position
;
unsigned
int
pos_shift
;
unsigned
int
last_pos
;
unsigned
long
last_pos_jiffies
;
unsigned
int
jiffy_to_bytes
;
int
frags
;
int
lvi
;
int
lvi_frag
;
...
...
@@ -844,7 +842,6 @@ static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
val
=
ICH_IOCE
|
ICH_STARTBM
;
ichdev
->
last_pos
=
ichdev
->
position
;
ichdev
->
last_pos_jiffies
=
jiffies
;
break
;
case
SNDRV_PCM_TRIGGER_SUSPEND
:
ichdev
->
suspended
=
1
;
...
...
@@ -1048,7 +1045,6 @@ static int snd_intel8x0_pcm_prepare(struct snd_pcm_substream *substream)
ichdev
->
pos_shift
=
(
runtime
->
sample_bits
>
16
)
?
2
:
1
;
}
snd_intel8x0_setup_periods
(
chip
,
ichdev
);
ichdev
->
jiffy_to_bytes
=
(
runtime
->
rate
*
4
*
ichdev
->
pos_shift
)
/
HZ
;
return
0
;
}
...
...
@@ -1073,19 +1069,23 @@ static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *subs
ptr1
==
igetword
(
chip
,
ichdev
->
reg_offset
+
ichdev
->
roff_picb
))
break
;
}
while
(
timeout
--
);
ptr
=
ichdev
->
last_pos
;
if
(
ptr1
!=
0
)
{
ptr1
<<=
ichdev
->
pos_shift
;
ptr
=
ichdev
->
fragsize1
-
ptr1
;
ptr
+=
position
;
ichdev
->
last_pos
=
ptr
;
ichdev
->
last_pos_jiffies
=
jiffies
;
}
else
{
ptr1
=
jiffies
-
ichdev
->
last_pos_jiffies
;
if
(
ptr1
)
ptr1
-=
1
;
ptr
=
ichdev
->
last_pos
+
ptr1
*
ichdev
->
jiffy_to_bytes
;
ptr
%=
ichdev
->
size
;
if
(
ptr
<
ichdev
->
last_pos
)
{
unsigned
int
pos_base
,
last_base
;
pos_base
=
position
/
ichdev
->
fragsize1
;
last_base
=
ichdev
->
last_pos
/
ichdev
->
fragsize1
;
/* another sanity check; ptr1 can go back to full
* before the base position is updated
*/
if
(
pos_base
==
last_base
)
ptr
=
ichdev
->
last_pos
;
}
}
ichdev
->
last_pos
=
ptr
;
spin_unlock
(
&
chip
->
reg_lock
);
if
(
ptr
>=
ichdev
->
size
)
return
0
;
...
...
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