From: Bert Vermeulen Date: Sun, 6 Jan 2013 16:41:30 +0000 (+0100) Subject: drivers: use new sr_config struct X-Git-Tag: dsupstream~337 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1987b8d63e748f0813dc6a4630e99686e4fe1728;p=libsigrok.git drivers: use new sr_config struct Sending an SR_DF_META packet at the start of every stream is not mandatory; the frontend should ask for what it needs, and any extra information the driver wants to send will come in due time. --- diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 167d4cc8..9bcca588 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -109,7 +109,7 @@ static GSList *hw_scan(GSList *options) struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; - struct sr_hwopt *opt; + struct sr_config *src; struct sr_probe *probe; struct sr_serial_dev_inst *serial; GSList *l, *devices; @@ -123,13 +123,13 @@ static GSList *hw_scan(GSList *options) devices = NULL; conn = serialcomm = NULL; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; case SR_HWOPT_SERIALCOMM: - serialcomm = opt->value; + serialcomm = src->value; break; } } @@ -309,7 +309,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; if (!(devc = sdi->priv)) { @@ -329,13 +328,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - sr_dbg("Sending SR_DF_META_ANALOG."); - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - /* Poll every 100ms, or whenever some data comes in. */ sr_source_add(devc->serial->fd, G_IO_IN, 100, agdmm_receive_data, (void *)sdi); diff --git a/hardware/alsa/api.c b/hardware/alsa/api.c index 57313461..f3948458 100644 --- a/hardware/alsa/api.c +++ b/hardware/alsa/api.c @@ -196,7 +196,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; int count, ret; char *endianness; @@ -287,13 +286,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - sr_dbg("Sending SR_DF_META_ANALOG packet."); - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = devc->num_probes; - sr_session_send(devc->cb_data, &packet); - /* Poll every 10ms, or whenever some data comes in. */ sr_source_add(devc->ufds[0].fd, devc->ufds[0].events, 10, alsa_receive_data, (void *)sdi); diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 3c6b3e2c..dd745774 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -1271,7 +1271,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, struct dev_context *devc; struct sr_datafeed_packet *packet; struct sr_datafeed_header *header; - struct sr_datafeed_meta_logic meta; struct clockselect_50 clockselect; int frac, triggerpin, ret; uint8_t triggerselect = 0; @@ -1382,13 +1381,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header->starttime, NULL); sr_session_send(devc->session_dev_id, packet); - /* Send metadata about the SR_DF_LOGIC packets to come. */ - packet->type = SR_DF_META_LOGIC; - packet->payload = &meta; - meta.samplerate = devc->cur_samplerate; - meta.num_probes = devc->num_probes; - sr_session_send(devc->session_dev_id, packet); - /* Add capture source. */ sr_source_add(0, G_IO_IN, 10, receive_data, (void *)sdi); diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index 0df9a7bc..9267ca7b 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -421,7 +421,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, struct dev_context *devc; struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_logic meta; uint8_t buf[4]; int bytes_written; @@ -477,13 +476,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->session_dev_id, &packet); - /* Send metadata about the SR_DF_LOGIC packets to come. */ - packet.type = SR_DF_META_LOGIC; - packet.payload = &meta; - meta.samplerate = devc->cur_samplerate; - meta.num_probes = NUM_PROBES; - sr_session_send(devc->session_dev_id, &packet); - /* Time when we should be done (for detecting trigger timeouts). */ devc->done = (devc->divcount + 1) * 0.08388608 + time(NULL) + devc->trigger_timeout; diff --git a/hardware/colead-slm/api.c b/hardware/colead-slm/api.c index 3135a5f3..098ba92f 100644 --- a/hardware/colead-slm/api.c +++ b/hardware/colead-slm/api.c @@ -92,7 +92,7 @@ static GSList *hw_scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_dev_inst *sdi; - struct sr_hwopt *opt; + struct sr_config *src; struct sr_probe *probe; GSList *devices, *l; const char *conn, *serialcomm; @@ -103,13 +103,13 @@ static GSList *hw_scan(GSList *options) conn = serialcomm = NULL; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; case SR_HWOPT_SERIALCOMM: - serialcomm = opt->value; + serialcomm = src->value; break; } } @@ -253,7 +253,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; if (!(devc = sdi->priv)) { @@ -273,13 +272,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - sr_dbg("Sending SR_DF_META_ANALOG."); - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - /* Poll every 150ms, or whenever some data comes in. */ sr_source_add(devc->serial->fd, G_IO_IN, 150, colead_slm_receive_data, (void *)sdi); diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 5d7c006a..c1a5a413 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -390,7 +390,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet *packet; struct sr_datafeed_header *header; - struct sr_datafeed_meta_logic meta; struct dev_context *devc; (void)sdi; @@ -452,13 +451,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header->starttime, NULL); sr_session_send(devc->session_dev_id, packet); - /* Send metadata about the SR_DF_LOGIC packets to come. */ - packet->type = SR_DF_META_LOGIC; - packet->payload = &meta; - meta.samplerate = cur_samplerate; - meta.num_probes = NUM_PROBES; - sr_session_send(devc->session_dev_id, packet); - /* We use this timestamp to decide how many more samples to send. */ devc->starttime = g_get_monotonic_time(); diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index a7272ad9..44c4651e 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -194,20 +194,20 @@ static GSList *fluke_scan(const char *conn, const char *serialcomm) static GSList *hw_scan(GSList *options) { - struct sr_hwopt *opt; + struct sr_config *src; GSList *l, *devices; int i; const char *conn, *serialcomm; conn = serialcomm = NULL; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; case SR_HWOPT_SERIALCOMM: - serialcomm = opt->value; + serialcomm = src->value; break; } } @@ -343,7 +343,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; if (!(devc = sdi->priv)) { @@ -363,13 +362,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - sr_dbg("Sending SR_DF_META_ANALOG."); - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - /* Poll every 100ms, or whenever some data comes in. */ sr_source_add(devc->serial->fd, G_IO_IN, 50, fluke_receive_data, (void *)sdi); diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 9eae9508..304873ae 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -928,7 +928,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_logic meta; struct dev_context *devc; struct drv_context *drvc; struct libusb_transfer *transfer; @@ -998,13 +997,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(cb_data, &packet); - /* Send metadata about the SR_DF_LOGIC packets to come. */ - packet.type = SR_DF_META_LOGIC; - packet.payload = &meta; - meta.samplerate = devc->cur_samplerate; - meta.num_probes = devc->sample_wide ? 16 : 8; - sr_session_send(cb_data, &packet); - if ((ret = command_start_acquisition(devc->usb->devhdl, devc->cur_samplerate, devc->sample_wide)) != SR_OK) { abort_acquisition(devc); diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index aec6651f..8e589c51 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -842,7 +842,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, const struct libusb_pollfd **lupfd; struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; struct drv_context *drvc = di->priv; int i; @@ -878,12 +877,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = NUM_PROBES; - sr_session_send(cb_data, &packet); - return SR_OK; } diff --git a/hardware/hantek-dso/dso.h b/hardware/hantek-dso/dso.h index bafa077d..866dc2d5 100644 --- a/hardware/hantek-dso/dso.h +++ b/hardware/hantek-dso/dso.h @@ -26,7 +26,6 @@ #define USB_CONFIGURATION 1 #define DSO_EP_IN 0x86 #define DSO_EP_OUT 0x02 -#define NUM_PROBES 2 /* FX2 renumeration delay in ms */ #define MAX_RENUM_DELAY_MS 3000 diff --git a/hardware/lascar-el-usb/api.c b/hardware/lascar-el-usb/api.c index e9875705..16349fdd 100644 --- a/hardware/lascar-el-usb/api.c +++ b/hardware/lascar-el-usb/api.c @@ -89,7 +89,7 @@ static GSList *hw_scan(GSList *options) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_usb_dev_inst *usb; - struct sr_hwopt *opt; + struct sr_config *src; GSList *usb_devices, *devices, *l; const char *conn; @@ -105,10 +105,10 @@ static GSList *hw_scan(GSList *options) conn = NULL; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; } } @@ -335,7 +335,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; struct drv_context *drvc = di->priv; struct libusb_transfer *xfer_in, *xfer_out; @@ -429,12 +428,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, devc->log_size = xfer_in->buffer[1] + (xfer_in->buffer[2] << 8); libusb_free_transfer(xfer_out); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - pfd = libusb_get_pollfds(drvc->sr_ctx->libusb_ctx); for (i = 0; pfd[i]; i++) { /* Handle USB events every 100ms, for decent latency. */ diff --git a/hardware/link-mso19/api.c b/hardware/link-mso19/api.c index 5dd040a6..fcec20c6 100644 --- a/hardware/link-mso19/api.c +++ b/hardware/link-mso19/api.c @@ -74,19 +74,19 @@ static GSList *hw_scan(GSList *options) const char *conn = NULL; const char *serialcomm = NULL; GSList *l; - struct sr_hwopt *opt; + struct sr_config *src; struct udev *udev; (void)options; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; case SR_HWOPT_SERIALCOMM: - serialcomm = opt->value; + serialcomm = src->value; break; } } @@ -399,7 +399,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet *packet; struct sr_datafeed_header *header; - struct sr_datafeed_meta_logic meta; struct dev_context *devc; int ret = SR_ERR; @@ -469,12 +468,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header->starttime, NULL); sr_session_send(cb_data, packet); - packet->type = SR_DF_META_LOGIC; - packet->payload = &meta; - meta.samplerate = devc->cur_rate; - meta.num_probes = NUM_PROBES; - sr_session_send(cb_data, packet); - g_free(header); g_free(packet); diff --git a/hardware/nexus-osciprime/api.c b/hardware/nexus-osciprime/api.c index bb631be2..a902b143 100644 --- a/hardware/nexus-osciprime/api.c +++ b/hardware/nexus-osciprime/api.c @@ -158,7 +158,7 @@ static GSList *hw_scan(GSList *options) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_usb_dev_inst *usb; - struct sr_hwopt *opt; + struct sr_config *src; struct sr_probe *probe; libusb_device *dev; GSList *usb_devices, *devices, *l; @@ -177,10 +177,10 @@ static GSList *hw_scan(GSList *options) conn = NULL; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; } } diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index fbcafda8..21844eed 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -71,7 +71,7 @@ static int hw_init(struct sr_context *sr_ctx) static GSList *hw_scan(GSList *options) { - struct sr_hwopt *opt; + struct sr_config *src; struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; @@ -89,13 +89,13 @@ static GSList *hw_scan(GSList *options) conn = serialcomm = NULL; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; case SR_HWOPT_SERIALCOMM: - serialcomm = opt->value; + serialcomm = src->value; break; } } @@ -336,7 +336,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet *packet; struct sr_datafeed_header *header; - struct sr_datafeed_meta_logic meta; struct dev_context *devc; uint32_t trigger_config[4]; uint32_t data; @@ -479,13 +478,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header->starttime, NULL); sr_session_send(cb_data, packet); - /* Send metadata about the SR_DF_LOGIC packets to come. */ - packet->type = SR_DF_META_LOGIC; - packet->payload = &meta; - meta.samplerate = devc->cur_samplerate; - meta.num_probes = NUM_PROBES; - sr_session_send(cb_data, packet); - g_free(header); g_free(packet); diff --git a/hardware/rigol-ds1xx2/api.c b/hardware/rigol-ds1xx2/api.c index 64f8c222..8c03ca86 100644 --- a/hardware/rigol-ds1xx2/api.c +++ b/hardware/rigol-ds1xx2/api.c @@ -26,8 +26,6 @@ #include "libsigrok-internal.h" #include "protocol.h" -#define NUM_PROBES 2 - static const int hwcaps[] = { SR_HWCAP_OSCILLOSCOPE, SR_HWCAP_LIMIT_SAMPLES, @@ -448,7 +446,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, struct dev_context *devc; struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; char buf[256]; int len; @@ -467,12 +464,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = NUM_PROBES; - sr_session_send(cb_data, &packet); - rigol_ds1xx2_send_data(devc->fd, ":CHAN1:SCAL?\n"); len = read(devc->fd, buf, sizeof(buf)); buf[len] = 0; diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index eee14891..944972d9 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -293,19 +293,19 @@ scan_cleanup: static GSList *hw_scan(GSList *options, int dmm) { - struct sr_hwopt *opt; + struct sr_config *src; GSList *l, *devices; const char *conn, *serialcomm; conn = serialcomm = NULL; for (l = options; l; l = l->next) { - opt = l->data; - switch (opt->hwopt) { + src = l->data; + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; case SR_HWOPT_SERIALCOMM: - serialcomm = opt->value; + serialcomm = src->value; break; } } @@ -430,7 +430,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; if (!(devc = sdi->priv)) { @@ -458,13 +457,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - sr_dbg("Sending SR_DF_META_ANALOG."); - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - /* Poll every 50ms, or whenever some data comes in. */ sr_source_add(devc->serial->fd, G_IO_IN, 50, dmms[dmm].receive_data, (void *)sdi); diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index 5b7ed363..b27625b5 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -88,7 +88,7 @@ static GSList *hw_scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_dev_inst *sdi; - struct sr_hwopt *opt; + struct sr_config *src; struct sr_probe *probe; GSList *devices, *l; const char *conn, *serialcomm; @@ -99,19 +99,19 @@ static GSList *hw_scan(GSList *options) conn = serialcomm = NULL; for (l = options; l; l = l->next) { - if (!(opt = l->data)) { + if (!(src = l->data)) { sr_err("Invalid option data, skipping."); continue; } - switch (opt->hwopt) { + switch (src->key) { case SR_HWOPT_CONN: - conn = opt->value; + conn = src->value; break; case SR_HWOPT_SERIALCOMM: - serialcomm = opt->value; + serialcomm = src->value; break; default: - sr_err("Unknown option %d, skipping.", opt->hwopt); + sr_err("Unknown option %d, skipping.", src->key); break; } } @@ -245,7 +245,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; devc = sdi->priv; @@ -259,13 +258,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - sr_dbg("Sending SR_DF_META_ANALOG."); - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - /* Poll every 500ms, or whenever some data comes in. */ sr_source_add(devc->serial->fd, G_IO_IN, 500, tondaj_sl_814_receive_data, (void *)sdi); diff --git a/hardware/uni-t-dmm/api.c b/hardware/uni-t-dmm/api.c index 7c6ad77f..bae358aa 100644 --- a/hardware/uni-t-dmm/api.c +++ b/hardware/uni-t-dmm/api.c @@ -262,7 +262,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; devc = sdi->priv; @@ -279,13 +278,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - sr_dbg("Sending SR_DF_META_ANALOG."); - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - if (!strcmp(di->name, "uni-t-ut61d")) { sr_source_add(0, 0, 10 /* poll_timeout */, uni_t_ut61d_receive_data, (void *)sdi); diff --git a/hardware/victor-dmm/api.c b/hardware/victor-dmm/api.c index 23c12e9d..e7fdb785 100644 --- a/hardware/victor-dmm/api.c +++ b/hardware/victor-dmm/api.c @@ -385,7 +385,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, { struct sr_datafeed_packet packet; struct sr_datafeed_header header; - struct sr_datafeed_meta_analog meta; struct dev_context *devc; struct drv_context *drvc = di->priv; const struct libusb_pollfd **pfd; @@ -410,12 +409,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, header.feed_version = 1; sr_session_send(devc->cb_data, &packet); - /* Send metadata about the SR_DF_ANALOG packets to come. */ - packet.type = SR_DF_META_ANALOG; - packet.payload = &meta; - meta.num_probes = 1; - sr_session_send(devc->cb_data, &packet); - pfd = libusb_get_pollfds(drvc->sr_ctx->libusb_ctx); for (i = 0; pfd[i]; i++) { /* Handle USB events every 100ms, for decent latency. */ diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index f2fcac63..e132c784 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -686,7 +686,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, struct sr_datafeed_packet packet; struct sr_datafeed_logic logic; struct sr_datafeed_header header; - struct sr_datafeed_meta_logic meta; //uint64_t samples_read; int res; unsigned int packet_num; @@ -726,13 +725,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, gettimeofday(&header.starttime, NULL); sr_session_send(cb_data, &packet); - /* Send metadata about the SR_DF_LOGIC packets to come. */ - packet.type = SR_DF_META_LOGIC; - packet.payload = &meta; - meta.samplerate = devc->cur_samplerate; - meta.num_probes = devc->num_channels; - sr_session_send(cb_data, &packet); - if (!(buf = g_try_malloc(PACKET_SIZE))) { sr_err("zp: %s: buf malloc failed", __func__); return SR_ERR_MALLOC;