diff options
-rw-r--r-- | sound/firewire/amdtp-stream.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index bf10ca3adc57..00060c4a9deb 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c | |||
@@ -368,9 +368,8 @@ static void pcm_period_tasklet(unsigned long data) | |||
368 | snd_pcm_period_elapsed(pcm); | 368 | snd_pcm_period_elapsed(pcm); |
369 | } | 369 | } |
370 | 370 | ||
371 | static int queue_packet(struct amdtp_stream *s, | 371 | static int queue_packet(struct amdtp_stream *s, unsigned int header_length, |
372 | unsigned int header_length, | 372 | unsigned int payload_length) |
373 | unsigned int payload_length, bool skip) | ||
374 | { | 373 | { |
375 | struct fw_iso_packet p = {0}; | 374 | struct fw_iso_packet p = {0}; |
376 | int err = 0; | 375 | int err = 0; |
@@ -381,8 +380,10 @@ static int queue_packet(struct amdtp_stream *s, | |||
381 | p.interrupt = IS_ALIGNED(s->packet_index + 1, INTERRUPT_INTERVAL); | 380 | p.interrupt = IS_ALIGNED(s->packet_index + 1, INTERRUPT_INTERVAL); |
382 | p.tag = TAG_CIP; | 381 | p.tag = TAG_CIP; |
383 | p.header_length = header_length; | 382 | p.header_length = header_length; |
384 | p.payload_length = (!skip) ? payload_length : 0; | 383 | if (payload_length > 0) |
385 | p.skip = skip; | 384 | p.payload_length = payload_length; |
385 | else | ||
386 | p.skip = true; | ||
386 | err = fw_iso_context_queue(s->context, &p, &s->buffer.iso_buffer, | 387 | err = fw_iso_context_queue(s->context, &p, &s->buffer.iso_buffer, |
387 | s->buffer.packets[s->packet_index].offset); | 388 | s->buffer.packets[s->packet_index].offset); |
388 | if (err < 0) { | 389 | if (err < 0) { |
@@ -397,16 +398,15 @@ end: | |||
397 | } | 398 | } |
398 | 399 | ||
399 | static inline int queue_out_packet(struct amdtp_stream *s, | 400 | static inline int queue_out_packet(struct amdtp_stream *s, |
400 | unsigned int payload_length, bool skip) | 401 | unsigned int payload_length) |
401 | { | 402 | { |
402 | return queue_packet(s, OUT_PACKET_HEADER_SIZE, | 403 | return queue_packet(s, OUT_PACKET_HEADER_SIZE, payload_length); |
403 | payload_length, skip); | ||
404 | } | 404 | } |
405 | 405 | ||
406 | static inline int queue_in_packet(struct amdtp_stream *s) | 406 | static inline int queue_in_packet(struct amdtp_stream *s) |
407 | { | 407 | { |
408 | return queue_packet(s, IN_PACKET_HEADER_SIZE, | 408 | return queue_packet(s, IN_PACKET_HEADER_SIZE, |
409 | amdtp_stream_get_max_payload(s), false); | 409 | amdtp_stream_get_max_payload(s)); |
410 | } | 410 | } |
411 | 411 | ||
412 | static int handle_out_packet(struct amdtp_stream *s, unsigned int cycle, | 412 | static int handle_out_packet(struct amdtp_stream *s, unsigned int cycle, |
@@ -437,7 +437,7 @@ static int handle_out_packet(struct amdtp_stream *s, unsigned int cycle, | |||
437 | 437 | ||
438 | trace_out_packet(s, cycle, buffer, payload_length, index); | 438 | trace_out_packet(s, cycle, buffer, payload_length, index); |
439 | 439 | ||
440 | if (queue_out_packet(s, payload_length, false) < 0) | 440 | if (queue_out_packet(s, payload_length) < 0) |
441 | return -EIO; | 441 | return -EIO; |
442 | 442 | ||
443 | pcm = ACCESS_ONCE(s->pcm); | 443 | pcm = ACCESS_ONCE(s->pcm); |
@@ -764,7 +764,7 @@ int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed) | |||
764 | if (s->direction == AMDTP_IN_STREAM) | 764 | if (s->direction == AMDTP_IN_STREAM) |
765 | err = queue_in_packet(s); | 765 | err = queue_in_packet(s); |
766 | else | 766 | else |
767 | err = queue_out_packet(s, 0, true); | 767 | err = queue_out_packet(s, 0); |
768 | if (err < 0) | 768 | if (err < 0) |
769 | goto err_context; | 769 | goto err_context; |
770 | } while (s->packet_index > 0); | 770 | } while (s->packet_index > 0); |