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

Modified Files:
        ak4524.c ice1712.c 
Log Message:
Control API update
- separated volatile data from snd_kcontrol_t to reduce space for multi elements
- added multi elements
- changed trident driver to use multi elements
- added dimen union to the info structure to describe matrix


Index: ak4524.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ak4524.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ak4524.c    25 Feb 2003 15:05:02 -0000      1.12
+++ ak4524.c    1 Apr 2003 13:55:45 -0000       1.13
@@ -433,8 +433,8 @@
                        strcpy(ctl.id.name, "DAC Volume");
                        ctl.id.index = idx + ak->idx_offset * 2;
                        ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+                       ctl.count = 1;
                        ctl.info = snd_ice1712_akm4xxx_volume_info;
-                       ctl.access = 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                        ctl.get = snd_ice1712_akm4xxx_volume_get;
                        ctl.put = snd_ice1712_akm4xxx_volume_put;
                        switch (ak->type) {
@@ -459,7 +459,7 @@
                                return -EINVAL;
                        }
                        ctl.private_data = ak;
-                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl))) < 0)
+                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                                return err;
                }
                for (idx = 0; idx < ak->num_adcs && ak->type == SND_AK4524; ++idx) {
@@ -468,25 +468,25 @@
                        strcpy(ctl.id.name, "ADC Volume");
                        ctl.id.index = idx;
                        ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+                       ctl.count = 1;
                        ctl.info = snd_ice1712_akm4xxx_volume_info;
-                       ctl.access = 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                        ctl.get = snd_ice1712_akm4xxx_volume_get;
                        ctl.put = snd_ice1712_akm4xxx_volume_put;
                        ctl.private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); /* 
register 4 & 5 */
                        ctl.private_data = ak;
-                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl))) < 0)
+                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                                return err;
                        memset(&ctl, 0, sizeof(ctl));
                        strcpy(ctl.id.name, "IPGA Analog Capture Volume");
                        ctl.id.index = idx;
                        ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+                       ctl.count = 1;
                        ctl.info = snd_ice1712_akm4xxx_ipga_gain_info;
-                       ctl.access = 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                        ctl.get = snd_ice1712_akm4xxx_ipga_gain_get;
                        ctl.put = snd_ice1712_akm4xxx_ipga_gain_put;
                        ctl.private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 0); /* 
register 4 & 5 */
                        ctl.private_data = ak;
-                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl))) < 0)
+                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                                return err;
                }
                for (idx = 0; idx < ak->num_dacs/2; idx++) {
@@ -495,8 +495,8 @@
                        strcpy(ctl.id.name, "Deemphasis");
                        ctl.id.index = idx + ak->idx_offset;
                        ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+                       ctl.count = 1;
                        ctl.info = snd_ice1712_akm4xxx_deemphasis_info;
-                       ctl.access = 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                        ctl.get = snd_ice1712_akm4xxx_deemphasis_get;
                        ctl.put = snd_ice1712_akm4xxx_deemphasis_put;
                        switch (ak->type) {
@@ -517,11 +517,9 @@
                                break;
                        }
                        ctl.private_data = ak;
-                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl))) < 0)
+                       if ((err = snd_ctl_add(ice->card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                                return err;
                }
        }
        return 0;
 }
-
-

Index: ice1712.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ice1712.c   16 Mar 2003 10:53:14 -0000      1.21
+++ ice1712.c   1 Apr 2003 13:55:45 -0000       1.22
@@ -1373,25 +1373,25 @@
                strcpy(ctl.id.name, "Multi Playback Switch");
                ctl.id.index = idx;
                ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+               ctl.count = 1;
                ctl.info = snd_ice1712_pro_mixer_switch_info;
-               ctl.access = SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                ctl.get = snd_ice1712_pro_mixer_switch_get;
                ctl.put = snd_ice1712_pro_mixer_switch_put;
                ctl.private_value = idx;
                ctl.private_data = ice;
-               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl))) < 0)
+               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                        return err;
                memset(&ctl, 0, sizeof(ctl));
                strcpy(ctl.id.name, "Multi Playback Volume");
                ctl.id.index = idx;
                ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+               ctl.count = 1;
                ctl.info = snd_ice1712_pro_mixer_volume_info;
-               ctl.access = SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                ctl.get = snd_ice1712_pro_mixer_volume_get;
                ctl.put = snd_ice1712_pro_mixer_volume_put;
                ctl.private_value = idx;
                ctl.private_data = ice;
-               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl))) < 0)
+               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                        return err;
        }
 
@@ -1401,25 +1401,25 @@
                strcpy(ctl.id.name, "Multi Capture Switch");
                ctl.id.index = idx;
                ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+               ctl.count = 1;
                ctl.info = snd_ice1712_pro_mixer_switch_info;
-               ctl.access = SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                ctl.get = snd_ice1712_pro_mixer_switch_get;
                ctl.put = snd_ice1712_pro_mixer_switch_put;
                ctl.private_value = idx + 10;
                ctl.private_data = ice;
-               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl))) < 0)
+               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                        return err;
                memset(&ctl, 0, sizeof(ctl));
                strcpy(ctl.id.name, "Multi Capture Volume");
                ctl.id.index = idx;
                ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+               ctl.count = 1;
                ctl.info = snd_ice1712_pro_mixer_volume_info;
-               ctl.access = SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE;
                ctl.get = snd_ice1712_pro_mixer_volume_get;
                ctl.put = snd_ice1712_pro_mixer_volume_put;
                ctl.private_value = idx + 10;
                ctl.private_data = ice;
-               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl))) < 0)
+               if ((err = snd_ctl_add(card, snd_ctl_new(&ctl, 
SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
                        return err;
        }
        



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to