Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
f48a6df2
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看板
提交
f48a6df2
编写于
10月 28, 2014
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ALSA: pcxhr: Kill the rest snd_print*()
Use the standard dev_*() instead. Signed-off-by:
N
Takashi Iwai
<
tiwai@suse.de
>
上级
2e6705c0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
21 deletion
+21
-21
sound/pci/pcxhr/pcxhr.c
sound/pci/pcxhr/pcxhr.c
+21
-21
未找到文件。
sound/pci/pcxhr/pcxhr.c
浏览文件 @
f48a6df2
...
...
@@ -501,10 +501,10 @@ int pcxhr_get_external_clock(struct pcxhr_mgr *mgr,
/*
* start or stop playback/capture substream
*/
static
int
pcxhr_set_stream_state
(
struct
pcxhr_stream
*
stream
)
static
int
pcxhr_set_stream_state
(
struct
snd_pcxhr
*
chip
,
struct
pcxhr_stream
*
stream
)
{
int
err
;
struct
snd_pcxhr
*
chip
;
struct
pcxhr_rmh
rmh
;
int
stream_mask
,
start
;
...
...
@@ -512,8 +512,8 @@ static int pcxhr_set_stream_state(struct pcxhr_stream *stream)
start
=
1
;
else
{
if
(
stream
->
status
!=
PCXHR_STREAM_STATUS_SCHEDULE_STOP
)
{
snd_printk
(
KERN_ERR
"ERROR pcxhr_set_stream_state "
"
CANNOT be stopped
\n
"
);
dev_err
(
chip
->
card
->
dev
,
"pcxhr_set_stream_state
CANNOT be stopped
\n
"
);
return
-
EINVAL
;
}
start
=
0
;
...
...
@@ -560,6 +560,7 @@ static int pcxhr_set_format(struct pcxhr_stream *stream)
struct
pcxhr_rmh
rmh
;
unsigned
int
header
;
chip
=
snd_pcm_substream_chip
(
stream
->
substream
);
switch
(
stream
->
format
)
{
case
SNDRV_PCM_FORMAT_U8
:
header
=
HEADER_FMT_BASE_LIN
;
...
...
@@ -582,11 +583,10 @@ static int pcxhr_set_format(struct pcxhr_stream *stream)
header
=
HEADER_FMT_BASE_FLOAT
|
HEADER_FMT_INTEL
;
break
;
default:
snd_printk
(
KERN_ERR
"error pcxhr_set_format() : unknown format
\n
"
);
dev_err
(
chip
->
card
->
dev
,
"error pcxhr_set_format() : unknown format
\n
"
);
return
-
EINVAL
;
}
chip
=
snd_pcm_substream_chip
(
stream
->
substream
);
sample_rate
=
chip
->
mgr
->
sample_rate
;
if
(
sample_rate
<=
32000
&&
sample_rate
!=
0
)
{
...
...
@@ -643,11 +643,11 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream)
is_capture
=
(
subs
->
stream
==
SNDRV_PCM_STREAM_CAPTURE
);
stream_num
=
is_capture
?
0
:
subs
->
number
;
snd_printdd
(
"pcxhr_update_r_buffer(pcm%c%d) : "
"
addr(%p) bytes(%zx) subs(%d)
\n
"
,
is_capture
?
'c'
:
'p'
,
chip
->
chip_idx
,
(
void
*
)(
long
)
subs
->
runtime
->
dma_addr
,
subs
->
runtime
->
dma_bytes
,
subs
->
number
);
dev_dbg
(
chip
->
card
->
dev
,
"pcxhr_update_r_buffer(pcm%c%d) :
addr(%p) bytes(%zx) subs(%d)
\n
"
,
is_capture
?
'c'
:
'p'
,
chip
->
chip_idx
,
(
void
*
)(
long
)
subs
->
runtime
->
dma_addr
,
subs
->
runtime
->
dma_bytes
,
subs
->
number
);
pcxhr_init_rmh
(
&
rmh
,
CMD_UPDATE_R_BUFFERS
);
pcxhr_set_pipe_cmd_params
(
&
rmh
,
is_capture
,
stream
->
pipe
->
first_audio
,
...
...
@@ -687,7 +687,7 @@ static int pcxhr_pipe_sample_count(struct pcxhr_stream *stream,
*sample_count = ((snd_pcm_uframes_t)rmh.stat[0]) << 24;
*sample_count += (snd_pcm_uframes_t)rmh.stat[1];
}
snd_printdd(
"PIPE_SAMPLE_COUNT = %lx\n", *sample_count);
dev_dbg(chip->card->dev,
"PIPE_SAMPLE_COUNT = %lx\n", *sample_count);
return err;
}
#endif
...
...
@@ -779,12 +779,12 @@ static void pcxhr_start_linked_stream(struct pcxhr_mgr *mgr)
for
(
j
=
0
;
j
<
chip
->
nb_streams_capt
;
j
++
)
{
stream
=
&
chip
->
capture_stream
[
j
];
if
(
pcxhr_stream_scheduled_get_pipe
(
stream
,
&
pipe
))
err
=
pcxhr_set_stream_state
(
stream
);
err
=
pcxhr_set_stream_state
(
chip
,
stream
);
}
for
(
j
=
0
;
j
<
chip
->
nb_streams_play
;
j
++
)
{
stream
=
&
chip
->
playback_stream
[
j
];
if
(
pcxhr_stream_scheduled_get_pipe
(
stream
,
&
pipe
))
err
=
pcxhr_set_stream_state
(
stream
);
err
=
pcxhr_set_stream_state
(
chip
,
stream
);
}
}
...
...
@@ -839,12 +839,12 @@ static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd)
{
struct
pcxhr_stream
*
stream
;
struct
snd_pcm_substream
*
s
;
struct
snd_pcxhr
*
chip
=
snd_pcm_substream_chip
(
subs
);
switch
(
cmd
)
{
case
SNDRV_PCM_TRIGGER_START
:
snd_printdd
(
"SNDRV_PCM_TRIGGER_START
\n
"
);
dev_dbg
(
chip
->
card
->
dev
,
"SNDRV_PCM_TRIGGER_START
\n
"
);
if
(
snd_pcm_stream_linked
(
subs
))
{
struct
snd_pcxhr
*
chip
=
snd_pcm_substream_chip
(
subs
);
snd_pcm_group_for_each_entry
(
s
,
subs
)
{
if
(
snd_pcm_substream_chip
(
s
)
!=
chip
)
continue
;
...
...
@@ -856,7 +856,7 @@ static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd)
pcxhr_start_linked_stream
(
chip
->
mgr
);
}
else
{
stream
=
subs
->
runtime
->
private_data
;
snd_printdd
(
"Only one Substream %c %d
\n
"
,
dev_dbg
(
chip
->
card
->
dev
,
"Only one Substream %c %d
\n
"
,
stream
->
pipe
->
is_capture
?
'C'
:
'P'
,
stream
->
pipe
->
first_audio
);
if
(
pcxhr_set_format
(
stream
))
...
...
@@ -865,17 +865,17 @@ static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd)
return
-
EINVAL
;
stream
->
status
=
PCXHR_STREAM_STATUS_SCHEDULE_RUN
;
if
(
pcxhr_set_stream_state
(
stream
))
if
(
pcxhr_set_stream_state
(
chip
,
stream
))
return
-
EINVAL
;
stream
->
status
=
PCXHR_STREAM_STATUS_RUNNING
;
}
break
;
case
SNDRV_PCM_TRIGGER_STOP
:
snd_printdd
(
"SNDRV_PCM_TRIGGER_STOP
\n
"
);
dev_dbg
(
chip
->
card
->
dev
,
"SNDRV_PCM_TRIGGER_STOP
\n
"
);
snd_pcm_group_for_each_entry
(
s
,
subs
)
{
stream
=
s
->
runtime
->
private_data
;
stream
->
status
=
PCXHR_STREAM_STATUS_SCHEDULE_STOP
;
if
(
pcxhr_set_stream_state
(
stream
))
if
(
pcxhr_set_stream_state
(
chip
,
stream
))
return
-
EINVAL
;
snd_pcm_trigger_done
(
s
,
subs
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录