@@ -455,10 +455,10 @@ struct bt_bap_stream {
455
455
struct bt_bap_ep * ep ;
456
456
457
457
/** Codec Configuration */
458
- struct bt_codec * codec ;
458
+ struct bt_audio_codec_cfg * codec_cfg ;
459
459
460
460
/** QoS Configuration */
461
- struct bt_codec_qos * qos ;
461
+ struct bt_audio_codec_qos * qos ;
462
462
463
463
/** Audio stream operations */
464
464
struct bt_bap_stream_ops * ops ;
@@ -493,7 +493,8 @@ struct bt_bap_stream_ops {
493
493
* @param stream Stream object that has been configured.
494
494
* @param pref Remote QoS preferences.
495
495
*/
496
- void (* configured )(struct bt_bap_stream * stream , const struct bt_codec_qos_pref * pref );
496
+ void (* configured )(struct bt_bap_stream * stream ,
497
+ const struct bt_audio_codec_qos_pref * pref );
497
498
498
499
/**
499
500
* @brief Stream QoS set callback
@@ -614,12 +615,12 @@ void bt_bap_stream_cb_register(struct bt_bap_stream *stream, struct bt_bap_strea
614
615
* @param conn Connection object
615
616
* @param stream Stream object being configured
616
617
* @param ep Remote Audio Endpoint being configured
617
- * @param codec Codec configuration
618
+ * @param codec_cfg Codec configuration
618
619
*
619
620
* @return Allocated Audio Stream object or NULL in case of error.
620
621
*/
621
622
int bt_bap_stream_config (struct bt_conn * conn , struct bt_bap_stream * stream , struct bt_bap_ep * ep ,
622
- struct bt_codec * codec );
623
+ struct bt_audio_codec_cfg * codec_cfg );
623
624
624
625
/**
625
626
* @brief Reconfigure Audio Stream
@@ -630,11 +631,11 @@ int bt_bap_stream_config(struct bt_conn *conn, struct bt_bap_stream *stream, str
630
631
* This can only be done for unicast streams.
631
632
*
632
633
* @param stream Stream object being reconfigured
633
- * @param codec Codec configuration
634
+ * @param codec_cfg Codec configuration
634
635
*
635
636
* @return 0 in case of success or negative value in case of error.
636
637
*/
637
- int bt_bap_stream_reconfig (struct bt_bap_stream * stream , struct bt_codec * codec );
638
+ int bt_bap_stream_reconfig (struct bt_bap_stream * stream , struct bt_audio_codec_cfg * codec_cfg );
638
639
639
640
/**
640
641
* @brief Configure Audio Stream QoS
@@ -664,7 +665,7 @@ int bt_bap_stream_qos(struct bt_conn *conn, struct bt_bap_unicast_group *group);
664
665
*
665
666
* @return 0 in case of success or negative value in case of error.
666
667
*/
667
- int bt_bap_stream_enable (struct bt_bap_stream * stream , struct bt_codec_data * meta ,
668
+ int bt_bap_stream_enable (struct bt_bap_stream * stream , struct bt_audio_codec_data * meta ,
668
669
size_t meta_count );
669
670
670
671
/**
@@ -678,7 +679,7 @@ int bt_bap_stream_enable(struct bt_bap_stream *stream, struct bt_codec_data *met
678
679
*
679
680
* @return 0 in case of success or negative value in case of error.
680
681
*/
681
- int bt_bap_stream_metadata (struct bt_bap_stream * stream , struct bt_codec_data * meta ,
682
+ int bt_bap_stream_metadata (struct bt_bap_stream * stream , struct bt_audio_codec_data * meta ,
682
683
size_t meta_count );
683
684
684
685
/**
@@ -787,41 +788,41 @@ struct bt_bap_unicast_server_cb {
787
788
* Config callback is called whenever an endpoint is requested to be
788
789
* configured
789
790
*
790
- * @param[in] conn Connection object.
791
- * @param[in] ep Local Audio Endpoint being configured.
792
- * @param[in] dir Direction of the endpoint.
793
- * @param[in] codec Codec configuration.
794
- * @param[out] stream Pointer to stream that will be configured for the endpoint.
795
- * @param[out] pref Pointer to a QoS preference object that shall be populated with
796
- * values. Invalid values will reject the codec configuration request.
797
- * @param[out] rsp Object for the ASE operation response. Only used if the return
798
- * value is non-zero.
791
+ * @param[in] conn Connection object.
792
+ * @param[in] ep Local Audio Endpoint being configured.
793
+ * @param[in] dir Direction of the endpoint.
794
+ * @param[in] codec_cfg Codec configuration.
795
+ * @param[out] stream Pointer to stream that will be configured for the endpoint.
796
+ * @param[out] pref Pointer to a QoS preference object that shall be populated with
797
+ * values. Invalid values will reject the codec configuration request.
798
+ * @param[out] rsp Object for the ASE operation response. Only used if the return
799
+ * value is non-zero.
799
800
*
800
801
* @return 0 in case of success or negative value in case of error.
801
802
*/
802
803
int (* config )(struct bt_conn * conn , const struct bt_bap_ep * ep , enum bt_audio_dir dir ,
803
- const struct bt_codec * codec , struct bt_bap_stream * * stream ,
804
- struct bt_codec_qos_pref * const pref , struct bt_bap_ascs_rsp * rsp );
804
+ const struct bt_audio_codec_cfg * codec_cfg , struct bt_bap_stream * * stream ,
805
+ struct bt_audio_codec_qos_pref * const pref , struct bt_bap_ascs_rsp * rsp );
805
806
806
807
/**
807
808
* @brief Stream reconfig request callback
808
809
*
809
810
* Reconfig callback is called whenever an Audio Stream needs to be
810
811
* reconfigured with different codec configuration.
811
812
*
812
- * @param[in] stream Stream object being reconfigured.
813
- * @param[in] dir Direction of the endpoint.
814
- * @param[in] codec Codec configuration.
815
- * @param[out] pref Pointer to a QoS preference object that shall be populated with
816
- * values. Invalid values will reject the codec configuration request.
817
- * @param[out] rsp Object for the ASE operation response. Only used if the return
818
- * value is non-zero.
813
+ * @param[in] stream Stream object being reconfigured.
814
+ * @param[in] dir Direction of the endpoint.
815
+ * @param[in] codec_cfg Codec configuration.
816
+ * @param[out] pref Pointer to a QoS preference object that shall be populated with
817
+ * values. Invalid values will reject the codec configuration request.
818
+ * @param[out] rsp Object for the ASE operation response. Only used if the return
819
+ * value is non-zero.
819
820
*
820
821
* @return 0 in case of success or negative value in case of error.
821
822
*/
822
823
int (* reconfig )(struct bt_bap_stream * stream , enum bt_audio_dir dir ,
823
- const struct bt_codec * codec , struct bt_codec_qos_pref * const pref ,
824
- struct bt_bap_ascs_rsp * rsp );
824
+ const struct bt_audio_codec_cfg * codec_cfg ,
825
+ struct bt_audio_codec_qos_pref * const pref , struct bt_bap_ascs_rsp * rsp );
825
826
826
827
/**
827
828
* @brief Stream QoS request callback
@@ -836,7 +837,7 @@ struct bt_bap_unicast_server_cb {
836
837
*
837
838
* @return 0 in case of success or negative value in case of error.
838
839
*/
839
- int (* qos )(struct bt_bap_stream * stream , const struct bt_codec_qos * qos ,
840
+ int (* qos )(struct bt_bap_stream * stream , const struct bt_audio_codec_qos * qos ,
840
841
struct bt_bap_ascs_rsp * rsp );
841
842
842
843
/**
@@ -852,7 +853,7 @@ struct bt_bap_unicast_server_cb {
852
853
*
853
854
* @return 0 in case of success or negative value in case of error.
854
855
*/
855
- int (* enable )(struct bt_bap_stream * stream , const struct bt_codec_data * meta ,
856
+ int (* enable )(struct bt_bap_stream * stream , const struct bt_audio_codec_data * meta ,
856
857
size_t meta_count , struct bt_bap_ascs_rsp * rsp );
857
858
858
859
/**
@@ -881,7 +882,7 @@ struct bt_bap_unicast_server_cb {
881
882
*
882
883
* @return 0 in case of success or negative value in case of error.
883
884
*/
884
- int (* metadata )(struct bt_bap_stream * stream , const struct bt_codec_data * meta ,
885
+ int (* metadata )(struct bt_bap_stream * stream , const struct bt_audio_codec_data * meta ,
885
886
size_t meta_count , struct bt_bap_ascs_rsp * rsp );
886
887
887
888
/**
@@ -972,14 +973,14 @@ void bt_bap_unicast_server_foreach_ep(struct bt_conn *conn, bt_bap_ep_func_t fun
972
973
*
973
974
* @param conn Connection object
974
975
* @param stream Configured stream object to be attached to the ASE
975
- * @param codec Codec configuration
976
+ * @param codec_cfg Codec configuration
976
977
* @param qos_pref Audio Stream Quality of Service Preference
977
978
*
978
979
* @return 0 in case of success or negative value in case of error.
979
980
*/
980
981
int bt_bap_unicast_server_config_ase (struct bt_conn * conn , struct bt_bap_stream * stream ,
981
- struct bt_codec * codec ,
982
- const struct bt_codec_qos_pref * qos_pref );
982
+ struct bt_audio_codec_cfg * codec_cfg ,
983
+ const struct bt_audio_codec_qos_pref * qos_pref );
983
984
984
985
/** @} */ /* End of group bt_bap_unicast_server */
985
986
@@ -995,7 +996,7 @@ struct bt_bap_unicast_group_stream_param {
995
996
struct bt_bap_stream * stream ;
996
997
997
998
/** The QoS settings for the stream object. */
998
- struct bt_codec_qos * qos ;
999
+ struct bt_audio_codec_qos * qos ;
999
1000
};
1000
1001
1001
1002
/** @brief Parameter struct for the unicast group functions
@@ -1031,7 +1032,7 @@ struct bt_bap_unicast_group_param {
1031
1032
* @brief Create audio unicast group.
1032
1033
*
1033
1034
* Create a new audio unicast group with one or more audio streams as a unicast client. Streams in
1034
- * a unicast group shall share the same interval, framing and latency (see @ref bt_codec_qos ).
1035
+ * a unicast group shall share the same interval, framing and latency (see @ref bt_audio_codec_qos ).
1035
1036
*
1036
1037
* @param[in] param The unicast group create parameters.
1037
1038
* @param[out] unicast_group Pointer to the unicast group created.
@@ -1224,14 +1225,14 @@ struct bt_bap_unicast_client_cb {
1224
1225
* The @p codec is only valid while in the callback, so the values must be stored by the
1225
1226
* receiver if future use is wanted.
1226
1227
*
1227
- * @param conn Connection to the remote unicast server.
1228
- * @param dir The type of remote endpoints and capabilities discovered.
1229
- * @param codec Remote capabilities.
1228
+ * @param conn Connection to the remote unicast server.
1229
+ * @param dir The type of remote endpoints and capabilities discovered.
1230
+ * @param codec_cap Remote capabilities.
1230
1231
*
1231
1232
* If discovery procedure has complete both @p codec and @p ep are set to NULL.
1232
1233
*/
1233
1234
void (* pac_record )(struct bt_conn * conn , enum bt_audio_dir dir ,
1234
- const struct bt_codec * codec );
1235
+ const struct bt_audio_codec_cap * codec_cap );
1235
1236
1236
1237
/**
1237
1238
* @brief Remote Audio Stream Endoint (ASE) discovered
@@ -1295,18 +1296,18 @@ int bt_bap_unicast_client_discover(struct bt_conn *conn, enum bt_audio_dir dir);
1295
1296
struct bt_bap_base_bis_data {
1296
1297
/* Unique index of the BIS */
1297
1298
uint8_t index ;
1298
- #if defined(CONFIG_BT_CODEC_MAX_DATA_COUNT )
1299
+ #if defined(CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_COUNT )
1299
1300
/** Codec Specific Data count.
1300
1301
*
1301
- * Only valid if the data_count of struct bt_codec in the subgroup is 0
1302
+ * Only valid if the data_count of struct bt_audio_codec_cfg in the subgroup is 0
1302
1303
*/
1303
1304
size_t data_count ;
1304
1305
/** Codec Specific Data
1305
1306
*
1306
- * Only valid if the data_count of struct bt_codec in the subgroup is 0
1307
+ * Only valid if the data_count of struct bt_audio_codec_cfg in the subgroup is 0
1307
1308
*/
1308
- struct bt_codec_data data [CONFIG_BT_CODEC_MAX_DATA_COUNT ];
1309
- #endif /* CONFIG_BT_CODEC_MAX_DATA_COUNT */
1309
+ struct bt_audio_codec_data data [CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_COUNT ];
1310
+ #endif /* CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_COUNT */
1310
1311
};
1311
1312
1312
1313
struct bt_bap_base_subgroup {
@@ -1317,7 +1318,7 @@ struct bt_bap_base_subgroup {
1317
1318
* If the data_count of the codec is 0, then codec specific data may be
1318
1319
* found for each BIS in the bis_data.
1319
1320
*/
1320
- struct bt_codec codec ;
1321
+ struct bt_audio_codec_cfg codec_cfg ;
1321
1322
/* Array of BIS specific data for each BIS in the subgroup */
1322
1323
struct bt_bap_base_bis_data bis_data [BROADCAST_SNK_STREAM_CNT ];
1323
1324
};
@@ -1362,7 +1363,7 @@ struct bt_bap_broadcast_source_stream_param {
1362
1363
/** Audio stream */
1363
1364
struct bt_bap_stream * stream ;
1364
1365
1365
- #if CONFIG_BT_CODEC_MAX_DATA_COUNT > 0
1366
+ #if CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_COUNT > 0
1366
1367
/**
1367
1368
* @brief The number of elements in the @p data array.
1368
1369
*
@@ -1371,8 +1372,8 @@ struct bt_bap_broadcast_source_stream_param {
1371
1372
size_t data_count ;
1372
1373
1373
1374
/** BIS Codec Specific Configuration */
1374
- struct bt_codec_data * data ;
1375
- #endif /* CONFIG_BT_CODEC_MAX_DATA_COUNT > 0 */
1375
+ struct bt_audio_codec_data * data ;
1376
+ #endif /* CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_COUNT > 0 */
1376
1377
};
1377
1378
1378
1379
/** Broadcast Source subgroup parameters*/
@@ -1384,7 +1385,7 @@ struct bt_bap_broadcast_source_subgroup_param {
1384
1385
struct bt_bap_broadcast_source_stream_param * params ;
1385
1386
1386
1387
/** Subgroup Codec configuration. */
1387
- struct bt_codec * codec ;
1388
+ struct bt_audio_codec_cfg * codec_cfg ;
1388
1389
};
1389
1390
1390
1391
/** Broadcast Source create parameters */
@@ -1396,7 +1397,7 @@ struct bt_bap_broadcast_source_create_param {
1396
1397
struct bt_bap_broadcast_source_subgroup_param * params ;
1397
1398
1398
1399
/** Quality of Service configuration. */
1399
- struct bt_codec_qos * qos ;
1400
+ struct bt_audio_codec_qos * qos ;
1400
1401
1401
1402
/**
1402
1403
* @brief Broadcast Source packing mode.
@@ -1449,13 +1450,14 @@ int bt_bap_broadcast_source_create(struct bt_bap_broadcast_source_create_param *
1449
1450
* service parameters. This can only be done when the source is stopped.
1450
1451
*
1451
1452
* @param source Pointer to the broadcast source
1452
- * @param codec Codec configuration.
1453
+ * @param codec_cfg Codec configuration.
1453
1454
* @param qos Quality of Service configuration
1454
1455
*
1455
1456
* @return Zero on success or (negative) error code otherwise.
1456
1457
*/
1457
- int bt_bap_broadcast_source_reconfig (struct bt_bap_broadcast_source * source , struct bt_codec * codec ,
1458
- struct bt_codec_qos * qos );
1458
+ int bt_bap_broadcast_source_reconfig (struct bt_bap_broadcast_source * source ,
1459
+ struct bt_audio_codec_cfg * codec_cfg ,
1460
+ struct bt_audio_codec_qos * qos );
1459
1461
1460
1462
/**
1461
1463
* @brief Modify the metadata of an audio broadcast source.
@@ -1470,7 +1472,8 @@ int bt_bap_broadcast_source_reconfig(struct bt_bap_broadcast_source *source, str
1470
1472
* @return Zero on success or (negative) error code otherwise.
1471
1473
*/
1472
1474
int bt_bap_broadcast_source_update_metadata (struct bt_bap_broadcast_source * source ,
1473
- const struct bt_codec_data meta [], size_t meta_count );
1475
+ const struct bt_audio_codec_data meta [],
1476
+ size_t meta_count );
1474
1477
1475
1478
/**
1476
1479
* @brief Start audio broadcast source.
0 commit comments