summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/audio.c
diff options
context:
space:
mode:
authorJassi Brar <jaswinder.singh@linaro.org>2012-02-02 17:31:12 +0100
committerFelipe Balbi <balbi@ti.com>2012-02-15 09:10:25 +0100
commitd747a916872241daef68c864ef09f8bef0c35bf8 (patch)
tree39106b6ea77fd7d2e954eccfe6ee13da705ee5e7 /drivers/usb/gadget/audio.c
parentusb: uac2: Add ACHeader and FormatType descriptor (diff)
downloadlinux-d747a916872241daef68c864ef09f8bef0c35bf8.tar.xz
linux-d747a916872241daef68c864ef09f8bef0c35bf8.zip
usb: gadget: audio: Move string IDs to audio.c
Move manufacturer and product string ids into audio.c so as to be reusable by the new uac2 version of gadget driver. Signed-off-by: Yadi Brar <yadi.brar01@gmail.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/audio.c')
-rw-r--r--drivers/usb/gadget/audio.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
index 056a2d936d7f..33e9327d6639 100644
--- a/drivers/usb/gadget/audio.c
+++ b/drivers/usb/gadget/audio.c
@@ -33,6 +33,29 @@
#include "config.c"
#include "epautoconf.c"
+/* string IDs are assigned dynamically */
+
+#define STRING_MANUFACTURER_IDX 0
+#define STRING_PRODUCT_IDX 1
+
+static char manufacturer[50];
+
+static struct usb_string strings_dev[] = {
+ [STRING_MANUFACTURER_IDX].s = manufacturer,
+ [STRING_PRODUCT_IDX].s = DRIVER_DESC,
+ { } /* end of list */
+};
+
+static struct usb_gadget_strings stringtab_dev = {
+ .language = 0x0409, /* en-us */
+ .strings = strings_dev,
+};
+
+static struct usb_gadget_strings *audio_strings[] = {
+ &stringtab_dev,
+ NULL,
+};
+
#include "u_uac1.c"
#include "f_uac1.c"