printf("Error: unable to start tx streaming\r\n");
return (-1);
}
if ( skiq_start_rx_streaming(skiq->card_list[0],skiq_rx_hdl_A1) != 0 ){
printf("Error: unable to start rx streaming\r\n");
return (-1);
}
return 0;
}
int skiq_add_tx_el(skiq_state_t *skiq, openair0_timestamp ptimestamp,void **buff,int nsamps) {
TX_input_packet_q_t *txq = &skiq->txq;
int res=0;
#ifdef DEBUG_SKIQ_TX
printf(ANSI_COLOR_BLUE "skiq_add_tx_el: Locking TX mutex, time %llu\n" ANSI_COLOR_RESET,rdtsc_oai());
#endif
pthread_mutex_lock(&skiq->tx_mutex);
#ifdef DEBUG_SKIQ_TX
printf(ANSI_COLOR_BLUE "skiq_add_tx_el: Unlocked TX mutex, time %llu\n" ANSI_COLOR_RESET,rdtsc_oai());
#endif
if (((txq->tail+1) % SKIQ_MAX_TX_ELM) != txq->head) { // queue is not full
#ifdef DEBUG_SKIQ_TX
printf(ANSI_COLOR_BLUE "skiq_add_tx_el: Adding element at time %lu and size %d to txq (head %d, tail %d, SKIQ_MAX_TX_ELM %d), buff %p\n" ANSI_COLOR_RESET,
printf("SKIQ Error: failed to set Rx gain to %u (offset %d)\n",(uint32_t)openair0_cfg->rx_gain[0],(int32_t)openair0_cfg[0].rx_gain_offset[0]);
return(-1);
}
else {
printf("SKIQ Set rx gain to %u dB (offset %d)\n",(uint32_t)openair0_cfg->rx_gain[0]-(int32_t)openair0_cfg[0].rx_gain_offset[0],(int32_t)openair0_cfg[0].rx_gain_offset[0]);