From patchwork Tue May 18 08:45:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 441277 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 2BD0CC433ED for ; Tue, 18 May 2021 08:47:53 +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 BFF5A611BD for ; Tue, 18 May 2021 08:47:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFF5A611BD 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 0EE0416BE; Tue, 18 May 2021 10:47:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0EE0416BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327670; bh=lno4hSJ5avfyYxxvVUsVsZSHxqggH1BfAuCN0AHldSY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FN1/TyuRK9pEQT2E4WiO9CReGaKOs2jz0Qqx9cn7NQGrAuWVg/jS7lJJMfqdy2+Kt 5syw8JLvmiDG0/qhhVEl5rnMP75qSSY8Diy1rIdQF/QQCwQZqpaxwoXCNWy6t60OL8 68dwg7PxuUsrqCfIOs2EimUskUYbXfyOM1k8lhbs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C25BBF802E3; Tue, 18 May 2021 10:46:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D7F11F80425; Tue, 18 May 2021 10:46:10 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 856D7F8012C for ; Tue, 18 May 2021 10:46:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 856D7F8012C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="r6y/pgq9"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="c9h/vd7y" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AB0F25C0062; Tue, 18 May 2021 04:46:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 18 May 2021 04:46:03 -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=kvX2n5JRFbmkj FssJhpcgRvcHrKUAnx/uL4ZYjHWy8Y=; b=r6y/pgq9x8NNW+YaUL7hy5R/Vd4vR TYFjFkWYNRCSaeWGfNKsM3eOANY98VPR+WXedR8x7Mmh34vt2NWVS62RN0jn9JWw LSnfMgxYG/pZUxbG+TFyxocP5KGXkOgFcvY1T44mAeEz7BOrSmGTJipc8/YcK+B6 IqkluIef1/hI1oMDRnhkmJZ0LW/wNugSAp3bogAL8OrN+bI8fb8ZQwfm9BNtoNbN Yo+CAVZHN9AaiH0pOkz4DRfTULu13ZjujvpPL+aqdSKtgz4noPjhrnFYmpBQ/i7p 0F1s+Jg0RoP17BM4s1dWoQWhwWrdDqkhdDmVeTy0SRKENnpjziMAz7nEg== 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=kvX2n5JRFbmkjFssJhpcgRvcHrKUAnx/uL4ZYjHWy8Y=; b=c9h/vd7y 048/a94HrtDCjfzTNsDyEoZyo7SQQKcrrPH4mWdxFID0Cgv3SZPKU6Wm1ZWQXqEq vrMsfB2sroNQUBEL0K3WMogRt1XWjfQZyxYEoH+H69Va8c2z36c9OV2RaUY3Ym32 3brvMcavZct4chDuc6I6SUIpB0TyszCNA3fcma/O2vAVpOt674y/tr19482EG/VJ QL4x1y9PB5Rown60i/NTZ8gAV//naktH0GWcb9UkNCkV9045BlncpSHOCyC77BVd 0iHU89yZyfkL/l3v2PrpZOZdw3AYm5Ge9fyfEuy1+rf+QfuFvzRsIgqY0iQhp5iY eVhvmNzKHYobeA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:02 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 01/11] Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro" Date: Tue, 18 May 2021 17:45:47 +0900 Message-Id: <20210518084557.102681-2-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" This reverts commit 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f. I've explained that optional FireWire card for d.2 is also built-in to d.2 Pro, however it's wrong. The optional card uses DM1000 ASIC and has 'Mackie DJ Mixer' in its model name of configuration ROM. On the other hand, built-in FireWire card for d.2 Pro and d.4 Pro uses OXFW971 ASIC and has 'd.Pro' in its model name according to manuals and user experiences. The former card is not the card for d.2 Pro. They are similar in appearance but different internally. Signed-off-by: Takashi Sakamoto --- sound/firewire/Kconfig | 4 ++-- sound/firewire/bebob/bebob.c | 2 +- sound/firewire/oxfw/oxfw.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/firewire/Kconfig b/sound/firewire/Kconfig index 9897bd26a438..def1f3d5ecf5 100644 --- a/sound/firewire/Kconfig +++ b/sound/firewire/Kconfig @@ -38,7 +38,7 @@ config SND_OXFW * Mackie(Loud) Onyx 1640i (former model) * Mackie(Loud) Onyx Satellite * Mackie(Loud) Tapco Link.Firewire - * Mackie(Loud) d.4 pro + * Mackie(Loud) d.2 pro/d.4 pro (built-in FireWire card with OXFW971 ASIC) * Mackie(Loud) U.420/U.420d * TASCAM FireOne * Stanton Controllers & Systems 1 Deck/Mixer @@ -84,7 +84,7 @@ config SND_BEBOB * PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 * BridgeCo RDAudio1/Audio5 * Mackie Onyx 1220/1620/1640 (FireWire I/O Card) - * Mackie d.2 (FireWire Option) and d.2 Pro + * Mackie d.2 (optional FireWire card with DM1000 ASIC) * Stanton FinalScratch 2 (ScratchAmp) * Tascam IF-FW/DM * Behringer XENIX UFX 1204/1604 diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index daeecfa8b9aa..90e98a6d1546 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -387,7 +387,7 @@ static const struct ieee1394_device_id bebob_id_table[] = { SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), - // Mackie, d.2 (Firewire option card) and d.2 Pro (the card is built-in). + // Mackie, d.2 (optional Firewire card with DM1000). SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), /* Stanton, ScratchAmp */ SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 9eea25c46dc7..5490637d278a 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -355,7 +355,7 @@ static const struct ieee1394_device_id oxfw_id_table[] = { * Onyx-i series (former models): 0x081216 * Mackie Onyx Satellite: 0x00200f * Tapco LINK.firewire 4x6: 0x000460 - * d.4 pro: Unknown + * d.2 pro/d.4 pro (built-in card): Unknown * U.420: Unknown * U.420d: Unknown */ From patchwork Tue May 18 08:45:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 442539 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 B9E6EC433B4 for ; Tue, 18 May 2021 08:47:56 +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 1A57861166 for ; Tue, 18 May 2021 08:47:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A57861166 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 B228316B8; Tue, 18 May 2021 10:47:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B228316B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327674; bh=99duklAdcsAU/2/owCmFV5SIqcq6KJ9N4EHRbLWJM5Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IyObf0Dzp9cV7SgeqvDguZY5AtkoXJPsbIbTsNHLkS2y2gKqyOKsDxPzvWD7LlyJe loCurNyUYBDfATLGQ8Olx2HNJJ5qaaniPx7PjBRRJsvA/JppguWYganMKz6W13qc91 2CYRK5K8OfzasE5QkpQc2tbjIJs/L5BgJlvTnTiE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2C289F80431; Tue, 18 May 2021 10:46:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EDDA9F802E3; Tue, 18 May 2021 10:46:11 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EAC60F801DB for ; Tue, 18 May 2021 10:46:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EAC60F801DB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="0dp1aiYc"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="twOvfSuI" Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0A8955C0131; Tue, 18 May 2021 04:46:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 18 May 2021 04:46:05 -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=+YqyiIh+nY8Tf tXVmh+T+Vhx4m6t9HLbjBJPP/pdmFQ=; b=0dp1aiYc0intuPnidulUQkLNszkkH X4w/2wfkJikz58JLIGgHIVnmsc0SLd0eZeH2T6rgirfEAf5ILinXJ6FMJYPn/JAD 22imC0iyve0YQCFFMe3Xqr2B1aYymSY3t07mZi60o2WuqWqvVzh2qnmgpFUtpoiJ NfXf79vvv77kLSBzFuXp7uutf7GC4bFXmRzn4k0jP8q1zoBpGB5Sn41nsvBPdszr Egv/B6HUOHAS+keoO6tnm0jDcHtSDk8nJl1mOli+beQZ4QQbIlt1nl3Ml/nDY6Iz Flhun3k1hg3WPyJLZFXt4ghPnGGAAofghcmBawi4HuXzVz5eQlU0A4qyA== 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=+YqyiIh+nY8TftXVmh+T+Vhx4m6t9HLbjBJPP/pdmFQ=; b=twOvfSuI OMDgTzT2QUp0Rc6bUb9cvlwxIG+eNfiGWDKcQ5tZ9k0zfDqoLNmKzhkmUV26U8Y3 SCskD+Cw5+jPonY8KouVVLF+9l5WOO3+7BMJ8XeZ8VeCrUU7rtTUsP6QwV7JII3g CWDpDSDaJJXwfBcKgItPCiB+bIgyDLfk626pKCQscp9fDgdKxj7Ca4DN3ZRfLZus cFn6Kc5c/quyzOdcUeUaH5bFxrI3liFy28/eIMDZX64Wo8MCLVvJYKBpeBXz0OW5 Bj/ywtvU5hMgcUIiH18Rxqb0jzTkgSFOMuGPjg3DjFnMEEAe9vc5hxmylNYPps9T 0CSFTQ+Jh00LTA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:03 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 02/11] ALSA: firewire-lib/motu: use int type for the value of bitwise OR with enumerator-constant Date: Tue, 18 May 2021 17:45:48 +0900 Message-Id: <20210518084557.102681-3-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" It brings some inconvenience in practice to use enumerated type for variable to which bitwise OR with enumerator constant is assigned. This commit replaces declarations of enumerated type with int type. Suggested-by: Takashi Iwai Signed-off-by: Takashi Sakamoto --- sound/firewire/amdtp-am824.c | 4 ++-- sound/firewire/amdtp-am824.h | 2 +- sound/firewire/amdtp-stream.c | 4 ++-- sound/firewire/amdtp-stream.h | 5 +++-- sound/firewire/digi00x/amdtp-dot.c | 2 +- sound/firewire/motu/motu.h | 3 ++- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/sound/firewire/amdtp-am824.c b/sound/firewire/amdtp-am824.c index fea92e148790..d9c700f652bb 100644 --- a/sound/firewire/amdtp-am824.c +++ b/sound/firewire/amdtp-am824.c @@ -410,10 +410,10 @@ static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s, * @s: the AMDTP stream to initialize * @unit: the target of the stream * @dir: the direction of stream - * @flags: the packet transmission method to use + * @flags: the details of the streaming protocol consist of cip_flags enumeration-constants. */ int amdtp_am824_init(struct amdtp_stream *s, struct fw_unit *unit, - enum amdtp_stream_direction dir, enum cip_flags flags) + enum amdtp_stream_direction dir, unsigned int flags) { amdtp_stream_process_ctx_payloads_t process_ctx_payloads; diff --git a/sound/firewire/amdtp-am824.h b/sound/firewire/amdtp-am824.h index 06d280783581..2b092b1061ba 100644 --- a/sound/firewire/amdtp-am824.h +++ b/sound/firewire/amdtp-am824.h @@ -45,5 +45,5 @@ void amdtp_am824_midi_trigger(struct amdtp_stream *s, unsigned int port, struct snd_rawmidi_substream *midi); int amdtp_am824_init(struct amdtp_stream *s, struct fw_unit *unit, - enum amdtp_stream_direction dir, enum cip_flags flags); + enum amdtp_stream_direction dir, unsigned int flags); #endif diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index e0faa6601966..b14c3922efb2 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -71,13 +71,13 @@ static void pcm_period_work(struct work_struct *work); * @s: the AMDTP stream to initialize * @unit: the target of the stream * @dir: the direction of stream - * @flags: the packet transmission method to use + * @flags: the details of the streaming protocol consist of cip_flags enumeration-constants. * @fmt: the value of fmt field in CIP header * @process_ctx_payloads: callback handler to process payloads of isoc context * @protocol_size: the size to allocate newly for protocol */ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, - enum amdtp_stream_direction dir, enum cip_flags flags, + enum amdtp_stream_direction dir, unsigned int flags, unsigned int fmt, amdtp_stream_process_ctx_payloads_t process_ctx_payloads, unsigned int protocol_size) diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h index a3daa1f2c1c4..0628b6e52fc1 100644 --- a/sound/firewire/amdtp-stream.h +++ b/sound/firewire/amdtp-stream.h @@ -112,7 +112,8 @@ typedef unsigned int (*amdtp_stream_process_ctx_payloads_t)( struct amdtp_domain; struct amdtp_stream { struct fw_unit *unit; - enum cip_flags flags; + // The combination of cip_flags enumeration-constants. + unsigned int flags; enum amdtp_stream_direction direction; struct mutex mutex; @@ -184,7 +185,7 @@ struct amdtp_stream { }; int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, - enum amdtp_stream_direction dir, enum cip_flags flags, + enum amdtp_stream_direction dir, unsigned int flags, unsigned int fmt, amdtp_stream_process_ctx_payloads_t process_ctx_payloads, unsigned int protocol_size); diff --git a/sound/firewire/digi00x/amdtp-dot.c b/sound/firewire/digi00x/amdtp-dot.c index d613642a2ce3..398c57a6fb43 100644 --- a/sound/firewire/digi00x/amdtp-dot.c +++ b/sound/firewire/digi00x/amdtp-dot.c @@ -396,7 +396,7 @@ int amdtp_dot_init(struct amdtp_stream *s, struct fw_unit *unit, enum amdtp_stream_direction dir) { amdtp_stream_process_ctx_payloads_t process_ctx_payloads; - enum cip_flags flags; + unsigned int flags; // Use different mode between incoming/outgoing. if (dir == AMDTP_IN_STREAM) { diff --git a/sound/firewire/motu/motu.h b/sound/firewire/motu/motu.h index 3d0236ee6716..92effb6e6c96 100644 --- a/sound/firewire/motu/motu.h +++ b/sound/firewire/motu/motu.h @@ -106,7 +106,8 @@ enum snd_motu_protocol_version { struct snd_motu_spec { const char *const name; enum snd_motu_protocol_version protocol_version; - enum snd_motu_spec_flags flags; + // The combination of snd_motu_spec_flags enumeration-constants. + unsigned int flags; unsigned char tx_fixed_pcm_chunks[3]; unsigned char rx_fixed_pcm_chunks[3]; From patchwork Tue May 18 08:45:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 441274 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 1D251C433ED for ; Tue, 18 May 2021 08:50:02 +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 312CB610FA for ; Tue, 18 May 2021 08:50:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 312CB610FA 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 B3DBD16EF; Tue, 18 May 2021 10:49:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B3DBD16EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327799; bh=K2QTJ7PWAmZz2pe8j3TlXJ5eUB6PUhhTPsN4IKE+lro=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EDps8mFhonRRA8DzYOj5hu6cnNZULLCQkJtdwTc85PtGNzyvlloAfjS1+fkr3EGik +P/M7ApPubN+GWhNBpCssBh9MQfb3sL8xvQC5SglQIAgqyWlXv4m9C4pyQwv46X7Ym Zny5cpWcozm1/4nAYAiu8r1TaHRvfX7te66v3xGI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A5380F804DA; Tue, 18 May 2021 10:46:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 565EBF804AA; Tue, 18 May 2021 10:46:17 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 29055F80139 for ; Tue, 18 May 2021 10:46:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 29055F80139 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="fV6Jez7i"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cFOPuDWz" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 5A5C25C0121; Tue, 18 May 2021 04:46:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 18 May 2021 04:46:06 -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=z2h4iAd5kIIH1 zEvRUhiZCQqxbScmElaaiMxsPYF/Pc=; b=fV6Jez7ibV/PGt1KQXi94GJrC/IfM 6xyOi6Y80XBRt4fOOOlLqJqjECYZkvt7RoI6HDoC44ELy434+BL3LN9CrJbV5fsw vppfPmVQqFqzdb4DEBDvNznpHzAho3NMxxPP73gcwlvajs0n3FALcun+6vX/Ij+0 pAbCcpLXl4hj9cv4DaJJ9QQWpEpgVYnPq8ISE4lziHq1nuYl5i6QMl5VXUbaXB6i PlVwEcaBFlNjRyglOThR0la2Nrm/JwlTfjoQ5Pt1f8/ZL53f/XS4H508X38eHP3O RzpiO60QWMG+4VxiyduOMXHNiocufQLoU5mXq4Yulr2AIMpZJ7EPgWEXQ== 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=z2h4iAd5kIIH1zEvRUhiZCQqxbScmElaaiMxsPYF/Pc=; b=cFOPuDWz jxREqgB1toxHcK+3QwdJZ//lbK0Itn2x9Md+qBXbuzQvxSqU0dB67DgSgU36q9g4 VdrtBUC50C6ZGPj+JW4d8PhqV9PZorU6HNFiz8TvGNRsU6+25DvzasUynxxzP1ja mEaqfmAB6N9WsuiXRdOXLUPOfsY9zZqU274mIY5ggdXDu+n5be+3VpqUegc5eArt pIjH62YcJhZKi9TLCwLhWvhx5MtKL2s1e9ZoJMEUNRKrp+B5hXruK+XD4jooeLOD nfQyR9c1pwljElsDnEgu44d5mfhugBMPdOdIsHPYSlPl7/ZGDCzPRxlPuyDpILgN JEJDtKRQjBdy1A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:05 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 03/11] ALSA: oxfw: code refactoring for existent device entry with specifier_id and version Date: Tue, 18 May 2021 17:45:49 +0900 Message-Id: <20210518084557.102681-4-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" All of the devices known to be based on OXFW ASICs have the same layout of configuration ROM, in which unit directory includes vendor, model, specifier_id and version immediate values. Especially, the pair of specifier_id and version is fixed to represent AV/C general protocol. This commit refactors device entries to fulfil with these 4 elements. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw.c | 82 ++++++++++++-------------------------- 1 file changed, 25 insertions(+), 57 deletions(-) diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 5490637d278a..7be999c61730 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -320,36 +320,24 @@ static const struct compat_info lacie_speakers = { .model_name = "FireWire Speakers", }; +#define OXFW_DEV_ENTRY(vendor, model, data) \ +{ \ + .match_flags = IEEE1394_MATCH_VENDOR_ID | \ + IEEE1394_MATCH_MODEL_ID | \ + IEEE1394_MATCH_SPECIFIER_ID | \ + IEEE1394_MATCH_VERSION, \ + .vendor_id = vendor, \ + .model_id = model, \ + .specifier_id = SPECIFIER_1394TA, \ + .version = VERSION_AVC, \ + .driver_data = (kernel_ulong_t)data, \ +} + static const struct ieee1394_device_id oxfw_id_table[] = { - { - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID | - IEEE1394_MATCH_SPECIFIER_ID | - IEEE1394_MATCH_VERSION, - .vendor_id = VENDOR_GRIFFIN, - .model_id = 0x00f970, - .specifier_id = SPECIFIER_1394TA, - .version = VERSION_AVC, - .driver_data = (kernel_ulong_t)&griffin_firewave, - }, - { - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID | - IEEE1394_MATCH_SPECIFIER_ID | - IEEE1394_MATCH_VERSION, - .vendor_id = VENDOR_LACIE, - .model_id = 0x00f970, - .specifier_id = SPECIFIER_1394TA, - .version = VERSION_AVC, - .driver_data = (kernel_ulong_t)&lacie_speakers, - }, - /* Behringer,F-Control Audio 202 */ - { - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID, - .vendor_id = VENDOR_BEHRINGER, - .model_id = 0x00fc22, - }, + OXFW_DEV_ENTRY(VENDOR_GRIFFIN, 0x00f970, &griffin_firewave), + OXFW_DEV_ENTRY(VENDOR_LACIE, 0x00f970, &lacie_speakers), + // Behringer,F-Control Audio 202. + OXFW_DEV_ENTRY(VENDOR_BEHRINGER, 0x00fc22, NULL), /* * Any Mackie(Loud) models (name string/model id): * Onyx-i series (former models): 0x081216 @@ -367,34 +355,14 @@ static const struct ieee1394_device_id oxfw_id_table[] = { .specifier_id = SPECIFIER_1394TA, .version = VERSION_AVC, }, - /* TASCAM, FireOne */ - { - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID, - .vendor_id = VENDOR_TASCAM, - .model_id = 0x800007, - }, - /* Stanton, Stanton Controllers & Systems 1 Mixer (SCS.1m) */ - { - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID, - .vendor_id = OUI_STANTON, - .model_id = 0x001000, - }, - /* Stanton, Stanton Controllers & Systems 1 Deck (SCS.1d) */ - { - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID, - .vendor_id = OUI_STANTON, - .model_id = 0x002000, - }, - // APOGEE, duet FireWire - { - .match_flags = IEEE1394_MATCH_VENDOR_ID | - IEEE1394_MATCH_MODEL_ID, - .vendor_id = OUI_APOGEE, - .model_id = 0x01dddd, - }, + // TASCAM, FireOne. + OXFW_DEV_ENTRY(VENDOR_TASCAM, 0x800007, NULL), + // Stanton, Stanton Controllers & Systems 1 Mixer (SCS.1m). + OXFW_DEV_ENTRY(OUI_STANTON, 0x001000, NULL), + // Stanton, Stanton Controllers & Systems 1 Deck (SCS.1d). + OXFW_DEV_ENTRY(OUI_STANTON, 0x002000, NULL), + // APOGEE, duet FireWire. + OXFW_DEV_ENTRY(OUI_APOGEE, 0x01dddd, NULL), { } }; MODULE_DEVICE_TABLE(ieee1394, oxfw_id_table); From patchwork Tue May 18 08:45:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 441276 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 454D1C433ED for ; Tue, 18 May 2021 08:48:33 +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 C14976100A for ; Tue, 18 May 2021 08:48:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C14976100A 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 5701816DD; Tue, 18 May 2021 10:47:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5701816DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327710; bh=8ayjLbVWf3C8BGPZC60BiLFPymypO7X5DbaciqOP0y4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cgdQ7M5f551x2dN6g/e/RmFGv3if2GPsSfoVNSqbkzzxtLVM9MEedB7zK3ZgR0stA RHH0Uzhn6VRveaBDZwcmGE70QcW8FW4aD70IV2LIMJJkfv958ouJIF3xM/WIPiHTW/ xLynea+0NCZwfnlqbdkycH/UvMWixcEmxIWm6x24= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1EB42F80475; Tue, 18 May 2021 10:46:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C0F6F80272; Tue, 18 May 2021 10:46:13 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 71E1AF80272 for ; Tue, 18 May 2021 10:46:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 71E1AF80272 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="yMvkX64I"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="H45e/KsZ" Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id A8F625C00A4; Tue, 18 May 2021 04:46:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 18 May 2021 04:46:07 -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=yy4KErEXtjHja I46tRlfO8xAp9Q7omE53IZRt+oG4NI=; b=yMvkX64I/5qqw131lUsutIuYNmb57 ZHWu6tmq0jfdHHOIc43HkZeBE3qLV9wmUlMThaOwVCcuxsblER/Kg5auyKmZBCvb 8cOZi8lq77Re/bITEQe/TpzL0h5T4yYjgy8jKj2Y33IJu5oJWDS5SbeH+HyI9siD HVdMBYwTgp+MJzXgyXt4W0UG1uCcbQGrOgwNyhP9JazH74XbMkM1vGH+3NzHbupR HFLonQsUAYqcTR1oOJS6moNvDyVo7iTewkhkS2Idqo8qhT56xmhFaWIWG+uhQFSq 4wt4PGeqZ540AJsD8IrHoRrY2XdnBSFUXc9xT9sPa+c/p2in5Bsi278ow== 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=yy4KErEXtjHjaI46tRlfO8xAp9Q7omE53IZRt+oG4NI=; b=H45e/KsZ MW3l57CrSCyDRITbGFZ7YDH8EqjoKWcDQE9DQl6OzuRx0zI9iFRp8HYHL65Q6D66 NcN3bYMDpvKaNSSArMpujBdrCHmYZ5WMQ5dDbcIX/1a+jWBHWQGKjIYdREoWg8ot 4u1FYvboMns5zeIpcIPeWO2zxPJu51CZ5yYTHMBuCdF/Z+bb4b2nEfR3fhIj826h snQT2ELhQ2wA0nDFhza34iloHdc9AkWV6MPg4VSeRsDHjmE660PFmL+ti2Mu2OdV kp4QBWTmwJ2A0+eHdQaPdHZDU1h5XUY4LqH9SHkQEHEyi0+8fb9hoqqykwXxBhgj +JhEs2qk0bZKDg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:06 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 04/11] ALSA: oxfw: code refactoring to detect mackie models Date: Tue, 18 May 2021 17:45:50 +0900 Message-Id: <20210518084557.102681-5-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" This commit changes condition statement to call mackie models detection just for the device entry. Additionally, comment is added for Onyx 1640i. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 7be999c61730..2af72951ebf8 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -245,7 +245,7 @@ static int oxfw_probe(struct fw_unit *unit, { struct snd_oxfw *oxfw; - if (entry->vendor_id == VENDOR_LOUD && !detect_loud_models(unit)) + if (entry->vendor_id == VENDOR_LOUD && entry->model_id == 0 && !detect_loud_models(unit)) return -ENODEV; /* Allocate this independent of sound card instance. */ @@ -341,6 +341,7 @@ static const struct ieee1394_device_id oxfw_id_table[] = { /* * Any Mackie(Loud) models (name string/model id): * Onyx-i series (former models): 0x081216 + * Onyx 1640i: 0x001640 * Mackie Onyx Satellite: 0x00200f * Tapco LINK.firewire 4x6: 0x000460 * d.2 pro/d.4 pro (built-in card): Unknown @@ -352,6 +353,7 @@ static const struct ieee1394_device_id oxfw_id_table[] = { IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, .vendor_id = VENDOR_LOUD, + .model_id = 0, .specifier_id = SPECIFIER_1394TA, .version = VERSION_AVC, }, From patchwork Tue May 18 08:45:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 441275 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 C9D7BC433ED for ; Tue, 18 May 2021 08:49:22 +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 4B3FE610FA for ; Tue, 18 May 2021 08:49:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B3FE610FA 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 D5FDD16DE; Tue, 18 May 2021 10:48:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D5FDD16DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327760; bh=KLzOh5mkhUBfN+RzD99d17MfQxGzHdmxNaHuPOR3PzY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Gg+dxrMIp3Qzdg251QVjuqSdAet74QpcANodMd6WMIr14Qe8MTgHFdIXpsCB24+zU ZKz9cY/Q/juVTrC7ABrTK5gbvejuukwhNIuT3BaPZU7iRemfs1nU+FO8VCdD6aRCpo S6kI7gMiq/0kX8UwiTNDSyqTT8yN4G0yN++iU/xo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 43B82F804B2; Tue, 18 May 2021 10:46:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 59EB7F802C8; Tue, 18 May 2021 10:46:16 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BE5D3F802C8 for ; Tue, 18 May 2021 10:46:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BE5D3F802C8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="TjdVr4bo"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="tFXD/U8O" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0547D5C0121; Tue, 18 May 2021 04:46:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 18 May 2021 04:46:09 -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=snVjiQ+JiUZKn 0f6kKcYcN35k6cxRPHFAY/KaCgQYsY=; b=TjdVr4boYVKz7NXzzzqCKaMDta8jX 0PxQPfFy1wB+qLufh0wI65t9r6okD++i+L7Msqnf2wqEYDIThYSvHrsoZcJ4UvLc nj8e4dXmSl8FnpUu9NIJFy7AamHEUrukWmT1rrrKJM8uczDM1K0yvWY41wwympm7 b3e8PgB0uqJw7dkFBmLAn+m2NOLBv2ahZlsJd0lIVlssIrzTZtzg9xwFoifGGk8Q 5Mr75yN+dP4Z3KpVJpWmoG/VCBPasvm7AwMgwqB0wrmsHZEbYsuBgps+mIJ3FgUl Hp2guE0IXFMK1EzWw75HOqp+mk/EPWeib13AYH5W/iMILLQnvQ6dKLItQ== 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=snVjiQ+JiUZKn0f6kKcYcN35k6cxRPHFAY/KaCgQYsY=; b=tFXD/U8O +TK84JmsoBUJ5flhaV4ssavL82XRr781JOIMxd5bX9AZwcG27LTqbVOmDEjPallc 9jiP7i47i7jfhYzvQ7dcpx57XQ5PFUxux4E5UFfWk6Cj3irocQPq8CycbYEHdRFm 3SsScOH4vxyCGhIyric3Yi0AZP11oxvN2V3Dkq0uPgeOlJTNVibHQIZ45GQPC6ma 1nK3g5eMYgfL0qlEd8YXTTAHz4qgt/Wtn+paOs4+d60DWcu2tnLVw03H0nAsZq3V lt/OQN8B4o8Vx3iKCDlqXuGY84Jwf2eC88M+QxMZhu7GEspGklicVZ4Isu2KB7T3 ONK+yqiEAwimpA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:07 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 05/11] ALSA: oxfw: add explicit device entry for Loud Technologies Tapco Link.FireWire 4x6 Date: Tue, 18 May 2021 17:45:51 +0900 Message-Id: <20210518084557.102681-6-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" Loud Technologies Tapco Link.FireWire 4x6 is identified as the model with OXFW970 ASIC. This commit adds explicit entry for the model. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 2af72951ebf8..998f0da6fd5b 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -47,7 +47,6 @@ static bool detect_loud_models(struct fw_unit *unit) "Onyx 1640i", "d.Pro", "Mackie Onyx Satellite", - "Tapco LINK.firewire 4x6", "U.420"}; char model[32]; int err; @@ -338,12 +337,13 @@ static const struct ieee1394_device_id oxfw_id_table[] = { OXFW_DEV_ENTRY(VENDOR_LACIE, 0x00f970, &lacie_speakers), // Behringer,F-Control Audio 202. OXFW_DEV_ENTRY(VENDOR_BEHRINGER, 0x00fc22, NULL), + // Loud Technologies, Tapco Link.FireWire 4x6. + OXFW_DEV_ENTRY(VENDOR_LOUD, 0x000460, NULL), /* * Any Mackie(Loud) models (name string/model id): * Onyx-i series (former models): 0x081216 * Onyx 1640i: 0x001640 * Mackie Onyx Satellite: 0x00200f - * Tapco LINK.firewire 4x6: 0x000460 * d.2 pro/d.4 pro (built-in card): Unknown * U.420: Unknown * U.420d: Unknown From patchwork Tue May 18 08:45:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 442538 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 DCC21C433B4 for ; Tue, 18 May 2021 08:49:05 +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 5F3526124C for ; Tue, 18 May 2021 08:49:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F3526124C 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 D995816DF; Tue, 18 May 2021 10:48:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D995816DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327743; bh=ecXGP7UvcqAeddWVujTRhp5wXlYTu+1U5pTQO+kYzP0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PL1yz84n2zSl+q40TiCoUT7+0pl/autA6keg5era4D+0paltUjVNYakcS6XppSj6F 2brLxDXcKDVf3Y8sQs3YgvqttKGlf8Lizwd9vPrWidCGgmH9VkTx9v1HVH/dlEPe6y 7WYrqwxlu+rUfi6ZUhF9OEtE305x7e08GJ0ibk2E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 57904F804AB; Tue, 18 May 2021 10:46:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CECA9F804A9; Tue, 18 May 2021 10:46:15 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0B643F8012C for ; Tue, 18 May 2021 10:46:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0B643F8012C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="S3n5ecyD"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SnjVgBzf" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3D9C05C0117; Tue, 18 May 2021 04:46:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 18 May 2021 04:46:10 -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=70ipNRkwOuqh7 Y/8xTJRyXNS0tI5YWloNgWLpub/Vho=; b=S3n5ecyDZlJUsMOlbWSlvoc4jmUQy vJ6OfqpYBHxmQ5e7jxIxS5ODiCXdBLhlLfaoLIHMY8xd8sYUmvhn8w1l4aRxRzyI LWKqaDPEN7PCGI0FpywYzbH2+7rC1b+Dle3AzC347Vp5aXCXYYC3zeemsTrbk1dY ZSDI42wf9YWx0QSkz06RLoBomKB/Xks3KJnjaJlyaEsan31oVlbvFEoG0iZo81VF d8FiilD7clsNQ7gvIloiZVttM7zAEe/WZ/B3q4wjGkkNm7q/JvliPfY4mFZ7IvX7 B65VuI+zxCVe181vBspR12OvFYcShoJMB+QomW0KsTKsV2ZIM/lhVuXqg== 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=70ipNRkwOuqh7Y/8xTJRyXNS0tI5YWloNgWLpub/Vho=; b=SnjVgBzf lsHOukd3YlBSrps8U34ISK6SPYcRN6CmAk+QFkN/vBqzCcMsj18bGLqb+tltN9U2 eekmvxkskn300pleONBtXO0hIbPw6VdVcpxxP9RQEp49E6ud1gKCURWVNV67Wrso Xr7/FJwZ3KNAsLlGkxK1SoiHz5mIy7jeaOZrJNwpIdI7qiJkxptrGulQnuJA65BB 32+FdCgiDsBRXOzg79pn/4A2PaijOcjcvskjaETPH7pXRxxPWS55+z/eozF/YBzP O6wvhiQW0Yn++Q6hvCIOGF8yF+qWLCvOyJVr6os0ifAO591Cob3m0qIjPXBJiXE6 fXKpdhqvPvOsKw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfgrkhgrshhhihcuufgrkhgrmhhothhouceoohdqthgrkhgr shhhihesshgrkhgrmhhotggthhhirdhjpheqnecuggftrfgrthhtvghrnhepveefffefke etgfevgeefleehfffhueejtdejveethfekveektdejjedvtdejhfejnecukfhppedugedr fedrieehrddujeehnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilh 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; Tue, 18 May 2021 04:46:09 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 06/11] ALSA: oxfw: add explicit device entry for Loud Technologies Mackie Onyx Sattelite Date: Tue, 18 May 2021 17:45:52 +0900 Message-Id: <20210518084557.102681-7-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" Loud Technologies Mackie Onyx Satellite is identified as the model with OXFW970 ASIC. This commit adds explicit entry for the model. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 998f0da6fd5b..e851149c5280 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -46,7 +46,6 @@ static bool detect_loud_models(struct fw_unit *unit) "Onyx-i", "Onyx 1640i", "d.Pro", - "Mackie Onyx Satellite", "U.420"}; char model[32]; int err; @@ -339,15 +338,14 @@ static const struct ieee1394_device_id oxfw_id_table[] = { OXFW_DEV_ENTRY(VENDOR_BEHRINGER, 0x00fc22, NULL), // Loud Technologies, Tapco Link.FireWire 4x6. OXFW_DEV_ENTRY(VENDOR_LOUD, 0x000460, NULL), - /* - * Any Mackie(Loud) models (name string/model id): - * Onyx-i series (former models): 0x081216 - * Onyx 1640i: 0x001640 - * Mackie Onyx Satellite: 0x00200f - * d.2 pro/d.4 pro (built-in card): Unknown - * U.420: Unknown - * U.420d: Unknown - */ + // Loud Technologies, Mackie Onyx Satellite. + OXFW_DEV_ENTRY(VENDOR_LOUD, MODEL_SATELLITE, NULL), + // Any Mackie(Loud) models (name string/model id): + // Onyx-i series (former models): 0x081216 + // Onyx 1640i: 0x001640 + // d.2 pro/d.4 pro (built-in card): Unknown + // U.420: Unknown + // U.420d: Unknown { .match_flags = IEEE1394_MATCH_VENDOR_ID | IEEE1394_MATCH_SPECIFIER_ID | From patchwork Tue May 18 08:45:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 442537 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 AB17AC433B4 for ; Tue, 18 May 2021 08:49:37 +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 28D73610FA for ; Tue, 18 May 2021 08:49:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28D73610FA 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 B0AB316DA; Tue, 18 May 2021 10:48:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B0AB316DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327775; bh=dExvVoTGLf7U1Y9k+Y0xTSfVZ05c68Ggl5QdIFAnYRc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rYMki9dpyJJwP3PK3dTryV2DO/72YndS1eV3+SKUvsj8hJER0ejZjPQD+vfjtnUKn WTfmZzmgLGDuu6j1PTWn8o3qs+v2hjzKLzYPeSbtIynYJJ9m8rdUV8VDLBT87NQ//J f2nTkgvjV8Ga8khuR/ByPlFqEKmO3Ez4ClmCaNUE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 03417F804BD; Tue, 18 May 2021 10:46:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 65567F801DB; Tue, 18 May 2021 10:46:16 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4F3AAF801DB for ; Tue, 18 May 2021 10:46:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4F3AAF801DB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="qOA/AIfO"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="HZKdR5XR" Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 844EE5C0127; Tue, 18 May 2021 04:46:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 18 May 2021 04:46:11 -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=Y7Op8L2qKUKtq pgpfwBcp5vvU/wt/qoca6pUELYbLoY=; b=qOA/AIfOSpmnGGzjp98OqmHNnuUSq +Bio3/gASrAp3eKausNg4QZVD+pzE27fKOBQ3dizGyD4Higm5EpiAmhj5VBzG6Eq s5QQAmBwxj14XKdnW3Qz0TQPFqjjZZaqlnOh0/Zk1Cnypww+qK2md3DlYedu/5pG fl7babag05sWs6WYORhbt4STBqd3J2YRzRlUnAAY3UsfJPkRAmI0DUp/Q0jJRObx GabNMFFb8xLoNhCj5eGdWZ6EhTHaocRi5mCBAANoIsakjcx4i/qzIhZHyZVxRrve TxDGxgtp8eZNTxR3ttfKR9hO/tFE96yZWbb81asuWZlf6M9XKUCZuZrMw== 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=Y7Op8L2qKUKtqpgpfwBcp5vvU/wt/qoca6pUELYbLoY=; b=HZKdR5XR 2lEKiAaLjrnCaeaADU2Lf+/qOyTNPU2AWzlMnpTR28GNt7nmhdye6yLEsnJP6cNa oF+4LkZIVjy4RwUO3ElhgYREX6wU/uZs/a1JsiUL5BunFdf6b3E1vcdAIP2PL565 m2sb6v/Ws4K9KIzHyv+QwMOtViyBEzwo4sEguEzLigRkPpzDFFzQLMdvCqS15Uzs rAZFXShkbIP+LB8Zoj8PSZgU0IEOM8Rk+SnqkHdAImwhc6fdC4LR/4tdYiVUoW4o apNvL/2OkoJcRLI/+ZWjMC5rgf8xOaiVSgU5m4JxXZnzSFk8lVOfjHFBxcDsvw4v DLVsWztPlNGQGg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfgrkhgrshhhihcuufgrkhgrmhhothhouceoohdqthgrkhgr shhhihesshgrkhgrmhhotggthhhirdhjpheqnecuggftrfgrthhtvghrnhepveefffefke etgfevgeefleehfffhueejtdejveethfekveektdejjedvtdejhfejnecukfhppedugedr fedrieehrddujeehnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilh 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; Tue, 18 May 2021 04:46:10 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 07/11] ALSA: oxfw: add comment for the type of ASICs Date: Tue, 18 May 2021 17:45:53 +0900 Message-Id: <20210518084557.102681-8-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" ALSA OXFW supports two types of ASICS; OXFW970 and OXFW971. The former is known to have a quirk we call 'jumbo payload' that some isochronous cycles are skipped to transfer isochronous packets during handling asynchronous transaction. The quirk seems to correspond to firmware initially delivered by Oxford Semiconductor since the quirk is not confirmed for Mackie Onyx Satellite in which the revised firmware is available. The quirk is not confirmed in the latter. This commit adds code comment to describe the quirk. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index e851149c5280..9a9c84bc811a 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -332,14 +332,30 @@ static const struct compat_info lacie_speakers = { } static const struct ieee1394_device_id oxfw_id_table[] = { + // + // OXFW970 devices: + // Initial firmware has a quirk to postpone isoc packet transmission during finishing async + // transaction. As a result, several isochronous cycles are skipped to transfer the packets + // and the audio data frames which should have been transferred during the cycles are put + // into packet at the first isoc cycle after the postpone. Furthermore, the value of SYT + // field in CIP header is not reliable as synchronization timing, + // OXFW_DEV_ENTRY(VENDOR_GRIFFIN, 0x00f970, &griffin_firewave), OXFW_DEV_ENTRY(VENDOR_LACIE, 0x00f970, &lacie_speakers), - // Behringer,F-Control Audio 202. + // Behringer,F-Control Audio 202. The value of SYT field is not reliable at all. OXFW_DEV_ENTRY(VENDOR_BEHRINGER, 0x00fc22, NULL), - // Loud Technologies, Tapco Link.FireWire 4x6. + // Loud Technologies, Tapco Link.FireWire 4x6. The value of SYT field is always 0xffff. OXFW_DEV_ENTRY(VENDOR_LOUD, 0x000460, NULL), - // Loud Technologies, Mackie Onyx Satellite. + // Loud Technologies, Mackie Onyx Satellite. Although revised version of firmware is + // installed to avoid the postpone, the value of SYT field is always 0xffff. OXFW_DEV_ENTRY(VENDOR_LOUD, MODEL_SATELLITE, NULL), + // Miglia HarmonyAudio. Not yet identified. + + // + // OXFW971 devices: + // The value of SYT field in CIP header is enough reliable. Both of blocking and non-blocking + // transmission methods are available. + // // Any Mackie(Loud) models (name string/model id): // Onyx-i series (former models): 0x081216 // Onyx 1640i: 0x001640 From patchwork Tue May 18 08:45:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 441273 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 1464DC433B4 for ; Tue, 18 May 2021 08:50:47 +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 87B0E61285 for ; Tue, 18 May 2021 08:50:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87B0E61285 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 28EC116EB; Tue, 18 May 2021 10:49:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 28EC116EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327845; bh=XyOh7chtLLsMZmzhNOcr2AwbbkdMPYUQSen4I/CvxGA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=F2GU0ZOn7Y9qh2LgjdNSbBlCXvto3be/TNKxZ5BXUyb0a/Zj6P9ZB8ZwpsE16bBn+ A5dMDIHCSlNzia+pWP078cZCcoI7ArSkaHjLLvECPCWUHr6BYPoN+FqHViDoomyGJV pDAkLpaF/wCzKioZuBfSnC+M6C6U7OF/6mMXcrrY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E57DFF804E5; Tue, 18 May 2021 10:46:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20039F804AA; Tue, 18 May 2021 10:46:19 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A4055F80272 for ; Tue, 18 May 2021 10:46:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A4055F80272 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="FNm2QdPQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="t90li5k6" Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D675F5C0131; Tue, 18 May 2021 04:46:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 18 May 2021 04:46:12 -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=7Hjq0nvKmzw8U X/+U1ImDdTQyPhDOBQPKqlcPg+8ayE=; b=FNm2QdPQtizzfXe+mjA7fDEswDLs0 VuIYJoJZc85AEoXSMgiiKGvDa8DxFUOCc6kNW5rpmUHufQ9B8eat2g4vH2ZGLxHh Tjnyc4UMDrfB5BPNFiQykxtIgmgPbS12OPepSg1MtUbk3vJRwRN1GE7Ch8TdZRFS ZRMai7Mg7zc8pFl9tQ0kHC97vFxHv0p0rCDtFqxjMsbLqBfzDsnSF9k7N5DpQy4i JSTLQ2oescVgbpWL/NZVYJZf8YuqaIG5qCYi4Xp4EdWowlaG556NTJ7Qogdap8mV i6FI5dnGUjrlejqepZjL2EZK9J8IyJIljUxYmC20vwgUweldITJuSuIQg== 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=7Hjq0nvKmzw8UX/+U1ImDdTQyPhDOBQPKqlcPg+8ayE=; b=t90li5k6 vBou3PVY4u6Otg5IRhEX7kQOXRBVzULReZuLJa8WtiLvqyMIo+JcdNjEEc1i5YyB rKGGqNtio0m0+PCaJq8Kmer4QLzxJffu/FWfDNrAlpiLYRB7u16svLQUJ0J53tY4 qsU0lE90unWJD4YCh5YSmyUZxlVoIAvyePbtn9mzxEeOktWSRhYTMXQIosbouAwF AdBW9oDGXIF4Odg8cFaXNdoaC55yg2wzsD0IACCGa1+xXbCwq+KdLZX5wxzDHrRX VBaeCzP3QRM/HqvDquVmHRtw1GMLqqTLuNgXsf7AGyr8Zi1yA8lLkfGZ976ifbbT RtGKZw8nPf89ig== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:11 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 08/11] ALSA: oxfw: code refactoring for jumbo-payload quirk in OXFW970 Date: Tue, 18 May 2021 17:45:54 +0900 Message-Id: <20210518084557.102681-9-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" This commit adds enumeration to describe quirks of OXFW ASICs. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw-stream.c | 20 +++++++------------- sound/firewire/oxfw/oxfw.c | 3 +++ sound/firewire/oxfw/oxfw.h | 8 ++++++++ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c index 80c9dc13f1b5..c06173fd247d 100644 --- a/sound/firewire/oxfw/oxfw-stream.c +++ b/sound/firewire/oxfw/oxfw-stream.c @@ -153,12 +153,18 @@ static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream) struct cmp_connection *conn; enum cmp_direction c_dir; enum amdtp_stream_direction s_dir; + unsigned int flags = CIP_NONBLOCKING; int err; if (stream == &oxfw->tx_stream) { conn = &oxfw->out_conn; c_dir = CMP_OUTPUT; s_dir = AMDTP_IN_STREAM; + + if (oxfw->quirks & SND_OXFW_QUIRK_JUMBO_PAYLOAD) + flags |= CIP_JUMBO_PAYLOAD; + if (oxfw->wrong_dbs) + flags |= CIP_WRONG_DBS; } else { conn = &oxfw->in_conn; c_dir = CMP_INPUT; @@ -169,24 +175,12 @@ static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream) if (err < 0) return err; - err = amdtp_am824_init(stream, oxfw->unit, s_dir, CIP_NONBLOCKING); + err = amdtp_am824_init(stream, oxfw->unit, s_dir, flags); if (err < 0) { cmp_connection_destroy(conn); return err; } - /* - * OXFW starts to transmit packets with non-zero dbc. - * OXFW postpone transferring packets till handling any asynchronous - * packets. As a result, next isochronous packet includes more data - * blocks than IEC 61883-6 defines. - */ - if (stream == &oxfw->tx_stream) { - oxfw->tx_stream.flags |= CIP_JUMBO_PAYLOAD; - if (oxfw->wrong_dbs) - oxfw->tx_stream.flags |= CIP_WRONG_DBS; - } - return 0; } diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 9a9c84bc811a..90a66e1312fe 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -86,6 +86,9 @@ static int name_card(struct snd_oxfw *oxfw) goto end; be32_to_cpus(&firmware); + if (firmware >> 20 == 0x970) + oxfw->quirks |= SND_OXFW_QUIRK_JUMBO_PAYLOAD; + /* to apply card definitions */ if (oxfw->entry->vendor_id == VENDOR_GRIFFIN || oxfw->entry->vendor_id == VENDOR_LACIE) { diff --git a/sound/firewire/oxfw/oxfw.h b/sound/firewire/oxfw/oxfw.h index fa2d7f9e2dc3..07aa0d25e100 100644 --- a/sound/firewire/oxfw/oxfw.h +++ b/sound/firewire/oxfw/oxfw.h @@ -32,6 +32,12 @@ #include "../amdtp-am824.h" #include "../cmp.h" +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, +}; + /* This is an arbitrary number for convinience. */ #define SND_OXFW_STREAM_FORMAT_ENTRIES 10 struct snd_oxfw { @@ -43,6 +49,8 @@ struct snd_oxfw { bool registered; struct delayed_work dwork; + // The combination of snd_oxfw_quirk enumeration-constants. + unsigned int quirks; bool wrong_dbs; bool has_output; bool has_input; From patchwork Tue May 18 08:45:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 442536 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 8B0C9C433ED for ; Tue, 18 May 2021 08:50:17 +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 111FD610FA for ; Tue, 18 May 2021 08:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 111FD610FA 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 A5B6916E6; Tue, 18 May 2021 10:49:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A5B6916E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327815; bh=PXw8fSI4DC+05mHbIjz9YMZPxHrG/+JhjeRSuxwxIag=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qMPqa5T7FIwXQIAIK0sXAqgl143kdZEvknN0g7TzYYs7nKLhOZpYYqZ/BPDXm1nYt nLabFSHlPTE6sLx5uiz8hUxJWrtieAIAruG9x9eD6ZsCYI20TvOieBegcGt7SzWUX7 il38rFiTOYmHeypgqCJQETiADzq7O39WeUtWLiEg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 519B1F804DF; Tue, 18 May 2021 10:46:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 98A3CF804AA; Tue, 18 May 2021 10:46:18 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EF6A7F8012C for ; Tue, 18 May 2021 10:46:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF6A7F8012C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="SBrsgQE+"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mN8e01dy" Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2FA025C019D; Tue, 18 May 2021 04:46:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 18 May 2021 04:46:14 -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=Dl4zhhaUElYxk Vzb633kXpsz6Z1fkaDBmuQJ1CrWEHs=; b=SBrsgQE+AbS82SO9fjKbrRFuKVROe +9IdgxCvMnk4BfI54N7dD3pUo7P6+DGFL4fnkuKVxPKDJvKIeunIFAsbdZpx6hiD QKMwC5vyYH92Reo2UfD+BptCgwlR8D0aq/dVMtDPe6PAYAJZ1o+YaFgFoNJTfizd ZihfZoY3xyURdj1EzkZ7lw1ZBYokDXQPUfqJ16yg1bv8xn+sfsH1jLYXhFmjPjN0 Bj1K5TiURVRk5qKfL3Adhrvtuo6SVV7e6CPxS66PdVEKXpxa4/KtwXeFqabj9Bmh 6btvMnwMsAKhd7nlF7zi0ZXZgYQEXpK8N14uA7vZKUt6OhrkHUwEkgmiw== 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=Dl4zhhaUElYxkVzb633kXpsz6Z1fkaDBmuQJ1CrWEHs=; b=mN8e01dy qkhBSfrWpQEQh2RJ5IKiIEwB5LX4O/+dbOqTniV0XmSEKrNy0kBc9yjuU5aZ5D15 CYacmP25Mx6C4mIX2TdLuKW6RsYQGrTV7VUIyh0wMeLwiveA80Plpu7DbM9AOVaE S4M/pn3Pz9YyLl6yMyH4gAYMdFRWsDIYlLxMm3jDDB7FpSosmJDkW+hSvG3iDV/c CtH3gBCOWtDdMWc7xD+8xXz/gEASsfQ5mX/v+aRF+2vle8zF6/2ANRSscvptiwU7 JviD3wK1jgWtlifg4OXBwHgOgJyAxbO73LTtxcHKTX4DZpzwnlTUAU8UdeKbDg1P TKDQbwaV8RRAXA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:13 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 09/11] ALSA: firewire-lib: code refactoring for jumbo payload quirk Date: Tue, 18 May 2021 17:45:55 +0900 Message-Id: <20210518084557.102681-10-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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 macro is added to describe the maximum number of cycles to accept cycle skip by jumbo payload quirk. Signed-off-by: Takashi Sakamoto --- sound/firewire/amdtp-stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index b14c3922efb2..409274a532ed 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -64,6 +64,11 @@ #define IT_PKT_HEADER_SIZE_CIP 8 // For 2 CIP header. #define IT_PKT_HEADER_SIZE_NO_CIP 0 // Nothing. +// The initial firmware of OXFW970 can postpone transmission of packet during finishing +// asynchronous transaction. This module accepts 5 cycles to skip as maximum to avoid buffer +// overrun. Actual device can skip more, then this module stops the packet streaming. +#define IR_JUMBO_PAYLOAD_MAX_SKIP_CYCLES 5 + static void pcm_period_work(struct work_struct *work); /** @@ -316,7 +321,7 @@ unsigned int amdtp_stream_get_max_payload(struct amdtp_stream *s) unsigned int cip_header_size = 0; if (s->flags & CIP_JUMBO_PAYLOAD) - multiplier = 5; + multiplier = IR_JUMBO_PAYLOAD_MAX_SKIP_CYCLES; if (!(s->flags & CIP_NO_HEADER)) cip_header_size = sizeof(__be32) * 2; From patchwork Tue May 18 08:45:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 442535 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 49D1DC433ED for ; Tue, 18 May 2021 08:51:04 +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 BB2806124C for ; Tue, 18 May 2021 08:51:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB2806124C 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 32B4F16E3; Tue, 18 May 2021 10:50:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32B4F16E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327862; bh=i49Fp8cR1cpc77Ja4+LP2qrMl1LjwFW0g/irVuCYRH8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EsqrDWJ4eED0V2oFoZgiNwmBBVWE/7+BL8lOJbrgafKUNextIlD+pJ+SQl0qFBraE g7Fpypz2I3OYE4WY8zO+YqealFm/WG3GUlb1NteIIAMt9tRWx88c5b4klhPjcfVw4B GWPS/kNJ+78rRUi3+96k1HSn01a+BtpElfDsBRt8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9E291F804EB; Tue, 18 May 2021 10:46:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 42992F804AA; Tue, 18 May 2021 10:46:20 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 408DCF8049C for ; Tue, 18 May 2021 10:46:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 408DCF8049C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="tuYiDOEH"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VRz/v4vX" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 789305C0127; Tue, 18 May 2021 04:46:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 18 May 2021 04:46:15 -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=a8rWYDAHF7RCi UhMU9VRr4U5B32VDR14jltI6pbDoJ8=; b=tuYiDOEHzbQI789RGtBw3hutbP6J4 v+6HOURmINJJWhaJvrlV2Ngt1gdKoTZ9/Ed96jTj4ALH8SysUwmWyyzpbDFn0SU0 uQ9jTHY9lPNYMsL0YE/YxPytu5bqUG+qyYiLjH0fXN7hGYzWaRHInzd8YoR6IwH0 5IM9wbGv6yxIX8+IEzi5sNH9hvtoax7RNfYu9zLNe0xo3CQAtwjDvwaGjN6C2oBr zMiF9TQMQZ3w+VO0vFcAcA+4BOI9NVKZ6WHbHOMDC5U48oD29PfD//b6mBNshEpO E1DPnT0wA3pdAHyO4/1R7s68/tPjuIss6+hsdXxV7EOq/XXWulwxnY4wQ== 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=a8rWYDAHF7RCiUhMU9VRr4U5B32VDR14jltI6pbDoJ8=; b=VRz/v4vX EEelaWevJxMpfJ8lAI1O9G5GPiEI86NuMLDUOaiiuXdkgFV87SI5MGHcZLQekD63 Fq+RObnjnHShgv3iXKkvDkJgXtcOe/fszIs05WxDjYKPCpzd/4JMbhI7CKJ6TgUW LDzBjj1mqkalrxto25ETX/lj2IymVB8d6Nv3NhmGzyGlhem8zSTD4Fs/lydNUJ+Q EYgAHDDmBb0GODgWlIRwfi+yN1Tgbj4zwxb5ld7LHanoArJKuk6NtCzIJ0jRQwmt gfD0BvNTxmfR4i09F9qQWIbyBQAF95QVAR8q7xdGF29G3pU5Ova7wnMbh2GLdh2e 8ui+SIJwOrOYEQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfgrkhgrshhhihcuufgrkhgrmhhothhouceoohdqthgrkhgr shhhihesshgrkhgrmhhotggthhhirdhjpheqnecuggftrfgrthhtvghrnhepveefffefke etgfevgeefleehfffhueejtdejveethfekveektdejjedvtdejhfejnecukfhppedugedr fedrieehrddujeehnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilh 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; Tue, 18 May 2021 04:46:14 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 10/11] ALSA: oxfw: code refactoring for wrong_dbs quirk Date: Tue, 18 May 2021 17:45:56 +0900 Message-Id: <20210518084557.102681-11-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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 c06173fd247d..5771ff44dd5d 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 07aa0d25e100..4002998d41e8 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. unsigned int quirks; - bool wrong_dbs; bool has_output; bool has_input; u8 *tx_stream_formats[SND_OXFW_STREAM_FORMAT_ENTRIES]; From patchwork Tue May 18 08:45:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 441272 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 D4093C433ED for ; Tue, 18 May 2021 08:51:27 +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 562376100A for ; Tue, 18 May 2021 08:51:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 562376100A 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 E536816F0; Tue, 18 May 2021 10:50:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E536816F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621327886; bh=V8iYAHSYT2UqsNPWEwYI38kIeQIErLi5AlLae55U6kI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=K4r/1wkx/Q6y394CcecWuVw9rS+8pqEd5Ractro22+E15/2gBzGj7l0D/Oh/Wpo/Z 12d2e+BJRURXuQCy7vPuYxR9uwVgM+FsqFk+nMXHT7vtCnPKOgq2K9qXoYy9Gpsjwa fWtaJW4Jc0s7QwhHISlAnJmlpiVByNLSfpkPF1a0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 50E60F804F2; Tue, 18 May 2021 10:46:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 42059F804B0; Tue, 18 May 2021 10:46:21 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A958FF8012C for ; Tue, 18 May 2021 10:46:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A958FF8012C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="29VqlLau"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VF0LeBx9" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D140B5C0062; Tue, 18 May 2021 04:46:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 18 May 2021 04:46:16 -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=C7cNkgrcvyZEa 3lOdIaUQIiB4Z4OchMJVFaoClM+ea4=; b=29VqlLau47LXcZTFdG1QFsokeJXgH SxpUPxdWDNkwwN8zorkX4yzSqKAe4LixKch2VKPNBICPzRtiPQ2AAqmzQNA2yzOw SWZRrkO+BIqPNovPeDZEJKlNnCK7hEo466CnSUru1i8DuV8PI4uAQfTtLZR8Hd0h 7630Jrspn1xMnpi4BTShXWQwmAyCSX8laEWPBMsa4Yz6JY4T02+MLZFX0Pj7XZbh LwkRPyj36qMt/BZWZVEdAHbpQG0DpSg3jJUrIXMoNbVdxtNNqptnJiwfYjETBK3I gQEO1jSgxrkK0ZM7Xvq2BvWnHwGDkvA5njgd4aNMoKJSFBHjioCe5RQ4g== 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=C7cNkgrcvyZEa3lOdIaUQIiB4Z4OchMJVFaoClM+ea4=; b=VF0LeBx9 WSwynccx3pa6qgJUUAMDNqtkiMuCCvk8zp8rTl45Yx2BfH4EJswgrRgt2698cuog 8CsG89u8MACeVok89KpEkyNq/xxw787N1h82uk0Wkun+IN8HbS00VUYxQ7nn0PgG LvedJLBmL/y3KxxN79cCQAkrQN7fZZoKMmIHyOzG1TwtExuRwB/dpV9L3Uf1WF/U DsKX9ANvwYiSs4t0s/HwmmbmhTilWHeq0rnrDXhki7uak8IBCLsjAkFt/4Afk/JH 8K0D9RghY51SWGWX3e3OQsgkIsDCWsaYE388KQJYCN4kSzxsYxXmBjfCZYqp5K6S +CRcDQ0XOIkIpw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgtdekucetufdoteggodetrfdotf 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; Tue, 18 May 2021 04:46:15 -0400 (EDT) From: Takashi Sakamoto To: tiwai@suse.de Subject: [PATCH v4 11/11] ALSA: oxfw: add quirk flag for blocking transmission method Date: Tue, 18 May 2021 17:45:57 +0900 Message-Id: <20210518084557.102681-12-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210518084557.102681-1-o-takashi@sakamocchi.jp> References: <20210518084557.102681-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" Stanton SCS.1m and Apogee Duet FireWire use blocking transmission method unlike the other models. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw-stream.c | 7 ++++++- sound/firewire/oxfw/oxfw.c | 14 +++++++++++--- sound/firewire/oxfw/oxfw.h | 2 ++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c index 5771ff44dd5d..e9b6a9f171bf 100644 --- a/sound/firewire/oxfw/oxfw-stream.c +++ b/sound/firewire/oxfw/oxfw-stream.c @@ -153,9 +153,14 @@ static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream) struct cmp_connection *conn; enum cmp_direction c_dir; enum amdtp_stream_direction s_dir; - unsigned int flags = CIP_NONBLOCKING; + unsigned int flags; int err; + if (!(oxfw->quirks & SND_OXFW_QUIRK_BLOCKING_TRANSMISSION)) + flags = CIP_NONBLOCKING; + else + flags = CIP_BLOCKING; + if (stream == &oxfw->tx_stream) { conn = &oxfw->out_conn; c_dir = CMP_OUTPUT; diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 966697dace47..59bffa32636c 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -23,6 +23,8 @@ #define OUI_APOGEE 0x0003db #define MODEL_SATELLITE 0x00200f +#define MODEL_SCS1M 0x001000 +#define MODEL_DUET_FW 0x01dddd #define SPECIFIER_1394TA 0x00a02d #define VERSION_AVC 0x010001 @@ -144,13 +146,19 @@ static int detect_quirks(struct snd_oxfw *oxfw) * messages. */ if (oxfw->entry->vendor_id == OUI_STANTON) { - /* No physical MIDI ports. */ + if (oxfw->entry->model_id == MODEL_SCS1M) + oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION; + + // No physical MIDI ports. oxfw->midi_input_ports = 0; oxfw->midi_output_ports = 0; return snd_oxfw_scs1x_add(oxfw); } + if (oxfw->entry->vendor_id == OUI_APOGEE && oxfw->entry->model_id == MODEL_DUET_FW) + oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION; + /* * TASCAM FireOne has physical control and requires a pair of additional * MIDI ports. @@ -377,11 +385,11 @@ static const struct ieee1394_device_id oxfw_id_table[] = { // TASCAM, FireOne. OXFW_DEV_ENTRY(VENDOR_TASCAM, 0x800007, NULL), // Stanton, Stanton Controllers & Systems 1 Mixer (SCS.1m). - OXFW_DEV_ENTRY(OUI_STANTON, 0x001000, NULL), + OXFW_DEV_ENTRY(OUI_STANTON, MODEL_SCS1M, NULL), // Stanton, Stanton Controllers & Systems 1 Deck (SCS.1d). OXFW_DEV_ENTRY(OUI_STANTON, 0x002000, NULL), // APOGEE, duet FireWire. - OXFW_DEV_ENTRY(OUI_APOGEE, 0x01dddd, NULL), + OXFW_DEV_ENTRY(OUI_APOGEE, MODEL_DUET_FW, NULL), { } }; MODULE_DEVICE_TABLE(ieee1394, oxfw_id_table); diff --git a/sound/firewire/oxfw/oxfw.h b/sound/firewire/oxfw/oxfw.h index 4002998d41e8..853135b5002d 100644 --- a/sound/firewire/oxfw/oxfw.h +++ b/sound/firewire/oxfw/oxfw.h @@ -38,6 +38,8 @@ enum snd_oxfw_quirk { SND_OXFW_QUIRK_JUMBO_PAYLOAD = 0x01, // The dbs field of CIP header in tx packet is wrong. SND_OXFW_QUIRK_WRONG_DBS = 0x02, + // Blocking transmission mode is used. + SND_OXFW_QUIRK_BLOCKING_TRANSMISSION = 0x04, }; /* This is an arbitrary number for convinience. */