]> sigrok.org Git - libsigrok.git/blobdiff - hardware/alsa/alsa.c
sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.
[libsigrok.git] / hardware / alsa / alsa.c
index 91ae7f6706ae3311bafbbc5a5979beea966bd4b1..94a95723adc4eea6ddd06df3a5c980f70ada848b 100644 (file)
@@ -42,7 +42,7 @@ struct sr_analog_sample {
        struct sr_analog_probe probes[];
 };
 
-static int capabilities[] = {
+static int hwcaps[] = {
        SR_HWCAP_SAMPLERATE,
        SR_HWCAP_LIMIT_SAMPLES,
        SR_HWCAP_CONTINUOUS,
@@ -86,6 +86,7 @@ static int hw_init(const char *devinfo)
        dev_insts = g_slist_append(dev_insts, sdi);
 
        return 1;
+
 free_alsa:
        g_free(alsa);
        return 0;
@@ -164,7 +165,7 @@ static int hw_cleanup(void)
        return SR_OK;
 }
 
-static void *hw_get_dev_info(int dev_index, int dev_info_id)
+static void *hw_dev_info_get(int dev_index, int dev_info_id)
 {
        struct sr_dev_inst *sdi;
        struct alsa *alsa;
@@ -203,12 +204,12 @@ static int hw_get_status(int dev_index)
        return SR_ST_ACTIVE;
 }
 
-static int *hw_get_capabilities(void)
+static int *hw_hwcap_get_all(void)
 {
-       return capabilities;
+       return hwcaps;
 }
 
-static int hw_set_configuration(int dev_index, int capability, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        struct alsa *alsa;
@@ -217,7 +218,7 @@ static int hw_set_configuration(int dev_index, int capability, void *value)
                return SR_ERR;
        alsa = sdi->priv;
 
-       switch (capability) {
+       switch (hwcap) {
        case SR_HWCAP_PROBECONFIG:
                return SR_OK;
        case SR_HWCAP_SAMPLERATE:
@@ -399,10 +400,10 @@ SR_PRIV struct sr_dev_plugin alsa_plugin_info = {
        .cleanup = hw_cleanup,
        .opendev = hw_opendev,
        .closedev = hw_closedev,
-       .get_dev_info = hw_get_dev_info,
+       .dev_info_get = hw_dev_info_get,
        .get_status = hw_get_status,
-       .get_capabilities = hw_get_capabilities,
-       .set_configuration = hw_set_configuration,
+       .hwcap_get_all = hw_hwcap_get_all,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };