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
3f0d23e8
Commit
3f0d23e8
authored
May 10, 2021
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge existing fixes from asoc/for-5.13
parents
6efb943b
682ae59c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
22 deletions
+31
-22
sound/soc/amd/raven/acp3x-pcm-dma.c
sound/soc/amd/raven/acp3x-pcm-dma.c
+0
-10
sound/soc/amd/raven/acp3x.h
sound/soc/amd/raven/acp3x.h
+1
-0
sound/soc/amd/raven/pci-acp3x.c
sound/soc/amd/raven/pci-acp3x.c
+15
-0
sound/soc/codecs/da7219.c
sound/soc/codecs/da7219.c
+1
-4
sound/soc/codecs/max98088.c
sound/soc/codecs/max98088.c
+11
-2
sound/soc/codecs/rt711-sdca.c
sound/soc/codecs/rt711-sdca.c
+2
-2
sound/soc/stm/stm32_sai_sub.c
sound/soc/stm/stm32_sai_sub.c
+1
-4
No files found.
sound/soc/amd/raven/acp3x-pcm-dma.c
View file @
3f0d23e8
...
@@ -235,10 +235,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
...
@@ -235,10 +235,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return
ret
;
return
ret
;
}
}
if
(
!
adata
->
play_stream
&&
!
adata
->
capture_stream
&&
!
adata
->
i2ssp_play_stream
&&
!
adata
->
i2ssp_capture_stream
)
rv_writel
(
1
,
adata
->
acp3x_base
+
mmACP_EXTERNAL_INTR_ENB
);
i2s_data
->
acp3x_base
=
adata
->
acp3x_base
;
i2s_data
->
acp3x_base
=
adata
->
acp3x_base
;
runtime
->
private_data
=
i2s_data
;
runtime
->
private_data
=
i2s_data
;
return
ret
;
return
ret
;
...
@@ -365,12 +361,6 @@ static int acp3x_dma_close(struct snd_soc_component *component,
...
@@ -365,12 +361,6 @@ static int acp3x_dma_close(struct snd_soc_component *component,
}
}
}
}
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
if
(
!
adata
->
play_stream
&&
!
adata
->
capture_stream
&&
!
adata
->
i2ssp_play_stream
&&
!
adata
->
i2ssp_capture_stream
)
rv_writel
(
0
,
adata
->
acp3x_base
+
mmACP_EXTERNAL_INTR_ENB
);
return
0
;
return
0
;
}
}
...
...
sound/soc/amd/raven/acp3x.h
View file @
3f0d23e8
...
@@ -77,6 +77,7 @@
...
@@ -77,6 +77,7 @@
#define ACP_POWER_OFF_IN_PROGRESS 0x03
#define ACP_POWER_OFF_IN_PROGRESS 0x03
#define ACP3x_ITER_IRER_SAMP_LEN_MASK 0x38
#define ACP3x_ITER_IRER_SAMP_LEN_MASK 0x38
#define ACP_EXT_INTR_STAT_CLEAR_MASK 0xFFFFFFFF
struct
acp3x_platform_info
{
struct
acp3x_platform_info
{
u16
play_i2s_instance
;
u16
play_i2s_instance
;
...
...
sound/soc/amd/raven/pci-acp3x.c
View file @
3f0d23e8
...
@@ -76,6 +76,19 @@ static int acp3x_reset(void __iomem *acp3x_base)
...
@@ -76,6 +76,19 @@ static int acp3x_reset(void __iomem *acp3x_base)
return
-
ETIMEDOUT
;
return
-
ETIMEDOUT
;
}
}
static
void
acp3x_enable_interrupts
(
void
__iomem
*
acp_base
)
{
rv_writel
(
0x01
,
acp_base
+
mmACP_EXTERNAL_INTR_ENB
);
}
static
void
acp3x_disable_interrupts
(
void
__iomem
*
acp_base
)
{
rv_writel
(
ACP_EXT_INTR_STAT_CLEAR_MASK
,
acp_base
+
mmACP_EXTERNAL_INTR_STAT
);
rv_writel
(
0x00
,
acp_base
+
mmACP_EXTERNAL_INTR_CNTL
);
rv_writel
(
0x00
,
acp_base
+
mmACP_EXTERNAL_INTR_ENB
);
}
static
int
acp3x_init
(
struct
acp3x_dev_data
*
adata
)
static
int
acp3x_init
(
struct
acp3x_dev_data
*
adata
)
{
{
void
__iomem
*
acp3x_base
=
adata
->
acp3x_base
;
void
__iomem
*
acp3x_base
=
adata
->
acp3x_base
;
...
@@ -93,6 +106,7 @@ static int acp3x_init(struct acp3x_dev_data *adata)
...
@@ -93,6 +106,7 @@ static int acp3x_init(struct acp3x_dev_data *adata)
pr_err
(
"ACP3x reset failed
\n
"
);
pr_err
(
"ACP3x reset failed
\n
"
);
return
ret
;
return
ret
;
}
}
acp3x_enable_interrupts
(
acp3x_base
);
return
0
;
return
0
;
}
}
...
@@ -100,6 +114,7 @@ static int acp3x_deinit(void __iomem *acp3x_base)
...
@@ -100,6 +114,7 @@ static int acp3x_deinit(void __iomem *acp3x_base)
{
{
int
ret
;
int
ret
;
acp3x_disable_interrupts
(
acp3x_base
);
/* Reset */
/* Reset */
ret
=
acp3x_reset
(
acp3x_base
);
ret
=
acp3x_reset
(
acp3x_base
);
if
(
ret
)
{
if
(
ret
)
{
...
...
sound/soc/codecs/da7219.c
View file @
3f0d23e8
...
@@ -2181,10 +2181,7 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
...
@@ -2181,10 +2181,7 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
ret
);
ret
);
goto
err
;
goto
err
;
}
}
da7219
->
dai_clks
[
i
]
=
dai_clk_hw
->
clk
;
da7219
->
dai_clks
[
i
]
=
devm_clk_hw_get_clk
(
dev
,
dai_clk_hw
,
NULL
);
if
(
IS_ERR
(
da7219
->
dai_clks
[
i
]))
return
PTR_ERR
(
da7219
->
dai_clks
[
i
]);
/* For DT setup onecell data, otherwise create lookup */
/* For DT setup onecell data, otherwise create lookup */
if
(
np
)
{
if
(
np
)
{
...
...
sound/soc/codecs/max98088.c
View file @
3f0d23e8
...
@@ -41,6 +41,7 @@ struct max98088_priv {
...
@@ -41,6 +41,7 @@ struct max98088_priv {
enum
max98088_type
devtype
;
enum
max98088_type
devtype
;
struct
max98088_pdata
*
pdata
;
struct
max98088_pdata
*
pdata
;
struct
clk
*
mclk
;
struct
clk
*
mclk
;
unsigned
char
mclk_prescaler
;
unsigned
int
sysclk
;
unsigned
int
sysclk
;
struct
max98088_cdata
dai
[
2
];
struct
max98088_cdata
dai
[
2
];
int
eq_textcnt
;
int
eq_textcnt
;
...
@@ -998,13 +999,16 @@ static int max98088_dai1_hw_params(struct snd_pcm_substream *substream,
...
@@ -998,13 +999,16 @@ static int max98088_dai1_hw_params(struct snd_pcm_substream *substream,
/* Configure NI when operating as master */
/* Configure NI when operating as master */
if
(
snd_soc_component_read
(
component
,
M98088_REG_14_DAI1_FORMAT
)
if
(
snd_soc_component_read
(
component
,
M98088_REG_14_DAI1_FORMAT
)
&
M98088_DAI_MAS
)
{
&
M98088_DAI_MAS
)
{
unsigned
long
pclk
;
if
(
max98088
->
sysclk
==
0
)
{
if
(
max98088
->
sysclk
==
0
)
{
dev_err
(
component
->
dev
,
"Invalid system clock frequency
\n
"
);
dev_err
(
component
->
dev
,
"Invalid system clock frequency
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
ni
=
65536ULL
*
(
rate
<
50000
?
96ULL
:
48ULL
)
ni
=
65536ULL
*
(
rate
<
50000
?
96ULL
:
48ULL
)
*
(
unsigned
long
long
int
)
rate
;
*
(
unsigned
long
long
int
)
rate
;
do_div
(
ni
,
(
unsigned
long
long
int
)
max98088
->
sysclk
);
pclk
=
DIV_ROUND_CLOSEST
(
max98088
->
sysclk
,
max98088
->
mclk_prescaler
);
ni
=
DIV_ROUND_CLOSEST_ULL
(
ni
,
pclk
);
snd_soc_component_write
(
component
,
M98088_REG_12_DAI1_CLKCFG_HI
,
snd_soc_component_write
(
component
,
M98088_REG_12_DAI1_CLKCFG_HI
,
(
ni
>>
8
)
&
0x7F
);
(
ni
>>
8
)
&
0x7F
);
snd_soc_component_write
(
component
,
M98088_REG_13_DAI1_CLKCFG_LO
,
snd_soc_component_write
(
component
,
M98088_REG_13_DAI1_CLKCFG_LO
,
...
@@ -1065,13 +1069,16 @@ static int max98088_dai2_hw_params(struct snd_pcm_substream *substream,
...
@@ -1065,13 +1069,16 @@ static int max98088_dai2_hw_params(struct snd_pcm_substream *substream,
/* Configure NI when operating as master */
/* Configure NI when operating as master */
if
(
snd_soc_component_read
(
component
,
M98088_REG_1C_DAI2_FORMAT
)
if
(
snd_soc_component_read
(
component
,
M98088_REG_1C_DAI2_FORMAT
)
&
M98088_DAI_MAS
)
{
&
M98088_DAI_MAS
)
{
unsigned
long
pclk
;
if
(
max98088
->
sysclk
==
0
)
{
if
(
max98088
->
sysclk
==
0
)
{
dev_err
(
component
->
dev
,
"Invalid system clock frequency
\n
"
);
dev_err
(
component
->
dev
,
"Invalid system clock frequency
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
ni
=
65536ULL
*
(
rate
<
50000
?
96ULL
:
48ULL
)
ni
=
65536ULL
*
(
rate
<
50000
?
96ULL
:
48ULL
)
*
(
unsigned
long
long
int
)
rate
;
*
(
unsigned
long
long
int
)
rate
;
do_div
(
ni
,
(
unsigned
long
long
int
)
max98088
->
sysclk
);
pclk
=
DIV_ROUND_CLOSEST
(
max98088
->
sysclk
,
max98088
->
mclk_prescaler
);
ni
=
DIV_ROUND_CLOSEST_ULL
(
ni
,
pclk
);
snd_soc_component_write
(
component
,
M98088_REG_1A_DAI2_CLKCFG_HI
,
snd_soc_component_write
(
component
,
M98088_REG_1A_DAI2_CLKCFG_HI
,
(
ni
>>
8
)
&
0x7F
);
(
ni
>>
8
)
&
0x7F
);
snd_soc_component_write
(
component
,
M98088_REG_1B_DAI2_CLKCFG_LO
,
snd_soc_component_write
(
component
,
M98088_REG_1B_DAI2_CLKCFG_LO
,
...
@@ -1113,8 +1120,10 @@ static int max98088_dai_set_sysclk(struct snd_soc_dai *dai,
...
@@ -1113,8 +1120,10 @@ static int max98088_dai_set_sysclk(struct snd_soc_dai *dai,
*/
*/
if
((
freq
>=
10000000
)
&&
(
freq
<
20000000
))
{
if
((
freq
>=
10000000
)
&&
(
freq
<
20000000
))
{
snd_soc_component_write
(
component
,
M98088_REG_10_SYS_CLK
,
0x10
);
snd_soc_component_write
(
component
,
M98088_REG_10_SYS_CLK
,
0x10
);
max98088
->
mclk_prescaler
=
1
;
}
else
if
((
freq
>=
20000000
)
&&
(
freq
<
30000000
))
{
}
else
if
((
freq
>=
20000000
)
&&
(
freq
<
30000000
))
{
snd_soc_component_write
(
component
,
M98088_REG_10_SYS_CLK
,
0x20
);
snd_soc_component_write
(
component
,
M98088_REG_10_SYS_CLK
,
0x20
);
max98088
->
mclk_prescaler
=
2
;
}
else
{
}
else
{
dev_err
(
component
->
dev
,
"Invalid master clock frequency
\n
"
);
dev_err
(
component
->
dev
,
"Invalid master clock frequency
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
...
...
sound/soc/codecs/rt711-sdca.c
View file @
3f0d23e8
...
@@ -683,13 +683,13 @@ static int rt711_sdca_set_fu1e_capture_ctl(struct rt711_sdca_priv *rt711)
...
@@ -683,13 +683,13 @@ static int rt711_sdca_set_fu1e_capture_ctl(struct rt711_sdca_priv *rt711)
ch_r
=
(
rt711
->
fu1e_dapm_mute
||
rt711
->
fu1e_mixer_r_mute
)
?
0x01
:
0x00
;
ch_r
=
(
rt711
->
fu1e_dapm_mute
||
rt711
->
fu1e_mixer_r_mute
)
?
0x01
:
0x00
;
err
=
regmap_write
(
rt711
->
regmap
,
err
=
regmap_write
(
rt711
->
regmap
,
SDW_SDCA_CTL
(
FUNC_NUM_
JACK_CODEC
,
RT711_SDCA_ENT_USER_FU1E
,
SDW_SDCA_CTL
(
FUNC_NUM_
MIC_ARRAY
,
RT711_SDCA_ENT_USER_FU1E
,
RT711_SDCA_CTL_FU_MUTE
,
CH_L
),
ch_l
);
RT711_SDCA_CTL_FU_MUTE
,
CH_L
),
ch_l
);
if
(
err
<
0
)
if
(
err
<
0
)
return
err
;
return
err
;
err
=
regmap_write
(
rt711
->
regmap
,
err
=
regmap_write
(
rt711
->
regmap
,
SDW_SDCA_CTL
(
FUNC_NUM_
JACK_CODEC
,
RT711_SDCA_ENT_USER_FU1E
,
SDW_SDCA_CTL
(
FUNC_NUM_
MIC_ARRAY
,
RT711_SDCA_ENT_USER_FU1E
,
RT711_SDCA_CTL_FU_MUTE
,
CH_R
),
ch_r
);
RT711_SDCA_CTL_FU_MUTE
,
CH_R
),
ch_r
);
if
(
err
<
0
)
if
(
err
<
0
)
return
err
;
return
err
;
...
...
sound/soc/stm/stm32_sai_sub.c
View file @
3f0d23e8
...
@@ -484,10 +484,7 @@ static int stm32_sai_add_mclk_provider(struct stm32_sai_sub_data *sai)
...
@@ -484,10 +484,7 @@ static int stm32_sai_add_mclk_provider(struct stm32_sai_sub_data *sai)
dev_err
(
dev
,
"mclk register returned %d
\n
"
,
ret
);
dev_err
(
dev
,
"mclk register returned %d
\n
"
,
ret
);
return
ret
;
return
ret
;
}
}
sai
->
sai_mclk
=
hw
->
clk
;
sai
->
sai_mclk
=
devm_clk_hw_get_clk
(
dev
,
hw
,
NULL
);
if
(
IS_ERR
(
sai
->
sai_mclk
))
return
PTR_ERR
(
sai
->
sai_mclk
);
/* register mclk provider */
/* register mclk provider */
return
devm_of_clk_add_hw_provider
(
dev
,
of_clk_hw_simple_get
,
hw
);
return
devm_of_clk_add_hw_provider
(
dev
,
of_clk_hw_simple_get
,
hw
);
...
...
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