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
d0d2c38e
Commit
d0d2c38e
authored
Jan 26, 2010
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'alsa/devel' into topic/misc
parents
cf944ee5
e7636925
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
5 deletions
+19
-5
include/sound/pcm.h
include/sound/pcm.h
+1
-0
sound/core/oss/pcm_oss.c
sound/core/oss/pcm_oss.c
+1
-2
sound/core/pcm_lib.c
sound/core/pcm_lib.c
+5
-2
sound/core/pcm_native.c
sound/core/pcm_native.c
+2
-0
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_analog.c
+10
-1
No files found.
include/sound/pcm.h
View file @
d0d2c38e
...
@@ -271,6 +271,7 @@ struct snd_pcm_runtime {
...
@@ -271,6 +271,7 @@ struct snd_pcm_runtime {
int
overrange
;
int
overrange
;
snd_pcm_uframes_t
avail_max
;
snd_pcm_uframes_t
avail_max
;
snd_pcm_uframes_t
hw_ptr_base
;
/* Position at buffer restart */
snd_pcm_uframes_t
hw_ptr_base
;
/* Position at buffer restart */
snd_pcm_uframes_t
hw_ptr_interrupt
;
/* Position at interrupt time */
unsigned
long
hw_ptr_jiffies
;
/* Time when hw_ptr is updated */
unsigned
long
hw_ptr_jiffies
;
/* Time when hw_ptr is updated */
snd_pcm_sframes_t
delay
;
/* extra delay; typically FIFO size */
snd_pcm_sframes_t
delay
;
/* extra delay; typically FIFO size */
...
...
sound/core/oss/pcm_oss.c
View file @
d0d2c38e
...
@@ -635,8 +635,7 @@ static long snd_pcm_alsa_frames(struct snd_pcm_substream *substream, long bytes)
...
@@ -635,8 +635,7 @@ static long snd_pcm_alsa_frames(struct snd_pcm_substream *substream, long bytes)
static
inline
static
inline
snd_pcm_uframes_t
get_hw_ptr_period
(
struct
snd_pcm_runtime
*
runtime
)
snd_pcm_uframes_t
get_hw_ptr_period
(
struct
snd_pcm_runtime
*
runtime
)
{
{
snd_pcm_uframes_t
ptr
=
runtime
->
status
->
hw_ptr
;
return
runtime
->
hw_ptr_interrupt
;
return
ptr
-
(
ptr
%
runtime
->
period_size
);
}
}
/* define extended formats in the recent OSS versions (if any) */
/* define extended formats in the recent OSS versions (if any) */
...
...
sound/core/pcm_lib.c
View file @
d0d2c38e
...
@@ -325,8 +325,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
...
@@ -325,8 +325,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
if
(
in_interrupt
)
{
if
(
in_interrupt
)
{
/* we know that one period was processed */
/* we know that one period was processed */
/* delta = "expected next hw_ptr" for in_interrupt != 0 */
/* delta = "expected next hw_ptr" for in_interrupt != 0 */
delta
=
old_hw_ptr
-
(
old_hw_ptr
%
runtime
->
period_size
)
delta
=
runtime
->
hw_ptr_interrupt
+
runtime
->
period_size
;
+
runtime
->
period_size
;
if
(
delta
>
new_hw_ptr
)
{
if
(
delta
>
new_hw_ptr
)
{
hw_base
+=
runtime
->
buffer_size
;
hw_base
+=
runtime
->
buffer_size
;
if
(
hw_base
>=
runtime
->
boundary
)
if
(
hw_base
>=
runtime
->
boundary
)
...
@@ -437,6 +436,10 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
...
@@ -437,6 +436,10 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
runtime
->
silence_size
>
0
)
runtime
->
silence_size
>
0
)
snd_pcm_playback_silence
(
substream
,
new_hw_ptr
);
snd_pcm_playback_silence
(
substream
,
new_hw_ptr
);
if
(
in_interrupt
)
{
runtime
->
hw_ptr_interrupt
=
new_hw_ptr
-
(
new_hw_ptr
%
runtime
->
period_size
);
}
runtime
->
hw_ptr_base
=
hw_base
;
runtime
->
hw_ptr_base
=
hw_base
;
runtime
->
status
->
hw_ptr
=
new_hw_ptr
;
runtime
->
status
->
hw_ptr
=
new_hw_ptr
;
runtime
->
hw_ptr_jiffies
=
jiffies
;
runtime
->
hw_ptr_jiffies
=
jiffies
;
...
...
sound/core/pcm_native.c
View file @
d0d2c38e
...
@@ -1252,6 +1252,8 @@ static int snd_pcm_do_reset(struct snd_pcm_substream *substream, int state)
...
@@ -1252,6 +1252,8 @@ static int snd_pcm_do_reset(struct snd_pcm_substream *substream, int state)
if
(
err
<
0
)
if
(
err
<
0
)
return
err
;
return
err
;
runtime
->
hw_ptr_base
=
0
;
runtime
->
hw_ptr_base
=
0
;
runtime
->
hw_ptr_interrupt
=
runtime
->
status
->
hw_ptr
-
runtime
->
status
->
hw_ptr
%
runtime
->
period_size
;
runtime
->
silence_start
=
runtime
->
status
->
hw_ptr
;
runtime
->
silence_start
=
runtime
->
status
->
hw_ptr
;
runtime
->
silence_filled
=
0
;
runtime
->
silence_filled
=
0
;
return
0
;
return
0
;
...
...
sound/pci/hda/patch_analog.c
View file @
d0d2c38e
...
@@ -2458,6 +2458,12 @@ static struct hda_verb ad1988_spdif_init_verbs[] = {
...
@@ -2458,6 +2458,12 @@ static struct hda_verb ad1988_spdif_init_verbs[] = {
{
}
{
}
};
};
static
struct
hda_verb
ad1988_spdif_in_init_verbs
[]
=
{
/* unmute SPDIF input pin */
{
0x1c
,
AC_VERB_SET_AMP_GAIN_MUTE
,
AMP_IN_UNMUTE
(
0
)},
{
}
};
/* AD1989 has no ADC -> SPDIF route */
/* AD1989 has no ADC -> SPDIF route */
static
struct
hda_verb
ad1989_spdif_init_verbs
[]
=
{
static
struct
hda_verb
ad1989_spdif_init_verbs
[]
=
{
/* SPDIF-1 out pin */
/* SPDIF-1 out pin */
...
@@ -3193,8 +3199,11 @@ static int patch_ad1988(struct hda_codec *codec)
...
@@ -3193,8 +3199,11 @@ static int patch_ad1988(struct hda_codec *codec)
ad1988_spdif_init_verbs
;
ad1988_spdif_init_verbs
;
}
}
}
}
if
(
spec
->
dig_in_nid
&&
codec
->
vendor_id
<
0x11d4989a
)
if
(
spec
->
dig_in_nid
&&
codec
->
vendor_id
<
0x11d4989a
)
{
spec
->
mixers
[
spec
->
num_mixers
++
]
=
ad1988_spdif_in_mixers
;
spec
->
mixers
[
spec
->
num_mixers
++
]
=
ad1988_spdif_in_mixers
;
spec
->
init_verbs
[
spec
->
num_init_verbs
++
]
=
ad1988_spdif_in_init_verbs
;
}
codec
->
patch_ops
=
ad198x_patch_ops
;
codec
->
patch_ops
=
ad198x_patch_ops
;
switch
(
board_config
)
{
switch
(
board_config
)
{
...
...
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