Lines Matching refs:codec_cap
1561 int bt_audio_codec_cap_meta_get_val(const struct bt_audio_codec_cap *codec_cap, uint8_t type, in bt_audio_codec_cap_meta_get_val() argument
1564 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_val()
1569 return codec_meta_get_val(codec_cap->meta, codec_cap->meta_len, type, data); in bt_audio_codec_cap_meta_get_val()
1572 int bt_audio_codec_cap_meta_set_val(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_val() argument
1578 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_set_val()
1583 ret = codec_meta_set_val(codec_cap->meta, codec_cap->meta_len, ARRAY_SIZE(codec_cap->meta), in bt_audio_codec_cap_meta_set_val()
1586 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_val()
1592 int bt_audio_codec_cap_meta_unset_val(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_unset_val() argument
1597 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_unset_val()
1602 ret = codec_meta_unset_val(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_unset_val()
1603 ARRAY_SIZE(codec_cap->meta), type); in bt_audio_codec_cap_meta_unset_val()
1605 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_unset_val()
1611 int bt_audio_codec_cap_meta_get_pref_context(const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_meta_get_pref_context() argument
1613 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_pref_context()
1618 return codec_meta_get_pref_context(codec_cap->meta, codec_cap->meta_len); in bt_audio_codec_cap_meta_get_pref_context()
1621 int bt_audio_codec_cap_meta_set_pref_context(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_pref_context() argument
1626 ret = codec_meta_set_pref_context(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_pref_context()
1627 ARRAY_SIZE(codec_cap->meta), ctx); in bt_audio_codec_cap_meta_set_pref_context()
1629 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_pref_context()
1635 int bt_audio_codec_cap_meta_get_stream_context(const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_meta_get_stream_context() argument
1637 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_stream_context()
1642 return codec_meta_get_stream_context(codec_cap->meta, codec_cap->meta_len); in bt_audio_codec_cap_meta_get_stream_context()
1645 int bt_audio_codec_cap_meta_set_stream_context(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_stream_context() argument
1650 ret = codec_meta_set_stream_context(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_stream_context()
1651 ARRAY_SIZE(codec_cap->meta), ctx); in bt_audio_codec_cap_meta_set_stream_context()
1653 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_stream_context()
1659 int bt_audio_codec_cap_meta_get_program_info(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_get_program_info() argument
1662 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_program_info()
1667 return codec_meta_get_program_info(codec_cap->meta, codec_cap->meta_len, program_info); in bt_audio_codec_cap_meta_get_program_info()
1670 int bt_audio_codec_cap_meta_set_program_info(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_program_info() argument
1675 ret = codec_meta_set_program_info(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_program_info()
1676 ARRAY_SIZE(codec_cap->meta), program_info, in bt_audio_codec_cap_meta_set_program_info()
1679 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_program_info()
1685 int bt_audio_codec_cap_meta_get_lang(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_get_lang() argument
1688 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_lang()
1693 return codec_meta_get_lang(codec_cap->meta, codec_cap->meta_len, lang); in bt_audio_codec_cap_meta_get_lang()
1696 int bt_audio_codec_cap_meta_set_lang(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_lang() argument
1701 ret = codec_meta_set_lang(codec_cap->meta, codec_cap->meta_len, ARRAY_SIZE(codec_cap->meta), in bt_audio_codec_cap_meta_set_lang()
1704 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_lang()
1710 int bt_audio_codec_cap_meta_get_ccid_list(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_get_ccid_list() argument
1713 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_ccid_list()
1718 return codec_meta_get_ccid_list(codec_cap->meta, codec_cap->meta_len, ccid_list); in bt_audio_codec_cap_meta_get_ccid_list()
1721 int bt_audio_codec_cap_meta_set_ccid_list(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_ccid_list() argument
1726 ret = codec_meta_set_ccid_list(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_ccid_list()
1727 ARRAY_SIZE(codec_cap->meta), ccid_list, ccid_list_len); in bt_audio_codec_cap_meta_set_ccid_list()
1729 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_ccid_list()
1735 int bt_audio_codec_cap_meta_get_parental_rating(const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_meta_get_parental_rating() argument
1737 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_parental_rating()
1742 return codec_meta_get_parental_rating(codec_cap->meta, codec_cap->meta_len); in bt_audio_codec_cap_meta_get_parental_rating()
1745 int bt_audio_codec_cap_meta_set_parental_rating(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_parental_rating() argument
1750 ret = codec_meta_set_parental_rating(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_parental_rating()
1751 ARRAY_SIZE(codec_cap->meta), parental_rating); in bt_audio_codec_cap_meta_set_parental_rating()
1753 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_parental_rating()
1759 int bt_audio_codec_cap_meta_get_program_info_uri(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_get_program_info_uri() argument
1762 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_program_info_uri()
1767 return codec_meta_get_program_info_uri(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_get_program_info_uri()
1771 int bt_audio_codec_cap_meta_set_program_info_uri(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_program_info_uri() argument
1777 ret = codec_meta_set_program_info_uri(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_program_info_uri()
1778 ARRAY_SIZE(codec_cap->meta), program_info_uri, in bt_audio_codec_cap_meta_set_program_info_uri()
1781 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_program_info_uri()
1787 int bt_audio_codec_cap_meta_get_audio_active_state(const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_meta_get_audio_active_state() argument
1789 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_audio_active_state()
1794 return codec_meta_get_audio_active_state(codec_cap->meta, codec_cap->meta_len); in bt_audio_codec_cap_meta_get_audio_active_state()
1797 int bt_audio_codec_cap_meta_set_audio_active_state(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_audio_active_state() argument
1802 ret = codec_meta_set_audio_active_state(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_audio_active_state()
1803 ARRAY_SIZE(codec_cap->meta), state); in bt_audio_codec_cap_meta_set_audio_active_state()
1805 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_audio_active_state()
1812 const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag() argument
1814 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag()
1819 return codec_meta_get_bcast_audio_immediate_rend_flag(codec_cap->meta, codec_cap->meta_len); in bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag()
1823 struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_meta_set_bcast_audio_immediate_rend_flag() argument
1827 ret = codec_meta_set_bcast_audio_immediate_rend_flag(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_bcast_audio_immediate_rend_flag()
1828 ARRAY_SIZE(codec_cap->meta)); in bt_audio_codec_cap_meta_set_bcast_audio_immediate_rend_flag()
1830 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_bcast_audio_immediate_rend_flag()
1837 const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_meta_get_assisted_listening_stream() argument
1839 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_assisted_listening_stream()
1844 return codec_meta_get_assisted_listening_stream(codec_cap->meta, codec_cap->meta_len); in bt_audio_codec_cap_meta_get_assisted_listening_stream()
1848 struct bt_audio_codec_cap *codec_cap, enum bt_audio_assisted_listening_stream val) in bt_audio_codec_cap_meta_set_assisted_listening_stream() argument
1852 ret = codec_meta_set_assisted_listening_stream(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_assisted_listening_stream()
1853 ARRAY_SIZE(codec_cap->meta), val); in bt_audio_codec_cap_meta_set_assisted_listening_stream()
1855 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_assisted_listening_stream()
1861 int bt_audio_codec_cap_meta_get_extended(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_get_extended() argument
1864 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_extended()
1869 return codec_meta_get_extended(codec_cap->meta, codec_cap->meta_len, extended_meta); in bt_audio_codec_cap_meta_get_extended()
1872 int bt_audio_codec_cap_meta_set_extended(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_extended() argument
1877 ret = codec_meta_set_extended(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_extended()
1878 ARRAY_SIZE(codec_cap->meta), extended_meta, in bt_audio_codec_cap_meta_set_extended()
1881 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_extended()
1887 int bt_audio_codec_cap_meta_get_vendor(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_get_vendor() argument
1890 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_vendor()
1895 return codec_meta_get_vendor(codec_cap->meta, codec_cap->meta_len, vendor_meta); in bt_audio_codec_cap_meta_get_vendor()
1898 int bt_audio_codec_cap_meta_set_vendor(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_vendor() argument
1903 ret = codec_meta_set_vendor(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_vendor()
1904 ARRAY_SIZE(codec_cap->meta), vendor_meta, vendor_meta_len); in bt_audio_codec_cap_meta_set_vendor()
1906 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_vendor()
1912 int bt_audio_codec_cap_meta_get_broadcast_name(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_get_broadcast_name() argument
1915 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_meta_get_broadcast_name()
1920 return codec_meta_get_broadcast_name(codec_cap->meta, codec_cap->meta_len, broadcast_name); in bt_audio_codec_cap_meta_get_broadcast_name()
1923 int bt_audio_codec_cap_meta_set_broadcast_name(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_meta_set_broadcast_name() argument
1929 ret = codec_meta_set_broadcast_name(codec_cap->meta, codec_cap->meta_len, in bt_audio_codec_cap_meta_set_broadcast_name()
1930 ARRAY_SIZE(codec_cap->meta), broadcast_name, in bt_audio_codec_cap_meta_set_broadcast_name()
1933 codec_cap->meta_len = ret; in bt_audio_codec_cap_meta_set_broadcast_name()
1946 struct bt_audio_codec_cap *codec_cap) in init_net_buf_simple_from_codec_cap() argument
1948 buf->__buf = codec_cap->data; in init_net_buf_simple_from_codec_cap()
1949 buf->data = codec_cap->data; in init_net_buf_simple_from_codec_cap()
1950 buf->size = sizeof(codec_cap->data); in init_net_buf_simple_from_codec_cap()
1951 buf->len = codec_cap->data_len; in init_net_buf_simple_from_codec_cap()
1954 int bt_audio_codec_cap_get_val(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_get_val() argument
1957 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_get_val()
1967 return bt_audio_data_get_val(codec_cap->data, codec_cap->data_len, (uint8_t)type, data); in bt_audio_codec_cap_get_val()
1970 int bt_audio_codec_cap_set_val(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_set_val() argument
1977 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_set_val()
1992 init_net_buf_simple_from_codec_cap(&buf, codec_cap); in bt_audio_codec_cap_set_val()
1996 codec_cap->data_len = ret; in bt_audio_codec_cap_set_val()
2002 int bt_audio_codec_cap_unset_val(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_unset_val() argument
2008 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_unset_val()
2013 init_net_buf_simple_from_codec_cap(&buf, codec_cap); in bt_audio_codec_cap_unset_val()
2017 codec_cap->data_len = ret; in bt_audio_codec_cap_unset_val()
2023 int bt_audio_codec_cap_get_freq(const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_get_freq() argument
2028 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_get_freq()
2033 data_len = bt_audio_codec_cap_get_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_FREQ, &data); in bt_audio_codec_cap_get_freq()
2045 int bt_audio_codec_cap_set_freq(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_set_freq() argument
2050 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_set_freq()
2062 return bt_audio_codec_cap_set_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_FREQ, in bt_audio_codec_cap_set_freq()
2066 int bt_audio_codec_cap_get_frame_dur(const struct bt_audio_codec_cap *codec_cap) in bt_audio_codec_cap_get_frame_dur() argument
2071 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_get_frame_dur()
2076 data_len = bt_audio_codec_cap_get_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_DURATION, &data); in bt_audio_codec_cap_get_frame_dur()
2088 int bt_audio_codec_cap_set_frame_dur(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_set_frame_dur() argument
2093 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_set_frame_dur()
2123 return bt_audio_codec_cap_set_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_DURATION, in bt_audio_codec_cap_set_frame_dur()
2127 int bt_audio_codec_cap_get_supported_audio_chan_counts(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_get_supported_audio_chan_counts() argument
2133 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_get_supported_audio_chan_counts()
2138 data_len = bt_audio_codec_cap_get_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT, &data); in bt_audio_codec_cap_get_supported_audio_chan_counts()
2140 if (fallback_to_default && codec_cap->id == BT_HCI_CODING_FORMAT_LC3) { in bt_audio_codec_cap_get_supported_audio_chan_counts()
2155 struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_chan_count chan_count) in bt_audio_codec_cap_set_supported_audio_chan_counts() argument
2159 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_set_supported_audio_chan_counts()
2171 return bt_audio_codec_cap_set_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT, in bt_audio_codec_cap_set_supported_audio_chan_counts()
2176 const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_get_octets_per_frame() argument
2182 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_get_octets_per_frame()
2192 data_len = bt_audio_codec_cap_get_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN, &data); in bt_audio_codec_cap_get_octets_per_frame()
2208 struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_set_octets_per_frame() argument
2213 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_set_octets_per_frame()
2231 return bt_audio_codec_cap_set_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN, in bt_audio_codec_cap_set_octets_per_frame()
2235 int bt_audio_codec_cap_get_max_codec_frames_per_sdu(const struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_get_max_codec_frames_per_sdu() argument
2241 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_get_max_codec_frames_per_sdu()
2247 bt_audio_codec_cap_get_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT, &data); in bt_audio_codec_cap_get_max_codec_frames_per_sdu()
2249 if (fallback_to_default && codec_cap->id == BT_HCI_CODING_FORMAT_LC3) { in bt_audio_codec_cap_get_max_codec_frames_per_sdu()
2263 int bt_audio_codec_cap_set_max_codec_frames_per_sdu(struct bt_audio_codec_cap *codec_cap, in bt_audio_codec_cap_set_max_codec_frames_per_sdu() argument
2266 CHECKIF(codec_cap == NULL) { in bt_audio_codec_cap_set_max_codec_frames_per_sdu()
2271 return bt_audio_codec_cap_set_val(codec_cap, BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT, in bt_audio_codec_cap_set_max_codec_frames_per_sdu()