]> sigrok.org Git - libsigrok.git/blobdiff - hardware/alsa/alsa.c
Prefix datafeed structs with sr_.
[libsigrok.git] / hardware / alsa / alsa.c
index 4ee20369b75eb5a5ef6834aec570e5db15fb731b..417745bbc48bbf80bd59bc1d00fd935f67995fa8 100644 (file)
@@ -78,7 +78,7 @@ static int hw_opendev(int device_index)
        struct alsa *alsa;
        int err;
 
-       if (!(sdi = get_sr_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
                return SR_ERR;
        alsa = sdi->priv;
 
@@ -112,7 +112,7 @@ static void hw_closedev(int device_index)
        struct sr_device_instance *sdi;
        struct alsa *alsa;
 
-       if (!(sdi = get_sr_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
                return;
        alsa = sdi->priv;
        if (!alsa)
@@ -128,7 +128,7 @@ static void hw_cleanup(void)
 {
        struct sr_device_instance *sdi;
 
-       if (!(sdi = get_sr_device_instance(device_instances, 0)))
+       if (!(sdi = sr_get_device_instance(device_instances, 0)))
                return;
 
        free(sdi->priv);
@@ -141,7 +141,7 @@ static void *hw_get_device_info(int device_index, int device_info_id)
        struct alsa *alsa;
        void *info = NULL;
 
-       if (!(sdi = get_sr_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
                return NULL;
        alsa = sdi->priv;
 
@@ -181,7 +181,7 @@ static int hw_set_configuration(int device_index, int capability, void *value)
        struct sr_device_instance *sdi;
        struct alsa *alsa;
 
-       if (!(sdi = get_sr_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
                return SR_ERR;
        alsa = sdi->priv;
 
@@ -203,7 +203,7 @@ static int receive_data(int fd, int revents, void *user_data)
 {
        struct sr_device_instance *sdi = user_data;
        struct alsa *alsa = sdi->priv;
-       struct datafeed_packet packet;
+       struct sr_datafeed_packet packet;
        struct analog_sample *sample;
        unsigned int sample_size = sizeof(struct analog_sample) +
                (NUM_PROBES * sizeof(struct analog_probe));
@@ -260,13 +260,13 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
 {
        struct sr_device_instance *sdi;
        struct alsa *alsa;
-       struct datafeed_packet packet;
-       struct datafeed_header header;
+       struct sr_datafeed_packet packet;
+       struct sr_datafeed_header header;
        struct pollfd *ufds;
        int count;
        int err;
 
-       if (!(sdi = get_sr_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
                return SR_ERR;
        alsa = sdi->priv;
 
@@ -334,7 +334,7 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
        source_add(ufds[0].fd, ufds[0].events, 10, receive_data, sdi);
 
        packet.type = DF_HEADER;
-       packet.length = sizeof(struct datafeed_header);
+       packet.length = sizeof(struct sr_datafeed_header);
        packet.payload = (unsigned char *) &header;
        header.feed_version = 1;
        gettimeofday(&header.starttime, NULL);