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

Modified Files:
        ac97_codec.h cs46xx.h info.h sndmagic.h trident.h ymfpci.h 
Log Message:
- AC97 code
  - introduced ac97_bus_t structure
  - moved attached codecs to /proc/asound/card?/codec97#? directory
  - merged snd_ac97_modem() to snd_ac97_mixer()
- proc cleanups - removed already initialized variables
- enhanced snd_info_set_text_ops() syntax


Index: ac97_codec.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/ac97_codec.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- ac97_codec.h        1 Sep 2003 09:53:26 -0000       1.34
+++ ac97_codec.h        23 Oct 2003 14:34:52 -0000      1.35
@@ -274,10 +274,12 @@
 
 
 /* ac97->scaps */
-#define AC97_SCAP_AUDIO                (1<<0)  /* audio AC'97 codec */
-#define AC97_SCAP_MODEM                (1<<1)  /* modem AC'97 codec */
+#define AC97_SCAP_AUDIO                (1<<0)  /* audio codec 97 */
+#define AC97_SCAP_MODEM                (1<<1)  /* modem codec 97 */
 #define AC97_SCAP_SURROUND_DAC (1<<2)  /* surround L&R DACs are present */
 #define AC97_SCAP_CENTER_LFE_DAC (1<<3)        /* center and LFE DACs are present */
+#define AC97_SCAP_SKIP_AUDIO   (1<<4)  /* skip audio part of codec */
+#define AC97_SCAP_SKIP_MODEM   (1<<5)  /* skip modem part of codec */
 
 /* ac97->flags */
 #define AC97_HAS_PC_BEEP       (1<<0)  /* force PC Speaker usage */
@@ -298,6 +300,7 @@
  *
  */
 
+typedef struct _snd_ac97_bus ac97_bus_t;
 typedef struct _snd_ac97 ac97_t;
 
 struct snd_ac97_build_ops {
@@ -307,18 +310,33 @@
        int (*build_post_spdif) (ac97_t *ac97);
 };
 
-struct _snd_ac97 {
+struct _snd_ac97_bus {
+       /* -- lowlevel (hardware) driver specific -- */
        void (*reset) (ac97_t *ac97);
        void (*write) (ac97_t *ac97, unsigned short reg, unsigned short val);
        unsigned short (*read) (ac97_t *ac97, unsigned short reg);
        void (*wait) (ac97_t *ac97);
        void (*init) (ac97_t *ac97);
+       void *private_data;
+       void (*private_free) (ac97_bus_t *bus);
+       /* --- */
+       snd_card_t *card;
+       unsigned int num;       /* bus number */
+       unsigned int clock;     /* AC'97 clock (usually 48000Hz) */
+       ac97_t *codec[4];
+       snd_info_entry_t *proc;
+};
+
+struct _snd_ac97 {
+       /* -- lowlevel (hardware) driver specific -- */
        struct snd_ac97_build_ops * build_ops;
        void *private_data;
        void (*private_free) (ac97_t *ac97);
        /* --- */
-       snd_card_t *card;
+       ac97_bus_t *bus;
        struct pci_dev *pci;    /* assigned PCI device - used for quirks */
+       snd_info_entry_t *proc;
+       snd_info_entry_t *proc_regs;
        unsigned short subsystem_vendor;
        unsigned short subsystem_device;
        spinlock_t reg_lock;
@@ -330,7 +348,6 @@
        unsigned short ext_mid; /* extended modem ID (register 3C) */
        unsigned int scaps;     /* driver capabilities */
        unsigned int flags;     /* specific code */
-       unsigned int clock;     /* AC'97 clock (usually 48000Hz) */
        unsigned int rates[6];  /* see AC97_RATES_* defines */
        unsigned int spdif_status;
        unsigned short regs[0x80]; /* register cache */
@@ -368,8 +385,8 @@
 }
 
 /* functions */
-int snd_ac97_mixer(snd_card_t * card, ac97_t * _ac97, ac97_t ** rac97);        /* 
create mixer controls */
-int snd_ac97_modem(snd_card_t * card, ac97_t * _ac97, ac97_t ** rac97);        /* 
create modem controls */
+int snd_ac97_bus(snd_card_t * card, ac97_bus_t * _bus, ac97_bus_t ** rbus); /* create 
new AC97 bus */
+int snd_ac97_mixer(ac97_bus_t * bus, ac97_t * _ac97, ac97_t ** rac97); /* create 
mixer controls */
 
 void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value);
 unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg);

Index: cs46xx.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/cs46xx.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- cs46xx.h    2 Apr 2003 14:42:34 -0000       1.16
+++ cs46xx.h    23 Oct 2003 14:34:52 -0000      1.17
@@ -1712,6 +1712,7 @@
 
 
        int nr_ac97_codecs;
+       ac97_bus_t *ac97_bus;
        ac97_t *ac97[MAX_NR_AC97];
 
        struct pci_dev *pci;

Index: info.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/info.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- info.h      18 Jul 2003 16:07:35 -0000      1.13
+++ info.h      23 Oct 2003 14:34:52 -0000      1.14
@@ -134,12 +134,13 @@
 /* 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, 
+static inline void snd_info_set_text_ops(snd_info_entry_t *entry, 
                                         void *private_data,
+                                        long read_size,
                                         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_size = read_size;
        entry->c.text.read = read;
 }
 

Index: sndmagic.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/sndmagic.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- sndmagic.h  9 Jun 2003 12:00:30 -0000       1.21
+++ sndmagic.h  23 Oct 2003 14:34:52 -0000      1.22
@@ -133,6 +133,7 @@
 #define mpu401_t_magic                         0xa15a1701
 #define fm801_t_magic                          0xa15a1801
 #define ac97_t_magic                           0xa15a1901
+#define ac97_bus_t_magic                       0xa15a1902
 #define ak4531_t_magic                         0xa15a1a01
 #define snd_uart16550_t_magic                  0xa15a1b01
 #define emu10k1_t_magic                                0xa15a1c01

Index: trident.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/trident.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- trident.h   23 Apr 2003 15:10:00 -0000      1.14
+++ trident.h   23 Oct 2003 14:34:52 -0000      1.15
@@ -443,6 +443,7 @@
        snd_rawmidi_t *rmidi;
        snd_seq_device_t *seq_dev;
 
+       ac97_bus_t *ac97_bus;
        ac97_t *ac97;
        ac97_t *ac97_sec;
 

Index: ymfpci.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/ymfpci.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ymfpci.h    14 Oct 2003 13:59:20 -0000      1.12
+++ ymfpci.h    23 Oct 2003 14:34:52 -0000      1.13
@@ -346,6 +346,7 @@
        u32 active_bank;
        ymfpci_voice_t voices[64];
 
+       ac97_bus_t *ac97_bus;
        ac97_t *ac97;
        snd_rawmidi_t *rawmidi;
        snd_timer_t *timer;



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to