Update of /cvsroot/alsa/alsa-kernel/pci/cs46xx
In directory sc8-pr-cvs1:/tmp/cvs-serv6295/pci/cs46xx
Modified Files:
cs46xx_lib.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: cs46xx_lib.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs46xx/cs46xx_lib.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- cs46xx_lib.c 7 Jan 2003 10:25:27 -0000 1.42
+++ cs46xx_lib.c 7 Jan 2003 10:36:30 -0000 1.43
@@ -2883,19 +2883,13 @@
for (idx = 0; idx < 5; idx++) {
snd_cs46xx_region_t *region = &chip->region.idx[idx];
- entry = snd_info_create_card_entry(card, region->name,
card->proc_root);
- if (entry) {
+ if (! snd_card_proc_new(card, region->name, &entry)) {
entry->content = SNDRV_INFO_CONTENT_DATA;
entry->private_data = chip;
entry->c.ops = &snd_cs46xx_proc_io_ops;
entry->size = region->size;
entry->mode = S_IFREG | S_IRUSR;
- if (snd_info_register(entry) < 0) {
- snd_info_unregister(entry);
- entry = NULL;
- }
}
- region->proc_entry = entry;
}
#ifdef CONFIG_SND_CS46XX_NEW_DSP
cs46xx_dsp_proc_init(card, chip);
@@ -2905,15 +2899,6 @@
static int snd_cs46xx_proc_done(cs46xx_t *chip)
{
- int idx;
-
- for (idx = 0; idx < 5; idx++) {
- snd_cs46xx_region_t *region = &chip->region.idx[idx];
- if (region->proc_entry) {
- snd_info_unregister((snd_info_entry_t *) region->proc_entry);
- region->proc_entry = NULL;
- }
- }
#ifdef CONFIG_SND_CS46XX_NEW_DSP
cs46xx_dsp_proc_done(chip);
#endif
-------------------------------------------------------
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