diff --git a/INSTALL b/INSTALL index 283ff32c..e274599d 100644 --- a/INSTALL +++ b/INSTALL @@ -48,9 +48,8 @@ Fedora (18, 19): python3-devel qt-devel boost-devel check libfftw3-devel Arch: - $ pacman -S git gcc make cmake autoconf autoconf-archive automake libtool \ - pkg-config glib2 glibmm libzip libusb check - python boost qt5 qt5-base qt5-svg libfftw3 + $ pacman -S base-devel git cmake glib2 libzip libusb check + python boost qt5 fftw Step3: Building diff --git a/libsigrok4DSL/hardware/DSL/dslogic.c b/libsigrok4DSL/hardware/DSL/dslogic.c index 8221f663..dd8adf2c 100644 --- a/libsigrok4DSL/hardware/DSL/dslogic.c +++ b/libsigrok4DSL/hardware/DSL/dslogic.c @@ -2400,21 +2400,8 @@ static int receive_data(int fd, int revents, const struct sr_dev_inst *sdi) libusb_handle_events_timeout_completed(drvc->sr_ctx->libusb_ctx, &tv, &completed); if (devc->status == DSL_FINISH) { - if (libusb_try_lock_events(drvc->sr_ctx->libusb_ctx) == 0) { - if (libusb_event_handling_ok(drvc->sr_ctx->libusb_ctx)) { - usb = ((struct sr_dev_inst *)devc->cb_data)->conn; - - /* Stop GPIF acquisition */ - if ((ret = command_stop_acquisition (usb->devhdl)) != SR_OK) - sr_err("%s: Sent acquisition stop command failed!", __func__); - else - sr_info("%s: Sent acquisition stop command!", __func__); - - /* Remove polling */ - remove_sources(devc); - } - libusb_unlock_events(drvc->sr_ctx->libusb_ctx); - } + /* Remove polling */ + remove_sources(devc); } return TRUE; @@ -2661,6 +2648,7 @@ static int dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data) struct DSL_context *devc; struct sr_usb_dev_inst *usb; + int ret; devc = sdi->priv; usb = sdi->conn; @@ -2668,6 +2656,12 @@ static int dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data) if (!devc->abort) { devc->abort = TRUE; command_wr_reg(usb->devhdl, bmFORCE_RDY, EEWP_ADDR); + } else if (devc->status == DSL_FINISH) { + /* Stop GPIF acquisition */ + if ((ret = command_stop_acquisition (usb->devhdl)) != SR_OK) + sr_err("%s: Sent acquisition stop command failed!", __func__); + else + sr_info("%s: Sent acquisition stop command!", __func__); } return SR_OK; diff --git a/libsigrok4DSL/session.c b/libsigrok4DSL/session.c index 83baa4c3..625b991f 100644 --- a/libsigrok4DSL/session.c +++ b/libsigrok4DSL/session.c @@ -421,6 +421,7 @@ SR_API int sr_session_run(void) } g_mutex_lock(&session->stop_mutex); + sr_session_stop_sync(); session->running = FALSE; session->abort_session = FALSE; g_mutex_unlock(&session->stop_mutex);