/** * Stop the audio playback and recording * * @param a Audio object */ void audio_stop(struct audio *a) { if (!a) return; stop_tx(&a->tx, a); stop_rx(&a->rx); }
/** @brief function for the @b stop method in a link_device instance @param ld the pointer to a link_device instance @remark It must be invoked after mc->state has already been changed to not STATE_ONLINE. */ static void mem_close_tx(struct link_device *ld) { struct mem_link_device *mld = to_mem_link_device(ld); unsigned long flags; spin_lock_irqsave(&ld->lock, flags); ld->state = LINK_STATE_OFFLINE; spin_unlock_irqrestore(&ld->lock, flags); stop_tx(mld); }
void RadioSi446x::ptt_off() { stop_tx(); si446x_powerlevel = 0; // turn off the blue LED (GPIO2) char gpio_pin_cfg_command0[] = {0x13, 0x02, 0x02, 0x02, 0x02, 0x08, 0x0b, 0x00}; // Set all GPIOs LOW; Link NIRQ to CTS; Link SDO to MISO; Max drive strength SendCmdReceiveAnswer(8, 1, gpio_pin_cfg_command0); digitalWrite(RADIO_SDN_PIN, HIGH); // active high = shutdown //digitalWrite(VCXO_ENABLE_PIN, LOW); //keep enabled for now }
static void mem_close_tx(struct link_device *ld) { struct mem_link_device *mld = to_mem_link_device(ld); struct modem_ctl *mc = ld->mc; unsigned long flags; spin_lock_irqsave(&ld->lock, flags); ld->state = LINK_STATE_OFFLINE; spin_unlock_irqrestore(&ld->lock, flags); if (timer_pending(&mc->crash_ack_timer)) del_timer(&mc->crash_ack_timer); stop_tx(mld); purge_txq(mld); }
void mem_handle_cp_crash(struct mem_link_device *mld, enum modem_state state) { struct link_device *ld = &mld->link_dev; struct modem_ctl *mc = ld->mc; #ifdef CONFIG_LINK_POWER_MANAGEMENT if (mld->stop_pm) mld->stop_pm(mld); #endif /* Disable normal IPC */ set_magic(mld, MEM_CRASH_MAGIC); set_access(mld, 0); stop_tx(mld); purge_txq(mld); if (cp_online(mc)) set_modem_state(mld, state); atomic_set(&mc->forced_cp_crash, 0); }
static void audio_destructor(void *arg) { struct audio *a = arg; stop_tx(&a->tx, a); stop_rx(&a->rx); mem_deref(a->tx.enc); mem_deref(a->rx.dec); mem_deref(a->tx.aubuf); mem_deref(a->tx.mb); mem_deref(a->tx.sampv); mem_deref(a->rx.sampv); mem_deref(a->rx.aubuf); mem_deref(a->tx.sampv_rs); mem_deref(a->rx.sampv_rs); list_flush(&a->tx.filtl); list_flush(&a->rx.filtl); mem_deref(a->strm); mem_deref(a->telev); }