From patchwork Sun May 23 12:41:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 12274861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8AA0C47080 for ; Sun, 23 May 2021 12:42:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BEC9611CB for ; Sun, 23 May 2021 12:42:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BEC9611CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 168B01664; Sun, 23 May 2021 14:41:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 168B01664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621773741; bh=dflXr8wLbdTN5Y5OxEMz+mqauAfzFusAd5VOEZShayk=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=TYdDYrwTzIZQdFShqWe3PB5iRWa/zr3yjfFKa3S3/cb4sByss6R4/wCO7t1LFfM/F a/Z1S7jORcprtCdDSu90QSnZZ81HAkDyRJxlpT8E7MtOch4Uu9sqb1C80ns9//stbT bUkVAovXHJ+nsBPczRQtzw6lfClh+T++6GlMLkN8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8D037F80212; Sun, 23 May 2021 14:41:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DBC64F8026B; Sun, 23 May 2021 14:41:28 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7D9D3F800DF for ; Sun, 23 May 2021 14:41:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D9D3F800DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="M3jpK7i3"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mqf+vQ6d" Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 605A8E7B; Sun, 23 May 2021 08:41:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 23 May 2021 08:41:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=03NdAVDEukhlIrXjsY0bseozuj p8nsn7QD2YDVhTJ24=; b=M3jpK7i3w32zZKIca1pSIjzwbI997k7DaJYtyuI9dQ cgkD/hib28UsnidIO5sSjQCNmhhTK/PgQw+B28tZJ3hmzh2iTEyCrfgSzITVmxeL 67yjJo50sfagFaWVhzHXa/9a5bcQXxx7oLnUDfOiuvT8+05mm2Mb3ZWIGfPFLwpT Jumr4C80+x264KYKXv9+6BSBgAd5T4+OU2n2hcVCTA5C6hIqAAaONL/Ws0MIorFg QGjPkBHxAy+l8eX/NFtWAZDafllrccxn7rNp9FCspTE3MBCqznCen8ulBSVWDoT8 1JCppxjox1bXsaEBBRZXbc5AMCqqNaV9+CZ4ZDl1d3Bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=03NdAVDEukhlIrXjs Y0bseozujp8nsn7QD2YDVhTJ24=; b=mqf+vQ6dxhM803M7YoSUr4Q8ApnYdHHWl Lj9QkErAlu5d3a+8OHNBVLhNfK9FexVnWOuDLkwS61vMwedBPde7ijGlh3WkfH24 PkyCZYUUunvUtFxyU7/Cod4ZrmysXgh1GPdpzv8vhE+zxyw4RDZHBtCQpeRfivfx ytoSlGNJmAX84UXdTxsmJzhbQ94VeTcahp7V8wX557nWvqV9KJBqItRVKpjOd3du dkJBcmVHXgl/qu9+SUDymk6DMp3DJ+qXf1nbPBBoofVWuWrRJo9iFS+a1uZhoTgd At2NT3th8RVmggT9TPkOKmjZYpNyHcGffnO7nltcSCDxJD7DgEQ8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdejjedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepvfgrkhgrshhhihcuufgrkhgrmhhothhouceoohdqthgrkhgrshhh ihesshgrkhgrmhhotggthhhirdhjpheqnecuggftrfgrthhtvghrnhepudejteelhfdttd ekgfdtueeilefhgfetjeejheekgeevuddvveegieehueeukeejnecukfhppedugedrfedr ieehrddujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Received: from workstation.flets-east.jp (ae065175.dynamic.ppp.asahi-net.or.jp [14.3.65.175]) by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 23 May 2021 08:41:17 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH 0/3] ALSA: firewire-lib: drop initial NODATA packets or empty packets Date: Sun, 23 May 2021 21:41:11 +0900 Message-Id: <20210523124114.272134-1-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, clemens@ladisch.de X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi, This patchset is for convenience of ALSA bebob and firewire-tascam drivers. The devices based on BeBoB ASICs or the devices in Tascam FireWire series transfer a batch of NODATA packet or empty packet in initial step of streaming. To avoid processing them, current implementation uses an option to skip processing content of tx packet during some initial cycles. However, the hard-coded number is not enough useful. In 1st patch, ALSA IEC 61883-1/6 packet streaming engine becomes to drop the initial packets. As a result, The tx_init_skip_cycles argument of amdtp_domain_start() function changes its meaning. In the following patches, ALSA bebob driver is refactored. Takashi Sakamoto (3): ALSA: firewire-lib: drop initial tx packets with NODATA or empty ALSA: bebob: cancel switching connection order ALSA: bebob: distinguish M-Audio ProFire Lightbridge quirk sound/firewire/amdtp-stream.c | 130 +++++++++++++++++++++------- sound/firewire/amdtp-stream.h | 3 + sound/firewire/bebob/bebob.c | 10 ++- sound/firewire/bebob/bebob.h | 1 + sound/firewire/bebob/bebob_stream.c | 25 ++---- 5 files changed, 119 insertions(+), 50 deletions(-)