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
783ec5e9
Commit
783ec5e9
authored
May 02, 2018
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/for-4.17' into asoc-4.18 to resolve a
conflict between a fix and new development in mtk
parents
9e6a469e
40c57963
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
16 deletions
+18
-16
include/sound/soc-dai.h
include/sound/soc-dai.h
+2
-2
sound/soc/cirrus/edb93xx.c
sound/soc/cirrus/edb93xx.c
+1
-1
sound/soc/cirrus/ep93xx-i2s.c
sound/soc/cirrus/ep93xx-i2s.c
+14
-12
sound/soc/cirrus/snappercl15.c
sound/soc/cirrus/snappercl15.c
+1
-1
No files found.
include/sound/soc-dai.h
View file @
783ec5e9
...
...
@@ -294,8 +294,8 @@ struct snd_soc_dai {
struct
snd_soc_dai_driver
*
driver
;
/* DAI runtime info */
unsigned
int
capture_active
:
1
;
/* stream is in use
*/
unsigned
int
playback_active
:
1
;
/* stream is in use
*/
unsigned
int
capture_active
;
/* stream usage count
*/
unsigned
int
playback_active
;
/* stream usage count
*/
unsigned
int
probed
:
1
;
unsigned
int
active
;
...
...
sound/soc/cirrus/edb93xx.c
View file @
783ec5e9
...
...
@@ -67,7 +67,7 @@ static struct snd_soc_dai_link edb93xx_dai = {
.
cpu_dai_name
=
"ep93xx-i2s"
,
.
codec_name
=
"spi0.0"
,
.
codec_dai_name
=
"cs4271-hifi"
,
.
dai_fmt
=
SND_SOC_DAIFMT_I2S
|
SND_SOC_DAIFMT_NB_
I
F
|
.
dai_fmt
=
SND_SOC_DAIFMT_I2S
|
SND_SOC_DAIFMT_NB_
N
F
|
SND_SOC_DAIFMT_CBS_CFS
,
.
ops
=
&
edb93xx_ops
,
};
...
...
sound/soc/cirrus/ep93xx-i2s.c
View file @
783ec5e9
...
...
@@ -51,7 +51,9 @@
#define EP93XX_I2S_WRDLEN_24 (1 << 0)
#define EP93XX_I2S_WRDLEN_32 (2 << 0)
#define EP93XX_I2S_LINCTRLDATA_R_JUST (1 << 2)
/* Right justify */
#define EP93XX_I2S_RXLINCTRLDATA_R_JUST BIT(1)
/* Right justify */
#define EP93XX_I2S_TXLINCTRLDATA_R_JUST BIT(2)
/* Right justify */
#define EP93XX_I2S_CLKCFG_LRS (1 << 0)
/* lrclk polarity */
#define EP93XX_I2S_CLKCFG_CKP (1 << 1)
/* Bit clock polarity */
...
...
@@ -170,25 +172,25 @@ static int ep93xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
unsigned
int
fmt
)
{
struct
ep93xx_i2s_info
*
info
=
snd_soc_dai_get_drvdata
(
cpu_dai
);
unsigned
int
clk_cfg
,
lin_ctrl
;
unsigned
int
clk_cfg
;
unsigned
int
txlin_ctrl
=
0
;
unsigned
int
rxlin_ctrl
=
0
;
clk_cfg
=
ep93xx_i2s_read_reg
(
info
,
EP93XX_I2S_RXCLKCFG
);
lin_ctrl
=
ep93xx_i2s_read_reg
(
info
,
EP93XX_I2S_RXLINCTRLDATA
);
switch
(
fmt
&
SND_SOC_DAIFMT_FORMAT_MASK
)
{
case
SND_SOC_DAIFMT_I2S
:
clk_cfg
|=
EP93XX_I2S_CLKCFG_REL
;
lin_ctrl
&=
~
EP93XX_I2S_LINCTRLDATA_R_JUST
;
break
;
case
SND_SOC_DAIFMT_LEFT_J
:
clk_cfg
&=
~
EP93XX_I2S_CLKCFG_REL
;
lin_ctrl
&=
~
EP93XX_I2S_LINCTRLDATA_R_JUST
;
break
;
case
SND_SOC_DAIFMT_RIGHT_J
:
clk_cfg
&=
~
EP93XX_I2S_CLKCFG_REL
;
lin_ctrl
|=
EP93XX_I2S_LINCTRLDATA_R_JUST
;
rxlin_ctrl
|=
EP93XX_I2S_RXLINCTRLDATA_R_JUST
;
txlin_ctrl
|=
EP93XX_I2S_TXLINCTRLDATA_R_JUST
;
break
;
default:
...
...
@@ -213,32 +215,32 @@ static int ep93xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
switch
(
fmt
&
SND_SOC_DAIFMT_INV_MASK
)
{
case
SND_SOC_DAIFMT_NB_NF
:
/* Negative bit clock, lrclk low on left word */
clk_cfg
&=
~
(
EP93XX_I2S_CLKCFG_CKP
|
EP93XX_I2S_CLKCFG_
REL
);
clk_cfg
&=
~
(
EP93XX_I2S_CLKCFG_CKP
|
EP93XX_I2S_CLKCFG_
LRS
);
break
;
case
SND_SOC_DAIFMT_NB_IF
:
/* Negative bit clock, lrclk low on right word */
clk_cfg
&=
~
EP93XX_I2S_CLKCFG_CKP
;
clk_cfg
|=
EP93XX_I2S_CLKCFG_
REL
;
clk_cfg
|=
EP93XX_I2S_CLKCFG_
LRS
;
break
;
case
SND_SOC_DAIFMT_IB_NF
:
/* Positive bit clock, lrclk low on left word */
clk_cfg
|=
EP93XX_I2S_CLKCFG_CKP
;
clk_cfg
&=
~
EP93XX_I2S_CLKCFG_
REL
;
clk_cfg
&=
~
EP93XX_I2S_CLKCFG_
LRS
;
break
;
case
SND_SOC_DAIFMT_IB_IF
:
/* Positive bit clock, lrclk low on right word */
clk_cfg
|=
EP93XX_I2S_CLKCFG_CKP
|
EP93XX_I2S_CLKCFG_
REL
;
clk_cfg
|=
EP93XX_I2S_CLKCFG_CKP
|
EP93XX_I2S_CLKCFG_
LRS
;
break
;
}
/* Write new register values */
ep93xx_i2s_write_reg
(
info
,
EP93XX_I2S_RXCLKCFG
,
clk_cfg
);
ep93xx_i2s_write_reg
(
info
,
EP93XX_I2S_TXCLKCFG
,
clk_cfg
);
ep93xx_i2s_write_reg
(
info
,
EP93XX_I2S_RXLINCTRLDATA
,
lin_ctrl
);
ep93xx_i2s_write_reg
(
info
,
EP93XX_I2S_TXLINCTRLDATA
,
lin_ctrl
);
ep93xx_i2s_write_reg
(
info
,
EP93XX_I2S_RXLINCTRLDATA
,
rx
lin_ctrl
);
ep93xx_i2s_write_reg
(
info
,
EP93XX_I2S_TXLINCTRLDATA
,
tx
lin_ctrl
);
return
0
;
}
...
...
sound/soc/cirrus/snappercl15.c
View file @
783ec5e9
...
...
@@ -72,7 +72,7 @@ static struct snd_soc_dai_link snappercl15_dai = {
.
codec_dai_name
=
"tlv320aic23-hifi"
,
.
codec_name
=
"tlv320aic23-codec.0-001a"
,
.
platform_name
=
"ep93xx-i2s"
,
.
dai_fmt
=
SND_SOC_DAIFMT_I2S
|
SND_SOC_DAIFMT_NB_
I
F
|
.
dai_fmt
=
SND_SOC_DAIFMT_I2S
|
SND_SOC_DAIFMT_NB_
N
F
|
SND_SOC_DAIFMT_CBS_CFS
,
.
ops
=
&
snappercl15_ops
,
};
...
...
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