mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 13:30:45 -05:00
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>
This commit is contained in:
committed by
Takashi Iwai
parent
1386d16761
commit
28bcb21696
@@ -2,5 +2,5 @@
|
||||
snd-dice-y := dice-transaction.o dice-stream.o dice-proc.o dice-midi.o \
|
||||
dice-pcm.o dice-hwdep.o dice.o dice-tcelectronic.o \
|
||||
dice-alesis.o dice-extension.o dice-mytek.o dice-presonus.o \
|
||||
dice-harman.o dice-focusrite.o dice-weiss.o
|
||||
dice-harman.o dice-focusrite.o dice-weiss.o dice-teac.o
|
||||
obj-$(CONFIG_SND_DICE) += snd-dice.o
|
||||
|
||||
43
sound/firewire/dice/dice-teac.c
Normal file
43
sound/firewire/dice/dice-teac.c
Normal file
@@ -0,0 +1,43 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// dice-teac.c - a part of driver for DICE based devices
|
||||
//
|
||||
// Copyright (c) 2025 Takashi Sakamoto
|
||||
|
||||
#include "dice.h"
|
||||
|
||||
int snd_dice_detect_teac_formats(struct snd_dice *dice)
|
||||
{
|
||||
__be32 reg;
|
||||
u32 data;
|
||||
int err;
|
||||
|
||||
err = snd_dice_transaction_read_tx(dice, TX_NUMBER, ®, sizeof(reg));
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16;
|
||||
dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16;
|
||||
dice->tx_midi_ports[0] = 1;
|
||||
|
||||
data = be32_to_cpu(reg);
|
||||
if (data > 1) {
|
||||
dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16;
|
||||
dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16;
|
||||
}
|
||||
|
||||
err = snd_dice_transaction_read_rx(dice, RX_NUMBER, ®, sizeof(reg));
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16;
|
||||
dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16;
|
||||
dice->rx_midi_ports[0] = 1;
|
||||
|
||||
data = be32_to_cpu(reg);
|
||||
if (data > 1) {
|
||||
dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16;
|
||||
dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -22,6 +22,7 @@ MODULE_LICENSE("GPL");
|
||||
#define OUI_PRESONUS 0x000a92
|
||||
#define OUI_HARMAN 0x000fd7
|
||||
#define OUI_AVID 0x00a07e
|
||||
#define OUI_TEAC 0x00022e
|
||||
|
||||
#define DICE_CATEGORY_ID 0x04
|
||||
#define WEISS_CATEGORY_ID 0x00
|
||||
@@ -458,6 +459,18 @@ static const struct ieee1394_device_id dice_id_table[] = {
|
||||
.match_flags = IEEE1394_MATCH_VERSION,
|
||||
.version = DICE_INTERFACE,
|
||||
},
|
||||
// Tascam IF-FW/DM MkII for DM-3200 and DM-4800.
|
||||
{
|
||||
.match_flags = IEEE1394_MATCH_VENDOR_ID |
|
||||
IEEE1394_MATCH_MODEL_ID |
|
||||
IEEE1394_MATCH_SPECIFIER_ID |
|
||||
IEEE1394_MATCH_VERSION,
|
||||
.vendor_id = OUI_TEAC,
|
||||
.model_id = OUI_TEAC,
|
||||
.specifier_id = OUI_TEAC,
|
||||
.version = 0x800006,
|
||||
.driver_data = (kernel_ulong_t)snd_dice_detect_teac_formats,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(ieee1394, dice_id_table);
|
||||
|
||||
@@ -233,5 +233,6 @@ int snd_dice_detect_presonus_formats(struct snd_dice *dice);
|
||||
int snd_dice_detect_harman_formats(struct snd_dice *dice);
|
||||
int snd_dice_detect_focusrite_pro40_tcd3070_formats(struct snd_dice *dice);
|
||||
int snd_dice_detect_weiss_formats(struct snd_dice *dice);
|
||||
int snd_dice_detect_teac_formats(struct snd_dice *dice);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user