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

Modified Files:
        trident_main.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: trident_main.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/trident/trident_main.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- trident_main.c      2 Sep 2003 18:06:12 -0000       1.47
+++ trident_main.c      23 Oct 2003 14:34:53 -0000      1.48
@@ -2955,6 +2955,7 @@
 
 static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device)
 {
+       ac97_bus_t _bus;
        ac97_t _ac97;
        snd_card_t * card = trident->card;
        snd_kcontrol_t *kctl;
@@ -2965,14 +2966,18 @@
        if (!uctl)
                return -ENOMEM;
 
+       memset(&_bus, 0, sizeof(_bus));
+       _bus.write = snd_trident_codec_write;
+       _bus.read = snd_trident_codec_read;
+       if ((err = snd_ac97_bus(trident->card, &_bus, &trident->ac97_bus)) < 0)
+               goto __out;
+
        memset(&_ac97, 0, sizeof(_ac97));
-       _ac97.write = snd_trident_codec_write;
-       _ac97.read = snd_trident_codec_read;
        _ac97.private_data = trident;
        trident->ac97_detect = 1;
 
       __again:
-       if ((err = snd_ac97_mixer(trident->card, &_ac97, &trident->ac97)) < 0) {
+       if ((err = snd_ac97_mixer(trident->ac97_bus, &_ac97, &trident->ac97)) < 0) {
                if (trident->device == TRIDENT_DEVICE_ID_SI7018) {
                        if ((err = snd_trident_sis_reset(trident)) < 0)
                                goto __out;
@@ -2987,7 +2992,7 @@
        if (trident->device == TRIDENT_DEVICE_ID_SI7018 &&
            (inl(TRID_REG(trident, SI_SERIAL_INTF_CTRL)) & SI_AC97_PRIMARY_READY) != 
0) {
                _ac97.num = 1;
-               err = snd_ac97_mixer(trident->card, &_ac97, &trident->ac97_sec);
+               err = snd_ac97_mixer(trident->ac97_bus, &_ac97, &trident->ac97_sec);
                if (err < 0)
                        snd_printk("SI7018: the secondary codec - invalid access\n");
 #if 0  // only for my testing purpose --jk
@@ -3295,7 +3300,7 @@
        if (trident->device == TRIDENT_DEVICE_ID_SI7018)
                s = "sis7018";
        if (! snd_card_proc_new(trident->card, s, &entry))
-               snd_info_set_text_ops(entry, trident, snd_trident_proc_read);
+               snd_info_set_text_ops(entry, trident, 1024, snd_trident_proc_read);
 }
 
 static int snd_trident_dev_free(snd_device_t *device)



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