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
46758dee
Commit
46758dee
authored
Jun 06, 2011
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-3.0' into for-3.1
parents
f97d0c6d
8ca695f2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
sound/soc/codecs/ad1836.c
sound/soc/codecs/ad1836.c
+7
-7
sound/soc/codecs/ad1836.h
sound/soc/codecs/ad1836.h
+6
-0
No files found.
sound/soc/codecs/ad1836.c
View file @
46758dee
...
...
@@ -178,22 +178,22 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream,
/* bit size */
switch
(
params_format
(
params
))
{
case
SNDRV_PCM_FORMAT_S16_LE
:
word_len
=
3
;
word_len
=
AD1836_WORD_LEN_16
;
break
;
case
SNDRV_PCM_FORMAT_S20_3LE
:
word_len
=
1
;
word_len
=
AD1836_WORD_LEN_20
;
break
;
case
SNDRV_PCM_FORMAT_S24_LE
:
case
SNDRV_PCM_FORMAT_S32_LE
:
word_len
=
0
;
word_len
=
AD1836_WORD_LEN_24
;
break
;
}
snd_soc_update_bits
(
codec
,
AD1836_DAC_CTRL1
,
AD1836_DAC_WORD_LEN_MASK
,
word_len
);
snd_soc_update_bits
(
codec
,
AD1836_DAC_CTRL1
,
AD1836_DAC_WORD_LEN_MASK
,
word_len
<<
AD1836_DAC_WORD_LEN_OFFSET
);
snd_soc_update_bits
(
codec
,
AD1836_ADC_CTRL2
,
AD1836_ADC_WORD_LEN_MASK
,
word_len
);
snd_soc_update_bits
(
codec
,
AD1836_ADC_CTRL2
,
AD1836_ADC_WORD_LEN_MASK
,
word_len
<<
AD1836_ADC_WORD_OFFSET
);
return
0
;
}
...
...
sound/soc/codecs/ad1836.h
View file @
46758dee
...
...
@@ -25,6 +25,7 @@
#define AD1836_DAC_SERFMT_PCK256 (0x4 << 5)
#define AD1836_DAC_SERFMT_PCK128 (0x5 << 5)
#define AD1836_DAC_WORD_LEN_MASK 0x18
#define AD1836_DAC_WORD_LEN_OFFSET 3
#define AD1836_DAC_CTRL2 1
...
...
@@ -42,6 +43,7 @@
#define AD1836_ADC_CTRL2 13
#define AD1836_ADC_WORD_LEN_MASK 0x30
#define AD1836_ADC_WORD_OFFSET 5
#define AD1836_ADC_SERFMT_MASK (7 << 6)
#define AD1836_ADC_SERFMT_PCK256 (0x4 << 6)
#define AD1836_ADC_SERFMT_PCK128 (0x5 << 6)
...
...
@@ -51,4 +53,8 @@
#define AD1836_NUM_REGS 16
#define AD1836_WORD_LEN_24 0x0
#define AD1836_WORD_LEN_20 0x1
#define AD1836_WORD_LEN_16 0x2
#endif
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