diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/amdtp.c | 1 | ||||
-rw-r--r-- | sound/firewire/cmp.c | 3 | ||||
-rw-r--r-- | sound/firewire/iso-resources.c | 12 | ||||
-rw-r--r-- | sound/firewire/iso-resources.h | 1 |
4 files changed, 5 insertions, 12 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index b18140ff2b93..87657dd7714c 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c | |||
@@ -396,6 +396,7 @@ static void out_packet_callback(struct fw_iso_context *context, u32 cycle, | |||
396 | 396 | ||
397 | for (i = 0; i < packets; ++i) | 397 | for (i = 0; i < packets; ++i) |
398 | queue_out_packet(s, ++cycle); | 398 | queue_out_packet(s, ++cycle); |
399 | fw_iso_context_queue_flush(s->context); | ||
399 | } | 400 | } |
400 | 401 | ||
401 | static int queue_initial_skip_packets(struct amdtp_out_stream *s) | 402 | static int queue_initial_skip_packets(struct amdtp_out_stream *s) |
diff --git a/sound/firewire/cmp.c b/sound/firewire/cmp.c index 4a37f3a6fab9..14cacbc655dd 100644 --- a/sound/firewire/cmp.c +++ b/sound/firewire/cmp.c | |||
@@ -49,10 +49,9 @@ static int pcr_modify(struct cmp_connection *c, | |||
49 | enum bus_reset_handling bus_reset_handling) | 49 | enum bus_reset_handling bus_reset_handling) |
50 | { | 50 | { |
51 | struct fw_device *device = fw_parent_device(c->resources.unit); | 51 | struct fw_device *device = fw_parent_device(c->resources.unit); |
52 | __be32 *buffer = c->resources.buffer; | ||
53 | int generation = c->resources.generation; | 52 | int generation = c->resources.generation; |
54 | int rcode, errors = 0; | 53 | int rcode, errors = 0; |
55 | __be32 old_arg; | 54 | __be32 old_arg, buffer[2]; |
56 | int err; | 55 | int err; |
57 | 56 | ||
58 | buffer[0] = c->last_pcr_value; | 57 | buffer[0] = c->last_pcr_value; |
diff --git a/sound/firewire/iso-resources.c b/sound/firewire/iso-resources.c index 9d4a6714f9ec..ffe20b877e9f 100644 --- a/sound/firewire/iso-resources.c +++ b/sound/firewire/iso-resources.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/jiffies.h> | 11 | #include <linux/jiffies.h> |
12 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
16 | #include "iso-resources.h" | 15 | #include "iso-resources.h" |
17 | 16 | ||
@@ -25,10 +24,6 @@ | |||
25 | */ | 24 | */ |
26 | int fw_iso_resources_init(struct fw_iso_resources *r, struct fw_unit *unit) | 25 | int fw_iso_resources_init(struct fw_iso_resources *r, struct fw_unit *unit) |
27 | { | 26 | { |
28 | r->buffer = kmalloc(2 * 4, GFP_KERNEL); | ||
29 | if (!r->buffer) | ||
30 | return -ENOMEM; | ||
31 | |||
32 | r->channels_mask = ~0uLL; | 27 | r->channels_mask = ~0uLL; |
33 | r->unit = fw_unit_get(unit); | 28 | r->unit = fw_unit_get(unit); |
34 | mutex_init(&r->mutex); | 29 | mutex_init(&r->mutex); |
@@ -45,7 +40,6 @@ EXPORT_SYMBOL(fw_iso_resources_init); | |||
45 | void fw_iso_resources_destroy(struct fw_iso_resources *r) | 40 | void fw_iso_resources_destroy(struct fw_iso_resources *r) |
46 | { | 41 | { |
47 | WARN_ON(r->allocated); | 42 | WARN_ON(r->allocated); |
48 | kfree(r->buffer); | ||
49 | mutex_destroy(&r->mutex); | 43 | mutex_destroy(&r->mutex); |
50 | fw_unit_put(r->unit); | 44 | fw_unit_put(r->unit); |
51 | } | 45 | } |
@@ -133,7 +127,7 @@ retry_after_bus_reset: | |||
133 | 127 | ||
134 | bandwidth = r->bandwidth + r->bandwidth_overhead; | 128 | bandwidth = r->bandwidth + r->bandwidth_overhead; |
135 | fw_iso_resource_manage(card, r->generation, r->channels_mask, | 129 | fw_iso_resource_manage(card, r->generation, r->channels_mask, |
136 | &channel, &bandwidth, true, r->buffer); | 130 | &channel, &bandwidth, true); |
137 | if (channel == -EAGAIN) { | 131 | if (channel == -EAGAIN) { |
138 | mutex_unlock(&r->mutex); | 132 | mutex_unlock(&r->mutex); |
139 | goto retry_after_bus_reset; | 133 | goto retry_after_bus_reset; |
@@ -187,7 +181,7 @@ int fw_iso_resources_update(struct fw_iso_resources *r) | |||
187 | bandwidth = r->bandwidth + r->bandwidth_overhead; | 181 | bandwidth = r->bandwidth + r->bandwidth_overhead; |
188 | 182 | ||
189 | fw_iso_resource_manage(card, r->generation, 1uLL << r->channel, | 183 | fw_iso_resource_manage(card, r->generation, 1uLL << r->channel, |
190 | &channel, &bandwidth, true, r->buffer); | 184 | &channel, &bandwidth, true); |
191 | /* | 185 | /* |
192 | * When another bus reset happens, pretend that the allocation | 186 | * When another bus reset happens, pretend that the allocation |
193 | * succeeded; we will try again for the new generation later. | 187 | * succeeded; we will try again for the new generation later. |
@@ -224,7 +218,7 @@ void fw_iso_resources_free(struct fw_iso_resources *r) | |||
224 | if (r->allocated) { | 218 | if (r->allocated) { |
225 | bandwidth = r->bandwidth + r->bandwidth_overhead; | 219 | bandwidth = r->bandwidth + r->bandwidth_overhead; |
226 | fw_iso_resource_manage(card, r->generation, 1uLL << r->channel, | 220 | fw_iso_resource_manage(card, r->generation, 1uLL << r->channel, |
227 | &channel, &bandwidth, false, r->buffer); | 221 | &channel, &bandwidth, false); |
228 | if (channel < 0) | 222 | if (channel < 0) |
229 | dev_err(&r->unit->device, | 223 | dev_err(&r->unit->device, |
230 | "isochronous resource deallocation failed\n"); | 224 | "isochronous resource deallocation failed\n"); |
diff --git a/sound/firewire/iso-resources.h b/sound/firewire/iso-resources.h index 3f0730e4d841..5a9af7c61657 100644 --- a/sound/firewire/iso-resources.h +++ b/sound/firewire/iso-resources.h | |||
@@ -24,7 +24,6 @@ struct fw_iso_resources { | |||
24 | unsigned int bandwidth_overhead; | 24 | unsigned int bandwidth_overhead; |
25 | int generation; /* in which allocation is valid */ | 25 | int generation; /* in which allocation is valid */ |
26 | bool allocated; | 26 | bool allocated; |
27 | __be32 *buffer; | ||
28 | }; | 27 | }; |
29 | 28 | ||
30 | int fw_iso_resources_init(struct fw_iso_resources *r, | 29 | int fw_iso_resources_init(struct fw_iso_resources *r, |