]> sigrok.org Git - libsigrok.git/blobdiff - output/analog.c
sr: Prefix log messages with subsystem string.
[libsigrok.git] / output / analog.c
index c59399a27847167a1bb2335732d876643809a15d..1922e1e6fc33e9af96e879300d045e52dcb01c72 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the sigrok project.
  *
- * Copyright (C) 2010 Bert Vermeulen <bert@biot.com>
+ * Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
  * Copyright (C) 2011 HÃ¥vard Espeland <gus@ping.uio.no>
  * Copyright (C) 2011 Daniel Ribeiro <drwyrm@gmail.com>
  *
@@ -135,7 +135,7 @@ static int init(struct sr_output *o, int default_spl, enum outputmode mode)
 
        snprintf(ctx->header, 511, "%s\n", PACKAGE_STRING);
        num_probes = g_slist_length(o->device->probes);
-       if (o->device->plugin && sr_device_has_hwcap(o->device, SR_HWCAP_SAMPLERATE)) {
+       if (o->device->plugin && sr_dev_has_hwcap(o->device, SR_HWCAP_SAMPLERATE)) {
                samplerate = *((uint64_t *) o->device->plugin->get_device_info(
                                o->device->plugin_index, SR_DI_CUR_SAMPLERATE));
                if (!(samplerate_s = sr_samplerate_string(samplerate))) {
@@ -284,7 +284,8 @@ static int data_bits(struct sr_output *o, const char *data_in,
                        }
                }
        } else {
-               sr_info("short buffer (length_in=%" PRIu64 ")", length_in);
+               sr_info("analog out: short buffer (length_in=%" PRIu64 ")",
+                       length_in);
        }
 
        *data_out = outbuf;
@@ -442,7 +443,8 @@ static int data_ascii(struct sr_output *o, const char *data_in,
                        ctx->prevsample = sample;
                }
        } else {
-               sr_info("short buffer (length_in=%" PRIu64 ")", length_in);
+               sr_info("analog out: short buffer (length_in=%" PRIu64 ")",
+                       length_in);
        }
 
        *data_out = outbuf;