本文整理汇总了C++中snd_info_set_text_ops函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_info_set_text_ops函数的具体用法?C++ snd_info_set_text_ops怎么用?C++ snd_info_set_text_ops使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snd_info_set_text_ops函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: snd_atiixp_proc_init
static void snd_atiixp_proc_init(struct atiixp *chip)
{
struct snd_info_entry *entry;
if (! snd_card_proc_new(chip->card, "atiixp", &entry))
snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read);
}
示例2: 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;
}
示例3: snd_gus_irq_profile_init
void snd_gus_irq_profile_init(struct snd_gus_card *gus)
{
struct snd_info_entry *entry;
if (! snd_card_proc_new(gus->card, "gusirq", &entry))
snd_info_set_text_ops(entry, gus, snd_gus_irq_info_read);
}
示例4: oxygen_proc_init
static void oxygen_proc_init(struct oxygen *chip)
{
struct snd_info_entry *entry;
if (!snd_card_proc_new(chip->card, "cmi8788", &entry))
snd_info_set_text_ops(entry, chip, oxygen_proc_read);
}
示例5: snd_gf1_mem_init
int snd_gf1_mem_init(struct snd_gus_card * gus)
{
struct snd_gf1_mem *alloc;
struct snd_gf1_mem_block block;
#ifdef CONFIG_SND_DEBUG
struct snd_info_entry *entry;
#endif
alloc = &gus->gf1.mem_alloc;
mutex_init(&alloc->memory_mutex);
alloc->first = alloc->last = NULL;
if (!gus->gf1.memory)
return 0;
memset(&block, 0, sizeof(block));
block.owner = SNDRV_GF1_MEM_OWNER_DRIVER;
if (gus->gf1.enh_mode) {
block.ptr = 0;
block.size = 1024;
block.name = kstrdup("InterWave LFOs", GFP_KERNEL);
if (snd_gf1_mem_xalloc(alloc, &block) == NULL)
return -ENOMEM;
}
block.ptr = gus->gf1.default_voice_address;
block.size = 4;
block.name = kstrdup("Voice default (NULL's)", GFP_KERNEL);
if (snd_gf1_mem_xalloc(alloc, &block) == NULL)
return -ENOMEM;
#ifdef CONFIG_SND_DEBUG
if (! snd_card_proc_new(gus->card, "gusmem", &entry))
snd_info_set_text_ops(entry, gus, snd_gf1_mem_info_read);
#endif
return 0;
}
示例6: cs_proc_init
static void cs_proc_init(ice1712_t *ice)
{
snd_info_entry_t *entry;
if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) {
snd_info_set_text_ops(entry, ice, 1024, cs_proc_regs_read);
}
}
示例7: 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);
}
}
示例8: snd_atiixp_proc_init
static void __devinit snd_atiixp_proc_init(atiixp_t *chip)
{
snd_info_entry_t *entry;
if (! snd_card_proc_new(chip->card, "atiixp", &entry))
snd_info_set_text_ops(entry, chip, 1024, snd_atiixp_proc_read);
}
示例9: snd_ad1889_proc_init
static void __devinit
snd_ad1889_proc_init(struct snd_ad1889 *chip)
{
struct snd_info_entry *entry;
if (!snd_card_proc_new(chip->card, chip->card->driver, &entry))
snd_info_set_text_ops(entry, chip, snd_ad1889_proc_read);
}
示例10: wm_proc_init
static void wm_proc_init(struct snd_ice1712 *ice)
{
struct snd_info_entry *entry;
if (!snd_card_proc_new(ice->card, "wm_codec", &entry)) {
snd_info_set_text_ops(entry, ice, wm_proc_regs_read);
entry->mode |= S_IWUSR;
entry->c.text.write = wm_proc_regs_write;
}
}
示例11: proc_init
static int proc_init(struct snd_akm4xxx *ak)
{
struct snd_info_entry *entry;
int err;
err = snd_card_proc_new(ak->card, ak->name, &entry);
if (err < 0)
return err;
snd_info_set_text_ops(entry, ak, proc_regs_read);
return 0;
}
示例12: dummy_proc_init
static void __devinit dummy_proc_init(struct snd_dummy *chip)
{
struct snd_info_entry *entry;
if (!snd_card_proc_new(chip->card, "dummy_pcm", &entry)) {
snd_info_set_text_ops(entry, chip, dummy_proc_read);
entry->c.text.write = dummy_proc_write;
entry->mode |= S_IWUSR;
}
}
示例13: wm_proc_init
static void wm_proc_init(ice1712_t *ice)
{
snd_info_entry_t *entry;
if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) {
snd_info_set_text_ops(entry, ice, 1024, wm_proc_regs_read);
entry->mode |= S_IWUSR;
entry->c.text.write_size = 1024;
entry->c.text.write = wm_proc_regs_write;
}
}
示例14: 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);
}
示例15: loopback_proc_new
static int __devinit loopback_proc_new(struct loopback *loopback, int cidx)
{
char name[32];
struct snd_info_entry *entry;
int err;
snprintf(name, sizeof(name), "cable#%d", cidx);
err = snd_card_proc_new(loopback->card, name, &entry);
if (err < 0)
return err;
snd_info_set_text_ops(entry, loopback, print_cable_info);
return 0;
}