diff options
author | Chris J Arges <chris.j.arges@canonical.com> | 2014-11-12 12:07:02 -0600 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-13 07:32:39 +0100 |
commit | 76b188c4b370876018e3a778ec11a94a5316dbe4 (patch) | |
tree | 66068fe3d0d9e90c51f28141a31ae998c773f1d6 /sound/usb/mixer_quirks.c | |
parent | eef90451605d79a5703756505087e0ef16da9077 (diff) | |
download | linux-76b188c4b370876018e3a778ec11a94a5316dbe4.tar.gz linux-76b188c4b370876018e3a778ec11a94a5316dbe4.tar.bz2 linux-76b188c4b370876018e3a778ec11a94a5316dbe4.zip |
ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20
This code contains the Scarlett mixer interface code that was originally
written by Tobias Hoffman and Robin Gareus. Because the device doesn't
properly implement UAC2 this code adds a mixer quirk for the device.
Changes from the original code include removing the metering code along with
dead code and comments. Compiler warnings were fixed. The code to initialize
the sampling rate was causing a crash this was fixed as discussed on the
mailing list. Error, and info messages were convered to dev_err and dev_info
interfaces. The custom scarlett_mixer_elem_info struct was replaced with the
more generic usb_mixer_elem_info to be able to recycle more code from mixer.c.
This patch also makes additional modifications based on upstream comments.
Individual control creation functions are removed and a generic
function is no used. Macros for function calls are removed to improve
readability. Hardcoded control initialization is removed. Save to HW
functionality has been removed. Strings for enums are created dynamically for
the mixer. Strings used for controls are now SNDRV_CTL_ELEM_ID_NAME_MAXLEN
length.
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer_quirks.c')
-rw-r--r-- | sound/usb/mixer_quirks.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index b8b1f48c1f50..7b9331a17026 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -41,6 +41,7 @@ #include "usbaudio.h" #include "mixer.h" #include "mixer_quirks.h" +#include "mixer_scarlett.h" #include "helper.h" extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl; @@ -1770,6 +1771,14 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) /* detection is disabled in mixer_maps.c */ err = snd_create_std_mono_table(mixer, ebox44_table); break; + + case USB_ID(0x1235, 0x8012): /* Focusrite Scarlett 6i6 */ + case USB_ID(0x1235, 0x8002): /* Focusrite Scarlett 8i6 */ + case USB_ID(0x1235, 0x8004): /* Focusrite Scarlett 18i6 */ + case USB_ID(0x1235, 0x8014): /* Focusrite Scarlett 18i8 */ + case USB_ID(0x1235, 0x800c): /* Focusrite Scarlett 18i20 */ + err = snd_scarlett_controls_create(mixer); + break; } return err; |