Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6cbff4b3
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
6cbff4b3
编写于
1月 24, 2022
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge existing fixes from asoc/for-5.17 into new branch
上级
e783362e
579b2c8f
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
54 addition
and
6 deletion
+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
未找到文件。
sound/soc/codecs/cpcap.c
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录