summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_uac1.h
diff options
context:
space:
mode:
authorRuslan Bilovol <ruslan.bilovol@gmail.com>2017-06-18 16:23:53 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-06-19 09:22:47 +0300
commitd355339eecd986648420e05f8c958fbc78dbb382 (patch)
treede6e2523a86a7a73aa9fdc3a49064f597f79c271 /drivers/usb/gadget/function/u_uac1.h
parenteb9fecb9e69b0be8c267c55b0bb52a08e8fb6bee (diff)
downloadlinux-d355339eecd986648420e05f8c958fbc78dbb382.tar.xz
usb: gadget: function: make current f_uac1 implementation legacy
Before introducing new f_uac1 function (with virtual ALSA card) make current implementation legacy. This includes renaming of existing files, some variables, config options and documentation Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_uac1.h')
-rw-r--r--drivers/usb/gadget/function/u_uac1.h82
1 files changed, 0 insertions, 82 deletions
diff --git a/drivers/usb/gadget/function/u_uac1.h b/drivers/usb/gadget/function/u_uac1.h
deleted file mode 100644
index 5c2ac8e8456d..000000000000
--- a/drivers/usb/gadget/function/u_uac1.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * u_uac1.h -- interface to USB gadget "ALSA AUDIO" utilities
- *
- * Copyright (C) 2008 Bryan Wu <cooloney@kernel.org>
- * Copyright (C) 2008 Analog Devices, Inc
- *
- * Enter bugs at http://blackfin.uclinux.org/
- *
- * Licensed under the GPL-2 or later.
- */
-
-#ifndef __U_AUDIO_H
-#define __U_AUDIO_H
-
-#include <linux/device.h>
-#include <linux/err.h>
-#include <linux/usb/audio.h>
-#include <linux/usb/composite.h>
-
-#include <sound/core.h>
-#include <sound/pcm.h>
-#include <sound/pcm_params.h>
-
-#define FILE_PCM_PLAYBACK "/dev/snd/pcmC0D0p"
-#define FILE_PCM_CAPTURE "/dev/snd/pcmC0D0c"
-#define FILE_CONTROL "/dev/snd/controlC0"
-
-#define UAC1_OUT_EP_MAX_PACKET_SIZE 200
-#define UAC1_REQ_COUNT 256
-#define UAC1_AUDIO_BUF_SIZE 48000
-
-/*
- * This represents the USB side of an audio card device, managed by a USB
- * function which provides control and stream interfaces.
- */
-
-struct gaudio_snd_dev {
- struct gaudio *card;
- struct file *filp;
- struct snd_pcm_substream *substream;
- int access;
- int format;
- int channels;
- int rate;
-};
-
-struct gaudio {
- struct usb_function func;
- struct usb_gadget *gadget;
-
- /* ALSA sound device interfaces */
- struct gaudio_snd_dev control;
- struct gaudio_snd_dev playback;
- struct gaudio_snd_dev capture;
-
- /* 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;
- unsigned bound:1;
- unsigned fn_play_alloc:1;
- unsigned fn_cap_alloc:1;
- unsigned fn_cntl_alloc:1;
- struct mutex lock;
- int refcnt;
-};
-
-int gaudio_setup(struct gaudio *card);
-void gaudio_cleanup(struct gaudio *the_card);
-
-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 */