From patchwork Sun Jun 14 03:49:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 6603601 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9AC0F9F358 for ; Sun, 14 Jun 2015 03:54:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1372206C3 for ; Sun, 14 Jun 2015 03:54:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 94B9720552 for ; Sun, 14 Jun 2015 03:54:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 71247261498; Sun, 14 Jun 2015 05:54:23 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 37877260586; Sun, 14 Jun 2015 05:50:05 +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 61BAE26057D; Sun, 14 Jun 2015 05:50:02 +0200 (CEST) Received: from smtp311.phy.lolipop.jp (smtp311.phy.lolipop.jp [210.157.22.79]) by alsa0.perex.cz (Postfix) with ESMTP id 32678260505 for ; Sun, 14 Jun 2015 05:49:46 +0200 (CEST) Received: from smtp311.phy.lolipop.lan (HELO smtp311.phy.lolipop.jp) (172.17.1.11) (smtp-auth username m12129643-o-takashi, mechanism plain) by smtp311.phy.lolipop.jp (qpsmtpd/0.82) with ESMTPA; Sun, 14 Jun 2015 12:49:42 +0900 Received: from 127.0.0.1 (127.0.0.1) by smtp311.phy.lolipop.jp (LOLIPOP-Fsecure); Sun, 14 Jun 2015 12:49:38 +0900 (JST) X-Virus-Status: clean(LOLIPOP-Fsecure) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de Date: Sun, 14 Jun 2015 12:49:35 +0900 Message-Id: <1434253777-433-10-git-send-email-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434253777-433-1-git-send-email-o-takashi@sakamocchi.jp> References: <1434253777-433-1-git-send-email-o-takashi@sakamocchi.jp> Cc: kim@incendio.no, alsa-devel@alsa-project.org, jh1ood@gmail.com, ffado-devel@lists.sf.net Subject: [alsa-devel] [PATCH 09/11] ALSA: bebob: loosen up severity of checking continuity for BeBoB v3 quirk 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 PrismSound Orpheus, Behringer UFX1604 and FCA610 work with BeBoB v3, and they're confirmed to transmit discontinuous packets in the beginning of streaming. payload CIP headers 8 0x00070000 0x9002FFFF 8 0x00070000 0x9002FFFF 8 0x00070000 0x9002FFFF 8 0x00070008 0x9002FFFF <- 8 0x00070008 0x9002FFFF 8 0x00070008 0x9002FFFF 8 0x00070008 0x9002FFFF 8 0x00070008 0x9002FFFF 8 0x00070008 0x9002FFFF 232 0x00070000 0x9002E798 <- 232 0x00070008 0x9002FB99 232 0x00070010 0x90021398 8 0x00070018 0x9002FFFF (This sample was got with Behringer FCA610 and FFADO library.) This commit sets CIP_EMPTY_HAS_WRONG_DBC and CIP_SKIP_DBC_ZERO_CHECK to ignore these discontinuities. Tested-by: Kim Tore Jensen Signed-off-by: Takashi Sakamoto --- sound/firewire/bebob/bebob_stream.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c index 9c810f9..d0df6c1 100644 --- a/sound/firewire/bebob/bebob_stream.c +++ b/sound/firewire/bebob/bebob_stream.c @@ -540,6 +540,17 @@ int snd_bebob_stream_init_duplex(struct snd_bebob *bebob) /* See comments in next function */ init_completion(&bebob->bus_reset); bebob->tx_stream.flags |= CIP_SKIP_INIT_DBC_CHECK; + + /* + * BeBoB v3 transfers packets with these qurks: + * - In the beginning of streaming, the value of dbc is incremented + * even if no data blocks are transferred. + * - The value of dbc is reset suddenly. + */ + if (bebob->version > 2) + bebob->tx_stream.flags |= CIP_EMPTY_HAS_WRONG_DBC | + CIP_SKIP_DBC_ZERO_CHECK; + /* * At high sampling rate, M-Audio special firmware transmits empty * packet with the value of dbc incremented by 8 but the others are