Commit 9fddc15e authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarKeith Milner <kamilner@superlative.org>
Tested-by: default avatarDylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-38-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6234fdc1
...@@ -8,6 +8,7 @@ snd-usb-audio-objs := card.o \ ...@@ -8,6 +8,7 @@ snd-usb-audio-objs := card.o \
endpoint.o \ endpoint.o \
format.o \ format.o \
helper.o \ helper.o \
implicit.o \
mixer.o \ mixer.o \
mixer_quirks.o \ mixer_quirks.o \
mixer_scarlett.o \ mixer_scarlett.o \
......
This diff is collapsed.
// 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 */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment