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

Modified Files:
        ice1712.c ice1724.c 
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: ice1712.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- ice1712.c   30 Sep 2003 11:30:35 -0000      1.35
+++ ice1712.c   23 Oct 2003 14:34:53 -0000      1.36
@@ -1450,13 +1450,17 @@
        int err;
 
        if (ice_has_con_ac97(ice)) {
+               ac97_bus_t bus, *pbus;
                ac97_t ac97;
+               memset(&bus, 0, sizeof(bus));
+               bus.write = snd_ice1712_ac97_write;
+               bus.read = snd_ice1712_ac97_read;
+               if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0)
+                       return err;
                memset(&ac97, 0, sizeof(ac97));
-               ac97.write = snd_ice1712_ac97_write;
-               ac97.read = snd_ice1712_ac97_read;
                ac97.private_data = ice;
                ac97.private_free = snd_ice1712_mixer_free_ac97;
-               if ((err = snd_ac97_mixer(ice->card, &ac97, &ice->ac97)) < 0)
+               if ((err = snd_ac97_mixer(pbus, &ac97, &ice->ac97)) < 0)
                        printk(KERN_WARNING "ice1712: cannot initialize ac97 for 
consumer, skipped\n");
                else {
                        if ((err = snd_ctl_add(ice->card, 
snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97, ice))) < 0)
@@ -1466,13 +1470,17 @@
        }
 
        if (! (ice->eeprom.data[ICE_EEP1_ACLINK] & ICE1712_CFG_PRO_I2S)) {
+               ac97_bus_t bus, *pbus;
                ac97_t ac97;
+               memset(&bus, 0, sizeof(bus));
+               bus.write = snd_ice1712_pro_ac97_write;
+               bus.read = snd_ice1712_pro_ac97_read;
+               if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0)
+                       return err;
                memset(&ac97, 0, sizeof(ac97));
-               ac97.write = snd_ice1712_pro_ac97_write;
-               ac97.read = snd_ice1712_pro_ac97_read;
                ac97.private_data = ice;
                ac97.private_free = snd_ice1712_mixer_free_ac97;
-               if ((err = snd_ac97_mixer(ice->card, &ac97, &ice->ac97)) < 0)
+               if ((err = snd_ac97_mixer(pbus, &ac97, &ice->ac97)) < 0)
                        printk(KERN_WARNING "ice1712: cannot initialize pro ac97, 
skipped\n");
                else
                        return 0;
@@ -1533,7 +1541,7 @@
        snd_info_entry_t *entry;
 
        if (! snd_card_proc_new(ice->card, "ice1712", &entry))
-               snd_info_set_text_ops(entry, ice, snd_ice1712_proc_read);
+               snd_info_set_text_ops(entry, ice, 1024, snd_ice1712_proc_read);
 }
 
 /*

Index: ice1724.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1724.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ice1724.c   10 Sep 2003 18:01:16 -0000      1.18
+++ ice1724.c   23 Oct 2003 14:34:53 -0000      1.19
@@ -908,17 +908,21 @@
        int err;
 
        if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S)) {
+               ac97_bus_t bus, *pbus;
                ac97_t ac97;
                /* cold reset */
                outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD));
                mdelay(5); /* FIXME */
                outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD));
 
+               memset(&bus, 0, sizeof(bus));
+               bus.write = snd_vt1724_ac97_write;
+               bus.read = snd_vt1724_ac97_read;
+               if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0)
+                       return err;
                memset(&ac97, 0, sizeof(ac97));
-               ac97.write = snd_vt1724_ac97_write;
-               ac97.read = snd_vt1724_ac97_read;
                ac97.private_data = ice;
-               if ((err = snd_ac97_mixer(ice->card, &ac97, &ice->ac97)) < 0)
+               if ((err = snd_ac97_mixer(pbus, &ac97, &ice->ac97)) < 0)
                        printk(KERN_WARNING "ice1712: cannot initialize pro ac97, 
skipped\n");
                else
                        return 0;
@@ -975,7 +979,7 @@
        snd_info_entry_t *entry;
 
        if (! snd_card_proc_new(ice->card, "ice1724", &entry))
-               snd_info_set_text_ops(entry, ice, snd_vt1724_proc_read);
+               snd_info_set_text_ops(entry, ice, 1024, snd_vt1724_proc_read);
 }
 
 /*



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