summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/u_uac1.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-07-22 19:58:38 +0200
committerFelipe Balbi <balbi@ti.com>2014-08-20 14:04:54 -0500
commitf3a3406b3f562f8d15b89979c0ca9e184b269084 (patch)
tree0cf9bc197f84683c8162a0005a6379738ddd9bb7 /drivers/usb/gadget/function/u_uac1.h
parentaf1a58ca00b3735275c453ebd0b811a71a377470 (diff)
downloadop-kernel-dev-f3a3406b3f562f8d15b89979c0ca9e184b269084.zip
op-kernel-dev-f3a3406b3f562f8d15b89979c0ca9e184b269084.tar.gz
usb: gadget: f_uac1: convert to new function interface with backward compatibility
Converting uac1 to the new function interface requires converting the USB uac1's function code and its users. This patch converts the f_uac1.c to the new function interface. The file is now compiled into a separate usb_f_uac1.ko module. The old function interface is provided by means of a preprocessor conditional directives. After all users are converted, the old interface can be removed. Tested-by: Sebastian Reimers <sebastian.reimers@googlemail.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_uac1.h')
-rw-r--r--drivers/usb/gadget/function/u_uac1.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_uac1.h b/drivers/usb/gadget/function/u_uac1.h
index 18c2e72..5b4fe9e 100644
--- a/drivers/usb/gadget/function/u_uac1.h
+++ b/drivers/usb/gadget/function/u_uac1.h
@@ -50,7 +50,27 @@ struct gaudio {
/* TODO */
};
+struct f_uac1_opts {
+ struct usb_function_instance func_inst;
+ int req_buf_size;
+ int req_count;
+ int audio_buf_size;
+ char *fn_play;
+ char *fn_cap;
+ char *fn_cntl;
+ bool bound;
+ struct gaudio *card;
+};
+
int gaudio_setup(struct gaudio *card);
+#ifdef USBF_UAC1_INCLUDED
void gaudio_cleanup(void);
+#else
+void gaudio_cleanup(struct gaudio *the_card);
+#endif
+
+size_t u_audio_playback(struct gaudio *card, void *buf, size_t count);
+int u_audio_get_playback_channels(struct gaudio *card);
+int u_audio_get_playback_rate(struct gaudio *card);
#endif /* __U_AUDIO_H */
OpenPOWER on IntegriCloud