Update of /cvsroot/alsa/alsa-kernel/isa/sb
In directory sc8-pr-cvs1:/tmp/cvs-serv6295/isa/sb
Modified Files:
sb16_csp.c
Log Message:
[PATCH: proc-card-dev.dif]
- added snd_card_proc_new() to create a normal text proc file for
the card basis. it's handled as an ALSA device, so no explicit
destruction is necessary.
- snd_info_set_text_ops() to set the callback function for convenience.
- applied the new function to each source and clean-up.
Index: sb16_csp.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/sb/sb16_csp.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sb16_csp.c 13 Aug 2002 16:13:38 -0000 1.7
+++ sb16_csp.c 7 Jan 2003 10:36:30 -0000 1.8
@@ -107,7 +107,6 @@
static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p);
static int init_proc_entry(snd_sb_csp_t * p, int device);
-static void delete_proc_entry(snd_sb_csp_t * p);
static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
/*
@@ -170,7 +169,6 @@
if (p) {
if (p->running & SNDRV_SB_CSP_ST_RUNNING)
snd_sb_csp_stop(p);
- delete_proc_entry(p);
snd_magic_kfree(p);
}
}
@@ -1104,26 +1102,9 @@
char name[16];
snd_info_entry_t *entry;
sprintf(name, "cspD%d", device);
- entry = p->proc = snd_info_create_card_entry(p->chip->card, name,
p->chip->card->proc_root);
- if (entry) {
- entry->content = SNDRV_INFO_CONTENT_TEXT;
- entry->c.text.read_size = 256;
- entry->c.text.read = info_read;
- entry->private_data = p;
- if (snd_info_register(entry) < 0) {
- snd_info_free_entry(entry);
- p->proc = NULL;
- }
- }
+ if (! snd_card_proc_new(p->chip->card, name, &entry))
+ snd_info_set_text_ops(entry, p, info_read);
return 0;
-}
-
-static void delete_proc_entry(snd_sb_csp_t * p)
-{
- if (p->proc) {
- snd_info_unregister(p->proc);
- p->proc = NULL;
- }
}
static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog