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
a9b68d3b
Commit
a9b68d3b
authored
Jan 16, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/core' into for-tiwai
parents
efe265d3
1104a9c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
18 deletions
+21
-18
sound/soc/soc-core.c
sound/soc/soc-core.c
+2
-2
sound/soc/soc-pcm.c
sound/soc/soc-pcm.c
+19
-16
No files found.
sound/soc/soc-core.c
View file @
a9b68d3b
...
...
@@ -3484,7 +3484,7 @@ int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
return
dai
->
codec
->
driver
->
set_sysclk
(
dai
->
codec
,
clk_id
,
0
,
freq
,
dir
);
else
return
-
E
INVAL
;
return
-
E
NOTSUPP
;
}
EXPORT_SYMBOL_GPL
(
snd_soc_dai_set_sysclk
);
...
...
@@ -3505,7 +3505,7 @@ int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
return
codec
->
driver
->
set_sysclk
(
codec
,
clk_id
,
source
,
freq
,
dir
);
else
return
-
E
INVAL
;
return
-
E
NOTSUPP
;
}
EXPORT_SYMBOL_GPL
(
snd_soc_codec_set_sysclk
);
...
...
sound/soc/soc-pcm.c
View file @
a9b68d3b
...
...
@@ -776,7 +776,7 @@ static int soc_pcm_bespoke_trigger(struct snd_pcm_substream *substream,
return
ret
;
}
if
(
platform
->
driver
->
ops
&&
platform
->
driver
->
bespoke_trigger
)
{
if
(
platform
->
driver
->
bespoke_trigger
)
{
ret
=
platform
->
driver
->
bespoke_trigger
(
substream
,
cmd
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -1235,6 +1235,20 @@ static int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream)
return
err
;
}
static
void
dpcm_init_runtime_hw
(
struct
snd_pcm_runtime
*
runtime
,
struct
snd_soc_pcm_stream
*
stream
)
{
runtime
->
hw
.
rate_min
=
stream
->
rate_min
;
runtime
->
hw
.
rate_max
=
stream
->
rate_max
;
runtime
->
hw
.
channels_min
=
stream
->
channels_min
;
runtime
->
hw
.
channels_max
=
stream
->
channels_max
;
if
(
runtime
->
hw
.
formats
)
runtime
->
hw
.
formats
&=
stream
->
formats
;
else
runtime
->
hw
.
formats
=
stream
->
formats
;
runtime
->
hw
.
rates
=
stream
->
rates
;
}
static
void
dpcm_set_fe_runtime
(
struct
snd_pcm_substream
*
substream
)
{
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
...
...
@@ -1242,21 +1256,10 @@ static void dpcm_set_fe_runtime(struct snd_pcm_substream *substream)
struct
snd_soc_dai
*
cpu_dai
=
rtd
->
cpu_dai
;
struct
snd_soc_dai_driver
*
cpu_dai_drv
=
cpu_dai
->
driver
;
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
{
runtime
->
hw
.
rate_min
=
cpu_dai_drv
->
playback
.
rate_min
;
runtime
->
hw
.
rate_max
=
cpu_dai_drv
->
playback
.
rate_max
;
runtime
->
hw
.
channels_min
=
cpu_dai_drv
->
playback
.
channels_min
;
runtime
->
hw
.
channels_max
=
cpu_dai_drv
->
playback
.
channels_max
;
runtime
->
hw
.
formats
&=
cpu_dai_drv
->
playback
.
formats
;
runtime
->
hw
.
rates
=
cpu_dai_drv
->
playback
.
rates
;
}
else
{
runtime
->
hw
.
rate_min
=
cpu_dai_drv
->
capture
.
rate_min
;
runtime
->
hw
.
rate_max
=
cpu_dai_drv
->
capture
.
rate_max
;
runtime
->
hw
.
channels_min
=
cpu_dai_drv
->
capture
.
channels_min
;
runtime
->
hw
.
channels_max
=
cpu_dai_drv
->
capture
.
channels_max
;
runtime
->
hw
.
formats
&=
cpu_dai_drv
->
capture
.
formats
;
runtime
->
hw
.
rates
=
cpu_dai_drv
->
capture
.
rates
;
}
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
dpcm_init_runtime_hw
(
runtime
,
&
cpu_dai_drv
->
playback
);
else
dpcm_init_runtime_hw
(
runtime
,
&
cpu_dai_drv
->
capture
);
}
static
int
dpcm_fe_dai_startup
(
struct
snd_pcm_substream
*
fe_substream
)
...
...
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