diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2013-10-15 14:26:05 -0400 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2013-10-20 16:07:57 -0400 |
commit | b20be8de1b3972ccf9af72850b045214faa8d830 (patch) | |
tree | 4420dfd34eb1feb12caf9b8c5ed032174a6dc148 /sound/firewire | |
parent | a471fcde8c2c4b65f110bb4210af3513ee4deeb8 (diff) |
ALSA: dice: restrict the driver to playback-only devices
At the moment, this driver supports only playback, while FFADO supports
(only) full-duplex devices. So, prevent conflicts by not claiming
devices that would be better handled by FFADO.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/Kconfig | 10 | ||||
-rw-r--r-- | sound/firewire/dice.c | 9 |
2 files changed, 15 insertions, 4 deletions
diff --git a/sound/firewire/Kconfig b/sound/firewire/Kconfig index 915330989412..b3e274fe4a77 100644 --- a/sound/firewire/Kconfig +++ b/sound/firewire/Kconfig | |||
@@ -12,14 +12,16 @@ config SND_FIREWIRE_LIB | |||
12 | depends on SND_PCM | 12 | depends on SND_PCM |
13 | 13 | ||
14 | config SND_DICE | 14 | config SND_DICE |
15 | tristate "DICE devices (EXPERIMENTAL)" | 15 | tristate "DICE-based DACs (EXPERIMENTAL)" |
16 | select SND_HWDEP | 16 | select SND_HWDEP |
17 | select SND_PCM | 17 | select SND_PCM |
18 | select SND_FIREWIRE_LIB | 18 | select SND_FIREWIRE_LIB |
19 | help | 19 | help |
20 | Say Y here to include support for many FireWire audio interfaces | 20 | Say Y here to include support for many DACs based on the DICE |
21 | based on the DICE chip family (DICE-II/Jr/Mini) from TC Applied | 21 | chip family (DICE-II/Jr/Mini) from TC Applied Technologies. |
22 | Technologies. | 22 | |
23 | At the moment, this driver supports playback only. If you | ||
24 | want to use devices that support capturing, use FFADO instead. | ||
23 | 25 | ||
24 | To compile this driver as a module, choose M here: the module | 26 | To compile this driver as a module, choose M here: the module |
25 | will be called snd-dice. | 27 | will be called snd-dice. |
diff --git a/sound/firewire/dice.c b/sound/firewire/dice.c index 49d630ba2d9f..6feee6614193 100644 --- a/sound/firewire/dice.c +++ b/sound/firewire/dice.c | |||
@@ -1128,6 +1128,7 @@ static int dice_interface_check(struct fw_unit *unit) | |||
1128 | int key, value, vendor = -1, model = -1, err; | 1128 | int key, value, vendor = -1, model = -1, err; |
1129 | unsigned int category, i; | 1129 | unsigned int category, i; |
1130 | __be32 pointers[ARRAY_SIZE(min_values)]; | 1130 | __be32 pointers[ARRAY_SIZE(min_values)]; |
1131 | __be32 tx_data[4]; | ||
1131 | __be32 version; | 1132 | __be32 version; |
1132 | 1133 | ||
1133 | /* | 1134 | /* |
@@ -1171,6 +1172,14 @@ static int dice_interface_check(struct fw_unit *unit) | |||
1171 | return -ENODEV; | 1172 | return -ENODEV; |
1172 | } | 1173 | } |
1173 | 1174 | ||
1175 | /* We support playback only. Let capture devices be handled by FFADO. */ | ||
1176 | err = snd_fw_transaction(unit, TCODE_READ_BLOCK_REQUEST, | ||
1177 | DICE_PRIVATE_SPACE + | ||
1178 | be32_to_cpu(pointers[2]) * 4, | ||
1179 | tx_data, sizeof(tx_data), 0); | ||
1180 | if (err < 0 || (tx_data[0] && tx_data[3])) | ||
1181 | return -ENODEV; | ||
1182 | |||
1174 | /* | 1183 | /* |
1175 | * Check that the implemented DICE driver specification major version | 1184 | * Check that the implemented DICE driver specification major version |
1176 | * number matches. | 1185 | * number matches. |