Remove indirect control access

The indirect control access is removed from the kernel.
This patch cleans the corresponding alsa-lib part.
This commit is contained in:
Takashi Iwai 2008-01-08 18:34:36 +01:00
parent d23669585d
commit e1e9e3ff82
2 changed files with 9 additions and 14 deletions

View 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 */

View 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];