Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: dice: add support for TASCAM IF-FW/DM MkII

TEAC Corporation launched IF-FW/DM MkII as an add-in card for TASCAM
DM-3200 and DM-4800. This card uses TC Applied Technologies DICE II
ASIC.

This commit supports the add-in card. The configuration ROM content
includes some quirks:

- The category value stored in chip_ID_hi field of bus information block
is zero.
- The value of model in unit directory (0x00022e) is different from the
one in root directory (0x000006).

The hardware allows users to select the total number of audio data channels
available for system from 16 and 32 channels for both input and output
direction. In 16-channel mode, all audio data are transferred in a
single isochronous packet stream, while in 32-channel mode, they are
transferred across two streams. After the user changes the channel
configuration on the hardware panel, the device temporarily disappears
from the bus and reappears with the new stream formats. During device
probing the ALSA dice driver checks the number of available isochronous
packet streams to determine the active mode of the hardware.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://patch.msgid.link/20251017111145.263295-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Sakamoto and committed by
Takashi Iwai
28bcb216 1386d167

+58 -1
+1 -1
sound/firewire/dice/Makefile
··· 2 2 snd-dice-y := dice-transaction.o dice-stream.o dice-proc.o dice-midi.o \ 3 3 dice-pcm.o dice-hwdep.o dice.o dice-tcelectronic.o \ 4 4 dice-alesis.o dice-extension.o dice-mytek.o dice-presonus.o \ 5 - dice-harman.o dice-focusrite.o dice-weiss.o 5 + dice-harman.o dice-focusrite.o dice-weiss.o dice-teac.o 6 6 obj-$(CONFIG_SND_DICE) += snd-dice.o
+43
sound/firewire/dice/dice-teac.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + // dice-teac.c - a part of driver for DICE based devices 3 + // 4 + // Copyright (c) 2025 Takashi Sakamoto 5 + 6 + #include "dice.h" 7 + 8 + int snd_dice_detect_teac_formats(struct snd_dice *dice) 9 + { 10 + __be32 reg; 11 + u32 data; 12 + int err; 13 + 14 + err = snd_dice_transaction_read_tx(dice, TX_NUMBER, &reg, sizeof(reg)); 15 + if (err < 0) 16 + return err; 17 + 18 + dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16; 19 + dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16; 20 + dice->tx_midi_ports[0] = 1; 21 + 22 + data = be32_to_cpu(reg); 23 + if (data > 1) { 24 + dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16; 25 + dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16; 26 + } 27 + 28 + err = snd_dice_transaction_read_rx(dice, RX_NUMBER, &reg, sizeof(reg)); 29 + if (err < 0) 30 + return err; 31 + 32 + dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16; 33 + dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16; 34 + dice->rx_midi_ports[0] = 1; 35 + 36 + data = be32_to_cpu(reg); 37 + if (data > 1) { 38 + dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16; 39 + dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16; 40 + } 41 + 42 + return 0; 43 + }
+13
sound/firewire/dice/dice.c
··· 22 22 #define OUI_PRESONUS 0x000a92 23 23 #define OUI_HARMAN 0x000fd7 24 24 #define OUI_AVID 0x00a07e 25 + #define OUI_TEAC 0x00022e 25 26 26 27 #define DICE_CATEGORY_ID 0x04 27 28 #define WEISS_CATEGORY_ID 0x00 ··· 458 457 { 459 458 .match_flags = IEEE1394_MATCH_VERSION, 460 459 .version = DICE_INTERFACE, 460 + }, 461 + // Tascam IF-FW/DM MkII for DM-3200 and DM-4800. 462 + { 463 + .match_flags = IEEE1394_MATCH_VENDOR_ID | 464 + IEEE1394_MATCH_MODEL_ID | 465 + IEEE1394_MATCH_SPECIFIER_ID | 466 + IEEE1394_MATCH_VERSION, 467 + .vendor_id = OUI_TEAC, 468 + .model_id = OUI_TEAC, 469 + .specifier_id = OUI_TEAC, 470 + .version = 0x800006, 471 + .driver_data = (kernel_ulong_t)snd_dice_detect_teac_formats, 461 472 }, 462 473 { } 463 474 };
+1
sound/firewire/dice/dice.h
··· 233 233 int snd_dice_detect_harman_formats(struct snd_dice *dice); 234 234 int snd_dice_detect_focusrite_pro40_tcd3070_formats(struct snd_dice *dice); 235 235 int snd_dice_detect_weiss_formats(struct snd_dice *dice); 236 + int snd_dice_detect_teac_formats(struct snd_dice *dice); 236 237 237 238 #endif