summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/legacy/audio.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-07-22 19:58:34 +0200
committerFelipe Balbi <balbi@ti.com>2014-08-20 14:04:38 -0500
commit065a107cdd70f0621011424009b3ecd4e42481b1 (patch)
tree6448e4a942ed96ceadea0b6e794a0ce50f0a4c02 /drivers/usb/gadget/legacy/audio.c
parentf408757f819a5792e6d27865a12f4da4ae802d28 (diff)
usb: gadget: f_uac2: use defined constants as defaults
When configfs is integrated the same values will have to be used as defaults. Use symbolic names in order not to duplicate magic numbers. 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/legacy/audio.c')
-rw-r--r--drivers/usb/gadget/legacy/audio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/gadget/legacy/audio.c b/drivers/usb/gadget/legacy/audio.c
index 159af0345986..c28691fbb576 100644
--- a/drivers/usb/gadget/legacy/audio.c
+++ b/drivers/usb/gadget/legacy/audio.c
@@ -22,33 +22,35 @@
USB_GADGET_COMPOSITE_OPTIONS();
#ifndef CONFIG_GADGET_UAC1
+#include "u_uac2.h"
+
/* Playback(USB-IN) Default Stereo - Fl/Fr */
-static int p_chmask = 0x3;
+static int p_chmask = UAC2_DEF_PCHMASK;
module_param(p_chmask, uint, S_IRUGO);
MODULE_PARM_DESC(p_chmask, "Playback Channel Mask");
/* Playback Default 48 KHz */
-static int p_srate = 48000;
+static int p_srate = UAC2_DEF_PSRATE;
module_param(p_srate, uint, S_IRUGO);
MODULE_PARM_DESC(p_srate, "Playback Sampling Rate");
/* Playback Default 16bits/sample */
-static int p_ssize = 2;
+static int p_ssize = UAC2_DEF_PSSIZE;
module_param(p_ssize, uint, S_IRUGO);
MODULE_PARM_DESC(p_ssize, "Playback Sample Size(bytes)");
/* Capture(USB-OUT) Default Stereo - Fl/Fr */
-static int c_chmask = 0x3;
+static int c_chmask = UAC2_DEF_CCHMASK;
module_param(c_chmask, uint, S_IRUGO);
MODULE_PARM_DESC(c_chmask, "Capture Channel Mask");
/* Capture Default 64 KHz */
-static int c_srate = 64000;
+static int c_srate = UAC2_DEF_CSRATE;
module_param(c_srate, uint, S_IRUGO);
MODULE_PARM_DESC(c_srate, "Capture Sampling Rate");
/* Capture Default 16bits/sample */
-static int c_ssize = 2;
+static int c_ssize = UAC2_DEF_CSSIZE;
module_param(c_ssize, uint, S_IRUGO);
MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)");
#endif
@@ -81,8 +83,6 @@ static struct usb_function *f_uac2;
#include "u_uac1.h"
#include "u_uac1.c"
#include "f_uac1.c"
-#else
-#include "u_uac2.h"
#endif
/*-------------------------------------------------------------------------*/