From patchwork Tue May 18 02:43:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 12263459 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,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 7FFE2C433ED for ; Tue, 18 May 2021 02:49:18 +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 A9E5861370 for ; Tue, 18 May 2021 02:49:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9E5861370 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 4A73D16AF; Tue, 18 May 2021 04:48:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4A73D16AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621306156; bh=/CoxoUZsR5uLKkQvd13H8mfeGMfi5IKzHU7uDT7xLgg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DAPVoU2qsWBvrnh0vh3cRanf249vRiNTfwH6XQ9E2St3ti002s3xKwkAKJIIBFtPt RZHlAgRVEDO0TjDJFNn6wxQRsc69sQs3kdKyDIrf43lEYXquKRYaTv/OehtxbbPUE2 iHX/AG9qefei2U7QQeBtF4wFEmMegP1WR5U+n8nw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 01AFCF80506; Tue, 18 May 2021 04:44:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E6B8DF804DA; Tue, 18 May 2021 04:44:02 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3F79FF8042F for ; Tue, 18 May 2021 04:43:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3F79FF8042F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="0loEqb/2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YbzKr6Az" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6BDC55C01A3; Mon, 17 May 2021 22:43:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 17 May 2021 22:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=Z4lmgCuUgwPzP 8ylS6vFr2zm/KxvNQxOxXqFDPLlKow=; b=0loEqb/2jwH7Lar/m4FpwjB6lVFSm vkiVwSDysILvoBEuuhmRDz4Jc7sm1z7aRO47CmN05LcI9t87RjBYNGDeiSTF1sM4 Ue7n9CXTCV81toDJY4YzbGShyT801UgbEr29NgD1jCT5F3JEGREt+A7kNdRWyDa7 q0C5NALD2Qe6agwaGMMQPoBnyh/wRbiCkTePWtlCe5vi9cLIuWb8OD3NAmwvW+jZ DJ8nPYqoSOwHXtYPuVZo5jdEMZBvTKRQ7s9+CpYy0692WpmhDqzCdMin9Dc6WQDD N3ccq6Xlr3tzdfoMjME5ZYqCOOVw9FX6Dr6DkDWB7zDr1Wk4O9PgsqCcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=Z4lmgCuUgwPzP8ylS6vFr2zm/KxvNQxOxXqFDPLlKow=; b=YbzKr6Az I01wX0gBeT9y8Y+4KEnZGvskj17GfnNzrsC8QSxPFD4de2bjeb2eC7NrzAmfoj2Z vml7X8SFH53Y/5oWa5xzYw2mNFKYlICaYK8hJnVqrDM3x/+6MHvzNNpAdqhl76NZ oXfw1wp4L3x/S6qXiUBJkj7/462GCtTMjdF4khvqU8E51OU8eXQ8r7mPpom3oVQh Y08Nx8HCh2BdM4Cngro0kKEUzEwK4WbHk/l2GU89j7fm6xNaI4Iz455a9VshN+pU zkELfAZOrJqYiTdFqHjCB8qrlbiMs7xaPoXFFurdwr8RqqFW/eterKkBlr8c91W8 uhwoCOi0GYnlFw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeiiedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfgrkhgrshhhihcuufgrkhgrmhhothhouceoohdqthgrkhgr shhhihesshgrkhgrmhhotggthhhirdhjpheqnecuggftrfgrthhtvghrnhepveefffefke etgfevgeefleehfffhueejtdejveethfekveektdejjedvtdejhfejnecukfhppedugedr fedrieehrddujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph 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; Mon, 17 May 2021 22:43:44 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v3 10/11] ALSA: oxfw: code refactoring for wrong_dbs quirk Date: Tue, 18 May 2021 11:43:25 +0900 Message-Id: <20210518024326.67576-11-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518024326.67576-1-o-takashi@sakamocchi.jp> References: <20210518024326.67576-1-o-takashi@sakamocchi.jp> 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" A new entry is added to the quirk enumeration for wrong_dbs quirk to obsolete structure member. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw-stream.c | 2 +- sound/firewire/oxfw/oxfw.c | 2 +- sound/firewire/oxfw/oxfw.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c index 65b458da2796..de6b40c04810 100644 --- a/sound/firewire/oxfw/oxfw-stream.c +++ b/sound/firewire/oxfw/oxfw-stream.c @@ -163,7 +163,7 @@ static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream) if (oxfw->quirks & SND_OXFW_QUIRK_JUMBO_PAYLOAD) flags |= CIP_JUMBO_PAYLOAD; - if (oxfw->wrong_dbs) + if (oxfw->quirks & SND_OXFW_QUIRK_WRONG_DBS) flags |= CIP_WRONG_DBS; } else { conn = &oxfw->in_conn; diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 90a66e1312fe..966697dace47 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -176,7 +176,7 @@ static int detect_quirks(struct snd_oxfw *oxfw) * value in 'dbs' field of CIP header against its format information. */ if (vendor == VENDOR_LOUD && model == MODEL_SATELLITE) - oxfw->wrong_dbs = true; + oxfw->quirks |= SND_OXFW_QUIRK_WRONG_DBS; return 0; } diff --git a/sound/firewire/oxfw/oxfw.h b/sound/firewire/oxfw/oxfw.h index bc6706984fbb..daac38d046db 100644 --- a/sound/firewire/oxfw/oxfw.h +++ b/sound/firewire/oxfw/oxfw.h @@ -36,6 +36,8 @@ enum snd_oxfw_quirk { // Postpone transferring packets during handling asynchronous transaction. As a result, // next isochronous packet includes more events than one packet can include. SND_OXFW_QUIRK_JUMBO_PAYLOAD = 0x01, + // The dbs field of CIP header in tx packet is wrong. + SND_OXFW_QUIRK_WRONG_DBS = 0x02, }; /* This is an arbitrary number for convinience. */ @@ -51,7 +53,6 @@ struct snd_oxfw { // The combination of snd_oxfw_quirk enumeration-constants. int quirks; - bool wrong_dbs; bool has_output; bool has_input; u8 *tx_stream_formats[SND_OXFW_STREAM_FORMAT_ENTRIES];