diff options
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/cmp.c | 1 | ||||
-rw-r--r-- | sound/firewire/motu/motu-protocol-v3.c | 16 |
2 files changed, 13 insertions, 4 deletions
diff --git a/sound/firewire/cmp.c b/sound/firewire/cmp.c index 14abbe7175b6..b596bec19774 100644 --- a/sound/firewire/cmp.c +++ b/sound/firewire/cmp.c @@ -293,7 +293,6 @@ static int pcr_set_check(struct cmp_connection *c, __be32 pcr) /** * cmp_connection_establish - establish a connection to the target * @c: the connection manager - * @max_payload_bytes: the amount of data (including CIP headers) per packet * * This function establishes a point-to-point connection from the local * computer to the target by allocating isochronous resources (channel and diff --git a/sound/firewire/motu/motu-protocol-v3.c b/sound/firewire/motu/motu-protocol-v3.c index 01a47ac7bb2d..4e6b0e449ee4 100644 --- a/sound/firewire/motu/motu-protocol-v3.c +++ b/sound/firewire/motu/motu-protocol-v3.c @@ -24,6 +24,9 @@ #define V3_NO_ADAT_OPT_OUT_IFACE_A 0x00040000 #define V3_NO_ADAT_OPT_OUT_IFACE_B 0x00400000 +#define V3_MSG_FLAG_CLK_CHANGED 0x00000002 +#define V3_CLK_WAIT_MSEC 4000 + int snd_motu_protocol_v3_get_clock_rate(struct snd_motu *motu, unsigned int *rate) { @@ -79,9 +82,16 @@ int snd_motu_protocol_v3_set_clock_rate(struct snd_motu *motu, return err; if (need_to_wait) { - /* Cost expensive. */ - if (msleep_interruptible(4000) > 0) - return -EINTR; + int result; + + motu->msg = 0; + result = wait_event_interruptible_timeout(motu->hwdep_wait, + motu->msg & V3_MSG_FLAG_CLK_CHANGED, + msecs_to_jiffies(V3_CLK_WAIT_MSEC)); + if (result < 0) + return result; + if (result == 0) + return -ETIMEDOUT; } return 0; |