Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
79c7cdd5
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,发现更多精彩内容 >>
提交
79c7cdd5
编写于
2月 09, 2009
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ALSA: Add kernel-doc comments to vmaster stuff
Signed-off-by:
N
Takashi Iwai
<
tiwai@suse.de
>
上级
f5b1db63
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
50 addition
and
2 deletion
+50
-2
Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl
Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl
+4
-0
include/sound/control.h
include/sound/control.h
+32
-0
sound/core/vmaster.c
sound/core/vmaster.c
+14
-2
未找到文件。
Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl
浏览文件 @
79c7cdd5
...
...
@@ -71,6 +71,10 @@
!Esound/pci/ac97/ac97_codec.c
!Esound/pci/ac97/ac97_pcm.c
</sect1>
<sect1><title>
Virtual Master Control API
</title>
!Esound/core/vmaster.c
!Iinclude/sound/control.h
</sect1>
</chapter>
<chapter><title>
MIDI API
</title>
<sect1><title>
Raw MIDI API
</title>
...
...
include/sound/control.h
浏览文件 @
79c7cdd5
...
...
@@ -176,12 +176,44 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
/* optional flags for slave */
#define SND_CTL_SLAVE_NEED_UPDATE (1 << 0)
/**
* snd_ctl_add_slave - Add a virtual slave control
* @master: vmaster element
* @slave: slave element to add
*
* Add a virtual slave control to the given master element created via
* snd_ctl_create_virtual_master() beforehand.
* Returns zero if successful or a negative error code.
*
* All slaves must be the same type (returning the same information
* via info callback). The fucntion doesn't check it, so it's your
* responsibility.
*
* Also, some additional limitations:
* at most two channels,
* logarithmic volume control (dB level) thus no linear volume,
* master can only attenuate the volume without gain
*/
static
inline
int
snd_ctl_add_slave
(
struct
snd_kcontrol
*
master
,
struct
snd_kcontrol
*
slave
)
{
return
_snd_ctl_add_slave
(
master
,
slave
,
0
);
}
/**
* snd_ctl_add_slave_uncached - Add a virtual slave control
* @master: vmaster element
* @slave: slave element to add
*
* Add a virtual slave control to the given master.
* Unlike snd_ctl_add_slave(), the element added via this function
* is supposed to have volatile values, and get callback is called
* at each time quried from the master.
*
* When the control peeks the hardware values directly and the value
* can be changed by other means than the put callback of the element,
* this function should be used to keep the value always up-to-date.
*/
static
inline
int
snd_ctl_add_slave_uncached
(
struct
snd_kcontrol
*
master
,
struct
snd_kcontrol
*
slave
)
...
...
sound/core/vmaster.c
浏览文件 @
79c7cdd5
...
...
@@ -340,8 +340,20 @@ static void master_free(struct snd_kcontrol *kcontrol)
}
/*
* Create a virtual master control with the given name
/**
* snd_ctl_make_virtual_master - Create a virtual master control
* @name: name string of the control element to create
* @tlv: optional TLV int array for dB information
*
* Creates a virtual matster control with the given name string.
* Returns the created control element, or NULL for errors (ENOMEM).
*
* After creating a vmaster element, you can add the slave controls
* via snd_ctl_add_slave() or snd_ctl_add_slave_uncached().
*
* The optional argument @tlv can be used to specify the TLV information
* for dB scale of the master control. It should be a single element
* with #SNDRV_CTL_TLVT_DB_SCALE type, and should be the max 0dB.
*/
struct
snd_kcontrol
*
snd_ctl_make_virtual_master
(
char
*
name
,
const
unsigned
int
*
tlv
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录