[alsa-devel] [PATCH 0/2] ALSA: bebob: merge vendor-dependent codes for Yamaha/Terratec
Hi,
This patchset merges vendor-dependent codes for Yamaha/Terratec, because each of these two pairs has the same configuration:
- Yamaha GO44 / Terratec Phase 24 FW - Yamaha GO46 / Terratec Phase X24 FW
The two companies might once have cooperated to develop some audio and music units on IEEE 1394 bus, based on DM1000E ASIC and BeBoB firmware. This conclusion comes from a reporter of a forum of Ubuntu Japanese Community. Thanks for his help to identify subunit formation and supported stream formats:
Jack & Firewireオーディオインターフェイスの設定に関する質問です。 https://forums.ubuntulinux.jp/viewtopic.php?id=18657
Terratec has also produced the other models with DM ASIC series and BeBoB firmware. For the models, vendor-dependent codes are still left.
Takashi Sakamoto (2): ALSA: bebob: rename file with vendor-dependent code so that it's for Yamaha/Terratec ALSA: bebob: unify configurations for some models produced by Yamaha/Terratec
sound/firewire/bebob/Makefile | 5 ++-- sound/firewire/bebob/bebob.c | 8 +++--- sound/firewire/bebob/bebob.h | 3 +-- sound/firewire/bebob/bebob_terratec.c | 31 ---------------------- .../{bebob_yamaha.c => bebob_yamaha_terratec.c} | 9 ++++--- 5 files changed, 14 insertions(+), 42 deletions(-) rename sound/firewire/bebob/{bebob_yamaha.c => bebob_yamaha_terratec.c} (85%)
Once Yamaha and Terratec cooperated to develop some audio and music units on IEEE 1394 bus. On these models, the same embedded board is used, and similar configurations are also applied.
This commit renames file for Yamaha's configuration so that it's for both of Yamaha and Terratec.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/bebob/Makefile | 5 +++-- sound/firewire/bebob/{bebob_yamaha.c => bebob_yamaha_terratec.c} | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) rename sound/firewire/bebob/{bebob_yamaha.c => bebob_yamaha_terratec.c} (93%)
diff --git a/sound/firewire/bebob/Makefile b/sound/firewire/bebob/Makefile index af7ed66..dd45486 100644 --- a/sound/firewire/bebob/Makefile +++ b/sound/firewire/bebob/Makefile @@ -1,4 +1,5 @@ snd-bebob-objs := bebob_command.o bebob_stream.o bebob_proc.o bebob_midi.o \ - bebob_pcm.o bebob_hwdep.o bebob_terratec.o bebob_yamaha.o \ - bebob_focusrite.o bebob_maudio.o bebob.o + bebob_pcm.o bebob_hwdep.o bebob_terratec.o \ + bebob_yamaha_terratec.o bebob_focusrite.o bebob_maudio.o \ + bebob.o obj-$(CONFIG_SND_BEBOB) += snd-bebob.o diff --git a/sound/firewire/bebob/bebob_yamaha.c b/sound/firewire/bebob/bebob_yamaha_terratec.c similarity index 93% rename from sound/firewire/bebob/bebob_yamaha.c rename to sound/firewire/bebob/bebob_yamaha_terratec.c index 90d4404..5c5d7d3 100644 --- a/sound/firewire/bebob/bebob_yamaha.c +++ b/sound/firewire/bebob/bebob_yamaha_terratec.c @@ -14,7 +14,7 @@ * must be accompanied. If changing the state, a LED on the device starts to * blink and its sync status is false. In this state, the device sounds nothing * even if streaming. To start streaming at the current sampling rate is only - * way to revocer this state. GO46 is better for stand-alone mixer. + * way to recover this state. GO46 is better for stand-alone mixer. * * Both of them have a capability to change its sampling rate up to 192.0kHz. * At 192.0kHz, the device reports 4 PCM-in, 1 MIDI-in, 6 PCM-out, 1 MIDI-out. @@ -25,7 +25,7 @@ * streaming with many asynchronous transactions brings sounds with noises. * Unfortunately current 'ffado-mixer' generated many asynchronous transaction * to observe device's state, mainly check cmp connection and signal format. I - * reccomend users to close ffado-mixer at 192.0kHz if mixer is needless. + * recommend users to close ffado-mixer at 192.0kHz if mixer is needless. */
static enum snd_bebob_clock_type clk_src_types[] = {
The below models were developed with a cooperation by Yamaha and Terratec. - Yamaha GO 44/Terratec PHASE 24 FW - Yamaha GO 46/Terratec PHASE X24 FW
They have the same configurations, thus it's better to unify corresponding codes.
This commit merges them to reduce the amount of maintained codes.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/bebob/bebob.c | 8 +++---- sound/firewire/bebob/bebob.h | 3 +-- sound/firewire/bebob/bebob_terratec.c | 31 ---------------------------- sound/firewire/bebob/bebob_yamaha_terratec.c | 5 ++++- 4 files changed, 9 insertions(+), 38 deletions(-)
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index f7e2cbd..3469ac14 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -458,17 +458,17 @@ static const struct ieee1394_device_id bebob_id_table[] = { /* TerraTec Electronic GmbH, PHASE 88 Rack FW */ SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000003, &phase88_rack_spec), /* TerraTec Electronic GmbH, PHASE 24 FW */ - SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000004, &phase24_series_spec), + SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000004, &yamaha_terratec_spec), /* TerraTec Electronic GmbH, Phase X24 FW */ - SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000007, &phase24_series_spec), + SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000007, &yamaha_terratec_spec), /* TerraTec Electronic GmbH, EWS MIC2/MIC8 */ SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal), /* Terratec Electronic GmbH, Aureon 7.1 Firewire */ SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal), /* Yamaha, GO44 */ - SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000b, &yamaha_go_spec), + SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000b, &yamaha_terratec_spec), /* YAMAHA, GO46 */ - SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000c, &yamaha_go_spec), + SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000c, &yamaha_terratec_spec), /* Focusrite, SaffirePro 26 I/O */ SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec), /* Focusrite, SaffirePro 10 I/O */ diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h index e7f1bb9..175da87 100644 --- a/sound/firewire/bebob/bebob.h +++ b/sound/firewire/bebob/bebob.h @@ -235,8 +235,7 @@ int snd_bebob_create_hwdep_device(struct snd_bebob *bebob);
/* model specific operations */ extern const struct snd_bebob_spec phase88_rack_spec; -extern const struct snd_bebob_spec phase24_series_spec; -extern const struct snd_bebob_spec yamaha_go_spec; +extern const struct snd_bebob_spec yamaha_terratec_spec; extern const struct snd_bebob_spec saffirepro_26_spec; extern const struct snd_bebob_spec saffirepro_10_spec; extern const struct snd_bebob_spec saffire_le_spec; diff --git a/sound/firewire/bebob/bebob_terratec.c b/sound/firewire/bebob/bebob_terratec.c index c38358b..2fdaf93 100644 --- a/sound/firewire/bebob/bebob_terratec.c +++ b/sound/firewire/bebob/bebob_terratec.c @@ -36,25 +36,6 @@ end: return err; }
-static enum snd_bebob_clock_type phase24_series_clk_src_types[] = { - SND_BEBOB_CLOCK_TYPE_INTERNAL, - SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */ -}; -static int -phase24_series_clk_src_get(struct snd_bebob *bebob, unsigned int *id) -{ - int err; - - err = avc_audio_get_selector(bebob->unit, 0, 4, id); - if (err < 0) - return err; - - if (*id >= ARRAY_SIZE(phase24_series_clk_src_types)) - return -EIO; - - return 0; -} - static const struct snd_bebob_rate_spec phase_series_rate_spec = { .get = &snd_bebob_stream_get_rate, .set = &snd_bebob_stream_set_rate, @@ -71,15 +52,3 @@ const struct snd_bebob_spec phase88_rack_spec = { .rate = &phase_series_rate_spec, .meter = NULL }; - -/* 'PHASE 24 FW' and 'PHASE X24 FW' */ -static const struct snd_bebob_clock_spec phase24_series_clk = { - .num = ARRAY_SIZE(phase24_series_clk_src_types), - .types = phase24_series_clk_src_types, - .get = &phase24_series_clk_src_get, -}; -const struct snd_bebob_spec phase24_series_spec = { - .clock = &phase24_series_clk, - .rate = &phase_series_rate_spec, - .meter = NULL -}; diff --git a/sound/firewire/bebob/bebob_yamaha_terratec.c b/sound/firewire/bebob/bebob_yamaha_terratec.c index 5c5d7d3..a6be3e7 100644 --- a/sound/firewire/bebob/bebob_yamaha_terratec.c +++ b/sound/firewire/bebob/bebob_yamaha_terratec.c @@ -26,6 +26,9 @@ * Unfortunately current 'ffado-mixer' generated many asynchronous transaction * to observe device's state, mainly check cmp connection and signal format. I * recommend users to close ffado-mixer at 192.0kHz if mixer is needless. + * + * Terratec PHASE 24 FW and PHASE X24 FW are internally the same as + * Yamaha GO 44 and GO 46. Yamaha and Terratec had cooperated for these models. */
static enum snd_bebob_clock_type clk_src_types[] = { @@ -55,7 +58,7 @@ static const struct snd_bebob_rate_spec rate_spec = { .get = &snd_bebob_stream_get_rate, .set = &snd_bebob_stream_set_rate, }; -const struct snd_bebob_spec yamaha_go_spec = { +const struct snd_bebob_spec yamaha_terratec_spec = { .clock = &clock_spec, .rate = &rate_spec, .meter = NULL
On Wed, 24 Aug 2016 14:42:41 +0200, Takashi Sakamoto wrote:
Hi,
This patchset merges vendor-dependent codes for Yamaha/Terratec, because each of these two pairs has the same configuration:
- Yamaha GO44 / Terratec Phase 24 FW
- Yamaha GO46 / Terratec Phase X24 FW
The two companies might once have cooperated to develop some audio and music units on IEEE 1394 bus, based on DM1000E ASIC and BeBoB firmware. This conclusion comes from a reporter of a forum of Ubuntu Japanese Community. Thanks for his help to identify subunit formation and supported stream formats:
Jack & Firewireオーディオインターフェイスの設定に関する質問です。 https://forums.ubuntulinux.jp/viewtopic.php?id=18657
Terratec has also produced the other models with DM ASIC series and BeBoB firmware. For the models, vendor-dependent codes are still left.
Takashi Sakamoto (2): ALSA: bebob: rename file with vendor-dependent code so that it's for Yamaha/Terratec ALSA: bebob: unify configurations for some models produced by
Applied both patches. Thanks.
Takashi
participants (2)
-
Takashi Iwai
-
Takashi Sakamoto