summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2018-01-15 17:35:51 +0100
committerKrzysztof Opasiak <k.opasiak@samsung.com>2018-01-17 16:13:58 +0100
commit0ab9f2f12856cfe3736ea8d9cf358c2e5a126758 (patch)
tree264ae48b7a866d522f73624367af538bf1f3a0c0
parent88cff3cbf7d557b73ca3cfabedd7c22ba2623be7 (diff)
downloadlibusbg-0ab9f2f12856cfe3736ea8d9cf358c2e5a126758.tar.gz
libusbg-0ab9f2f12856cfe3736ea8d9cf358c2e5a126758.tar.bz2
libusbg-0ab9f2f12856cfe3736ea8d9cf358c2e5a126758.zip
libusbgx: examples: Make show-gadgets aware of uac2 functionsubmit/tizen/20180124.124543
Allow user to show values of uac2 attributes instead of dummy "UNKNOWN" string. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
-rw-r--r--examples/show-gadgets.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/show-gadgets.c b/examples/show-gadgets.c
index 78b7b75..707d448 100644
--- a/examples/show-gadgets.c
+++ b/examples/show-gadgets.c
@@ -29,6 +29,7 @@
#include <usbg/function/phonet.h>
#include <usbg/function/midi.h>
#include <usbg/function/hid.h>
+#include <usbg/function/uac2.h>
/**
* @file show-gadgets.c
@@ -129,6 +130,7 @@ void show_function(usbg_function *f)
int serial_port_num;
char *phonet_ifname;
struct usbg_f_hid_attrs hid;
+ struct usbg_f_uac2_attrs uac2;
} f_attrs;
instance = usbg_get_function_instance(f);
@@ -229,6 +231,19 @@ void show_function(usbg_function *f)
break;
}
+ case USBG_F_UAC2:
+ {
+ struct usbg_f_uac2_attrs *attrs = &f_attrs.uac2;
+
+ fprintf(stdout, " c_chmask\t\t%d\n", attrs->c_chmask);
+ fprintf(stdout, " c_srate\t\t%d\n", attrs->c_srate);
+ fprintf(stdout, " c_ssize\t\t%d\n", attrs->c_ssize);
+ fprintf(stdout, " p_chmask\t\t%d\n", attrs->p_chmask);
+ fprintf(stdout, " p_srate\t\t%d\n", attrs->p_srate);
+ fprintf(stdout, " p_ssize\t\t%d\n", attrs->p_ssize);
+ break;
+ }
+
default:
fprintf(stdout, " UNKNOWN\n");
}