@@ -124,9 +124,9 @@ typedef struct uac_host_device {
124124typedef enum {
125125 UAC_INTERFACE_STATE_NOT_INITIALIZED = 0x00 , /*!< UAC Interface not initialized */
126126 UAC_INTERFACE_STATE_IDLE , /*!< UAC Interface has been opened but not started */
127- UAC_INTERFACE_STATE_READY , /*!< UAC Interface has started but stream is suspended */
127+ UAC_INTERFACE_STATE_READY , /*!< UAC Interface has started but stream is paused */
128128 UAC_INTERFACE_STATE_ACTIVE , /*!< UAC Interface is streaming */
129- UAC_INTERFACE_STATE_SUSPENDING , /*!< UAC Interface is suspending */
129+ UAC_INTERFACE_STATE_PAUSING , /*!< UAC Interface is pausing */
130130} uac_iface_state_t ;
131131
132132/**
@@ -1332,19 +1332,19 @@ static void stream_tx_xfer_done(usb_transfer_t *out_xfer)
13321332}
13331333
13341334/**
1335- * @brief Suspend active interface, the interface will be in READY state
1335+ * @brief Pause active interface, the interface will be in READY state
13361336 *
13371337 * @param[in] iface Pointer to Interface structure
13381338 * @return esp_err_t
13391339 */
1340- static esp_err_t uac_host_interface_suspend (uac_iface_t * iface )
1340+ static esp_err_t uac_host_interface_pause (uac_iface_t * iface )
13411341{
13421342 UAC_RETURN_ON_INVALID_ARG (iface );
13431343 UAC_RETURN_ON_INVALID_ARG (iface -> parent );
13441344 UAC_RETURN_ON_INVALID_ARG (iface -> free_xfer_list );
13451345 UAC_RETURN_ON_FALSE (is_interface_in_list (iface ), ESP_ERR_NOT_FOUND , "Interface handle not found" );
13461346 UAC_RETURN_ON_FALSE ((UAC_INTERFACE_STATE_ACTIVE == iface -> state ), ESP_ERR_INVALID_STATE , "Interface wrong state" );
1347- iface -> state = UAC_INTERFACE_STATE_SUSPENDING ;
1347+ iface -> state = UAC_INTERFACE_STATE_PAUSING ;
13481348
13491349 // Set Interface alternate setting to 0
13501350 usb_setup_packet_t usb_request ;
@@ -1355,9 +1355,9 @@ static esp_err_t uac_host_interface_suspend(uac_iface_t *iface)
13551355 memcpy (& uac_request , & usb_request , sizeof (usb_setup_packet_t ));
13561356 esp_err_t ret = uac_cs_request_set (iface -> parent , & uac_request );
13571357 if (ret != ESP_OK ) {
1358- ESP_LOGW (TAG , "Suspend Interface %d-%d Failed" , iface -> dev_info .iface_num , 0 );
1358+ ESP_LOGW (TAG , "Pause Interface %d-%d Failed" , iface -> dev_info .iface_num , 0 );
13591359 } else {
1360- ESP_LOGI (TAG , "Suspend Interface %d-%d" , iface -> dev_info .iface_num , 0 );
1360+ ESP_LOGI (TAG , "Pause Interface %d-%d" , iface -> dev_info .iface_num , 0 );
13611361 }
13621362
13631363 uint8_t ep_addr = iface -> iface_alt [iface -> cur_alt ].ep_addr ;
@@ -1382,12 +1382,12 @@ static esp_err_t uac_host_interface_suspend(uac_iface_t *iface)
13821382}
13831383
13841384/**
1385- * @brief Resume suspended interface, the interface will be in ACTIVE state
1385+ * @brief Unpause paused interface, the interface will be in ACTIVE state
13861386 *
13871387 * @param[in] iface Pointer to Interface structure
13881388 * @return esp_err_t
13891389 */
1390- static esp_err_t uac_host_interface_resume (uac_iface_t * iface )
1390+ static esp_err_t uac_host_interface_unpause (uac_iface_t * iface )
13911391{
13921392 UAC_RETURN_ON_INVALID_ARG (iface );
13931393 UAC_RETURN_ON_INVALID_ARG (iface -> parent );
@@ -1403,7 +1403,7 @@ static esp_err_t uac_host_interface_resume(uac_iface_t *iface)
14031403 uac_cs_request_t uac_request = {0 };
14041404 memcpy (& uac_request , & usb_request , sizeof (usb_setup_packet_t ));
14051405 UAC_RETURN_ON_ERROR (uac_cs_request_set (iface -> parent , & uac_request ), "Unable to set Interface alternate" );
1406- ESP_LOGI (TAG , "Resume Interface %d-%d" , iface -> dev_info .iface_num , iface -> cur_alt + 1 );
1406+ ESP_LOGI (TAG , "Unpause Interface %d-%d" , iface -> dev_info .iface_num , iface -> cur_alt + 1 );
14071407 // Set endpoint frequency control
14081408 if (iface -> iface_alt [iface -> cur_alt ].freq_ctrl_supported ) {
14091409 ESP_LOGI (TAG , "Set EP %d frequency %" PRIu32 , iface -> iface_alt [iface -> cur_alt ].ep_addr & USB_B_ENDPOINT_ADDRESS_EP_NUM_MASK , iface -> iface_alt [iface -> cur_alt ].cur_sampling_freq );
@@ -2201,7 +2201,7 @@ esp_err_t uac_host_device_close(uac_host_device_handle_t uac_dev_handle)
22012201
22022202 UAC_RETURN_ON_ERROR (uac_host_interface_try_lock (uac_iface , DEFAULT_CTRL_XFER_TIMEOUT_MS ), "UAC Interface is busy by other task" );
22032203 if (UAC_INTERFACE_STATE_ACTIVE == uac_iface -> state ) {
2204- UAC_GOTO_ON_ERROR (uac_host_interface_suspend (uac_iface ), "Unable to disable UAC Interface" );
2204+ UAC_GOTO_ON_ERROR (uac_host_interface_pause (uac_iface ), "Unable to disable UAC Interface" );
22052205 }
22062206
22072207 if (UAC_INTERFACE_STATE_READY == uac_iface -> state ) {
@@ -2372,8 +2372,8 @@ esp_err_t uac_host_device_start(uac_host_device_handle_t uac_dev_handle, const u
23722372 UAC_GOTO_ON_ERROR (uac_host_interface_claim_and_prepare_transfer (iface ), "Unable to claim Interface" );
23732373 iface_claimed = true;
23742374
2375- if (!(iface -> flags & FLAG_STREAM_SUSPEND_AFTER_START )) {
2376- UAC_GOTO_ON_ERROR (uac_host_interface_resume (iface ), "Unable to enable UAC Interface" );
2375+ if (!(iface -> flags & FLAG_STREAM_PAUSE_AFTER_START )) {
2376+ UAC_GOTO_ON_ERROR (uac_host_interface_unpause (iface ), "Unable to enable UAC Interface" );
23772377 }
23782378 uac_host_interface_unlock (iface );
23792379 return ESP_OK ;
@@ -2386,7 +2386,7 @@ esp_err_t uac_host_device_start(uac_host_device_handle_t uac_dev_handle, const u
23862386 return ret ;
23872387}
23882388
2389- esp_err_t uac_host_device_suspend (uac_host_device_handle_t uac_dev_handle )
2389+ esp_err_t uac_host_device_pause (uac_host_device_handle_t uac_dev_handle )
23902390{
23912391 uac_iface_t * iface = get_iface_by_handle (uac_dev_handle );
23922392 UAC_RETURN_ON_INVALID_ARG (iface );
@@ -2398,7 +2398,7 @@ esp_err_t uac_host_device_suspend(uac_host_device_handle_t uac_dev_handle)
23982398 }
23992399 esp_err_t ret = ESP_OK ;
24002400 UAC_GOTO_ON_FALSE ((UAC_INTERFACE_STATE_ACTIVE == iface -> state ), ESP_ERR_INVALID_STATE , "device not active" );
2401- UAC_GOTO_ON_ERROR (uac_host_interface_suspend (iface ), "Unable to disable UAC Interface" );
2401+ UAC_GOTO_ON_ERROR (uac_host_interface_pause (iface ), "Unable to disable UAC Interface" );
24022402
24032403 uac_host_interface_unlock (iface );
24042404 return ESP_OK ;
@@ -2408,7 +2408,7 @@ esp_err_t uac_host_device_suspend(uac_host_device_handle_t uac_dev_handle)
24082408 return ret ;
24092409}
24102410
2411- esp_err_t uac_host_device_resume (uac_host_device_handle_t uac_dev_handle )
2411+ esp_err_t uac_host_device_unpause (uac_host_device_handle_t uac_dev_handle )
24122412{
24132413 uac_iface_t * iface = get_iface_by_handle (uac_dev_handle );
24142414 UAC_RETURN_ON_INVALID_ARG (iface );
@@ -2421,7 +2421,7 @@ esp_err_t uac_host_device_resume(uac_host_device_handle_t uac_dev_handle)
24212421
24222422 esp_err_t ret = ESP_OK ;
24232423 UAC_GOTO_ON_FALSE ((UAC_INTERFACE_STATE_READY == iface -> state ), ESP_ERR_INVALID_STATE , "device not ready" );
2424- UAC_GOTO_ON_ERROR (uac_host_interface_resume (iface ), "Unable to enable UAC Interface" );
2424+ UAC_GOTO_ON_ERROR (uac_host_interface_unpause (iface ), "Unable to enable UAC Interface" );
24252425
24262426 uac_host_interface_unlock (iface );
24272427 return ESP_OK ;
@@ -2439,7 +2439,7 @@ esp_err_t uac_host_device_stop(uac_host_device_handle_t uac_dev_handle)
24392439 esp_err_t ret = ESP_OK ;
24402440 UAC_RETURN_ON_ERROR (uac_host_interface_try_lock (iface , DEFAULT_CTRL_XFER_TIMEOUT_MS ), "Unable to lock UAC Interface" );
24412441 if (UAC_INTERFACE_STATE_ACTIVE == iface -> state ) {
2442- UAC_GOTO_ON_ERROR (uac_host_interface_suspend (iface ), "Unable to disable UAC Interface" );
2442+ UAC_GOTO_ON_ERROR (uac_host_interface_pause (iface ), "Unable to disable UAC Interface" );
24432443 }
24442444
24452445 if (UAC_INTERFACE_STATE_READY == iface -> state ) {
0 commit comments