Bluetooth: Audio: Remove the bt_vcp_aics API
The AICS functionality can be exercised using the bt_aics API instead. These functions did very little besides cluttering up the bt_vcp API. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
ce2b8f9fe1
commit
bfbb704c8e
8 changed files with 46 additions and 482 deletions
|
@ -385,147 +385,6 @@ int bt_vcp_vocs_description_get(struct bt_vcp *vcp, struct bt_vocs *inst);
|
||||||
int bt_vcp_vocs_description_set(struct bt_vcp *vcp, struct bt_vocs *inst,
|
int bt_vcp_vocs_description_set(struct bt_vcp *vcp, struct bt_vocs *inst,
|
||||||
const char *description);
|
const char *description);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Deactivates an Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* Audio Input Control Services are activated by default, but this will allow
|
|
||||||
* the server to deactivate an Audio Input Control Service.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_deactivate(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Activates an Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* Audio Input Control Services are activated by default, but this will allow
|
|
||||||
* the server to reactivate an Audio Input Control Service instance after it has
|
|
||||||
* been deactivated with @ref bt_vcp_aics_deactivate.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_activate(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Read the Audio Input Control Service input state.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_state_get(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Read the Audio Input Control Service gain settings.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_gain_setting_get(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Read the Audio Input Control Service input type.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_type_get(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Read the Audio Input Control Service input status.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_status_get(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Mute the Audio Input Control Service input.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_mute(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Unmute the Audio Input Control Service input.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_unmute(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set input gain to manual.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_manual_gain_set(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set the input gain to automatic.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_automatic_gain_set(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set the input gain.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
* @param gain The gain in dB to set (-128 to 127).
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_gain_set(struct bt_vcp *vcp, struct bt_aics *inst,
|
|
||||||
int8_t gain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Read the Audio Input Control Service description.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_description_get(struct bt_vcp *vcp, struct bt_aics *inst);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set the Audio Input Control Service description.
|
|
||||||
*
|
|
||||||
* @param vcp Volume Control Service instance pointer.
|
|
||||||
* @param inst Pointer to the Audio Input Control Service instance.
|
|
||||||
* @param description The description to set.
|
|
||||||
*
|
|
||||||
* @return 0 if success, errno on failure.
|
|
||||||
*/
|
|
||||||
int bt_vcp_aics_description_set(struct bt_vcp *vcp, struct bt_aics *inst,
|
|
||||||
const char *description);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Registers the callbacks used by the Volume Control Service client.
|
* @brief Registers the callbacks used by the Volume Control Service client.
|
||||||
*
|
*
|
||||||
|
|
|
@ -44,23 +44,6 @@ static bool valid_vocs_inst(struct bt_vcp *vcp, struct bt_vocs *vocs)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool valid_aics_inst(struct bt_vcp *vcp, struct bt_aics *aics)
|
|
||||||
{
|
|
||||||
if (aics == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CONFIG_BT_VCP)
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(vcp->srv.aics_insts); i++) {
|
|
||||||
if (vcp->srv.aics_insts[i] == aics) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_BT_VCP */
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CONFIG_BT_VCP)
|
#if defined(CONFIG_BT_VCP)
|
||||||
|
|
||||||
#define VOLUME_DOWN(current_vol) \
|
#define VOLUME_DOWN(current_vol) \
|
||||||
|
@ -417,45 +400,6 @@ int bt_vcp_register(struct bt_vcp_register_param *param, struct bt_vcp **vcp)
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bt_vcp_aics_deactivate(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
CHECKIF(inst == NULL) {
|
|
||||||
LOG_DBG("NULL aics instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!valid_aics_inst(vcp, inst)) {
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return bt_aics_deactivate(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_activate(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
CHECKIF(inst == NULL) {
|
|
||||||
LOG_DBG("NULL aics instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!valid_aics_inst(vcp, inst)) {
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return bt_aics_activate(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* CONFIG_BT_VCP */
|
#endif /* CONFIG_BT_VCP */
|
||||||
|
|
||||||
int bt_vcp_included_get(struct bt_vcp *vcp, struct bt_vcp_included *included)
|
int bt_vcp_included_get(struct bt_vcp *vcp, struct bt_vcp_included *included)
|
||||||
|
@ -833,214 +777,3 @@ int bt_vcp_vocs_description_set(struct bt_vcp *vcp, struct bt_vocs *inst,
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bt_vcp_aics_state_get(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_state_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_state_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_gain_setting_get(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_gain_setting_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_gain_setting_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_type_get(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_type_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_type_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_status_get(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_status_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_status_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_unmute(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_unmute(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_unmute(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_mute(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_mute(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_mute(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_manual_gain_set(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_manual_gain_set(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_manual_gain_set(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_automatic_gain_set(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_automatic_gain_set(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_automatic_gain_set(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_gain_set(struct bt_vcp *vcp, struct bt_aics *inst,
|
|
||||||
int8_t gain)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_gain_set(inst, gain);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_gain_set(inst, gain);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_description_get(struct bt_vcp *vcp, struct bt_aics *inst)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_description_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_description_get(inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bt_vcp_aics_description_set(struct bt_vcp *vcp, struct bt_aics *inst,
|
|
||||||
const char *description)
|
|
||||||
{
|
|
||||||
CHECKIF(vcp == NULL) {
|
|
||||||
LOG_DBG("NULL vcp instance");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_CLIENT_AICS) &&
|
|
||||||
bt_vcp_client_valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_description_set(inst, description);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_VCP_AICS) && valid_aics_inst(vcp, inst)) {
|
|
||||||
return bt_aics_description_set(inst, description);
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
|
@ -61,33 +61,6 @@ bool bt_vcp_client_valid_vocs_inst(struct bt_vcp *vcp, struct bt_vocs *vocs)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bt_vcp_client_valid_aics_inst(struct bt_vcp *vcp, struct bt_aics *aics)
|
|
||||||
{
|
|
||||||
if (vcp == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!vcp->client_instance) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vcp->cli.conn == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aics == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(vcp->cli.aics); i++) {
|
|
||||||
if (vcp->cli.aics[i] == aics) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint8_t vcp_client_notify_handler(struct bt_conn *conn,
|
static uint8_t vcp_client_notify_handler(struct bt_conn *conn,
|
||||||
struct bt_gatt_subscribe_params *params,
|
struct bt_gatt_subscribe_params *params,
|
||||||
const void *data, uint16_t length)
|
const void *data, uint16_t length)
|
||||||
|
|
|
@ -106,5 +106,4 @@ int bt_vcp_client_unmute(struct bt_vcp *vcp);
|
||||||
int bt_vcp_client_mute(struct bt_vcp *vcp);
|
int bt_vcp_client_mute(struct bt_vcp *vcp);
|
||||||
|
|
||||||
bool bt_vcp_client_valid_vocs_inst(struct bt_vcp *vcp, struct bt_vocs *vocs);
|
bool bt_vcp_client_valid_vocs_inst(struct bt_vcp *vcp, struct bt_vocs *vocs);
|
||||||
bool bt_vcp_client_valid_aics_inst(struct bt_vcp *vcp, struct bt_aics *aics);
|
|
||||||
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_VCP_INTERNAL_*/
|
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_VCP_INTERNAL_*/
|
||||||
|
|
|
@ -529,7 +529,7 @@ static int cmd_vcs_aics_input_state_get(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_state_get(NULL, vcp_included.aics[index]);
|
result = bt_aics_state_get(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -549,7 +549,7 @@ static int cmd_vcs_aics_gain_setting_get(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_gain_setting_get(NULL, vcp_included.aics[index]);
|
result = bt_aics_gain_setting_get(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -569,7 +569,7 @@ static int cmd_vcs_aics_input_type_get(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_type_get(NULL, vcp_included.aics[index]);
|
result = bt_aics_type_get(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -589,7 +589,7 @@ static int cmd_vcs_aics_input_status_get(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_status_get(NULL, vcp_included.aics[index]);
|
result = bt_aics_status_get(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -609,7 +609,7 @@ static int cmd_vcs_aics_input_unmute(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_unmute(NULL, vcp_included.aics[index]);
|
result = bt_aics_unmute(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -629,7 +629,7 @@ static int cmd_vcs_aics_input_mute(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_mute(NULL, vcp_included.aics[index]);
|
result = bt_aics_mute(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ static int cmd_vcs_aics_manual_input_gain_set(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_manual_gain_set(NULL, vcp_included.aics[index]);
|
result = bt_aics_manual_gain_set(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -669,7 +669,7 @@ static int cmd_vcs_aics_automatic_input_gain_set(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_automatic_gain_set(NULL, vcp_included.aics[index]);
|
result = bt_aics_automatic_gain_set(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -696,7 +696,7 @@ static int cmd_vcs_aics_gain_set(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_gain_set(NULL, vcp_included.aics[index], gain);
|
result = bt_aics_gain_set(vcp_included.aics[index], gain);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -716,7 +716,7 @@ static int cmd_vcs_aics_input_description_get(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_description_get(NULL, vcp_included.aics[index]);
|
result = bt_aics_description_get(vcp_included.aics[index]);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -737,7 +737,7 @@ static int cmd_vcs_aics_input_description_set(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_description_set(NULL, vcp_included.aics[index],
|
result = bt_aics_description_set(vcp_included.aics[index],
|
||||||
description);
|
description);
|
||||||
if (result) {
|
if (result) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
|
|
|
@ -706,7 +706,7 @@ static int cmd_vcp_client_aics_input_state_get(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_state_get(vcp, vcp_included.aics[index]);
|
result = bt_aics_state_get(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -731,7 +731,7 @@ static int cmd_vcp_client_aics_gain_setting_get(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_gain_setting_get(vcp, vcp_included.aics[index]);
|
result = bt_aics_gain_setting_get(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -756,7 +756,7 @@ static int cmd_vcp_client_aics_input_type_get(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_type_get(vcp, vcp_included.aics[index]);
|
result = bt_aics_type_get(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -781,7 +781,7 @@ static int cmd_vcp_client_aics_input_status_get(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_status_get(vcp, vcp_included.aics[index]);
|
result = bt_aics_status_get(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -806,7 +806,7 @@ static int cmd_vcp_client_aics_input_unmute(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_unmute(vcp, vcp_included.aics[index]);
|
result = bt_aics_unmute(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -831,7 +831,7 @@ static int cmd_vcp_client_aics_input_mute(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_mute(vcp, vcp_included.aics[index]);
|
result = bt_aics_mute(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -856,7 +856,7 @@ static int cmd_vcp_client_aics_manual_input_gain_set(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_manual_gain_set(vcp, vcp_included.aics[index]);
|
result = bt_aics_manual_gain_set(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -881,7 +881,7 @@ static int cmd_vcp_client_aics_auto_input_gain_set(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_automatic_gain_set(vcp, vcp_included.aics[index]);
|
result = bt_aics_automatic_gain_set(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -913,7 +913,7 @@ static int cmd_vcp_client_aics_gain_set(const struct shell *sh, size_t argc,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_gain_set(vcp, vcp_included.aics[index], gain);
|
result = bt_aics_gain_set(vcp_included.aics[index], gain);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -938,7 +938,7 @@ static int cmd_vcp_client_aics_input_description_get(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_description_get(vcp, vcp_included.aics[index]);
|
result = bt_aics_description_get(vcp_included.aics[index]);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
}
|
}
|
||||||
|
@ -964,7 +964,7 @@ static int cmd_vcp_client_aics_input_description_set(const struct shell *sh,
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = bt_vcp_aics_description_set(vcp, vcp_included.aics[index],
|
result = bt_aics_description_set(vcp_included.aics[index],
|
||||||
description);
|
description);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
shell_print(sh, "Fail: %d", result);
|
shell_print(sh, "Fail: %d", result);
|
||||||
|
|
|
@ -310,7 +310,7 @@ static int test_aics(void)
|
||||||
|
|
||||||
printk("Getting AICS state\n");
|
printk("Getting AICS state\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_state_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_state_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS state (err %d)\n", err);
|
FAIL("Could not get AICS state (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -320,7 +320,7 @@ static int test_aics(void)
|
||||||
|
|
||||||
printk("Getting AICS gain setting\n");
|
printk("Getting AICS gain setting\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_gain_setting_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_gain_setting_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS gain setting (err %d)\n", err);
|
FAIL("Could not get AICS gain setting (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -331,7 +331,7 @@ static int test_aics(void)
|
||||||
printk("Getting AICS input type\n");
|
printk("Getting AICS input type\n");
|
||||||
expected_input_type = BT_AICS_INPUT_TYPE_DIGITAL;
|
expected_input_type = BT_AICS_INPUT_TYPE_DIGITAL;
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_type_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_type_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS input type (err %d)\n", err);
|
FAIL("Could not get AICS input type (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -342,7 +342,7 @@ static int test_aics(void)
|
||||||
|
|
||||||
printk("Getting AICS status\n");
|
printk("Getting AICS status\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_status_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_status_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS status (err %d)\n", err);
|
FAIL("Could not get AICS status (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -352,7 +352,7 @@ static int test_aics(void)
|
||||||
|
|
||||||
printk("Getting AICS description\n");
|
printk("Getting AICS description\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_description_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_description_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS description (err %d)\n", err);
|
FAIL("Could not get AICS description (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -363,7 +363,7 @@ static int test_aics(void)
|
||||||
printk("Setting AICS mute\n");
|
printk("Setting AICS mute\n");
|
||||||
expected_input_mute = BT_AICS_STATE_MUTED;
|
expected_input_mute = BT_AICS_STATE_MUTED;
|
||||||
g_write_complete = g_cb = false;
|
g_write_complete = g_cb = false;
|
||||||
err = bt_vcp_aics_mute(vcp, vcp_included.aics[0]);
|
err = bt_aics_mute(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS mute (err %d)\n", err);
|
FAIL("Could not set AICS mute (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -375,7 +375,7 @@ static int test_aics(void)
|
||||||
printk("Setting AICS unmute\n");
|
printk("Setting AICS unmute\n");
|
||||||
expected_input_mute = BT_AICS_STATE_UNMUTED;
|
expected_input_mute = BT_AICS_STATE_UNMUTED;
|
||||||
g_write_complete = g_cb = false;
|
g_write_complete = g_cb = false;
|
||||||
err = bt_vcp_aics_unmute(vcp, vcp_included.aics[0]);
|
err = bt_aics_unmute(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS unmute (err %d)\n", err);
|
FAIL("Could not set AICS unmute (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -387,7 +387,7 @@ static int test_aics(void)
|
||||||
printk("Setting AICS auto mode\n");
|
printk("Setting AICS auto mode\n");
|
||||||
expected_mode = BT_AICS_MODE_AUTO;
|
expected_mode = BT_AICS_MODE_AUTO;
|
||||||
g_write_complete = g_cb = false;
|
g_write_complete = g_cb = false;
|
||||||
err = bt_vcp_aics_automatic_gain_set(vcp, vcp_included.aics[0]);
|
err = bt_aics_automatic_gain_set(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS auto mode (err %d)\n", err);
|
FAIL("Could not set AICS auto mode (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -398,7 +398,7 @@ static int test_aics(void)
|
||||||
printk("Setting AICS manual mode\n");
|
printk("Setting AICS manual mode\n");
|
||||||
expected_mode = BT_AICS_MODE_MANUAL;
|
expected_mode = BT_AICS_MODE_MANUAL;
|
||||||
g_write_complete = g_cb = false;
|
g_write_complete = g_cb = false;
|
||||||
err = bt_vcp_aics_manual_gain_set(vcp, vcp_included.aics[0]);
|
err = bt_aics_manual_gain_set(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS manual mode (err %d)\n", err);
|
FAIL("Could not set AICS manual mode (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -409,7 +409,7 @@ static int test_aics(void)
|
||||||
printk("Setting AICS gain\n");
|
printk("Setting AICS gain\n");
|
||||||
expected_gain = g_aics_gain_max - 1;
|
expected_gain = g_aics_gain_max - 1;
|
||||||
g_write_complete = g_cb = false;
|
g_write_complete = g_cb = false;
|
||||||
err = bt_vcp_aics_gain_set(vcp, vcp_included.aics[0], expected_gain);
|
err = bt_aics_gain_set(vcp_included.aics[0], expected_gain);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS gain (err %d)\n", err);
|
FAIL("Could not set AICS gain (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -422,7 +422,7 @@ static int test_aics(void)
|
||||||
sizeof(expected_aics_desc));
|
sizeof(expected_aics_desc));
|
||||||
expected_aics_desc[sizeof(expected_aics_desc) - 1] = '\0';
|
expected_aics_desc[sizeof(expected_aics_desc) - 1] = '\0';
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_description_set(vcp, vcp_included.aics[0],
|
err = bt_aics_description_set(vcp_included.aics[0],
|
||||||
expected_aics_desc);
|
expected_aics_desc);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS Description (err %d)\n", err);
|
FAIL("Could not set AICS Description (err %d)\n", err);
|
||||||
|
|
|
@ -218,7 +218,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Deactivating AICS\n");
|
printk("Deactivating AICS\n");
|
||||||
expected_aics_active = false;
|
expected_aics_active = false;
|
||||||
err = bt_vcp_aics_deactivate(vcp, vcp_included.aics[0]);
|
err = bt_aics_deactivate(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not deactivate AICS (err %d)\n", err);
|
FAIL("Could not deactivate AICS (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -228,7 +228,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Activating AICS\n");
|
printk("Activating AICS\n");
|
||||||
expected_aics_active = true;
|
expected_aics_active = true;
|
||||||
err = bt_vcp_aics_activate(vcp, vcp_included.aics[0]);
|
err = bt_aics_activate(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not activate AICS (err %d)\n", err);
|
FAIL("Could not activate AICS (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -238,7 +238,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Getting AICS state\n");
|
printk("Getting AICS state\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_state_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_state_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS state (err %d)\n", err);
|
FAIL("Could not get AICS state (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -248,7 +248,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Getting AICS gain setting\n");
|
printk("Getting AICS gain setting\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_gain_setting_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_gain_setting_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS gain setting (err %d)\n", err);
|
FAIL("Could not get AICS gain setting (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -258,7 +258,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Getting AICS input type\n");
|
printk("Getting AICS input type\n");
|
||||||
expected_input_type = BT_AICS_INPUT_TYPE_DIGITAL;
|
expected_input_type = BT_AICS_INPUT_TYPE_DIGITAL;
|
||||||
err = bt_vcp_aics_type_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_type_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS input type (err %d)\n", err);
|
FAIL("Could not get AICS input type (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -269,7 +269,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Getting AICS status\n");
|
printk("Getting AICS status\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_status_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_status_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS status (err %d)\n", err);
|
FAIL("Could not get AICS status (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -279,7 +279,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Getting AICS description\n");
|
printk("Getting AICS description\n");
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_description_get(vcp, vcp_included.aics[0]);
|
err = bt_aics_description_get(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not get AICS description (err %d)\n", err);
|
FAIL("Could not get AICS description (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -289,7 +289,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Setting AICS mute\n");
|
printk("Setting AICS mute\n");
|
||||||
expected_input_mute = BT_AICS_STATE_MUTED;
|
expected_input_mute = BT_AICS_STATE_MUTED;
|
||||||
err = bt_vcp_aics_mute(vcp, vcp_included.aics[0]);
|
err = bt_aics_mute(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS mute (err %d)\n", err);
|
FAIL("Could not set AICS mute (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -299,7 +299,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Setting AICS unmute\n");
|
printk("Setting AICS unmute\n");
|
||||||
expected_input_mute = BT_AICS_STATE_UNMUTED;
|
expected_input_mute = BT_AICS_STATE_UNMUTED;
|
||||||
err = bt_vcp_aics_unmute(vcp, vcp_included.aics[0]);
|
err = bt_aics_unmute(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS unmute (err %d)\n", err);
|
FAIL("Could not set AICS unmute (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -309,7 +309,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Setting AICS auto mode\n");
|
printk("Setting AICS auto mode\n");
|
||||||
expected_mode = BT_AICS_MODE_AUTO;
|
expected_mode = BT_AICS_MODE_AUTO;
|
||||||
err = bt_vcp_aics_automatic_gain_set(vcp, vcp_included.aics[0]);
|
err = bt_aics_automatic_gain_set(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS auto mode (err %d)\n", err);
|
FAIL("Could not set AICS auto mode (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -319,7 +319,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Setting AICS manual mode\n");
|
printk("Setting AICS manual mode\n");
|
||||||
expected_mode = BT_AICS_MODE_MANUAL;
|
expected_mode = BT_AICS_MODE_MANUAL;
|
||||||
err = bt_vcp_aics_manual_gain_set(vcp, vcp_included.aics[0]);
|
err = bt_aics_manual_gain_set(vcp_included.aics[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS manual mode (err %d)\n", err);
|
FAIL("Could not set AICS manual mode (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -329,7 +329,7 @@ static int test_aics_standalone(void)
|
||||||
|
|
||||||
printk("Setting AICS gain\n");
|
printk("Setting AICS gain\n");
|
||||||
expected_gain = g_aics_gain_max - 1;
|
expected_gain = g_aics_gain_max - 1;
|
||||||
err = bt_vcp_aics_gain_set(vcp, vcp_included.aics[0], expected_gain);
|
err = bt_aics_gain_set(vcp_included.aics[0], expected_gain);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS gain (err %d)\n", err);
|
FAIL("Could not set AICS gain (err %d)\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -342,7 +342,7 @@ static int test_aics_standalone(void)
|
||||||
sizeof(expected_aics_desc));
|
sizeof(expected_aics_desc));
|
||||||
expected_aics_desc[sizeof(expected_aics_desc) - 1] = '\0';
|
expected_aics_desc[sizeof(expected_aics_desc) - 1] = '\0';
|
||||||
g_cb = false;
|
g_cb = false;
|
||||||
err = bt_vcp_aics_description_set(vcp, vcp_included.aics[0],
|
err = bt_aics_description_set(vcp_included.aics[0],
|
||||||
expected_aics_desc);
|
expected_aics_desc);
|
||||||
if (err) {
|
if (err) {
|
||||||
FAIL("Could not set AICS Description (err %d)\n", err);
|
FAIL("Could not set AICS Description (err %d)\n", err);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue