Update of /cvsroot/alsa/alsa-kernel/include
In directory sc8-pr-cvs1:/tmp/cvs-serv6295/include

Modified Files:
        ac97_codec.h ak4531_codec.h core.h cs46xx.h emu10k1.h gus.h 
        info.h sb16_csp.h sndmagic.h trident.h 
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: ac97_codec.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/ac97_codec.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ac97_codec.h        7 Jan 2003 10:17:29 -0000       1.19
+++ ac97_codec.h        7 Jan 2003 10:36:28 -0000       1.20
@@ -237,8 +237,6 @@
        unsigned short (*read) (ac97_t *ac97, unsigned short reg);
        void (*wait) (ac97_t *ac97);
        void (*init) (ac97_t *ac97);
-       snd_info_entry_t *proc_entry;
-       snd_info_entry_t *proc_regs_entry;
        void *private_data;
        void (*private_free) (ac97_t *ac97);
        /* --- */

Index: ak4531_codec.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/ak4531_codec.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ak4531_codec.h      4 Jan 2002 15:08:43 -0000       1.3
+++ ak4531_codec.h      7 Jan 2003 10:36:29 -0000       1.4
@@ -68,7 +68,6 @@
 
 struct _snd_ak4531 {
        void (*write) (ak4531_t *ak4531, unsigned short reg, unsigned short val);
-       snd_info_entry_t *proc_entry;
        void *private_data;
        void (*private_free) (ak4531_t *ak4531);
        /* --- */

Index: core.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/core.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- core.h      4 Dec 2002 09:40:44 -0000       1.30
+++ core.h      7 Jan 2003 10:36:29 -0000       1.31
@@ -55,6 +55,7 @@
        SNDRV_DEV_TIMER,
        SNDRV_DEV_SEQUENCER,
        SNDRV_DEV_HWDEP,
+       SNDRV_DEV_INFO,
        SNDRV_DEV_LOWLEVEL =            (2*SNDRV_DEV_TYPE_RANGE_SIZE)
 } snd_device_type_t;
 

Index: cs46xx.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/cs46xx.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- cs46xx.h    9 Dec 2002 11:26:07 -0000       1.14
+++ cs46xx.h    7 Jan 2003 10:36:29 -0000       1.15
@@ -1673,7 +1673,6 @@
        unsigned long remap_addr;
        unsigned long size;
        struct resource *resource;
-       void *proc_entry;
 } snd_cs46xx_region_t;
 
 struct _snd_cs46xx {
@@ -1726,7 +1725,6 @@
        spinlock_t reg_lock;
        unsigned int midcr;
        unsigned int uartm;
-       snd_info_entry_t *proc_entry;
 
        int amplifier;
        void (*amplifier_ctrl)(cs46xx_t *, int);

Index: emu10k1.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/emu10k1.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- emu10k1.h   17 Sep 2002 13:46:32 -0000      1.19
+++ emu10k1.h   7 Jan 2003 10:36:29 -0000       1.20
@@ -993,13 +993,6 @@
        emu10k1_midi_t midi2; /* for audigy */
 
        unsigned int efx_voices_mask[2];
-
-       snd_info_entry_t *proc_entry;
-       snd_info_entry_t *proc_entry_fx8010_gpr;
-       snd_info_entry_t *proc_entry_fx8010_tram_data;
-       snd_info_entry_t *proc_entry_fx8010_tram_addr;
-       snd_info_entry_t *proc_entry_fx8010_code;
-       snd_info_entry_t *proc_entry_fx8010_iblocks;
 };
 
 int snd_emu10k1_create(snd_card_t * card,
@@ -1063,7 +1056,6 @@
 
 /* proc interface */
 int snd_emu10k1_proc_init(emu10k1_t * emu);
-int snd_emu10k1_proc_done(emu10k1_t * emu);
 
 #endif /* __KERNEL__ */
 

Index: gus.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/gus.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gus.h       15 Feb 2002 18:31:58 -0000      1.7
+++ gus.h       7 Jan 2003 10:36:29 -0000       1.8
@@ -210,7 +210,6 @@
        snd_gf1_bank_info_t banks_16[4];
        snd_gf1_mem_block_t *first;
        snd_gf1_mem_block_t *last;
-       snd_info_entry_t *info_entry;
        struct semaphore memory_mutex;
 } snd_gf1_mem_t;
 
