diff options
| -rw-r--r-- | sound/firewire/dice/Makefile | 2 | ||||
| -rw-r--r-- | sound/firewire/dice/dice-teac.c | 43 | ||||
| -rw-r--r-- | sound/firewire/dice/dice.c | 13 | ||||
| -rw-r--r-- | sound/firewire/dice/dice.h | 1 |
4 files changed, 58 insertions, 1 deletions
diff --git a/sound/firewire/dice/Makefile b/sound/firewire/dice/Makefile index 36e25a3cf3c6..478cd7a08fb5 100644 --- a/sound/firewire/dice/Makefile +++ b/sound/firewire/dice/Makefile @@ -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 diff --git a/sound/firewire/dice/dice-teac.c b/sound/firewire/dice/dice-teac.c new file mode 100644 index 000000000000..29febddfe3a5 --- /dev/null +++ b/sound/firewire/dice/dice-teac.c @@ -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; +} diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c index bcbe80344328..85d265c7d544 100644 --- a/sound/firewire/dice/dice.c +++ b/sound/firewire/dice/dice.c @@ -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); diff --git a/sound/firewire/dice/dice.h b/sound/firewire/dice/dice.h index 4c0ad7335998..7744ea6a0791 100644 --- a/sound/firewire/dice/dice.h +++ b/sound/firewire/dice/dice.h @@ -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 |
