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
0dd76f36
Commit
0dd76f36
authored
Apr 18, 2015
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: hda - Replace open codes with snd_hdac_stream_set_params()
Signed-off-by:
Takashi Iwai
<
tiwai@suse.de
>
parent
86f6501b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
19 deletions
+4
-19
sound/pci/hda/hda_controller.c
sound/pci/hda/hda_controller.c
+4
-19
No files found.
sound/pci/hda/hda_controller.c
View file @
0dd76f36
...
@@ -157,7 +157,7 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
...
@@ -157,7 +157,7 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
struct
azx_dev
*
azx_dev
=
get_azx_dev
(
substream
);
struct
azx_dev
*
azx_dev
=
get_azx_dev
(
substream
);
struct
hda_pcm_stream
*
hinfo
=
to_hda_pcm_stream
(
substream
);
struct
hda_pcm_stream
*
hinfo
=
to_hda_pcm_stream
(
substream
);
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
unsigned
int
bufsize
,
period_bytes
,
format_val
,
stream_tag
;
unsigned
int
format_val
,
stream_tag
;
int
err
;
int
err
;
struct
hda_spdif_out
*
spdif
=
struct
hda_spdif_out
*
spdif
=
snd_hda_spdif_out_of_nid
(
apcm
->
codec
,
hinfo
->
nid
);
snd_hda_spdif_out_of_nid
(
apcm
->
codec
,
hinfo
->
nid
);
...
@@ -183,24 +183,9 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
...
@@ -183,24 +183,9 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
goto
unlock
;
goto
unlock
;
}
}
bufsize
=
snd_pcm_lib_buffer_bytes
(
substream
);
err
=
snd_hdac_stream_set_params
(
azx_stream
(
azx_dev
),
format_val
);
period_bytes
=
snd_pcm_lib_period_bytes
(
substream
);
if
(
err
<
0
)
goto
unlock
;
dev_dbg
(
chip
->
card
->
dev
,
"azx_pcm_prepare: bufsize=0x%x, format=0x%x
\n
"
,
bufsize
,
format_val
);
if
(
bufsize
!=
azx_dev
->
core
.
bufsize
||
period_bytes
!=
azx_dev
->
core
.
period_bytes
||
format_val
!=
azx_dev
->
core
.
format_val
||
runtime
->
no_period_wakeup
!=
azx_dev
->
core
.
no_period_wakeup
)
{
azx_dev
->
core
.
bufsize
=
bufsize
;
azx_dev
->
core
.
period_bytes
=
period_bytes
;
azx_dev
->
core
.
format_val
=
format_val
;
azx_dev
->
core
.
no_period_wakeup
=
runtime
->
no_period_wakeup
;
err
=
snd_hdac_stream_setup_periods
(
azx_stream
(
azx_dev
));
if
(
err
<
0
)
goto
unlock
;
}
snd_hdac_stream_setup
(
azx_stream
(
azx_dev
));
snd_hdac_stream_setup
(
azx_stream
(
azx_dev
));
...
...
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