aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-12-21 19:15:39 -0500
committerTakashi Iwai <tiwai@suse.de>2015-12-22 05:51:27 -0500
commit3f47152a1c8f4d4c8ca18740bf3f1a7fff1b3fd9 (patch)
tree5459d070e9ee22cb4b7a80f3e19c918de9d5eaa8 /sound
parentd6ce6bbd7d83453ce958cfc03b7250dbee3a431e (diff)
ALSA: oxfw: add scs1x layer
Stanton Controllers and Systems 1 (SCS.1) series is supported by ALSA scs1x driver. This driver just supports MIDI functionality. On the other hand, models in this series are based on OXFW971 and ALSA OXFW driver can support them. SCS.1 series has MIDI functionality to control its surface state such as LED lighting. When operating physical knobs and faders, the models generate MIDI messages. These MIDI messages are transferred by asynchronous transactions. These transactions are really model-specific and ALSA OXFW driver requires the functionality so as scs1x module implements. This commit adds scs1x layer as a preparation to merge scs1x driver to oxfw driver. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/firewire/oxfw/Makefile2
-rw-r--r--sound/firewire/oxfw/oxfw-scs1x.c26
-rw-r--r--sound/firewire/oxfw/oxfw.c4
-rw-r--r--sound/firewire/oxfw/oxfw.h1
4 files changed, 30 insertions, 3 deletions
diff --git a/sound/firewire/oxfw/Makefile b/sound/firewire/oxfw/Makefile
index 4e54ba9f4394..b474da7c6a1f 100644
--- a/sound/firewire/oxfw/Makefile
+++ b/sound/firewire/oxfw/Makefile
@@ -1,3 +1,3 @@
1snd-oxfw-objs := oxfw-command.o oxfw-stream.o oxfw-pcm.o oxfw-proc.o \ 1snd-oxfw-objs := oxfw-command.o oxfw-stream.o oxfw-pcm.o oxfw-proc.o \
2 oxfw-midi.o oxfw-hwdep.o oxfw-spkr.o oxfw.o 2 oxfw-midi.o oxfw-hwdep.o oxfw-spkr.o oxfw-scs1x.o oxfw.o
3obj-$(CONFIG_SND_OXFW) += snd-oxfw.o 3obj-$(CONFIG_SND_OXFW) += snd-oxfw.o
diff --git a/sound/firewire/oxfw/oxfw-scs1x.c b/sound/firewire/oxfw/oxfw-scs1x.c
new file mode 100644
index 000000000000..34db0d0957c5
--- /dev/null
+++ b/sound/firewire/oxfw/oxfw-scs1x.c
@@ -0,0 +1,26 @@
1/*
2 * oxfw-scs1x.c - a part of driver for OXFW970/971 based devices
3 *
4 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
5 * Copyright (c) 2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>
6 *
7 * Licensed under the terms of the GNU General Public License, version 2.
8 */
9
10#include "oxfw.h"
11
12int snd_oxfw_scs1x_add(struct snd_oxfw *oxfw)
13{
14 struct snd_rawmidi *rmidi;
15 int err;
16
17 /* Use unique name for backward compatibility to scs1x module. */
18 err = snd_rawmidi_new(oxfw->card, "SCS.1x", 0, 0, 0, &rmidi);
19 if (err < 0)
20 return err;
21
22 snprintf(rmidi->name, sizeof(rmidi->name),
23 "%s MIDI", oxfw->card->shortname);
24
25 return err;
26}
diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
index 96fbb784f086..b20e496e2201 100644
--- a/sound/firewire/oxfw/oxfw.c
+++ b/sound/firewire/oxfw/oxfw.c
@@ -216,11 +216,11 @@ static int oxfw_probe(struct fw_unit *unit,
216 if (err < 0) 216 if (err < 0)
217 goto error; 217 goto error;
218 218
219 err = detect_quirks(oxfw); 219 err = name_card(oxfw);
220 if (err < 0) 220 if (err < 0)
221 goto error; 221 goto error;
222 222
223 err = name_card(oxfw); 223 err = detect_quirks(oxfw);
224 if (err < 0) 224 if (err < 0)
225 goto error; 225 goto error;
226 226
diff --git a/sound/firewire/oxfw/oxfw.h b/sound/firewire/oxfw/oxfw.h
index 1c9844a4649d..cbf00eee678c 100644
--- a/sound/firewire/oxfw/oxfw.h
+++ b/sound/firewire/oxfw/oxfw.h
@@ -134,3 +134,4 @@ int snd_oxfw_create_midi(struct snd_oxfw *oxfw);
134int snd_oxfw_create_hwdep(struct snd_oxfw *oxfw); 134int snd_oxfw_create_hwdep(struct snd_oxfw *oxfw);
135 135
136int snd_oxfw_add_spkr(struct snd_oxfw *oxfw, bool is_lacie); 136int snd_oxfw_add_spkr(struct snd_oxfw *oxfw, bool is_lacie);
137int snd_oxfw_scs1x_add(struct snd_oxfw *oxfw);