From patchwork Sun Jun 1 16:50:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 4278861 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2602FBEEA7 for ; Sun, 1 Jun 2014 16:50:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECCC720225 for ; Sun, 1 Jun 2014 16:50:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 283CA2021A for ; Sun, 1 Jun 2014 16:50:46 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B571926545E; Sun, 1 Jun 2014 18:50:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id E64FF26545F; Sun, 1 Jun 2014 18:50:36 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 37DB4265465; Sun, 1 Jun 2014 18:50:35 +0200 (CEST) Received: from smtp302.phy.lolipop.jp (smtp302.phy.lolipop.jp [210.157.22.85]) by alsa0.perex.cz (Postfix) with ESMTP id C74CC26545D for ; Sun, 1 Jun 2014 18:50:26 +0200 (CEST) Received: from smtp302.phy.lolipop.lan (HELO smtp302.phy.lolipop.jp) (172.17.1.85) (smtp-auth username m12129643-o-takashi, mechanism plain) by smtp302.phy.lolipop.jp (qpsmtpd/0.82) with ESMTPA; Mon, 02 Jun 2014 01:50:19 +0900 Received: from 127.0.0.1 (127.0.0.1) by smtp302.phy.lolipop.jp (LOLIPOP-Fsecure); Mon, 02 Jun 2014 01:50:16 +0900 (JST) X-Virus-Status: clean(LOLIPOP-Fsecure) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de, perex@perex.cz Date: Mon, 2 Jun 2014 01:50:16 +0900 Message-Id: <1401641416-14127-1-git-send-email-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 1.8.3.2 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] firewire-lib: Use IEC 61883-6 compliant labels for Raw Audio data X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP According to AM824 in IEC 61883-6:2002, 2 bits in LSB of label for Raw Audio data means Valid Length Code (VBL). Ths value is: - b00 for 24 bits sample (label is 0x40) - b01 for 20 bits sample (label is 0x41) - b10 for 16 bits sample (label is 0x42) But current firewire-lib apply 24 bits label for both of 16/24 bits samples. As long as developers investigate BeBoB/Fireworks/OXFW/Dice, all of them have a behaviour to ignore the label. They can generate correct sound even if firewire-lib gives wrong label (i.e. 0xff). On BeBoB, this is not only for Raw Audio data channel, but also for IEC 60958 Conformant data channel. So there is little possibility of regression. Acked-by: Clemens Ladisch Signed-off-by: Takashi Sakamoto --- sound/firewire/amdtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index 31dd1cf..f96bf4c 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c @@ -418,7 +418,7 @@ static void amdtp_write_s16(struct amdtp_stream *s, for (i = 0; i < frames; ++i) { for (c = 0; c < channels; ++c) { buffer[s->pcm_positions[c]] = - cpu_to_be32((*src << 8) | 0x40000000); + cpu_to_be32((*src << 8) | 0x42000000); src++; } buffer += s->data_block_quadlets;