本文整理汇总了C++中snd_info_register函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_info_register函数的具体用法?C++ snd_info_register怎么用?C++ snd_info_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snd_info_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: preallocate_info_init
static inline void preallocate_info_init(struct snd_pcm_substream *substream)
{
struct snd_info_entry *entry;
if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) {
entry->c.text.read = snd_pcm_lib_preallocate_proc_read;
entry->c.text.write = snd_pcm_lib_preallocate_proc_write;
entry->mode |= 0200;
entry->private_data = substream;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
substream->proc_prealloc_entry = entry;
if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc_max", substream->proc_root)) != NULL) {
entry->c.text.read = snd_pcm_lib_preallocate_max_proc_read;
entry->private_data = substream;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
substream->proc_prealloc_max_entry = entry;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:25,代码来源:pcm_memory.c
示例2: snd_dg00x_proc_init
void snd_dg00x_proc_init(struct snd_dg00x *dg00x)
{
struct snd_info_entry *root, *entry;
/*
* All nodes are automatically removed at snd_card_disconnect(),
* by following to link list.
*/
root = snd_info_create_card_entry(dg00x->card, "firewire",
dg00x->card->proc_root);
if (root == NULL)
return;
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
if (snd_info_register(root) < 0) {
snd_info_free_entry(root);
return;
}
entry = snd_info_create_card_entry(dg00x->card, "clock", root);
if (entry == NULL) {
snd_info_free_entry(root);
return;
}
snd_info_set_text_ops(entry, dg00x, proc_read_clock);
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
snd_info_free_entry(root);
}
}
开发者ID:020gzh,项目名称:linux,代码行数:31,代码来源:digi00x-proc.c
示例3: snd_compress_proc_init
static int snd_compress_proc_init(struct snd_compr *compr)
{
struct snd_info_entry *entry;
char name[16];
sprintf(name, "compr%i", compr->device);
entry = snd_info_create_card_entry(compr->card, name,
compr->card->proc_root);
if (!entry)
return -ENOMEM;
entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
return -ENOMEM;
}
compr->proc_root = entry;
entry = snd_info_create_card_entry(compr->card, "info",
compr->proc_root);
if (entry) {
snd_info_set_text_ops(entry, compr,
snd_compress_proc_info_read);
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
compr->proc_info_entry = entry;
return 0;
}
开发者ID:a2hojsjsjs,项目名称:linux,代码行数:31,代码来源:compress_offload.c
示例4: snd_bebob_proc_init
void snd_bebob_proc_init(struct snd_bebob *bebob)
{
struct snd_info_entry *root;
/*
* All nodes are automatically removed at snd_card_disconnect(),
* by following to link list.
*/
root = snd_info_create_card_entry(bebob->card, "firewire",
bebob->card->proc_root);
if (root == NULL)
return;
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
if (snd_info_register(root) < 0) {
snd_info_free_entry(root);
return;
}
add_node(bebob, root, "clock", proc_read_clock);
add_node(bebob, root, "firmware", proc_read_hw_info);
add_node(bebob, root, "formation", proc_read_formation);
if (bebob->spec->meter != NULL)
add_node(bebob, root, "meter", proc_read_meters);
}
开发者ID:DenisLug,项目名称:mptcp,代码行数:25,代码来源:bebob_proc.c
示例5: snd_opl4_create_proc
int snd_opl4_create_proc(struct snd_opl4 *opl4)
{
struct snd_info_entry *entry;
entry = snd_info_create_card_entry(opl4->card, "opl4-mem", opl4->card->proc_root);
if (entry) {
if (opl4->hardware < OPL3_HW_OPL4_ML) {
/* OPL4 can access 4 MB external ROM/SRAM */
entry->mode |= S_IWUSR;
entry->size = 4 * 1024 * 1024;
} else {
/* OPL4-ML has 1 MB internal ROM */
entry->size = 1 * 1024 * 1024;
}
entry->content = SNDRV_INFO_CONTENT_DATA;
entry->c.ops = &snd_opl4_mem_proc_ops;
entry->module = THIS_MODULE;
entry->private_data = opl4;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
opl4->proc_entry = entry;
return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:26,代码来源:opl4_proc.c
示例6: snd_pcm_lib_preallocate_pages1
/*
* pre-allocate the buffer and create a proc file for the substream
*/
static int snd_pcm_lib_preallocate_pages1(snd_pcm_substream_t *substream,
size_t size, size_t max)
{
snd_info_entry_t *entry;
if (size > 0 && preallocate_dma && substream->number < maximum_substreams)
preallocate_pcm_pages(substream, size);
if (substream->dma_buffer.bytes > 0)
substream->buffer_bytes_max = substream->dma_buffer.bytes;
substream->dma_max = max;
if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) {
entry->c.text.read_size = 64;
entry->c.text.read = snd_pcm_lib_preallocate_proc_read;
entry->c.text.write_size = 64;
entry->c.text.write = snd_pcm_lib_preallocate_proc_write;
entry->private_data = substream;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
substream->proc_prealloc_entry = entry;
return 0;
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:28,代码来源:pcm_memory.c
示例7: snd_minor_info_oss_init
int __init snd_minor_info_oss_init(void)
{
struct snd_info_entry *entry;
entry = snd_info_create_module_entry(THIS_MODULE, "devices", snd_oss_root);
if (!entry)
return -ENOMEM;
entry->c.text.read = snd_minor_info_oss_read;
return snd_info_register(entry); /* freed in error path */
}
开发者ID:vishnupatekar,项目名称:linux,代码行数:10,代码来源:sound_oss.c
示例8: snd_info_minor_register
int __init snd_info_minor_register(void)
{
struct snd_info_entry *entry;
memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings));
entry = snd_info_create_module_entry(THIS_MODULE, "sndstat",
snd_oss_root);
if (!entry)
return -ENOMEM;
entry->c.text.read = snd_sndstat_proc_read;
return snd_info_register(entry); /* freed in error path */
}
开发者ID:020gzh,项目名称:linux,代码行数:12,代码来源:info_oss.c
示例9: snd_info_init
int __init snd_info_init(void)
{
struct proc_dir_entry *p;
p = snd_create_proc_entry("asound", S_IFDIR | S_IRUGO | S_IXUGO, &proc_root);
if (p == NULL)
return -ENOMEM;
snd_proc_root = p;
#ifdef CONFIG_SND_OSSEMUL
{
struct snd_info_entry *entry;
if ((entry = snd_info_create_module_entry(THIS_MODULE, "oss", NULL)) == NULL)
return -ENOMEM;
entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
return -ENOMEM;
}
snd_oss_root = entry;
}
#endif
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
{
struct snd_info_entry *entry;
if ((entry = snd_info_create_module_entry(THIS_MODULE, "seq", NULL)) == NULL)
return -ENOMEM;
entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
return -ENOMEM;
}
snd_seq_root = entry;
}
#endif
snd_info_version_init();
snd_minor_info_init();
snd_minor_info_oss_init();
snd_card_info_init();
return 0;
}
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:40,代码来源:info.c
示例10: snd_hwdep_proc_init
static void __init snd_hwdep_proc_init(void)
{
struct snd_info_entry *entry;
if ((entry = snd_info_create_module_entry(THIS_MODULE, "hwdep", NULL)) != NULL) {
entry->c.text.read = snd_hwdep_proc_read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
snd_hwdep_proc_entry = entry;
}
开发者ID:Nothing-Dev,项目名称:android_kernel_lge_jagnm_lp,代码行数:13,代码来源:hwdep.c
示例11: add_node
static void
add_node(struct snd_efw *efw, struct snd_info_entry *root, const char *name,
void (*op)(struct snd_info_entry *e, struct snd_info_buffer *b))
{
struct snd_info_entry *entry;
entry = snd_info_create_card_entry(efw->card, name, root);
if (entry == NULL)
return;
snd_info_set_text_ops(entry, efw, op);
if (snd_info_register(entry) < 0)
snd_info_free_entry(entry);
}
开发者ID:020gzh,项目名称:linux,代码行数:14,代码来源:fireworks_proc.c
示例12: i2s_debug_init
static int i2s_debug_init(struct snd_soc_card *card)
{
struct snd_info_entry *entry;
if ((entry = snd_info_create_card_entry(card->snd_card, "i2s-debug",
card->snd_card->proc_root)) != NULL) {
entry->c.text.read = i2s_debug_read;
entry->c.text.write = i2s_debug_write;
entry->mode |= S_IWUSR;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
return 0;
}
开发者ID:Whiw,项目名称:hello-world,代码行数:15,代码来源:i2s-r0p0-null-codec.c
示例13: snd_minor_info_init
int __init snd_minor_info_init(void)
{
struct snd_info_entry *entry;
entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL);
if (entry) {
entry->c.text.read = snd_minor_info_read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
snd_minor_info_entry = entry;
return 0;
}
开发者ID:3null,项目名称:fastsocket,代码行数:15,代码来源:sound.c
示例14: snd_info_minor_register
int snd_info_minor_register(void)
{
struct snd_info_entry *entry;
memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings));
if ((entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", snd_oss_root)) != NULL) {
entry->c.text.read = snd_sndstat_proc_read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
snd_sndstat_proc_entry = entry;
return 0;
}
开发者ID:33d,项目名称:linux-2.6.21-hh20,代码行数:15,代码来源:info_oss.c
示例15: snd_info_version_init
static int __init snd_info_version_init(void)
{
snd_info_entry_t *entry;
entry = snd_info_create_module_entry(THIS_MODULE, "version", NULL);
if (entry == NULL)
return -ENOMEM;
entry->c.text.read_size = 256;
entry->c.text.read = snd_info_version_read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
return -ENOMEM;
}
snd_info_version_entry = entry;
return 0;
}
开发者ID:OS2World,项目名称:DRV-UNIAUD,代码行数:16,代码来源:info.c
示例16: create_info_entry
static struct snd_info_entry * __init
create_info_entry(char *name, void (*read)(struct snd_info_entry *,
struct snd_info_buffer *))
{
struct snd_info_entry *entry;
entry = snd_info_create_module_entry(THIS_MODULE, name, snd_seq_root);
if (entry == NULL)
return NULL;
entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read = read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
return NULL;
}
return entry;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:17,代码来源:seq_info.c
示例17: snd_info_minor_register
int snd_info_minor_register(void)
{
snd_info_entry_t *entry;
memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings));
if ((entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", snd_oss_root)) != NULL) {
entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = 2048;
entry->c.text.read = snd_sndstat_proc_read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
snd_sndstat_proc_entry = entry;
return 0;
}
开发者ID:xricson,项目名称:knoppix,代码行数:17,代码来源:info_oss.c
示例18: snd_memory_info_init
int __init snd_memory_info_init(void)
{
snd_info_entry_t *entry;
entry = snd_info_create_module_entry(THIS_MODULE, "meminfo", NULL);
if (entry) {
entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = 256;
entry->c.text.read = snd_memory_info_read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
snd_memory_info_entry = entry;
return 0;
}
开发者ID:xricson,项目名称:knoppix,代码行数:17,代码来源:memory.c
示例19: snd_emux_proc_init
void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device)
{
struct snd_info_entry *entry;
char name[64];
sprintf(name, "wavetableD%d", device);
entry = snd_info_create_card_entry(card, name, card->proc_root);
if (entry == NULL)
return;
entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->private_data = emu;
entry->c.text.read = snd_emux_proc_info_read;
if (snd_info_register(entry) < 0)
snd_info_free_entry(entry);
else
emu->proc = entry;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:18,代码来源:emux_proc.c
示例20: snd_gus_irq_profile_init
void snd_gus_irq_profile_init(snd_gus_card_t *gus)
{
snd_info_entry_t *entry;
gus->irq_entry = NULL;
entry = snd_info_create_card_entry(gus->card, "gusirq", gus->card->proc_root);
if (entry) {
entry->content = SNDRV_INFO_CONTENT_TEXT;
entry->c.text.read_size = 512;
entry->c.text.read = snd_gus_irq_info_read;
entry->private_data = gus;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
entry = NULL;
}
}
gus->irq_entry = entry;
}
开发者ID:OS2World,项目名称:DRV-UNIAUD,代码行数:18,代码来源:gus_irq.c
注:本文中的snd_info_register函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论