diff options
Diffstat (limited to 'sound/firewire/dice')
-rw-r--r-- | sound/firewire/dice/Makefile | 2 | ||||
-rw-r--r-- | sound/firewire/dice/dice-focusrite.c | 25 | ||||
-rw-r--r-- | sound/firewire/dice/dice.c | 10 | ||||
-rw-r--r-- | sound/firewire/dice/dice.h | 1 |
4 files changed, 37 insertions, 1 deletions
diff --git a/sound/firewire/dice/Makefile b/sound/firewire/dice/Makefile index 9bf7b960a720..a5f3fbf28b8c 100644 --- a/sound/firewire/dice/Makefile +++ b/sound/firewire/dice/Makefile @@ -2,5 +2,5 @@ snd-dice-objs := 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-harman.o dice-focusrite.o obj-$(CONFIG_SND_DICE) += snd-dice.o diff --git a/sound/firewire/dice/dice-focusrite.c b/sound/firewire/dice/dice-focusrite.c new file mode 100644 index 000000000000..caf9f620c5d0 --- /dev/null +++ b/sound/firewire/dice/dice-focusrite.c @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 +// dice-focusrite.c - a part of driver for DICE based devices +// +// Copyright (c) 2022 Takashi Sakamoto +// +// Licensed under the terms of the GNU General Public License, version 2. + +#include "dice.h" + +int snd_dice_detect_focusrite_pro40_tcd3070_formats(struct snd_dice *dice) +{ + // Focusrite shipped several variants of Saffire Pro 40. One of them is based on TCD3070-CH + // apart from the others with TCD2220. It doesn't support TCAT protocol extension. + dice->tx_pcm_chs[0][0] = 20; + dice->tx_midi_ports[0] = 1; + dice->rx_pcm_chs[0][0] = 20; + dice->rx_midi_ports[0] = 1; + + dice->tx_pcm_chs[0][1] = 16; + dice->tx_midi_ports[1] = 1; + dice->rx_pcm_chs[0][1] = 16; + dice->rx_midi_ports[1] = 1; + + return 0; +} diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c index f75902bc8e74..6036a5edbcb8 100644 --- a/sound/firewire/dice/dice.c +++ b/sound/firewire/dice/dice.c @@ -382,6 +382,16 @@ static const struct ieee1394_device_id dice_id_table[] = { .model_id = 0x000001, .driver_data = (kernel_ulong_t)snd_dice_detect_harman_formats, }, + // Focusrite Saffire Pro 40 with TCD3070-CH. + // The model has quirk in its GUID, in which model field is 0x000013 and different from + // model ID (0x0000de) in its root/unit directory. + { + .match_flags = IEEE1394_MATCH_VENDOR_ID | + IEEE1394_MATCH_MODEL_ID, + .vendor_id = OUI_FOCUSRITE, + .model_id = 0x0000de, + .driver_data = (kernel_ulong_t)snd_dice_detect_focusrite_pro40_tcd3070_formats, + }, { .match_flags = IEEE1394_MATCH_VERSION, .version = DICE_INTERFACE, diff --git a/sound/firewire/dice/dice.h b/sound/firewire/dice/dice.h index fd440cc625f9..674f7d552c2e 100644 --- a/sound/firewire/dice/dice.h +++ b/sound/firewire/dice/dice.h @@ -231,5 +231,6 @@ int snd_dice_detect_extension_formats(struct snd_dice *dice); int snd_dice_detect_mytek_formats(struct snd_dice *dice); 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); #endif |