diff options
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/amdtp.c | 15 | ||||
-rw-r--r-- | sound/firewire/dice.c | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index d3226892ad6b..9048777228e2 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c | |||
@@ -434,17 +434,14 @@ static void queue_out_packet(struct amdtp_out_stream *s, unsigned int cycle) | |||
434 | return; | 434 | return; |
435 | index = s->packet_index; | 435 | index = s->packet_index; |
436 | 436 | ||
437 | /* this module generate empty packet for 'no data' */ | ||
437 | syt = calculate_syt(s, cycle); | 438 | syt = calculate_syt(s, cycle); |
438 | if (!(s->flags & CIP_BLOCKING)) { | 439 | if (!(s->flags & CIP_BLOCKING)) |
439 | data_blocks = calculate_data_blocks(s); | 440 | data_blocks = calculate_data_blocks(s); |
440 | } else { | 441 | else if (syt != 0xffff) |
441 | if (syt != 0xffff) { | 442 | data_blocks = s->syt_interval; |
442 | data_blocks = s->syt_interval; | 443 | else |
443 | } else { | 444 | data_blocks = 0; |
444 | data_blocks = 0; | ||
445 | syt = 0xffffff; | ||
446 | } | ||
447 | } | ||
448 | 445 | ||
449 | buffer = s->buffer.packets[index].buffer; | 446 | buffer = s->buffer.packets[index].buffer; |
450 | buffer[0] = cpu_to_be32(ACCESS_ONCE(s->source_node_id_field) | | 447 | buffer[0] = cpu_to_be32(ACCESS_ONCE(s->source_node_id_field) | |
diff --git a/sound/firewire/dice.c b/sound/firewire/dice.c index 57bcd31fcc12..c0aa64941cee 100644 --- a/sound/firewire/dice.c +++ b/sound/firewire/dice.c | |||
@@ -1019,7 +1019,7 @@ static void dice_proc_read(struct snd_info_entry *entry, | |||
1019 | 1019 | ||
1020 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[2], 2) < 0) | 1020 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[2], 2) < 0) |
1021 | return; | 1021 | return; |
1022 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.tx)); | 1022 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.tx) / 4); |
1023 | for (stream = 0; stream < tx_rx_header.number; ++stream) { | 1023 | for (stream = 0; stream < tx_rx_header.number; ++stream) { |
1024 | if (dice_proc_read_mem(dice, &buf.tx, sections[2] + 2 + | 1024 | if (dice_proc_read_mem(dice, &buf.tx, sections[2] + 2 + |
1025 | stream * tx_rx_header.size, | 1025 | stream * tx_rx_header.size, |
@@ -1045,7 +1045,7 @@ static void dice_proc_read(struct snd_info_entry *entry, | |||
1045 | 1045 | ||
1046 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[4], 2) < 0) | 1046 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[4], 2) < 0) |
1047 | return; | 1047 | return; |
1048 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.rx)); | 1048 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.rx) / 4); |
1049 | for (stream = 0; stream < tx_rx_header.number; ++stream) { | 1049 | for (stream = 0; stream < tx_rx_header.number; ++stream) { |
1050 | if (dice_proc_read_mem(dice, &buf.rx, sections[4] + 2 + | 1050 | if (dice_proc_read_mem(dice, &buf.rx, sections[4] + 2 + |
1051 | stream * tx_rx_header.size, | 1051 | stream * tx_rx_header.size, |