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
c1ab70c1
Commit
c1ab70c1
authored
Jul 22, 2014
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/monotonic' into for-next
parents
2d9772ef
e58c295c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
include/uapi/sound/asound.h
include/uapi/sound/asound.h
+2
-2
sound/core/pcm_compat.c
sound/core/pcm_compat.c
+6
-2
sound/core/pcm_native.c
sound/core/pcm_native.c
+4
-2
No files found.
include/uapi/sound/asound.h
View file @
c1ab70c1
...
@@ -391,8 +391,8 @@ struct snd_pcm_sw_params {
...
@@ -391,8 +391,8 @@ struct snd_pcm_sw_params {
snd_pcm_uframes_t
silence_threshold
;
/* min distance from noise for silence filling */
snd_pcm_uframes_t
silence_threshold
;
/* min distance from noise for silence filling */
snd_pcm_uframes_t
silence_size
;
/* silence block size */
snd_pcm_uframes_t
silence_size
;
/* silence block size */
snd_pcm_uframes_t
boundary
;
/* pointers wrap point */
snd_pcm_uframes_t
boundary
;
/* pointers wrap point */
unsigned
int
tstamp_type
;
/* timestamp type
*/
unsigned
int
proto
;
/* protocol version
*/
int
pads
;
/* alignment, reserved
*/
unsigned
int
tstamp_type
;
/* timestamp type (req. proto >= 2.0.12)
*/
unsigned
char
reserved
[
56
];
/* reserved for future */
unsigned
char
reserved
[
56
];
/* reserved for future */
};
};
...
...
sound/core/pcm_compat.c
View file @
c1ab70c1
...
@@ -101,7 +101,9 @@ struct snd_pcm_sw_params32 {
...
@@ -101,7 +101,9 @@ struct snd_pcm_sw_params32 {
u32
silence_threshold
;
u32
silence_threshold
;
u32
silence_size
;
u32
silence_size
;
u32
boundary
;
u32
boundary
;
unsigned
char
reserved
[
64
];
u32
proto
;
u32
tstamp_type
;
unsigned
char
reserved
[
56
];
};
};
/* recalcuate the boundary within 32bit */
/* recalcuate the boundary within 32bit */
...
@@ -133,7 +135,9 @@ static int snd_pcm_ioctl_sw_params_compat(struct snd_pcm_substream *substream,
...
@@ -133,7 +135,9 @@ static int snd_pcm_ioctl_sw_params_compat(struct snd_pcm_substream *substream,
get_user
(
params
.
start_threshold
,
&
src
->
start_threshold
)
||
get_user
(
params
.
start_threshold
,
&
src
->
start_threshold
)
||
get_user
(
params
.
stop_threshold
,
&
src
->
stop_threshold
)
||
get_user
(
params
.
stop_threshold
,
&
src
->
stop_threshold
)
||
get_user
(
params
.
silence_threshold
,
&
src
->
silence_threshold
)
||
get_user
(
params
.
silence_threshold
,
&
src
->
silence_threshold
)
||
get_user
(
params
.
silence_size
,
&
src
->
silence_size
))
get_user
(
params
.
silence_size
,
&
src
->
silence_size
)
||
get_user
(
params
.
tstamp_type
,
&
src
->
tstamp_type
)
||
get_user
(
params
.
proto
,
&
src
->
proto
))
return
-
EFAULT
;
return
-
EFAULT
;
/*
/*
* Check silent_size parameter. Since we have 64bit boundary,
* Check silent_size parameter. Since we have 64bit boundary,
...
...
sound/core/pcm_native.c
View file @
c1ab70c1
...
@@ -543,7 +543,8 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
...
@@ -543,7 +543,8 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
if
(
params
->
tstamp_mode
>
SNDRV_PCM_TSTAMP_LAST
)
if
(
params
->
tstamp_mode
>
SNDRV_PCM_TSTAMP_LAST
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
params
->
tstamp_type
>
SNDRV_PCM_TSTAMP_TYPE_LAST
)
if
(
params
->
proto
>=
SNDRV_PROTOCOL_VERSION
(
2
,
0
,
12
)
&&
params
->
tstamp_type
>
SNDRV_PCM_TSTAMP_TYPE_LAST
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
params
->
avail_min
==
0
)
if
(
params
->
avail_min
==
0
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -559,7 +560,8 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
...
@@ -559,7 +560,8 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
err
=
0
;
err
=
0
;
snd_pcm_stream_lock_irq
(
substream
);
snd_pcm_stream_lock_irq
(
substream
);
runtime
->
tstamp_mode
=
params
->
tstamp_mode
;
runtime
->
tstamp_mode
=
params
->
tstamp_mode
;
runtime
->
tstamp_type
=
params
->
tstamp_type
;
if
(
params
->
proto
>=
SNDRV_PROTOCOL_VERSION
(
2
,
0
,
12
))
runtime
->
tstamp_type
=
params
->
tstamp_type
;
runtime
->
period_step
=
params
->
period_step
;
runtime
->
period_step
=
params
->
period_step
;
runtime
->
control
->
avail_min
=
params
->
avail_min
;
runtime
->
control
->
avail_min
=
params
->
avail_min
;
runtime
->
start_threshold
=
params
->
start_threshold
;
runtime
->
start_threshold
=
params
->
start_threshold
;
...
...
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