Lines Matching refs:obj

1734  * \param obj CTL element identifiers list.
1740 int snd_ctl_elem_list_alloc_space(snd_ctl_elem_list_t *obj, unsigned int entries)
1742 free(obj->pids);
1743 obj->pids = calloc(entries, sizeof(*obj->pids));
1744 if (!obj->pids) {
1745 obj->space = 0;
1748 obj->space = entries;
1758 * \param obj CTL element identifiers list
1760 void snd_ctl_elem_list_free_space(snd_ctl_elem_list_t *obj)
1762 free(obj->pids);
1763 obj->pids = NULL;
1764 obj->space = 0;
1769 * \param obj CTL event
1772 unsigned int snd_ctl_event_elem_get_mask(const snd_ctl_event_t *obj)
1774 assert(obj);
1775 assert(obj->type == SND_CTL_EVENT_ELEM);
1776 return obj->data.elem.mask;
1781 * \param obj CTL event
1784 void snd_ctl_event_elem_get_id(const snd_ctl_event_t *obj, snd_ctl_elem_id_t *ptr)
1786 assert(obj && ptr);
1787 assert(obj->type == SND_CTL_EVENT_ELEM);
1788 *ptr = obj->data.elem.id;
1793 * \param obj CTL event
1796 unsigned int snd_ctl_event_elem_get_numid(const snd_ctl_event_t *obj)
1798 assert(obj);
1799 assert(obj->type == SND_CTL_EVENT_ELEM);
1800 return obj->data.elem.id.numid;
1805 * \param obj CTL event
1808 snd_ctl_elem_iface_t snd_ctl_event_elem_get_interface(const snd_ctl_event_t *obj)
1810 assert(obj);
1811 assert(obj->type == SND_CTL_EVENT_ELEM);
1812 return obj->data.elem.id.iface;
1817 * \param obj CTL event
1820 unsigned int snd_ctl_event_elem_get_device(const snd_ctl_event_t *obj)
1822 assert(obj);
1823 assert(obj->type == SND_CTL_EVENT_ELEM);
1824 return obj->data.elem.id.device;
1829 * \param obj CTL event
1832 unsigned int snd_ctl_event_elem_get_subdevice(const snd_ctl_event_t *obj)
1834 assert(obj);
1835 assert(obj->type == SND_CTL_EVENT_ELEM);
1836 return obj->data.elem.id.subdevice;
1841 * \param obj CTL event
1844 const char *snd_ctl_event_elem_get_name(const snd_ctl_event_t *obj)
1846 assert(obj);
1847 assert(obj->type == SND_CTL_EVENT_ELEM);
1848 return (const char *)obj->data.elem.id.name;
1853 * \param obj CTL event
1856 unsigned int snd_ctl_event_elem_get_index(const snd_ctl_event_t *obj)
1858 assert(obj);
1859 assert(obj->type == SND_CTL_EVENT_ELEM);
1860 return obj->data.elem.id.index;
1896 * \param obj pointer to object to free
1898 void snd_ctl_elem_id_free(snd_ctl_elem_id_t *obj)
1900 free(obj);
1905 * \param obj pointer to object to clear
1907 void snd_ctl_elem_id_clear(snd_ctl_elem_id_t *obj)
1909 memset(obj, 0, sizeof(snd_ctl_elem_id_t));
1990 * \param obj CTL element identifier
1993 unsigned int snd_ctl_elem_id_get_numid(const snd_ctl_elem_id_t *obj)
1995 assert(obj);
1996 return obj->numid;
2001 * \param obj CTL element identifier
2004 snd_ctl_elem_iface_t snd_ctl_elem_id_get_interface(const snd_ctl_elem_id_t *obj)
2006 assert(obj);
2007 return obj->iface;
2012 * \param obj CTL element identifier
2015 unsigned int snd_ctl_elem_id_get_device(const snd_ctl_elem_id_t *obj)
2017 assert(obj);
2018 return obj->device;
2023 * \param obj CTL element identifier
2026 unsigned int snd_ctl_elem_id_get_subdevice(const snd_ctl_elem_id_t *obj)
2028 assert(obj);
2029 return obj->subdevice;
2034 * \param obj CTL element identifier
2037 const char *snd_ctl_elem_id_get_name(const snd_ctl_elem_id_t *obj)
2039 assert(obj);
2040 return (const char *)obj->name;
2045 * \param obj CTL element identifier
2048 unsigned int snd_ctl_elem_id_get_index(const snd_ctl_elem_id_t *obj)
2050 assert(obj);
2051 return obj->index;
2056 * \param obj CTL element identifier
2059 void snd_ctl_elem_id_set_numid(snd_ctl_elem_id_t *obj, unsigned int val)
2061 assert(obj);
2062 obj->numid = val;
2067 * \param obj CTL element identifier
2070 void snd_ctl_elem_id_set_interface(snd_ctl_elem_id_t *obj, snd_ctl_elem_iface_t val)
2072 assert(obj);
2073 obj->iface = val;
2078 * \param obj CTL element identifier
2081 void snd_ctl_elem_id_set_device(snd_ctl_elem_id_t *obj, unsigned int val)
2083 assert(obj);
2084 obj->device = val;
2089 * \param obj CTL element identifier
2092 void snd_ctl_elem_id_set_subdevice(snd_ctl_elem_id_t *obj, unsigned int val)
2094 assert(obj);
2095 obj->subdevice = val;
2100 * \param obj CTL element identifier
2103 void snd_ctl_elem_id_set_name(snd_ctl_elem_id_t *obj, const char *val)
2105 assert(obj);
2106 snd_strlcpy((char *)obj->name, val, sizeof(obj->name));
2111 * \param obj CTL element identifier
2114 void snd_ctl_elem_id_set_index(snd_ctl_elem_id_t *obj, unsigned int val)
2116 assert(obj);
2117 obj->index = val;
2154 * \param obj Pointer to the snd_ctl_card_info_t.
2156 void snd_ctl_card_info_free(snd_ctl_card_info_t *obj)
2158 free(obj);
2166 * \param obj Card info object.
2168 void snd_ctl_card_info_clear(snd_ctl_card_info_t *obj)
2170 memset(obj, 0, sizeof(snd_ctl_card_info_t));
2190 * \param obj The card info object.
2193 int snd_ctl_card_info_get_card(const snd_ctl_card_info_t *obj)
2195 assert(obj);
2196 return obj->card;
2204 * \param obj The card info object.
2207 const char *snd_ctl_card_info_get_id(const snd_ctl_card_info_t *obj)
2209 assert(obj);
2210 return (const char *)obj->id;
2218 * \param obj The card info object.
2221 const char *snd_ctl_card_info_get_driver(const snd_ctl_card_info_t *obj)
2223 assert(obj);
2224 return (const char *)obj->driver;
2232 * \param obj The card info object.
2235 const char *snd_ctl_card_info_get_name(const snd_ctl_card_info_t *obj)
2237 assert(obj);
2238 return (const char *)obj->name;
2246 * \param obj The card info object.
2249 const char *snd_ctl_card_info_get_longname(const snd_ctl_card_info_t *obj)
2251 assert(obj);
2252 return (const char *)obj->longname;
2260 * \param obj The card info object.
2263 const char *snd_ctl_card_info_get_mixername(const snd_ctl_card_info_t *obj)
2265 assert(obj);
2266 return (const char *)obj->mixername;
2274 * \param obj The card info object.
2277 const char *snd_ctl_card_info_get_components(const snd_ctl_card_info_t *obj)
2279 assert(obj);
2280 return (const char *)obj->components;
2308 * \param obj pointer to object to free
2310 void snd_ctl_event_free(snd_ctl_event_t *obj)
2312 free(obj);
2317 * \param obj pointer to object to clear
2319 void snd_ctl_event_clear(snd_ctl_event_t *obj)
2321 memset(obj, 0, sizeof(snd_ctl_event_t));
2337 * \param obj CTL event
2340 snd_ctl_event_type_t snd_ctl_event_get_type(const snd_ctl_event_t *obj)
2342 assert(obj);
2343 return obj->type;
2382 * \param obj pointer to object to free
2384 void snd_ctl_elem_list_free(snd_ctl_elem_list_t *obj)
2386 free(obj);
2399 * \param obj pointer to object to clear
2401 void snd_ctl_elem_list_clear(snd_ctl_elem_list_t *obj)
2403 memset(obj, 0, sizeof(snd_ctl_elem_list_t));
2423 * \param obj CTL element identifiers list
2426 void snd_ctl_elem_list_set_offset(snd_ctl_elem_list_t *obj, unsigned int val)
2428 assert(obj);
2429 obj->offset = val;
2440 * \param obj CTL element identifier list
2443 unsigned int snd_ctl_elem_list_get_used(const snd_ctl_elem_list_t *obj)
2445 assert(obj);
2446 return obj->used;
2458 * \param obj CTL element identifier list
2461 unsigned int snd_ctl_elem_list_get_count(const snd_ctl_elem_list_t *obj)
2463 assert(obj);
2464 return obj->count;
2469 * \param obj CTL element identifier list
2473 void snd_ctl_elem_list_get_id(const snd_ctl_elem_list_t *obj, unsigned int idx, snd_ctl_elem_id_t *ptr)
2475 assert(obj && ptr);
2476 assert(idx < obj->used);
2477 *ptr = obj->pids[idx];
2482 * \param obj CTL element identifier list
2486 unsigned int snd_ctl_elem_list_get_numid(const snd_ctl_elem_list_t *obj, unsigned int idx)
2488 assert(obj);
2489 assert(idx < obj->used);
2490 return obj->pids[idx].numid;
2495 * \param obj CTL element identifier list
2499 snd_ctl_elem_iface_t snd_ctl_elem_list_get_interface(const snd_ctl_elem_list_t *obj, unsigned int idx)
2501 assert(obj);
2502 assert(idx < obj->used);
2503 return obj->pids[idx].iface;
2508 * \param obj CTL element identifier list
2512 unsigned int snd_ctl_elem_list_get_device(const snd_ctl_elem_list_t *obj, unsigned int idx)
2514 assert(obj);
2515 assert(idx < obj->used);
2516 return obj->pids[idx].device;
2521 * \param obj CTL element identifier list
2525 unsigned int snd_ctl_elem_list_get_subdevice(const snd_ctl_elem_list_t *obj, unsigned int idx)
2527 assert(obj);
2528 assert(idx < obj->used);
2529 return obj->pids[idx].subdevice;
2534 * \param obj CTL element identifier list
2538 const char *snd_ctl_elem_list_get_name(const snd_ctl_elem_list_t *obj, unsigned int idx)
2540 assert(obj);
2541 assert(idx < obj->used);
2542 return (const char *)obj->pids[idx].name;
2547 * \param obj CTL element identifier list
2551 unsigned int snd_ctl_elem_list_get_index(const snd_ctl_elem_list_t *obj, unsigned int idx)
2553 assert(obj);
2554 assert(idx < obj->used);
2555 return obj->pids[idx].index;
2583 * \param obj pointer to object to free
2585 void snd_ctl_elem_info_free(snd_ctl_elem_info_t *obj)
2587 free(obj);
2592 * \param obj pointer to object to clear
2594 void snd_ctl_elem_info_clear(snd_ctl_elem_info_t *obj)
2596 memset(obj, 0, sizeof(snd_ctl_elem_info_t));
2612 * \param obj CTL element id/info
2615 snd_ctl_elem_type_t snd_ctl_elem_info_get_type(const snd_ctl_elem_info_t *obj)
2617 assert(obj);
2618 return obj->type;
2623 * \param obj CTL element id/info
2626 int snd_ctl_elem_info_is_readable(const snd_ctl_elem_info_t *obj)
2628 assert(obj);
2629 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_READ);
2634 * \param obj CTL element id/info
2637 int snd_ctl_elem_info_is_writable(const snd_ctl_elem_info_t *obj)
2639 assert(obj);
2640 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_WRITE);
2645 * \param obj CTL element id/info
2648 int snd_ctl_elem_info_is_volatile(const snd_ctl_elem_info_t *obj)
2650 assert(obj);
2651 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_VOLATILE);
2656 * \param obj CTL element id/info
2659 int snd_ctl_elem_info_is_inactive(const snd_ctl_elem_info_t *obj)
2661 assert(obj);
2662 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_INACTIVE);
2667 * \param obj CTL element id/info
2670 int snd_ctl_elem_info_is_locked(const snd_ctl_elem_info_t *obj)
2672 assert(obj);
2673 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_LOCK);
2678 * \param obj CTL element id/info
2681 int snd_ctl_elem_info_is_owner(const snd_ctl_elem_info_t *obj)
2683 assert(obj);
2684 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_OWNER);
2689 * \param obj CTL element id/info
2692 int snd_ctl_elem_info_is_user(const snd_ctl_elem_info_t *obj)
2694 assert(obj);
2695 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_USER);
2700 * \param obj CTL element id/info
2703 int snd_ctl_elem_info_is_tlv_readable(const snd_ctl_elem_info_t *obj)
2705 assert(obj);
2706 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ);
2711 * \param obj CTL element id/info
2714 int snd_ctl_elem_info_is_tlv_writable(const snd_ctl_elem_info_t *obj)
2716 assert(obj);
2717 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_TLV_WRITE);
2722 * \param obj CTL element id/info
2725 int snd_ctl_elem_info_is_tlv_commandable(const snd_ctl_elem_info_t *obj)
2727 assert(obj);
2728 return !!(obj->access & SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND);
2733 * \param obj CTL element id/info
2736 int snd_ctl_elem_info_is_indirect(const snd_ctl_elem_info_t *obj)
2738 assert(obj);
2745 * \param obj CTL element id/info
2748 pid_t snd_ctl_elem_info_get_owner(const snd_ctl_elem_info_t *obj)
2750 assert(obj);
2751 return obj->owner;
2756 * \param obj CTL element id/info
2759 unsigned int snd_ctl_elem_info_get_count(const snd_ctl_elem_info_t *obj)
2761 assert(obj);
2762 return obj->count;
2767 * \param obj CTL element id/info
2770 long snd_ctl_elem_info_get_min(const snd_ctl_elem_info_t *obj)
2772 assert(obj);
2773 assert(obj->type == SND_CTL_ELEM_TYPE_INTEGER);
2774 return obj->value.integer.min;
2779 * \param obj CTL element id/info
2782 long snd_ctl_elem_info_get_max(const snd_ctl_elem_info_t *obj)
2784 assert(obj);
2785 assert(obj->type == SND_CTL_ELEM_TYPE_INTEGER);
2786 return obj->value.integer.max;
2791 * \param obj CTL element id/info
2794 long snd_ctl_elem_info_get_step(const snd_ctl_elem_info_t *obj)
2796 assert(obj);
2797 assert(obj->type == SND_CTL_ELEM_TYPE_INTEGER);
2798 return obj->value.integer.step;
2803 * \param obj CTL element id/info
2806 long long snd_ctl_elem_info_get_min64(const snd_ctl_elem_info_t *obj)
2808 assert(obj);
2809 assert(obj->type == SND_CTL_ELEM_TYPE_INTEGER64);
2810 return obj->value.integer64.min;
2815 * \param obj CTL element id/info
2818 long long snd_ctl_elem_info_get_max64(const snd_ctl_elem_info_t *obj)
2820 assert(obj);
2821 assert(obj->type == SND_CTL_ELEM_TYPE_INTEGER64);
2822 return obj->value.integer64.max;
2827 * \param obj CTL element id/info
2830 long long snd_ctl_elem_info_get_step64(const snd_ctl_elem_info_t *obj)
2832 assert(obj);
2833 assert(obj->type == SND_CTL_ELEM_TYPE_INTEGER64);
2834 return obj->value.integer64.step;
2839 * \param obj CTL element id/info
2842 unsigned int snd_ctl_elem_info_get_items(const snd_ctl_elem_info_t *obj)
2844 assert(obj);
2845 assert(obj->type == SND_CTL_ELEM_TYPE_ENUMERATED);
2846 return obj->value.enumerated.items;
2851 * \param obj CTL element id/info
2854 void snd_ctl_elem_info_set_item(snd_ctl_elem_info_t *obj, unsigned int val)
2856 assert(obj);
2857 obj->value.enumerated.item = val;
2862 * \param obj CTL element id/info
2865 const char *snd_ctl_elem_info_get_item_name(const snd_ctl_elem_info_t *obj)
2867 assert(obj);
2868 assert(obj->type == SND_CTL_ELEM_TYPE_ENUMERATED);
2869 return obj->value.enumerated.name;
2874 * \param obj CTL element id/info
2881 EXPORT_SYMBOL int INTERNAL(snd_ctl_elem_info_get_dimensions)(const snd_ctl_elem_info_t *obj ATTRIBUTE_UNUSED)
2883 int snd_ctl_elem_info_get_dimensions(const snd_ctl_elem_info_t *obj)
2889 assert(obj);
2891 if (obj->dimen.d[i])
2902 * \param obj CTL element id/info
2910 EXPORT_SYMBOL int INTERNAL(snd_ctl_elem_info_get_dimension)(const snd_ctl_elem_info_t *obj ATTRIBUTE_UNUSED, unsigned int idx ATTRIBUTE_UNUSED)
2912 int snd_ctl_elem_info_get_dimension(const snd_ctl_elem_info_t *obj, unsigned int idx)
2916 assert(obj);
2919 return obj->dimen.d[idx];
2968 * \param obj CTL element id/info
2971 void snd_ctl_elem_info_get_id(const snd_ctl_elem_info_t *obj, snd_ctl_elem_id_t *ptr)
2973 assert(obj && ptr);
2974 *ptr = obj->id;
2979 * \param obj CTL element id/info
2982 unsigned int snd_ctl_elem_info_get_numid(const snd_ctl_elem_info_t *obj)
2984 assert(obj);
2985 return obj->id.numid;
2990 * \param obj CTL element id/info
2993 snd_ctl_elem_iface_t snd_ctl_elem_info_get_interface(const snd_ctl_elem_info_t *obj)
2995 assert(obj);
2996 return obj->id.iface;
3001 * \param obj CTL element id/info
3004 unsigned int snd_ctl_elem_info_get_device(const snd_ctl_elem_info_t *obj)
3006 assert(obj);
3007 return obj->id.device;
3012 * \param obj CTL element id/info
3015 unsigned int snd_ctl_elem_info_get_subdevice(const snd_ctl_elem_info_t *obj)
3017 assert(obj);
3018 return obj->id.subdevice;
3023 * \param obj CTL element id/info
3026 const char *snd_ctl_elem_info_get_name(const snd_ctl_elem_info_t *obj)
3028 assert(obj);
3029 return (const char *)obj->id.name;
3034 * \param obj CTL element id/info
3037 unsigned int snd_ctl_elem_info_get_index(const snd_ctl_elem_info_t *obj)
3039 assert(obj);
3040 return obj->id.index;
3045 * \param obj CTL element id/info
3048 void snd_ctl_elem_info_set_id(snd_ctl_elem_info_t *obj, const snd_ctl_elem_id_t *ptr)
3050 assert(obj && ptr);
3051 obj->id = *ptr;
3056 * \param obj CTL element id/info
3059 void snd_ctl_elem_info_set_numid(snd_ctl_elem_info_t *obj, unsigned int val)
3061 assert(obj);
3062 obj->id.numid = val;
3067 * \param obj CTL element id/info
3070 void snd_ctl_elem_info_set_interface(snd_ctl_elem_info_t *obj, snd_ctl_elem_iface_t val)
3072 assert(obj);
3073 obj->id.iface = val;
3078 * \param obj CTL element id/info
3081 void snd_ctl_elem_info_set_device(snd_ctl_elem_info_t *obj, unsigned int val)
3083 assert(obj);
3084 obj->id.device = val;
3089 * \param obj CTL element id/info
3092 void snd_ctl_elem_info_set_subdevice(snd_ctl_elem_info_t *obj, unsigned int val)
3094 assert(obj);
3095 obj->id.subdevice = val;
3100 * \param obj CTL element id/info
3103 void snd_ctl_elem_info_set_name(snd_ctl_elem_info_t *obj, const char *val)
3105 assert(obj);
3106 snd_strlcpy((char *)obj->id.name, val, sizeof(obj->id.name));
3111 * \param obj CTL element id/info
3114 void snd_ctl_elem_info_set_index(snd_ctl_elem_info_t *obj, unsigned int val)
3116 assert(obj);
3117 obj->id.index = val;
3122 * \param obj CTL element id/info
3126 void snd_ctl_elem_info_set_read_write(snd_ctl_elem_info_t *obj, int rval, int wval)
3128 assert(obj);
3129 obj->access = (obj->access & ~SNDRV_CTL_ELEM_ACCESS_READWRITE) |
3136 * \param obj CTL element id/info
3140 void snd_ctl_elem_info_set_tlv_read_write(snd_ctl_elem_info_t *obj, int rval, int wval)
3142 assert(obj);
3143 obj->access = (obj->access & ~SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE) |
3150 * \param obj CTL element id/info
3153 void snd_ctl_elem_info_set_inactive(snd_ctl_elem_info_t *obj, int val)
3155 assert(obj);
3156 obj->access = (obj->access & ~SNDRV_CTL_ELEM_ACCESS_INACTIVE) |
3194 * \param obj Pointer to the snd_ctl_elem_value_t.
3196 void snd_ctl_elem_value_free(snd_ctl_elem_value_t *obj)
3198 free(obj);
3206 * \param obj Data of an element.
3208 void snd_ctl_elem_value_clear(snd_ctl_elem_value_t *obj)
3210 memset(obj, 0, sizeof(snd_ctl_elem_value_t));
3244 * \param obj The element value.
3248 void snd_ctl_elem_value_get_id(const snd_ctl_elem_value_t *obj, snd_ctl_elem_id_t *ptr)
3250 assert(obj && ptr);
3251 *ptr = obj->id;
3259 * \param obj The element value.
3262 unsigned int snd_ctl_elem_value_get_numid(const snd_ctl_elem_value_t *obj)
3264 assert(obj);
3265 return obj->id.numid;
3273 * \param obj The element value.
3276 snd_ctl_elem_iface_t snd_ctl_elem_value_get_interface(const snd_ctl_elem_value_t *obj)
3278 assert(obj);
3279 return obj->id.iface;
3287 * \param obj The element value.
3290 unsigned int snd_ctl_elem_value_get_device(const snd_ctl_elem_value_t *obj)
3292 assert(obj);
3293 return obj->id.device;
3301 * \param obj The element value.
3304 unsigned int snd_ctl_elem_value_get_subdevice(const snd_ctl_elem_value_t *obj)
3306 assert(obj);
3307 return obj->id.subdevice;
3315 * \param obj The element value.
3318 const char *snd_ctl_elem_value_get_name(const snd_ctl_elem_value_t *obj)
3320 assert(obj);
3321 return (const char *)obj->id.name;
3329 * \param obj The element value.
3332 unsigned int snd_ctl_elem_value_get_index(const snd_ctl_elem_value_t *obj)
3334 assert(obj);
3335 return obj->id.index;
3344 * \param obj The element value.
3347 void snd_ctl_elem_value_set_id(snd_ctl_elem_value_t *obj, const snd_ctl_elem_id_t *ptr)
3349 assert(obj && ptr);
3350 obj->id = *ptr;
3358 * \param obj The element value.
3361 void snd_ctl_elem_value_set_numid(snd_ctl_elem_value_t *obj, unsigned int val)
3363 assert(obj);
3364 obj->id.numid = val;
3372 * \param obj The element value.
3375 void snd_ctl_elem_value_set_interface(snd_ctl_elem_value_t *obj, snd_ctl_elem_iface_t val)
3377 assert(obj);
3378 obj->id.iface = val;
3386 * \param obj The element value.
3389 void snd_ctl_elem_value_set_device(snd_ctl_elem_value_t *obj, unsigned int val)
3391 assert(obj);
3392 obj->id.device = val;
3400 * \param obj The element value.
3403 void snd_ctl_elem_value_set_subdevice(snd_ctl_elem_value_t *obj, unsigned int val)
3405 assert(obj);
3406 obj->id.subdevice = val;
3414 * \param obj The element value.
3417 void snd_ctl_elem_value_set_name(snd_ctl_elem_value_t *obj, const char *val)
3419 assert(obj);
3420 snd_strlcpy((char *)obj->id.name, val, sizeof(obj->id.name));
3428 * \param obj The element value.
3431 void snd_ctl_elem_value_set_index(snd_ctl_elem_value_t *obj, unsigned int val)
3433 assert(obj);
3434 obj->id.index = val;
3444 * \param obj The element value object
3448 int snd_ctl_elem_value_get_boolean(const snd_ctl_elem_value_t *obj, unsigned int idx)
3450 assert(obj);
3451 assert(idx < ARRAY_SIZE(obj->value.integer.value));
3452 return obj->value.integer.value[idx];
3462 * \param obj The element value object.
3466 long snd_ctl_elem_value_get_integer(const snd_ctl_elem_value_t *obj, unsigned int idx)
3468 assert(obj);
3469 assert(idx < ARRAY_SIZE(obj->value.integer.value));
3470 return obj->value.integer.value[idx];
3480 * \param obj The element value object.
3484 long long snd_ctl_elem_value_get_integer64(const snd_ctl_elem_value_t *obj, unsigned int idx)
3486 assert(obj);
3487 assert(idx < ARRAY_SIZE(obj->value.integer64.value));
3488 return obj->value.integer64.value[idx];
3498 * \param obj The element value object.
3502 unsigned int snd_ctl_elem_value_get_enumerated(const snd_ctl_elem_value_t *obj, unsigned int idx)
3504 assert(obj);
3505 assert(idx < ARRAY_SIZE(obj->value.enumerated.item));
3506 return obj->value.enumerated.item[idx];
3516 * \param obj The element value object.
3520 unsigned char snd_ctl_elem_value_get_byte(const snd_ctl_elem_value_t *obj, unsigned int idx)
3522 assert(obj);
3523 assert(idx < ARRAY_SIZE(obj->value.bytes.data));
3524 return obj->value.bytes.data[idx];
3534 * \param obj The element value object.
3538 void snd_ctl_elem_value_set_boolean(snd_ctl_elem_value_t *obj, unsigned int idx, long val)
3540 assert(obj);
3541 assert(idx < ARRAY_SIZE(obj->value.integer.value));
3542 obj->value.integer.value[idx] = val;
3552 * \param obj The element value object.
3556 void snd_ctl_elem_value_set_integer(snd_ctl_elem_value_t *obj, unsigned int idx, long val)
3558 assert(obj);
3559 assert(idx < ARRAY_SIZE(obj->value.integer.value));
3560 obj->value.integer.value[idx] = val;
3570 * \param obj The element value object.
3574 void snd_ctl_elem_value_set_integer64(snd_ctl_elem_value_t *obj, unsigned int idx, long long val)
3576 assert(obj);
3577 assert(idx < ARRAY_SIZE(obj->value.integer64.value));
3578 obj->value.integer64.value[idx] = val;
3588 * \param obj The element value object.
3592 void snd_ctl_elem_value_set_enumerated(snd_ctl_elem_value_t *obj, unsigned int idx, unsigned int val)
3594 assert(obj);
3595 assert(idx < ARRAY_SIZE(obj->value.enumerated.item));
3596 obj->value.enumerated.item[idx] = val;
3606 * \param obj The element value object.
3610 void snd_ctl_elem_value_set_byte(snd_ctl_elem_value_t *obj, unsigned int idx, unsigned char val)
3612 assert(obj);
3613 assert(idx < ARRAY_SIZE(obj->value.bytes.data));
3614 obj->value.bytes.data[idx] = val;
3626 * \param obj The element value object.
3630 void snd_ctl_elem_set_bytes(snd_ctl_elem_value_t *obj, void *data, size_t size)
3632 assert(obj);
3633 assert(size <= ARRAY_SIZE(obj->value.bytes.data));
3634 memcpy(obj->value.bytes.data, data, size);
3646 * \param obj The element value object.
3649 const void * snd_ctl_elem_value_get_bytes(const snd_ctl_elem_value_t *obj)
3651 assert(obj);
3652 return obj->value.bytes.data;
3664 * \param obj The element value object.
3667 void snd_ctl_elem_value_get_iec958(const snd_ctl_elem_value_t *obj, snd_aes_iec958_t *ptr)
3669 assert(obj && ptr);
3670 memcpy(ptr, &obj->value.iec958, sizeof(*ptr));
3682 * \param obj The element value object.
3685 void snd_ctl_elem_value_set_iec958(snd_ctl_elem_value_t *obj, const snd_aes_iec958_t *ptr)
3687 assert(obj && ptr);
3688 memcpy(&obj->value.iec958, ptr, sizeof(obj->value.iec958));