]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Remove indirect control access
authorTakashi Iwai <tiwai@suse.de>
Tue, 8 Jan 2008 17:34:36 +0000 (18:34 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 8 Jan 2008 17:34:36 +0000 (18:34 +0100)
The indirect control access is removed from the kernel.
This patch cleans the corresponding alsa-lib part.

include/sound/asound.h
src/control/control.c

index 18eeb073ed311009625280fd4913fb1626de61f5..e8fa0dabf1d9d3da12ea37dc727f16591e8453a4 100644 (file)
@@ -723,7 +723,7 @@ struct sndrv_timer_tread {
  *                                                                          *
  ****************************************************************************/
 
-#define SNDRV_CTL_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 3)
+#define SNDRV_CTL_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 5)
 
 struct sndrv_ctl_card_info {
        int card;                       /* card number */
@@ -774,8 +774,7 @@ enum sndrv_ctl_elem_iface {
 #define SNDRV_CTL_ELEM_ACCESS_OWNER            (1<<10) /* write lock owner */
 #define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK     (1<<28) /* flag only for kernel */
 #define SNDRV_CTL_ELEM_ACCESS_USER             (1<<29) /* user space element */
-#define SNDRV_CTL_ELEM_ACCESS_DINDIRECT                (1<<30) /* indirect access for matrix dimensions in the info structure */
-#define SNDRV_CTL_ELEM_ACCESS_INDIRECT         (1<<31) /* indirect access for element value in the value structure */
+/* bits 30 and 31 are obsoleted (for indirect access) */
 
 /* for further details see the ACPI and PCI power management specification */
 #define SNDRV_CTL_POWER_D0             0x0000  /* full On */
@@ -829,30 +828,30 @@ struct sndrv_ctl_elem_info {
        } value;
        union {
                unsigned short d[4];            /* dimensions */
-               unsigned short *d_ptr;          /* indirect */
+               unsigned short *d_ptr;          /* (obsolete) indirect */
        } dimen;
        unsigned char reserved[64-4*sizeof(unsigned short)];
 };
 
 struct sndrv_ctl_elem_value {
        struct sndrv_ctl_elem_id id;    /* W: element ID */
-       unsigned int indirect: 1;       /* W: use indirect pointer (xxx_ptr member) */
+       unsigned int indirect: 1;       /* (obsolete) W: use indirect pointer (xxx_ptr member) */
         union {
                union {
                        long value[128];
-                       long *value_ptr;
+                       long *value_ptr;        /* obsolete */
                } integer;
                union {
                        long long value[64];
-                       long long *value_ptr;
+                       long long *value_ptr;   /* obsolete */
                } integer64;
                union {
                        unsigned int item[128];
-                       unsigned int *item_ptr;
+                       unsigned int *item_ptr; /* obsolete */
                } enumerated;
                union {
                        unsigned char data[512];
-                       unsigned char *data_ptr;
+                       unsigned char *data_ptr;        /* obsolete */
                } bytes;
                struct sndrv_aes_iec958 iec958;
         } value;                /* RO */
index 085dc634e7140a1a8cc2509e1ca21fabd7c28eaf..df249ddd090a67131353c692002558d66b2f6193 100644 (file)
@@ -1876,7 +1876,7 @@ int snd_ctl_elem_info_is_tlv_commandable(const snd_ctl_elem_info_t *obj)
 int snd_ctl_elem_info_is_indirect(const snd_ctl_elem_info_t *obj)
 {
        assert(obj);
-       return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_INDIRECT);
+       return 0;
 }
 link_warning(snd_ctl_elem_info_is_indirect, "Warning: snd_ctl_elem_info_is_indirect is deprecated, do not use it");
 
@@ -2023,8 +2023,6 @@ int snd_ctl_elem_info_get_dimensions(const snd_ctl_elem_info_t *obj)
        int i;
 
        assert(obj);
-       if (obj->access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)
-               return 0;                       /* FIXME: implement indirect access as well */
        for (i = 3; i >= 0; i--)
                if (obj->dimen.d[i])
                        break;
@@ -2045,8 +2043,6 @@ int snd_ctl_elem_info_get_dimension(const snd_ctl_elem_info_t *obj, unsigned int
 #endif
 {
        assert(obj);
-       if (obj->access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)
-               return 0;                       /* FIXME: implement indirect access as well */
        if (idx >= 3)
                return 0;
        return obj->dimen.d[idx];