Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
b7f08d29
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b7f08d29
编写于
1月 11, 2016
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/fix/compress' into asoc-linus
上级
c8980d2c
a1068045
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
20 addition
and
3 deletion
+20
-3
sound/soc/soc-compress.c
sound/soc/soc-compress.c
+20
-3
未找到文件。
sound/soc/soc-compress.c
浏览文件 @
b7f08d29
...
...
@@ -630,6 +630,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
struct
snd_pcm
*
be_pcm
;
char
new_name
[
64
];
int
ret
=
0
,
direction
=
0
;
int
playback
=
0
,
capture
=
0
;
if
(
rtd
->
num_codecs
>
1
)
{
dev_err
(
rtd
->
card
->
dev
,
"Multicodec not supported for compressed stream
\n
"
);
...
...
@@ -641,11 +642,27 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
rtd
->
dai_link
->
stream_name
,
codec_dai
->
name
,
num
);
if
(
codec_dai
->
driver
->
playback
.
channels_min
)
playback
=
1
;
if
(
codec_dai
->
driver
->
capture
.
channels_min
)
capture
=
1
;
capture
=
capture
&&
cpu_dai
->
driver
->
capture
.
channels_min
;
playback
=
playback
&&
cpu_dai
->
driver
->
playback
.
channels_min
;
/*
* Compress devices are unidirectional so only one of the directions
* should be set, check for that (xor)
*/
if
(
playback
+
capture
!=
1
)
{
dev_err
(
rtd
->
card
->
dev
,
"Invalid direction for compress P %d, C %d
\n
"
,
playback
,
capture
);
return
-
EINVAL
;
}
if
(
playback
)
direction
=
SND_COMPRESS_PLAYBACK
;
else
if
(
codec_dai
->
driver
->
capture
.
channels_min
)
direction
=
SND_COMPRESS_CAPTURE
;
else
return
-
EINVAL
;
direction
=
SND_COMPRESS_CAPTURE
;
compr
=
kzalloc
(
sizeof
(
*
compr
),
GFP_KERNEL
);
if
(
compr
==
NULL
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录