summaryrefslogtreecommitdiff
path: root/sound/usb/implicit.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-11-23 09:53:43 +0100
committerTakashi Iwai <tiwai@suse.de>2020-11-23 15:17:00 +0100
commit9fddc15e803945a744f357a4d1c94301e1ed6681 (patch)
tree894bd4cff83ff2dbc8672fa70e5a4261da47d7a3 /sound/usb/implicit.h
parent6234fdc1cede3c1deda8324bdbb8274c0f4ff192 (diff)
ALSA: usb-audio: Factor out the implicit feedback quirk code
The code dealing with the implicit feedback mode grew recently, and it's becoming messy. As we receive more and more devices that need the similar handling, it's better to be processed through a table instead of the open code. This patch moves the code that is relevant with parsing the implicit feedback mode and some helpers into another file, implicit.c. The detection and the setup of the implicit feedback sync EPs are rewritten to use the ID/class matching table instead. There should be no functional changes. Tested-by: Keith Milner <kamilner@superlative.org> Tested-by: Dylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-38-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/implicit.h')
-rw-r--r--sound/usb/implicit.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/usb/implicit.h b/sound/usb/implicit.h
new file mode 100644
index 000000000000..ccb415a0ea86
--- /dev/null
+++ b/sound/usb/implicit.h
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+#ifndef __USBAUDIO_IMPLICIT_H
+#define __USBAUDIO_IMPLICIT_H
+
+int snd_usb_parse_implicit_fb_quirk(struct snd_usb_audio *chip,
+ struct audioformat *fmt,
+ struct usb_host_interface *alts);
+const struct audioformat *
+snd_usb_find_implicit_fb_sync_format(struct snd_usb_audio *chip,
+ const struct audioformat *target,
+ const struct snd_pcm_hw_params *params,
+ int stream);
+
+#endif /* __USBAUDIO_IMPLICIT_H */