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
6cbff4b3
Commit
6cbff4b3
authored
Jan 24, 2022
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge existing fixes from asoc/for-5.17 into new branch
parents
e783362e
579b2c8f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
6 deletions
+54
-6
sound/soc/codecs/cpcap.c
sound/soc/codecs/cpcap.c
+2
-0
sound/soc/codecs/max9759.c
sound/soc/codecs/max9759.c
+2
-1
sound/soc/generic/simple-card.c
sound/soc/generic/simple-card.c
+25
-1
sound/soc/mediatek/Kconfig
sound/soc/mediatek/Kconfig
+1
-1
sound/soc/xilinx/xlnx_formatter_pcm.c
sound/soc/xilinx/xlnx_formatter_pcm.c
+24
-3
No files found.
sound/soc/codecs/cpcap.c
View file @
6cbff4b3
...
...
@@ -1667,6 +1667,8 @@ static int cpcap_codec_probe(struct platform_device *pdev)
{
struct
device_node
*
codec_node
=
of_get_child_by_name
(
pdev
->
dev
.
parent
->
of_node
,
"audio-codec"
);
if
(
!
codec_node
)
return
-
ENODEV
;
pdev
->
dev
.
of_node
=
codec_node
;
...
...
sound/soc/codecs/max9759.c
View file @
6cbff4b3
...
...
@@ -64,7 +64,8 @@ static int speaker_gain_control_put(struct snd_kcontrol *kcontrol,
struct
snd_soc_component
*
c
=
snd_soc_kcontrol_component
(
kcontrol
);
struct
max9759
*
priv
=
snd_soc_component_get_drvdata
(
c
);
if
(
ucontrol
->
value
.
integer
.
value
[
0
]
>
3
)
if
(
ucontrol
->
value
.
integer
.
value
[
0
]
<
0
||
ucontrol
->
value
.
integer
.
value
[
0
]
>
3
)
return
-
EINVAL
;
priv
->
gain
=
ucontrol
->
value
.
integer
.
value
[
0
];
...
...
sound/soc/generic/simple-card.c
View file @
6cbff4b3
...
...
@@ -28,6 +28,30 @@ static const struct snd_soc_ops simple_ops = {
.
hw_params
=
asoc_simple_hw_params
,
};
static
int
asoc_simple_parse_platform
(
struct
device_node
*
node
,
struct
snd_soc_dai_link_component
*
dlc
)
{
struct
of_phandle_args
args
;
int
ret
;
if
(
!
node
)
return
0
;
/*
* Get node via "sound-dai = <&phandle port>"
* it will be used as xxx_of_node on soc_bind_dai_link()
*/
ret
=
of_parse_phandle_with_args
(
node
,
DAI
,
CELL
,
0
,
&
args
);
if
(
ret
)
return
ret
;
/* dai_name is not required and may not exist for plat component */
dlc
->
of_node
=
args
.
np
;
return
0
;
}
static
int
asoc_simple_parse_dai
(
struct
device_node
*
node
,
struct
snd_soc_dai_link_component
*
dlc
,
int
*
is_single_link
)
...
...
@@ -289,7 +313,7 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv,
if
(
ret
<
0
)
goto
dai_link_of_err
;
ret
=
asoc_simple_parse_
dai
(
plat
,
platforms
,
NULL
);
ret
=
asoc_simple_parse_
platform
(
plat
,
platforms
);
if
(
ret
<
0
)
goto
dai_link_of_err
;
...
...
sound/soc/mediatek/Kconfig
View file @
6cbff4b3
...
...
@@ -216,7 +216,7 @@ config SND_SOC_MT8195_MT6359_RT1019_RT5682
config SND_SOC_MT8195_MT6359_RT1011_RT5682
tristate "ASoC Audio driver for MT8195 with MT6359 RT1011 RT5682 codec"
depends on I2C
depends on I2C
&& GPIOLIB
depends on SND_SOC_MT8195 && MTK_PMIC_WRAP
select SND_SOC_MT6359
select SND_SOC_RT1011
...
...
sound/soc/xilinx/xlnx_formatter_pcm.c
View file @
6cbff4b3
...
...
@@ -37,6 +37,7 @@
#define XLNX_AUD_XFER_COUNT 0x28
#define XLNX_AUD_CH_STS_START 0x2C
#define XLNX_BYTES_PER_CH 0x44
#define XLNX_AUD_ALIGN_BYTES 64
#define AUD_STS_IOC_IRQ_MASK BIT(31)
#define AUD_STS_CH_STS_MASK BIT(29)
...
...
@@ -368,12 +369,32 @@ static int xlnx_formatter_pcm_open(struct snd_soc_component *component,
snd_soc_set_runtime_hwparams
(
substream
,
&
xlnx_pcm_hardware
);
runtime
->
private_data
=
stream_data
;
/* Resize the period
size
divisible by 64 */
/* Resize the period
bytes as
divisible by 64 */
err
=
snd_pcm_hw_constraint_step
(
runtime
,
0
,
SNDRV_PCM_HW_PARAM_PERIOD_BYTES
,
64
);
SNDRV_PCM_HW_PARAM_PERIOD_BYTES
,
XLNX_AUD_ALIGN_BYTES
);
if
(
err
)
{
dev_err
(
component
->
dev
,
"unable to set constraint on period bytes
\n
"
);
"Unable to set constraint on period bytes
\n
"
);
return
err
;
}
/* Resize the buffer bytes as divisible by 64 */
err
=
snd_pcm_hw_constraint_step
(
runtime
,
0
,
SNDRV_PCM_HW_PARAM_BUFFER_BYTES
,
XLNX_AUD_ALIGN_BYTES
);
if
(
err
)
{
dev_err
(
component
->
dev
,
"Unable to set constraint on buffer bytes
\n
"
);
return
err
;
}
/* Set periods as integer multiple */
err
=
snd_pcm_hw_constraint_integer
(
runtime
,
SNDRV_PCM_HW_PARAM_PERIODS
);
if
(
err
<
0
)
{
dev_err
(
component
->
dev
,
"Unable to set constraint on periods to be integer
\n
"
);
return
err
;
}
...
...
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