@@ -332,8 +331,6 @@
        unsigned int rom_banks;         /* GUS's ROM banks */
 
        snd_gf1_mem_t mem_alloc;
-       snd_info_entry_t *ram_entries[4];
-       snd_info_entry_t *rom_entries[4];
 
        /* registers */
        unsigned short reg_page;
@@ -452,9 +449,6 @@
        int timer_dev;                  /* timer device */
 
        struct _snd_gf1 gf1;    /* gf1 specific variables */
-#ifdef CONFIG_SND_DEBUG
-       snd_info_entry_t *irq_entry;
-#endif
        snd_pcm_t *pcm;
        snd_pcm_substream_t *pcm_cap_substream;
        unsigned int c_dma_size;
@@ -601,7 +595,6 @@
 /* gus_mem_proc.c */
 
 int snd_gf1_mem_proc_init(snd_gus_card_t * gus);
-int snd_gf1_mem_proc_done(snd_gus_card_t * gus);
 
 /* gus_dma.c */
 
@@ -676,7 +669,6 @@
 void snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 #ifdef CONFIG_SND_DEBUG
 void snd_gus_irq_profile_init(snd_gus_card_t *gus);
-void snd_gus_irq_profile_done(snd_gus_card_t *gus);
 #endif
 
 /* gus_uart.c */

Index: info.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/info.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- info.h      3 Nov 2002 12:33:15 -0000       1.9
+++ info.h      7 Jan 2003 10:36:29 -0000       1.10
@@ -141,6 +141,19 @@
 void snd_remove_proc_entry(struct proc_dir_entry *parent,
                           struct proc_dir_entry *de);
 
+/* for card drivers */
+int snd_card_proc_new(snd_card_t *card, const char *name, snd_info_entry_t **entryp);
+
+inline static void snd_info_set_text_ops(snd_info_entry_t *entry, 
+                                        void *private_data,
+                                        void (*read)(snd_info_entry_t *, 
+snd_info_buffer_t *))
+{
+       entry->private_data = private_data;
+       entry->c.text.read_size = 1024;
+       entry->c.text.read = read;
+}
+
+
 #else
 
 #define snd_seq_root NULL
@@ -168,6 +181,9 @@
 static inline struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t 
mode, struct proc_dir_entry *parent) { return NULL; }
 static inline void snd_remove_proc_entry(struct proc_dir_entry *parent,
                                         struct proc_dir_entry *de) { ; }
+
+#define snd_card_proc_new(card,name,entryp)  0 /* always success */
+#define snd_info_set_text_ops(entry,private_data,read) /*NOP*/
 
 #endif
 

Index: sb16_csp.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/sb16_csp.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sb16_csp.h  4 Jan 2002 15:08:44 -0000       1.3
+++ sb16_csp.h  7 Jan 2003 10:36:29 -0000       1.4
@@ -159,7 +159,6 @@
        snd_kcontrol_t *qsound_space;
 
        struct semaphore access_mutex;  /* locking */
-       snd_info_entry_t *proc; /* proc interface */
 };
 
 int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep);

Index: sndmagic.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/sndmagic.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sndmagic.h  4 Sep 2002 14:28:24 -0000       1.12
+++ sndmagic.h  7 Jan 2003 10:36:29 -0000       1.13
@@ -64,6 +64,7 @@
 #define snd_pcm_sgbuf_t_magic                  0xa15a0107
 
 #define snd_info_private_data_t_magic          0xa15a0201
+#define snd_info_entry_t_magic                 0xa15a0202
 #define snd_ctl_file_t_magic                   0xa15a0301
 #define snd_kcontrol_t_magic                   0xa15a0302
 #define snd_rawmidi_t_magic                    0xa15a0401

Index: trident.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/trident.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- trident.h   19 Nov 2002 17:13:54 -0000      1.7
+++ trident.h   7 Jan 2003 10:36:29 -0000       1.8
@@ -452,7 +452,6 @@
        snd_trident_pcm_mixer_t pcm_mixer[32];
 
        spinlock_t reg_lock;
-       snd_info_entry_t *proc_entry;
 
        struct snd_trident_gameport *gameport;
 };



-------------------------------------------------------
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

Reply via email to