aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2013-11-21 00:21:06 -0500
committerTakashi Iwai <tiwai@suse.de>2013-11-22 09:30:46 -0500
commit82755abfe872c9f2b9a108641f98d08435762dc4 (patch)
treebfcbee76387927254a59706bb5a26c97db670857 /sound/firewire
parent5db4d34b54c7726253926223580c516f244f9c31 (diff)
ALSA: firewire-lib: fix wrong value for FDF field as an empty packet
This commit fix out of specification about the value of FDF field in out packet with 'no data'. This affects blocking mode. According to IEC 61883-6, there is two way to generate AMDTP packets include no data in blocking mode. Way 1. an empty packet defined in IEC 61883-1 - Size of packet is 2 quadlets. - The value of FDF is sfc. - The packet includes only CIP headers Way 2. a special non-empty packet defined in IEC 61883-6 - Size of packet is following to blocking mode - The value of FDF is 0xff. This value is 'NO-DATA'. This means 'The receiver' must ignore all the data in a CIP with this FDF code'. - The packet includes dummy data. But current implementation is a combination of them. - Size of packet is 2 (way 1) - FDF = 0xff (way 2) This causes BeBoB chipset cannot sound. This patch applies Way 1. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Cc: Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/amdtp.c15
1 files changed, 6 insertions, 9 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) |