mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Added snd_ctl_elem_info_is_owner and snd_ctl_elem_info_get_owner functions.
This commit is contained in:
parent
301a62f90a
commit
5e5a429815
2 changed files with 27 additions and 1 deletions
|
|
@ -503,8 +503,12 @@ int snd_ctl_elem_info_is_inactive(const snd_ctl_elem_info_t *obj);
|
||||||
|
|
||||||
int snd_ctl_elem_info_is_locked(const snd_ctl_elem_info_t *obj);
|
int snd_ctl_elem_info_is_locked(const snd_ctl_elem_info_t *obj);
|
||||||
|
|
||||||
|
int snd_ctl_elem_info_is_owner(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);
|
||||||
|
|
||||||
|
pid_t snd_ctl_elem_info_get_owner(const snd_ctl_elem_info_t *obj);
|
||||||
|
|
||||||
unsigned int snd_ctl_elem_info_get_count(const snd_ctl_elem_info_t *obj);
|
unsigned int snd_ctl_elem_info_get_count(const snd_ctl_elem_info_t *obj);
|
||||||
|
|
||||||
long snd_ctl_elem_info_get_min(const snd_ctl_elem_info_t *obj);
|
long snd_ctl_elem_info_get_min(const snd_ctl_elem_info_t *obj);
|
||||||
|
|
|
||||||
|
|
@ -1324,7 +1324,7 @@ int snd_ctl_elem_info_is_inactive(const snd_ctl_elem_info_t *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get info about status from a CTL element id/info
|
* \brief Get info whether an element is locked
|
||||||
* \param obj CTL element id/info
|
* \param obj CTL element id/info
|
||||||
* \return 0 if element value is currently changeable, 1 if it's locked by another application
|
* \return 0 if element value is currently changeable, 1 if it's locked by another application
|
||||||
*/
|
*/
|
||||||
|
|
@ -1334,6 +1334,17 @@ int snd_ctl_elem_info_is_locked(const snd_ctl_elem_info_t *obj)
|
||||||
return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_LOCK);
|
return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_LOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get info if I own an element
|
||||||
|
* \param obj CTL element id/info
|
||||||
|
* \return 0 if element value is currently changeable, 1 if it's locked by another application
|
||||||
|
*/
|
||||||
|
int snd_ctl_elem_info_is_owner(const snd_ctl_elem_info_t *obj)
|
||||||
|
{
|
||||||
|
assert(obj);
|
||||||
|
return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_OWNER);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get info about values passing policy from a CTL element id/info
|
* \brief Get info about values passing policy from a CTL element id/info
|
||||||
* \param obj CTL element id/info
|
* \param obj CTL element id/info
|
||||||
|
|
@ -1345,6 +1356,17 @@ int snd_ctl_elem_info_is_indirect(const snd_ctl_elem_info_t *obj)
|
||||||
return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_INDIRECT);
|
return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_INDIRECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get owner of a locked element
|
||||||
|
* \param obj CTL element id/info
|
||||||
|
* \return value entries count
|
||||||
|
*/
|
||||||
|
pid_t snd_ctl_elem_info_get_owner(const snd_ctl_elem_info_t *obj)
|
||||||
|
{
|
||||||
|
assert(obj);
|
||||||
|
return obj->owner;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get number of value entries from a CTL element id/info
|
* \brief Get number of value entries from a CTL element id/info
|
||||||
* \param obj CTL element id/info
|
* \param obj CTL element id/info
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue