X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Fanalog.c;h=65bdc71d3beaff7736871d7ec7f02989d4f0dd83;hb=90282c82bce6cb108be2123d2393ce058c7aefdd;hp=6462c96d296a67f0aef0f852e537cdbb663d9142;hpb=c73d2ea421c2b425c3f0ae33bce2bfd0c448ca5f;p=libsigrok.git diff --git a/output/analog.c b/output/analog.c index 6462c96d..65bdc71d 100644 --- a/output/analog.c +++ b/output/analog.c @@ -105,7 +105,7 @@ static int init(struct sr_output *o, int default_spl, enum outputmode mode) o->internal = ctx; ctx->num_enabled_probes = 0; - for (l = o->device->probes; l; l = l->next) { + for (l = o->dev->probes; l; l = l->next) { probe = l->data; if (!probe->enabled) continue; @@ -134,10 +134,10 @@ 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_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)); + num_probes = g_slist_length(o->dev->probes); + if (o->dev->plugin && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) { + samplerate = *((uint64_t *) o->dev->plugin->dev_info_get( + o->dev->plugin_index, SR_DI_CUR_SAMPLERATE)); if (!(samplerate_s = sr_samplerate_string(samplerate))) { g_free(ctx->header); g_free(ctx); @@ -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;