mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
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:
parent
d23669585d
commit
e1e9e3ff82
2 changed files with 9 additions and 14 deletions
|
|
@ -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 {
|
struct sndrv_ctl_card_info {
|
||||||
int card; /* card number */
|
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_OWNER (1<<10) /* write lock owner */
|
||||||
#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* flag only for kernel */
|
#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_USER (1<<29) /* user space element */
|
||||||
#define SNDRV_CTL_ELEM_ACCESS_DINDIRECT (1<<30) /* indirect access for matrix dimensions in the info structure */
|
/* bits 30 and 31 are obsoleted (for indirect access) */
|
||||||
#define SNDRV_CTL_ELEM_ACCESS_INDIRECT (1<<31) /* indirect access for element value in the value structure */
|
|
||||||
|
|
||||||
/* for further details see the ACPI and PCI power management specification */
|
/* for further details see the ACPI and PCI power management specification */
|
||||||
#define SNDRV_CTL_POWER_D0 0x0000 /* full On */
|
#define SNDRV_CTL_POWER_D0 0x0000 /* full On */
|
||||||
|
|
@ -829,30 +828,30 @@ struct sndrv_ctl_elem_info {
|
||||||
} value;
|
} value;
|
||||||
union {
|
union {
|
||||||
unsigned short d[4]; /* dimensions */
|
unsigned short d[4]; /* dimensions */
|
||||||
unsigned short *d_ptr; /* indirect */
|
unsigned short *d_ptr; /* (obsolete) indirect */
|
||||||
} dimen;
|
} dimen;
|
||||||
unsigned char reserved[64-4*sizeof(unsigned short)];
|
unsigned char reserved[64-4*sizeof(unsigned short)];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sndrv_ctl_elem_value {
|
struct sndrv_ctl_elem_value {
|
||||||
struct sndrv_ctl_elem_id id; /* W: element ID */
|
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 {
|
||||||
union {
|
union {
|
||||||
long value[128];
|
long value[128];
|
||||||
long *value_ptr;
|
long *value_ptr; /* obsolete */
|
||||||
} integer;
|
} integer;
|
||||||
union {
|
union {
|
||||||
long long value[64];
|
long long value[64];
|
||||||
long long *value_ptr;
|
long long *value_ptr; /* obsolete */
|
||||||
} integer64;
|
} integer64;
|
||||||
union {
|
union {
|
||||||
unsigned int item[128];
|
unsigned int item[128];
|
||||||
unsigned int *item_ptr;
|
unsigned int *item_ptr; /* obsolete */
|
||||||
} enumerated;
|
} enumerated;
|
||||||
union {
|
union {
|
||||||
unsigned char data[512];
|
unsigned char data[512];
|
||||||
unsigned char *data_ptr;
|
unsigned char *data_ptr; /* obsolete */
|
||||||
} bytes;
|
} bytes;
|
||||||
struct sndrv_aes_iec958 iec958;
|
struct sndrv_aes_iec958 iec958;
|
||||||
} value; /* RO */
|
} value; /* RO */
|
||||||
|
|
|
||||||
|
|
@ -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)
|
int snd_ctl_elem_info_is_indirect(const snd_ctl_elem_info_t *obj)
|
||||||
{
|
{
|
||||||
assert(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");
|
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;
|
int i;
|
||||||
|
|
||||||
assert(obj);
|
assert(obj);
|
||||||
if (obj->access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)
|
|
||||||
return 0; /* FIXME: implement indirect access as well */
|
|
||||||
for (i = 3; i >= 0; i--)
|
for (i = 3; i >= 0; i--)
|
||||||
if (obj->dimen.d[i])
|
if (obj->dimen.d[i])
|
||||||
break;
|
break;
|
||||||
|
|
@ -2045,8 +2043,6 @@ int snd_ctl_elem_info_get_dimension(const snd_ctl_elem_info_t *obj, unsigned int
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
assert(obj);
|
assert(obj);
|
||||||
if (obj->access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)
|
|
||||||
return 0; /* FIXME: implement indirect access as well */
|
|
||||||
if (idx >= 3)
|
if (idx >= 3)
|
||||||
return 0;
|
return 0;
|
||||||
return obj->dimen.d[idx];
|
return obj->dimen.d[idx];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue