diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-04-25 09:45:22 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-26 08:31:25 -0400 |
commit | 326b9cacf4932588156a920d67aab8b7b69d7a40 (patch) | |
tree | cb79e21b05cfe1dcb88d0661f278d6c4f40758ec /sound/firewire | |
parent | 1fc9522a084f36d042298ef15893cf07d66a54bc (diff) |
ALSA: bebob: Add support for Terratec PHASE, EWS series and Aureon
This commit allows this driver to support all of models which Terratec produced
with DM1000/BeBoB. They are:
- PHASE 24 FW
- PHASE X24 FW
- PHASE 88 Rack FW
- EWS MIC2
- EWS MIC4
- Aureon 7.1 Firewire
For Phase series, this commit adds a Terratec specific operation. To get source
of clock. AV/C Audio Subunit command is used.
For EWS series and Aureon, this module uses normal operations.
Tested-by: Maximilian Engelhardt <maxi@daemonizer.de> (PHASE 24 FW)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/Kconfig | 3 | ||||
-rw-r--r-- | sound/firewire/bebob/Makefile | 2 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob.c | 11 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob.h | 4 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_terratec.c | 68 |
5 files changed, 87 insertions, 1 deletions
diff --git a/sound/firewire/Kconfig b/sound/firewire/Kconfig index 21750649e14e..b1a1d7d8384a 100644 --- a/sound/firewire/Kconfig +++ b/sound/firewire/Kconfig | |||
@@ -108,6 +108,9 @@ config SND_BEBOB | |||
108 | * Lynx Aurora 8/16 (LT-FW) | 108 | * Lynx Aurora 8/16 (LT-FW) |
109 | * ICON FireXon | 109 | * ICON FireXon |
110 | * PrismSound Orpheus/ADA-8XR | 110 | * PrismSound Orpheus/ADA-8XR |
111 | * TerraTec PHASE 24 FW/PHASE X24 FW/PHASE 88 Rack FW | ||
112 | * Terratec EWS MIC2/EWS MIC4 | ||
113 | * Terratec Aureon 7.1 Firewire | ||
111 | 114 | ||
112 | To compile this driver as a module, choose M here: the module | 115 | To compile this driver as a module, choose M here: the module |
113 | will be called snd-bebob. | 116 | will be called snd-bebob. |
diff --git a/sound/firewire/bebob/Makefile b/sound/firewire/bebob/Makefile index e4b08e38dd23..cb38dd1ddefe 100644 --- a/sound/firewire/bebob/Makefile +++ b/sound/firewire/bebob/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | snd-bebob-objs := bebob_command.o bebob_stream.o bebob_proc.o bebob_midi.o \ | 1 | snd-bebob-objs := bebob_command.o bebob_stream.o bebob_proc.o bebob_midi.o \ |
2 | bebob_pcm.o bebob_hwdep.o bebob.o | 2 | bebob_pcm.o bebob_hwdep.o bebob_terratec.o bebob.o |
3 | obj-m += snd-bebob.o | 3 | obj-m += snd-bebob.o |
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index 3d7909036a3c..262677ef30f1 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c | |||
@@ -52,6 +52,7 @@ static DECLARE_BITMAP(devices_used, SNDRV_CARDS); | |||
52 | #define VEN_LYNX 0x000019e5 | 52 | #define VEN_LYNX 0x000019e5 |
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 | 56 | ||
56 | static int | 57 | static int |
57 | name_device(struct snd_bebob *bebob, unsigned int vendor_id) | 58 | name_device(struct snd_bebob *bebob, unsigned int vendor_id) |
@@ -290,6 +291,16 @@ static const struct ieee1394_device_id bebob_id_table[] = { | |||
290 | SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x00010048, &spec_normal), | 291 | SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x00010048, &spec_normal), |
291 | /* PrismSound, ADA-8XR */ | 292 | /* PrismSound, ADA-8XR */ |
292 | SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x0000ada8, &spec_normal), | 293 | SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x0000ada8, &spec_normal), |
294 | /* TerraTec Electronic GmbH, PHASE 88 Rack FW */ | ||
295 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000003, &phase88_rack_spec), | ||
296 | /* TerraTec Electronic GmbH, PHASE 24 FW */ | ||
297 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000004, &phase24_series_spec), | ||
298 | /* TerraTec Electronic GmbH, Phase X24 FW */ | ||
299 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000007, &phase24_series_spec), | ||
300 | /* TerraTec Electronic GmbH, EWS MIC2/MIC8 */ | ||
301 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal), | ||
302 | /* Terratec Electronic GmbH, Aureon 7.1 Firewire */ | ||
303 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal), | ||
293 | /* IDs are unknown but able to be supported */ | 304 | /* IDs are unknown but able to be supported */ |
294 | /* Apogee, Mini-ME Firewire */ | 305 | /* Apogee, Mini-ME Firewire */ |
295 | /* Apogee, Mini-DAC Firewire */ | 306 | /* Apogee, Mini-DAC Firewire */ |
diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h index 7365f92a6aed..6c11af82ee05 100644 --- a/sound/firewire/bebob/bebob.h +++ b/sound/firewire/bebob/bebob.h | |||
@@ -224,6 +224,10 @@ int snd_bebob_create_pcm_devices(struct snd_bebob *bebob); | |||
224 | 224 | ||
225 | int snd_bebob_create_hwdep_device(struct snd_bebob *bebob); | 225 | int snd_bebob_create_hwdep_device(struct snd_bebob *bebob); |
226 | 226 | ||
227 | /* model specific operations */ | ||
228 | extern struct snd_bebob_spec phase88_rack_spec; | ||
229 | extern struct snd_bebob_spec phase24_series_spec; | ||
230 | |||
227 | #define SND_BEBOB_DEV_ENTRY(vendor, model, data) \ | 231 | #define SND_BEBOB_DEV_ENTRY(vendor, model, data) \ |
228 | { \ | 232 | { \ |
229 | .match_flags = IEEE1394_MATCH_VENDOR_ID | \ | 233 | .match_flags = IEEE1394_MATCH_VENDOR_ID | \ |
diff --git a/sound/firewire/bebob/bebob_terratec.c b/sound/firewire/bebob/bebob_terratec.c new file mode 100644 index 000000000000..2a89c1cd9b15 --- /dev/null +++ b/sound/firewire/bebob/bebob_terratec.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * bebob_terratec.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 | static char *const phase88_rack_clk_src_labels[] = { | ||
12 | SND_BEBOB_CLOCK_INTERNAL, "Digital In", "Word Clock" | ||
13 | }; | ||
14 | static int | ||
15 | phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id) | ||
16 | { | ||
17 | unsigned int enable_ext, enable_word; | ||
18 | int err; | ||
19 | |||
20 | err = avc_audio_get_selector(bebob->unit, 0, 0, &enable_ext); | ||
21 | if (err < 0) | ||
22 | goto end; | ||
23 | err = avc_audio_get_selector(bebob->unit, 0, 0, &enable_word); | ||
24 | if (err < 0) | ||
25 | goto end; | ||
26 | |||
27 | *id = (enable_ext & 0x01) | ((enable_word & 0x01) << 1); | ||
28 | end: | ||
29 | return err; | ||
30 | } | ||
31 | |||
32 | static char *const phase24_series_clk_src_labels[] = { | ||
33 | SND_BEBOB_CLOCK_INTERNAL, "Digital In" | ||
34 | }; | ||
35 | static int | ||
36 | phase24_series_clk_src_get(struct snd_bebob *bebob, unsigned int *id) | ||
37 | { | ||
38 | return avc_audio_get_selector(bebob->unit, 0, 4, id); | ||
39 | } | ||
40 | |||
41 | struct snd_bebob_rate_spec phase_series_rate_spec = { | ||
42 | .get = &snd_bebob_stream_get_rate, | ||
43 | .set = &snd_bebob_stream_set_rate, | ||
44 | }; | ||
45 | |||
46 | /* PHASE 88 Rack FW */ | ||
47 | struct snd_bebob_clock_spec phase88_rack_clk = { | ||
48 | .num = ARRAY_SIZE(phase88_rack_clk_src_labels), | ||
49 | .labels = phase88_rack_clk_src_labels, | ||
50 | .get = &phase88_rack_clk_src_get, | ||
51 | }; | ||
52 | struct snd_bebob_spec phase88_rack_spec = { | ||
53 | .clock = &phase88_rack_clk, | ||
54 | .rate = &phase_series_rate_spec, | ||
55 | .meter = NULL | ||
56 | }; | ||
57 | |||
58 | /* 'PHASE 24 FW' and 'PHASE X24 FW' */ | ||
59 | struct snd_bebob_clock_spec phase24_series_clk = { | ||
60 | .num = ARRAY_SIZE(phase24_series_clk_src_labels), | ||
61 | .labels = phase24_series_clk_src_labels, | ||
62 | .get = &phase24_series_clk_src_get, | ||
63 | }; | ||
64 | struct snd_bebob_spec phase24_series_spec = { | ||
65 | .clock = &phase24_series_clk, | ||
66 | .rate = &phase_series_rate_spec, | ||
67 | .meter = NULL | ||
68 | }; | ||