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
08fa6545
Commit
08fa6545
authored
Mar 12, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next
parents
b8f86158
50a68fb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
sound/soc/codecs/pcm1681.c
sound/soc/codecs/pcm1681.c
+10
-5
No files found.
sound/soc/codecs/pcm1681.c
View file @
08fa6545
...
@@ -172,16 +172,21 @@ static int pcm1681_hw_params(struct snd_pcm_substream *substream,
...
@@ -172,16 +172,21 @@ static int pcm1681_hw_params(struct snd_pcm_substream *substream,
struct
snd_soc_codec
*
codec
=
dai
->
codec
;
struct
snd_soc_codec
*
codec
=
dai
->
codec
;
struct
pcm1681_private
*
priv
=
snd_soc_codec_get_drvdata
(
codec
);
struct
pcm1681_private
*
priv
=
snd_soc_codec_get_drvdata
(
codec
);
int
val
=
0
,
ret
;
int
val
=
0
,
ret
;
int
pcm_format
=
params_format
(
params
);
priv
->
rate
=
params_rate
(
params
);
priv
->
rate
=
params_rate
(
params
);
switch
(
priv
->
format
&
SND_SOC_DAIFMT_FORMAT_MASK
)
{
switch
(
priv
->
format
&
SND_SOC_DAIFMT_FORMAT_MASK
)
{
case
SND_SOC_DAIFMT_RIGHT_J
:
case
SND_SOC_DAIFMT_RIGHT_J
:
if
(
pcm_format
==
SNDRV_PCM_FORMAT_S24_LE
)
switch
(
params_width
(
params
))
{
val
=
0x00
;
case
24
:
else
if
(
pcm_format
==
SNDRV_PCM_FORMAT_S16_LE
)
val
=
0
;
val
=
0x03
;
break
;
case
16
:
val
=
3
;
break
;
default:
return
-
EINVAL
;
}
break
;
break
;
case
SND_SOC_DAIFMT_I2S
:
case
SND_SOC_DAIFMT_I2S
:
val
=
0x04
;
val
=
0x04
;
...
...
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