[alsa-devel] [PATCH 0/2] ALSA: dice: optimization for TC Electronic Studio Konnekt 48

Hi,
This patchset adds optimization to current ALSA dice driver for Studio Konnekt 48 produced by TC Electronic 2007.
My recent work adds hard-coded stream format parameters for all of models produced by TC Electronic with ASICs of Dice series:
* Konnekt 24D * Konnect 8 * Studio Konnekt 48 * Konnekt Live * Desktop Konnekt 6 * Impact Twin * Digital Konnekt 32
(Series of PowerCore is not based on Dice.)
Except for Konnekt Live, I actually test with these models, and realized that current ALSA dice driver brings several issues, mainly with noises but with detection of packet discontinuities and jumbo payload for some models and transmission frequencies. I guess they comes from timestamping quirks which I reported:
[alsa-devel] Dice packet sequence quirk and ALSA firewire stack in Linux 4.6 http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107715.html
I have never found any good solution for this issue.
Takashi Sakamoto (2): ALSA: dice: fix stream format parameters for TC Electronic Studio Konnekt 48 ALSA: dice: unuse second stream for MIDI conformant data channel for TC Electronic models
sound/firewire/dice/dice-tcelectronic.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)

TC Electronic Studio Konnekt 48 is an application of combination of WaveFront Dice II STD and TC Applied Technologies (TCAT) TCD2210 (Dice Mini). The latter is on a board with BNC and optical interfaces, thus used for signal processing for word clock, S/PDIF and ADAT. This model doesn't support TCAT extended application protocol. For such devices, ALSA dice driver needs to have hard-coded parameters for stream formats.
This commit fixes stream format parameters for this model. Unfortunately, at sampling transmission frequencies over 48.0kHz, I confirmed that current ALSA dice driver doesn't drive the device appropriately to generate sounds (silence). I guess that this comes from timestamping quirk of Dice-based devices, which I reported.
[alsa-devel] Dice packet sequence quirk and ALSA firewire stack in Linux 4.6 http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107715.html
$ cd linux-firewire-utils/src $ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04044a26 bus_info_length 4, crc_length 4, crc 18982 404 31333934 bus_name "1394" 408 e0ff8112 irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 255, max_rec 8 (512), max_rom 1, gen 1, spd 2 (S400) 40c 00016604 company_id 000166 | 410 08a65810 device_id 0408a65810 | EUI-64 0001660408a65810
root directory ----------------------------------------------------------------- 414 00062ab9 directory_length 6, crc 10937 418 03000166 vendor 41c 8100000a --> descriptor leaf at 444 420 17000022 model 424 8100000f --> descriptor leaf at 460 428 0c0087c0 node capabilities per IEEE 1394 42c d1000001 --> unit directory at 430
unit directory at 430 ----------------------------------------------------------------- 430 0004d5c5 directory_length 4, crc 54725 434 12000166 specifier id 438 13000001 version 43c 17000022 model 440 8100000f --> descriptor leaf at 47c
descriptor leaf at 444 ----------------------------------------------------------------- 444 0006c490 leaf_length 6, crc 50320 448 00000000 textual descriptor 44c 00000000 minimal ASCII 450 54432045 "TC E" 454 6c656374 "lect" 458 726f6e69 "roni" 45c 63000000 "c"
descriptor leaf at 460 ----------------------------------------------------------------- 460 0006e08e leaf_length 6, crc 57486 464 00000000 textual descriptor 468 00000000 minimal ASCII 46c 53747564 "Stud" 470 696f4b6f "ioKo" 474 6e6e656b "nnek" 478 74343800 "t48"
descriptor leaf at 47c ----------------------------------------------------------------- 47c 0006e08e leaf_length 6, crc 57486 480 00000000 textual descriptor 484 00000000 minimal ASCII 488 53747564 "Stud" 48c 696f4b6f "ioKo" 490 6e6e656b "nnek" 494 74343800 "t48"
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/dice/dice-tcelectronic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/firewire/dice/dice-tcelectronic.c b/sound/firewire/dice/dice-tcelectronic.c index f9e0072deb81..a4cbe2da8c15 100644 --- a/sound/firewire/dice/dice-tcelectronic.c +++ b/sound/firewire/dice/dice-tcelectronic.c @@ -44,8 +44,8 @@ static const struct dice_tc_spec konnekt_live = { };
static const struct dice_tc_spec studio_konnekt_48 = { - .tx_pcm_chs = {{16, 16, 16}, {16, 16, 0} }, - .rx_pcm_chs = {{16, 16, 16}, {16, 16, 0} }, + .tx_pcm_chs = {{16, 16, 8}, {16, 16, 7} }, + .rx_pcm_chs = {{16, 16, 8}, {14, 14, 7} }, .has_midi = true, };

At present, all of models produced by TC Electronic except for Konnekt Live are supported with hard-coded their stream formats. Studio Konnekt 48 is sore model to support dual streams for both directions. The second stream has no MIDI conformant data channel in its data block. But current implementation transfers the second stream with MIDI conformant data channel.
This commit fixes this issue.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/dice/dice-tcelectronic.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/sound/firewire/dice/dice-tcelectronic.c b/sound/firewire/dice/dice-tcelectronic.c index a4cbe2da8c15..a8875d24ba2a 100644 --- a/sound/firewire/dice/dice-tcelectronic.c +++ b/sound/firewire/dice/dice-tcelectronic.c @@ -95,11 +95,9 @@ int snd_dice_detect_tcelectronic_formats(struct snd_dice *dice) memcpy(dice->rx_pcm_chs, entry->spec->rx_pcm_chs, MAX_STREAMS * SND_DICE_RATE_MODE_COUNT * sizeof(unsigned int));
- for (i = 0; i < MAX_STREAMS; ++i) { - if (entry->spec->has_midi) { - dice->tx_midi_ports[i] = 1; - dice->rx_midi_ports[i] = 1; - } + if (entry->spec->has_midi) { + dice->tx_midi_ports[0] = 1; + dice->rx_midi_ports[0] = 1; }
return 0;

On Sun, 27 May 2018 03:13:28 +0200, Takashi Sakamoto wrote:
Hi,
This patchset adds optimization to current ALSA dice driver for Studio Konnekt 48 produced by TC Electronic 2007.
My recent work adds hard-coded stream format parameters for all of models produced by TC Electronic with ASICs of Dice series:
- Konnekt 24D
- Konnect 8
- Studio Konnekt 48
- Konnekt Live
- Desktop Konnekt 6
- Impact Twin
- Digital Konnekt 32
(Series of PowerCore is not based on Dice.)
Except for Konnekt Live, I actually test with these models, and realized that current ALSA dice driver brings several issues, mainly with noises but with detection of packet discontinuities and jumbo payload for some models and transmission frequencies. I guess they comes from timestamping quirks which I reported:
[alsa-devel] Dice packet sequence quirk and ALSA firewire stack in Linux 4.6 http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107715.html
I have never found any good solution for this issue.
Takashi Sakamoto (2): ALSA: dice: fix stream format parameters for TC Electronic Studio Konnekt 48 ALSA: dice: unuse second stream for MIDI conformant data channel for TC Electronic models
Applied both patches now. Thanks.
Takashi
participants (2)
-
Takashi Iwai
-
Takashi Sakamoto