- /* don't send tones, if not enabled or not connected */
- if (!p_r_tones
- && p_state != PORT_STATE_CONNECT)
+ /* send tones, if connected, or if early audio is enabled in proceeding/alerting state */
+ if (p_state != PORT_STATE_CONNECT
+ && !(p_r_earlyb
+ && (p_state == PORT_STATE_OUT_PROCEEDING
+ || p_state == PORT_STATE_OUT_ALERTING))
+ && !(p_r_tones
+ && (p_state == PORT_STATE_IN_PROCEEDING
+ || p_state == PORT_STATE_IN_ALERTING)))