2 * This file is part of the sigrok project.
4 * Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
5 * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 #include "sigrok-internal.h"
32 static const struct fx2lafw_profile supported_fx2[] = {
35 * EE Electronics ESLA201A
38 { 0x08a9, 0x0014, "CWAV", "USBee AX", NULL,
39 FIRMWARE_DIR "/fx2lafw-cwav-usbeeax.fw",
45 { 0x08a9, 0x0009, "CWAV", "USBee SX", NULL,
46 FIRMWARE_DIR "/fx2lafw-cwav-usbeesx.fw",
51 * EE Electronics ESLA100
53 * Robomotic BugLogic 3
55 { 0x0925, 0x3881, "Saleae", "Logic", NULL,
56 FIRMWARE_DIR "/fx2lafw-saleae-logic.fw",
60 * Default Cypress FX2 without EEPROM, e.g.:
62 * Braintechnology USB Interface V2.x
64 { 0x04B4, 0x8613, "Cypress", "FX2", NULL,
65 FIRMWARE_DIR "/fx2lafw-cypress-fx2.fw",
69 * Braintechnology USB-LPS
71 { 0x16d0, 0x0498, "Braintechnology", "USB-LPS", NULL,
72 FIRMWARE_DIR "/fx2lafw-braintechnology-usb-lps.fw",
75 { 0, 0, 0, 0, 0, 0, 0 }
78 static const int hwcaps[] = {
79 SR_HWCAP_LOGIC_ANALYZER,
82 /* These are really implemented in the driver, not the hardware. */
83 SR_HWCAP_LIMIT_SAMPLES,
89 * TODO: Different probe_names[] for each supported device.
91 static const char *probe_names[] = {
111 static const uint64_t supported_samplerates[] = {
131 static const struct sr_samplerates samplerates = {
135 supported_samplerates,
138 static GSList *dev_insts = NULL;
139 static libusb_context *usb_context = NULL;
141 static int hw_dev_config_set(int dev_index, int hwcap, const void *value);
142 static int hw_dev_acquisition_stop(int dev_index, void *cb_data);
145 * Check the USB configuration to determine if this is an fx2lafw device.
147 * @return TRUE if the device's configuration profile match fx2lafw
148 * configuration, FALSE otherwise.
150 static gboolean check_conf_profile(libusb_device *dev)
152 struct libusb_device_descriptor des;
153 struct libusb_device_handle *hdl;
155 unsigned char strdesc[64];
160 /* Assume the FW has not been loaded, unless proven wrong. */
161 if (libusb_get_device_descriptor(dev, &des) != 0)
164 if (libusb_open(dev, &hdl) != 0)
167 if (libusb_get_string_descriptor_ascii(hdl,
168 des.iManufacturer, strdesc, sizeof(strdesc)) < 0)
170 if (strncmp((const char *)strdesc, "sigrok", 6))
173 if (libusb_get_string_descriptor_ascii(hdl,
174 des.iProduct, strdesc, sizeof(strdesc)) < 0)
176 if (strncmp((const char *)strdesc, "fx2lafw", 7))
179 /* If we made it here, it must be an fx2lafw. */
188 static int fx2lafw_dev_open(int dev_index)
190 libusb_device **devlist;
191 struct libusb_device_descriptor des;
192 struct sr_dev_inst *sdi;
194 struct version_info vi;
198 if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
202 if (sdi->status == SR_ST_ACTIVE)
207 const int device_count = libusb_get_device_list(usb_context, &devlist);
208 if (device_count < 0) {
209 sr_err("fx2lafw: Failed to retrieve device list (%d)",
214 for (i = 0; i < device_count; i++) {
215 if ((ret = libusb_get_device_descriptor(devlist[i], &des))) {
216 sr_err("fx2lafw: Failed to get device descriptor: %d.",
221 if (des.idVendor != ctx->profile->vid
222 || des.idProduct != ctx->profile->pid)
225 if (sdi->status == SR_ST_INITIALIZING) {
226 if (skip != dev_index) {
227 /* Skip devices of this type that aren't the one we want. */
231 } else if (sdi->status == SR_ST_INACTIVE) {
233 * This device is fully enumerated, so we need to find
234 * this device by vendor, product, bus and address.
236 if (libusb_get_bus_number(devlist[i]) != ctx->usb->bus
237 || libusb_get_device_address(devlist[i]) != ctx->usb->address)
238 /* this is not the one */
242 if (!(ret = libusb_open(devlist[i], &ctx->usb->devhdl))) {
243 if (ctx->usb->address == 0xff)
245 * first time we touch this device after firmware upload,
246 * so we don't know the address yet.
248 ctx->usb->address = libusb_get_device_address(devlist[i]);
250 sr_err("fx2lafw: Failed to open device: %d.", ret);
254 ret = command_get_fw_version(ctx->usb->devhdl, &vi);
256 sr_err("fx2lafw: Failed to retrieve "
257 "firmware version information.");
261 ret = command_get_revid_version(ctx->usb->devhdl, &revid);
263 sr_err("fx2lafw: Failed to retrieve REVID.");
268 * Changes in major version mean incompatible/API changes, so
269 * bail out if we encounter an incompatible version.
270 * Different minor versions are OK, they should be compatible.
272 if (vi.major != FX2LAFW_REQUIRED_VERSION_MAJOR) {
273 sr_err("fx2lafw: Expected firmware version %d.x, "
274 "got %d.%d.", FX2LAFW_REQUIRED_VERSION_MAJOR,
279 sdi->status = SR_ST_ACTIVE;
280 sr_info("fx2lafw: Opened device %d on %d.%d "
281 "interface %d, firmware %d.%d, REVID %d.",
282 sdi->index, ctx->usb->bus, ctx->usb->address,
283 USB_INTERFACE, vi.major, vi.minor, revid);
287 libusb_free_device_list(devlist, 1);
289 if (sdi->status != SR_ST_ACTIVE)
295 static void close_dev(struct sr_dev_inst *sdi)
301 if (ctx->usb->devhdl == NULL)
304 sr_info("fx2lafw: Closing device %d on %d.%d interface %d.",
305 sdi->index, ctx->usb->bus, ctx->usb->address, USB_INTERFACE);
306 libusb_release_interface(ctx->usb->devhdl, USB_INTERFACE);
307 libusb_close(ctx->usb->devhdl);
308 ctx->usb->devhdl = NULL;
309 sdi->status = SR_ST_INACTIVE;
312 static int configure_probes(struct context *ctx, GSList *probes)
314 struct sr_probe *probe;
316 int probe_bit, stage, i;
319 for (i = 0; i < NUM_TRIGGER_STAGES; i++) {
320 ctx->trigger_mask[i] = 0;
321 ctx->trigger_value[i] = 0;
325 for (l = probes; l; l = l->next) {
326 probe = (struct sr_probe *)l->data;
327 if (probe->enabled == FALSE)
330 if (probe->index > 8)
331 ctx->sample_wide = TRUE;
333 probe_bit = 1 << (probe->index - 1);
334 if (!(probe->trigger))
338 for (tc = probe->trigger; *tc; tc++) {
339 ctx->trigger_mask[stage] |= probe_bit;
341 ctx->trigger_value[stage] |= probe_bit;
343 if (stage > NUM_TRIGGER_STAGES)
350 * We didn't configure any triggers, make sure acquisition
351 * doesn't wait for any.
353 ctx->trigger_stage = TRIGGER_FIRED;
355 ctx->trigger_stage = 0;
360 static struct context *fx2lafw_dev_new(void)
364 if (!(ctx = g_try_malloc0(sizeof(struct context)))) {
365 sr_err("fx2lafw: %s: ctx malloc failed.", __func__);
369 ctx->trigger_stage = TRIGGER_FIRED;
378 static int hw_init(const char *devinfo)
380 struct sr_dev_inst *sdi;
381 struct libusb_device_descriptor des;
382 const struct fx2lafw_profile *prof;
384 libusb_device **devlist;
389 /* Avoid compiler warnings. */
392 if (libusb_init(&usb_context) != 0) {
393 sr_warn("fx2lafw: Failed to initialize libusb.");
397 /* Find all fx2lafw compatible devices and upload firmware to them. */
398 libusb_get_device_list(usb_context, &devlist);
399 for (i = 0; devlist[i]; i++) {
401 if ((ret = libusb_get_device_descriptor(
402 devlist[i], &des)) != 0) {
403 sr_warn("fx2lafw: Failed to get device descriptor: %d.", ret);
408 for (j = 0; supported_fx2[j].vid; j++) {
409 if (des.idVendor == supported_fx2[j].vid &&
410 des.idProduct == supported_fx2[j].pid) {
411 prof = &supported_fx2[j];
415 /* Skip if the device was not found */
419 sdi = sr_dev_inst_new(devcnt, SR_ST_INITIALIZING,
420 prof->vendor, prof->model, prof->model_version);
424 ctx = fx2lafw_dev_new();
427 dev_insts = g_slist_append(dev_insts, sdi);
429 if (check_conf_profile(devlist[i])) {
430 /* Already has the firmware, so fix the new address. */
431 sr_dbg("fx2lafw: Found an fx2lafw device.");
432 sdi->status = SR_ST_INACTIVE;
433 ctx->usb = sr_usb_dev_inst_new
434 (libusb_get_bus_number(devlist[i]),
435 libusb_get_device_address(devlist[i]), NULL);
437 if (ezusb_upload_firmware(devlist[i], USB_CONFIGURATION,
438 prof->firmware) == SR_OK)
439 /* Remember when the firmware on this device was updated */
440 ctx->fw_updated = g_get_monotonic_time();
442 sr_err("fx2lafw: Firmware upload failed for "
443 "device %d.", devcnt);
444 ctx->usb = sr_usb_dev_inst_new
445 (libusb_get_bus_number(devlist[i]), 0xff, NULL);
450 libusb_free_device_list(devlist, 1);
455 static int hw_dev_open(int dev_index)
457 struct sr_dev_inst *sdi;
460 int64_t timediff_us, timediff_ms;
462 if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
467 * If the firmware was recently uploaded, wait up to MAX_RENUM_DELAY_MS
468 * milliseconds for the FX2 to renumerate.
471 if (ctx->fw_updated > 0) {
472 sr_info("fx2lafw: Waiting for device to reset.");
473 /* takes at least 300ms for the FX2 to be gone from the USB bus */
474 g_usleep(300 * 1000);
476 while (timediff_ms < MAX_RENUM_DELAY_MS) {
477 if ((ret = fx2lafw_dev_open(dev_index)) == SR_OK)
479 g_usleep(100 * 1000);
481 timediff_us = g_get_monotonic_time() - ctx->fw_updated;
482 timediff_ms = timediff_us / 1000;
483 sr_spew("fx2lafw: waited %" PRIi64 " ms", timediff_ms);
485 sr_info("fx2lafw: Device came back after %d ms.", timediff_ms);
487 ret = fx2lafw_dev_open(dev_index);
491 sr_err("fx2lafw: Unable to open device.");
496 ret = libusb_claim_interface(ctx->usb->devhdl, USB_INTERFACE);
499 case LIBUSB_ERROR_BUSY:
500 sr_err("fx2lafw: Unable to claim USB interface. Another "
501 "program or driver has already claimed it.");
504 case LIBUSB_ERROR_NO_DEVICE:
505 sr_err("fx2lafw: Device has been disconnected.");
509 sr_err("fx2lafw: Unable to claim interface: %d.", ret);
516 if (ctx->cur_samplerate == 0) {
517 /* Samplerate hasn't been set; default to the slowest one. */
518 if (hw_dev_config_set(dev_index, SR_HWCAP_SAMPLERATE,
519 &supported_samplerates[0]) == SR_ERR)
526 static int hw_dev_close(int dev_index)
528 struct sr_dev_inst *sdi;
530 if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
531 sr_err("fx2lafw: %s: sdi was NULL.", __func__);
541 static int hw_cleanup(void)
544 struct sr_dev_inst *sdi;
548 for (l = dev_insts; l; l = l->next) {
549 if (!(sdi = l->data)) {
550 /* Log error, but continue cleaning up the rest. */
551 sr_err("fx2lafw: %s: sdi was NULL, continuing.",
556 if (!(ctx = sdi->priv)) {
557 /* Log error, but continue cleaning up the rest. */
558 sr_err("fx2lafw: %s: sdi->priv was NULL, continuing",
565 sr_dev_inst_free(sdi);
568 g_slist_free(dev_insts);
572 libusb_exit(usb_context);
578 static const void *hw_dev_info_get(int dev_index, int dev_info_id)
580 struct sr_dev_inst *sdi;
583 if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
587 switch (dev_info_id) {
590 case SR_DI_NUM_PROBES:
591 return GINT_TO_POINTER(
592 (ctx->profile->dev_caps & DEV_CAPS_16BIT) ?
594 case SR_DI_PROBE_NAMES:
596 case SR_DI_SAMPLERATES:
598 case SR_DI_TRIGGER_TYPES:
599 return TRIGGER_TYPES;
600 case SR_DI_CUR_SAMPLERATE:
601 return &ctx->cur_samplerate;
607 static int hw_dev_status_get(int dev_index)
609 const struct sr_dev_inst *const sdi =
610 sr_dev_inst_get(dev_insts, dev_index);
613 return SR_ST_NOT_FOUND;
618 static const int *hw_hwcap_get_all(void)
623 static int hw_dev_config_set(int dev_index, int hwcap, const void *value)
625 struct sr_dev_inst *sdi;
629 if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
633 if (hwcap == SR_HWCAP_SAMPLERATE) {
634 ctx->cur_samplerate = *(const uint64_t *)value;
636 } else if (hwcap == SR_HWCAP_PROBECONFIG) {
637 ret = configure_probes(ctx, (GSList *) value);
638 } else if (hwcap == SR_HWCAP_LIMIT_SAMPLES) {
639 ctx->limit_samples = *(const uint64_t *)value;
648 static int receive_data(int fd, int revents, void *cb_data)
652 /* Avoid compiler warnings. */
657 tv.tv_sec = tv.tv_usec = 0;
658 libusb_handle_events_timeout(usb_context, &tv);
663 static void abort_acquisition(struct context *ctx)
665 ctx->num_samples = -1;
668 static void finish_acquisition(struct context *ctx)
670 struct sr_datafeed_packet packet;
673 /* Terminate session */
674 packet.type = SR_DF_END;
675 sr_session_send(ctx->session_dev_id, &packet);
677 /* Remove fds from polling */
678 const struct libusb_pollfd **const lupfd =
679 libusb_get_pollfds(usb_context);
680 for (i = 0; lupfd[i]; i++)
681 sr_source_remove(lupfd[i]->fd);
682 free(lupfd); /* NOT g_free()! */
685 static void free_transfer(struct libusb_transfer *transfer)
687 struct context *ctx = transfer->user_data;
689 g_free(transfer->buffer);
690 transfer->buffer = NULL;
691 libusb_free_transfer(transfer);
693 ctx->submitted_transfers--;
694 if (ctx->submitted_transfers == 0)
695 finish_acquisition(ctx);
699 static void resubmit_transfer(struct libusb_transfer *transfer)
701 if (libusb_submit_transfer(transfer) != 0) {
702 free_transfer(transfer);
703 /* TODO: Stop session? */
704 /* TODO: Better error message. */
705 sr_err("fx2lafw: %s: libusb_submit_transfer error.", __func__);
709 static void receive_transfer(struct libusb_transfer *transfer)
711 gboolean packet_has_error = FALSE;
712 struct sr_datafeed_packet packet;
713 struct sr_datafeed_logic logic;
714 struct context *ctx = transfer->user_data;
715 int trigger_offset, i;
718 * If acquisition has already ended, just free any queued up
719 * transfer that come in.
721 if (ctx->num_samples == -1) {
722 free_transfer(transfer);
726 sr_info("fx2lafw: receive_transfer(): status %d received %d bytes.",
727 transfer->status, transfer->actual_length);
729 /* Save incoming transfer before reusing the transfer struct. */
730 uint8_t *const cur_buf = transfer->buffer;
731 const int sample_width = ctx->sample_wide ? 2 : 1;
732 const int cur_sample_count = transfer->actual_length / sample_width;
734 switch (transfer->status) {
735 case LIBUSB_TRANSFER_NO_DEVICE:
736 abort_acquisition(ctx);
737 free_transfer(transfer);
739 case LIBUSB_TRANSFER_COMPLETED:
740 case LIBUSB_TRANSFER_TIMED_OUT: /* We may have received some data though */
743 packet_has_error = TRUE;
747 if (transfer->actual_length == 0 || packet_has_error) {
748 ctx->empty_transfer_count++;
749 if (ctx->empty_transfer_count > MAX_EMPTY_TRANSFERS) {
751 * The FX2 gave up. End the acquisition, the frontend
752 * will work out that the samplecount is short.
754 abort_acquisition(ctx);
755 free_transfer(transfer);
757 resubmit_transfer(transfer);
761 ctx->empty_transfer_count = 0;
765 if (ctx->trigger_stage >= 0) {
766 for (i = 0; i < cur_sample_count; i++) {
768 const uint16_t cur_sample = ctx->sample_wide ?
769 *((const uint16_t*)cur_buf + i) :
770 *((const uint8_t*)cur_buf + i);
772 if ((cur_sample & ctx->trigger_mask[ctx->trigger_stage]) ==
773 ctx->trigger_value[ctx->trigger_stage]) {
774 /* Match on this trigger stage. */
775 ctx->trigger_buffer[ctx->trigger_stage] = cur_sample;
776 ctx->trigger_stage++;
778 if (ctx->trigger_stage == NUM_TRIGGER_STAGES ||
779 ctx->trigger_mask[ctx->trigger_stage] == 0) {
780 /* Match on all trigger stages, we're done. */
781 trigger_offset = i + 1;
784 * TODO: Send pre-trigger buffer to session bus.
785 * Tell the frontend we hit the trigger here.
787 packet.type = SR_DF_TRIGGER;
788 packet.payload = NULL;
789 sr_session_send(ctx->session_dev_id, &packet);
792 * Send the samples that triggered it, since we're
793 * skipping past them.
795 packet.type = SR_DF_LOGIC;
796 packet.payload = &logic;
797 logic.unitsize = sizeof(*ctx->trigger_buffer);
798 logic.length = ctx->trigger_stage * logic.unitsize;
799 logic.data = ctx->trigger_buffer;
800 sr_session_send(ctx->session_dev_id, &packet);
802 ctx->trigger_stage = TRIGGER_FIRED;
805 } else if (ctx->trigger_stage > 0) {
807 * We had a match before, but not in the next sample. However, we may
808 * have a match on this stage in the next bit -- trigger on 0001 will
809 * fail on seeing 00001, so we need to go back to stage 0 -- but at
810 * the next sample from the one that matched originally, which the
811 * counter increment at the end of the loop takes care of.
813 i -= ctx->trigger_stage;
815 i = -1; /* Oops, went back past this buffer. */
816 /* Reset trigger stage. */
817 ctx->trigger_stage = 0;
822 if (ctx->trigger_stage == TRIGGER_FIRED) {
823 /* Send the incoming transfer to the session bus. */
824 const int trigger_offset_bytes = trigger_offset * sample_width;
825 packet.type = SR_DF_LOGIC;
826 packet.payload = &logic;
827 logic.length = transfer->actual_length - trigger_offset_bytes;
828 logic.unitsize = sample_width;
829 logic.data = cur_buf + trigger_offset_bytes;
830 sr_session_send(ctx->session_dev_id, &packet);
832 ctx->num_samples += cur_sample_count;
833 if (ctx->limit_samples &&
834 (unsigned int)ctx->num_samples > ctx->limit_samples) {
835 abort_acquisition(ctx);
839 * TODO: Buffer pre-trigger data in capture
840 * ratio-sized buffer.
844 resubmit_transfer(transfer);
847 static unsigned int to_bytes_per_ms(unsigned int samplerate)
849 return samplerate / 1000;
852 static size_t get_buffer_size(struct context *ctx)
856 /* The buffer should be large enough to hold 10ms of data and a multiple
858 s = 10 * to_bytes_per_ms(ctx->cur_samplerate);
859 return (s + 511) & ~511;
862 static unsigned int get_number_of_transfers(struct context *ctx)
866 /* Total buffer size should be able to hold about 500ms of data */
867 n = 500 * to_bytes_per_ms(ctx->cur_samplerate) / get_buffer_size(ctx);
869 if (n > NUM_SIMUL_TRANSFERS)
870 return NUM_SIMUL_TRANSFERS;
875 static unsigned int get_timeout(struct context *ctx)
878 unsigned int timeout;
880 total_size = get_buffer_size(ctx) * get_number_of_transfers(ctx);
881 timeout = total_size / to_bytes_per_ms(ctx->cur_samplerate);
882 return timeout + timeout / 4; /* Leave a headroom of 25% percent */
885 static int hw_dev_acquisition_start(int dev_index, void *cb_data)
887 struct sr_dev_inst *sdi;
888 struct sr_datafeed_packet packet;
889 struct sr_datafeed_header header;
890 struct sr_datafeed_meta_logic meta;
892 struct libusb_transfer *transfer;
893 const struct libusb_pollfd **lupfd;
898 if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
901 ctx->session_dev_id = cb_data;
902 ctx->num_samples = 0;
903 ctx->empty_transfer_count = 0;
905 const unsigned int timeout = get_timeout(ctx);
906 const unsigned int num_transfers = get_number_of_transfers(ctx);
907 const size_t size = get_buffer_size(ctx);
909 for (i = 0; i < num_transfers; i++) {
910 if (!(buf = g_try_malloc(size))) {
911 sr_err("fx2lafw: %s: buf malloc failed.", __func__);
912 return SR_ERR_MALLOC;
914 transfer = libusb_alloc_transfer(0);
915 libusb_fill_bulk_transfer(transfer, ctx->usb->devhdl,
916 2 | LIBUSB_ENDPOINT_IN, buf, size,
917 receive_transfer, ctx, timeout);
918 if (libusb_submit_transfer(transfer) != 0) {
919 /* TODO: Free them all. */
920 libusb_free_transfer(transfer);
925 ctx->submitted_transfers++;
928 lupfd = libusb_get_pollfds(usb_context);
929 for (i = 0; lupfd[i]; i++)
930 sr_source_add(lupfd[i]->fd, lupfd[i]->events,
931 timeout, receive_data, NULL);
932 free(lupfd); /* NOT g_free()! */
934 packet.type = SR_DF_HEADER;
935 packet.payload = &header;
936 header.feed_version = 1;
937 gettimeofday(&header.starttime, NULL);
938 sr_session_send(cb_data, &packet);
940 /* Send metadata about the SR_DF_LOGIC packets to come. */
941 packet.type = SR_DF_META_LOGIC;
942 packet.payload = &meta;
943 meta.samplerate = ctx->cur_samplerate;
944 meta.num_probes = ctx->sample_wide ? 16 : 8;
945 sr_session_send(cb_data, &packet);
947 if ((ret = command_start_acquisition (ctx->usb->devhdl,
948 ctx->cur_samplerate, ctx->sample_wide)) != SR_OK) {
955 /* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
956 static int hw_dev_acquisition_stop(int dev_index, void *cb_data)
958 struct sr_dev_inst *sdi;
960 /* Avoid compiler warnings. */
963 if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
966 abort_acquisition(sdi->priv);
971 SR_PRIV struct sr_dev_driver fx2lafw_driver_info = {
973 .longname = "fx2lafw (generic driver for FX2 based LAs)",
976 .cleanup = hw_cleanup,
977 .dev_open = hw_dev_open,
978 .dev_close = hw_dev_close,
979 .dev_info_get = hw_dev_info_get,
980 .dev_status_get = hw_dev_status_get,
981 .hwcap_get_all = hw_hwcap_get_all,
982 .dev_config_set = hw_dev_config_set,
983 .dev_acquisition_start = hw_dev_acquisition_start,
984 .dev_acquisition_stop = hw_dev_acquisition_stop,