summaryrefslogtreecommitdiff
path: root/sound/firewire/dice.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2013-10-15 20:26:05 +0200
committerClemens Ladisch <clemens@ladisch.de>2013-10-20 22:07:57 +0200
commitb20be8de1b3972ccf9af72850b045214faa8d830 (patch)
tree4420dfd34eb1feb12caf9b8c5ed032174a6dc148 /sound/firewire/dice.c
parenta471fcde8c2c4b65f110bb4210af3513ee4deeb8 (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/dice.c')
-rw-r--r--sound/firewire/dice.c9
1 files changed, 9 insertions, 0 deletions
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)
int key, value, vendor = -1, model = -1, err;
unsigned int category, i;
__be32 pointers[ARRAY_SIZE(min_values)];
+ __be32 tx_data[4];
__be32 version;
/*
@@ -1171,6 +1172,14 @@ static int dice_interface_check(struct fw_unit *unit)
return -ENODEV;
}
+ /* We support playback only. Let capture devices be handled by FFADO. */
+ err = snd_fw_transaction(unit, TCODE_READ_BLOCK_REQUEST,
+ DICE_PRIVATE_SPACE +
+ be32_to_cpu(pointers[2]) * 4,
+ tx_data, sizeof(tx_data), 0);
+ if (err < 0 || (tx_data[0] && tx_data[3]))
+ return -ENODEV;
+
/*
* Check that the implemented DICE driver specification major version
* number matches.