aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2014-04-25 09:45:23 -0400
committerTakashi Iwai <tiwai@suse.de>2014-05-26 08:31:38 -0400
commit8ac98a3585ee7ad0c1bd03b098784a10e13bee21 (patch)
tree1c3e50c3f56e828959e9a9b623c1c49b99b7cc6f /sound
parent326b9cacf4932588156a920d67aab8b7b69d7a40 (diff)
ALSA: bebob: Add support for Yamaha GO series
This commit allows this driver to support all of models which Yamaha produced with DM1000/BeBoB. They are: - GO44 - GO46 This commit adds Yamaha specific operations. To get source of clock, AV/C Audio Subunit command is used. I note that their appearances are similar to some models of TerraTec; 'Go44' is similar to 'PHASE 24 FW' and 'GO46' is similar to 'PHASE X24 FW'. But their combination of Audio/Music subunits is a bit different. 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/Kconfig1
-rw-r--r--sound/firewire/bebob/Makefile3
-rw-r--r--sound/firewire/bebob/bebob.c5
-rw-r--r--sound/firewire/bebob/bebob.h1
-rw-r--r--sound/firewire/bebob/bebob_yamaha.c50
5 files changed, 59 insertions, 1 deletions
diff --git a/sound/firewire/Kconfig b/sound/firewire/Kconfig
index b1a1d7d8384a..f8e484586221 100644
--- a/sound/firewire/Kconfig
+++ b/sound/firewire/Kconfig
@@ -111,6 +111,7 @@ config SND_BEBOB
111 * TerraTec PHASE 24 FW/PHASE X24 FW/PHASE 88 Rack FW 111 * TerraTec PHASE 24 FW/PHASE X24 FW/PHASE 88 Rack FW
112 * Terratec EWS MIC2/EWS MIC4 112 * Terratec EWS MIC2/EWS MIC4
113 * Terratec Aureon 7.1 Firewire 113 * Terratec Aureon 7.1 Firewire
114 * Yamaha GO44/GO46
114 115
115 To compile this driver as a module, choose M here: the module 116 To compile this driver as a module, choose M here: the module
116 will be called snd-bebob. 117 will be called snd-bebob.
diff --git a/sound/firewire/bebob/Makefile b/sound/firewire/bebob/Makefile
index cb38dd1ddefe..c35eee105135 100644
--- a/sound/firewire/bebob/Makefile
+++ b/sound/firewire/bebob/Makefile
@@ -1,3 +1,4 @@
1snd-bebob-objs := bebob_command.o bebob_stream.o bebob_proc.o bebob_midi.o \ 1snd-bebob-objs := bebob_command.o bebob_stream.o bebob_proc.o bebob_midi.o \
2 bebob_pcm.o bebob_hwdep.o bebob_terratec.o bebob.o 2 bebob_pcm.o bebob_hwdep.o bebob_terratec.o bebob_yamaha.o \
3 bebob.o
3obj-m += snd-bebob.o 4obj-m += snd-bebob.o
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c
index 262677ef30f1..6a6350466fd4 100644
--- a/sound/firewire/bebob/bebob.c
+++ b/sound/firewire/bebob/bebob.c
@@ -53,6 +53,7 @@ static DECLARE_BITMAP(devices_used, SNDRV_CARDS);
53#define VEN_ICON 0x00001a9e 53#define VEN_ICON 0x00001a9e
54#define VEN_PRISMSOUND 0x00001198 54#define VEN_PRISMSOUND 0x00001198
55#define VEN_TERRATEC 0x00000aac 55#define VEN_TERRATEC 0x00000aac
56#define VEN_YAMAHA 0x0000a0de
56 57
57static int 58static int
58name_device(struct snd_bebob *bebob, unsigned int vendor_id) 59name_device(struct snd_bebob *bebob, unsigned int vendor_id)
@@ -301,6 +302,10 @@ static const struct ieee1394_device_id bebob_id_table[] = {
301 SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal), 302 SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal),
302 /* Terratec Electronic GmbH, Aureon 7.1 Firewire */ 303 /* Terratec Electronic GmbH, Aureon 7.1 Firewire */
303 SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal), 304 SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal),
305 /* Yamaha, GO44 */
306 SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000b, &yamaha_go_spec),
307 /* YAMAHA, GO46 */
308 SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000c, &yamaha_go_spec),
304 /* IDs are unknown but able to be supported */ 309 /* IDs are unknown but able to be supported */
305 /* Apogee, Mini-ME Firewire */ 310 /* Apogee, Mini-ME Firewire */
306 /* Apogee, Mini-DAC Firewire */ 311 /* Apogee, Mini-DAC Firewire */
diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h
index 6c11af82ee05..e92d356ce361 100644
--- a/sound/firewire/bebob/bebob.h
+++ b/sound/firewire/bebob/bebob.h
@@ -227,6 +227,7 @@ int snd_bebob_create_hwdep_device(struct snd_bebob *bebob);
227/* model specific operations */ 227/* model specific operations */
228extern struct snd_bebob_spec phase88_rack_spec; 228extern struct snd_bebob_spec phase88_rack_spec;
229extern struct snd_bebob_spec phase24_series_spec; 229extern struct snd_bebob_spec phase24_series_spec;
230extern struct snd_bebob_spec yamaha_go_spec;
230 231
231#define SND_BEBOB_DEV_ENTRY(vendor, model, data) \ 232#define SND_BEBOB_DEV_ENTRY(vendor, model, data) \
232{ \ 233{ \
diff --git a/sound/firewire/bebob/bebob_yamaha.c b/sound/firewire/bebob/bebob_yamaha.c
new file mode 100644
index 000000000000..9b7e798180ff
--- /dev/null
+++ b/sound/firewire/bebob/bebob_yamaha.c
@@ -0,0 +1,50 @@
1/*
2 * bebob_yamaha.c - a part of driver for BeBoB based devices
3 *
4 * Copyright (c) 2013-2014 Takashi Sakamoto
5 *
6 * Licensed under the terms of the GNU General Public License, version 2.
7 */
8
9#include "./bebob.h"
10
11/*
12 * NOTE:
13 * Yamaha GO44 is not designed to be used as stand-alone mixer. So any streams
14 * must be accompanied. If changing the state, a LED on the device starts to
15 * blink and its sync status is false. In this state, the device sounds nothing
16 * even if streaming. To start streaming at the current sampling rate is only
17 * way to revocer this state. GO46 is better for stand-alone mixer.
18 *
19 * Both of them have a capability to change its sampling rate up to 192.0kHz.
20 * At 192.0kHz, the device reports 4 PCM-in, 1 MIDI-in, 6 PCM-out, 1 MIDI-out.
21 * But Yamaha's driver reduce 2 PCM-in, 1 MIDI-in, 2 PCM-out, 1 MIDI-out to use
22 * 'Extended Stream Format Information Command - Single Request' in 'Additional
23 * AVC commands' defined by BridgeCo.
24 * This ALSA driver don't do this because a bit tiresome. Then isochronous
25 * streaming with many asynchronous transactions brings sounds with noises.
26 * Unfortunately current 'ffado-mixer' generated many asynchronous transaction
27 * to observe device's state, mainly check cmp connection and signal format. I
28 * reccomend users to close ffado-mixer at 192.0kHz if mixer is needless.
29 */
30
31static char *const clk_src_labels[] = {SND_BEBOB_CLOCK_INTERNAL, "SPDIF"};
32static int
33clk_src_get(struct snd_bebob *bebob, unsigned int *id)
34{
35 return avc_audio_get_selector(bebob->unit, 0, 4, id);
36}
37static struct snd_bebob_clock_spec clock_spec = {
38 .num = ARRAY_SIZE(clk_src_labels),
39 .labels = clk_src_labels,
40 .get = &clk_src_get,
41};
42static struct snd_bebob_rate_spec rate_spec = {
43 .get = &snd_bebob_stream_get_rate,
44 .set = &snd_bebob_stream_set_rate,
45};
46struct snd_bebob_spec yamaha_go_spec = {
47 .clock = &clock_spec,
48 .rate = &rate_spec,
49 .meter = NULL
50};