From patchwork Mon Jul 22 17:52:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 814187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B7612C3DA5D for ; Mon, 22 Jul 2024 17:57:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C85B4E0D; Mon, 22 Jul 2024 19:57:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C85B4E0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671052; bh=PXWwNdLivNmL3loxTjcdIVhsQSSWJ5vEvlVrMr7Xrcw=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=mLXbGfOBAVvtIM6Is3JkLVPOlugWQHBhamFczv9iG9FBOISTKu4WZHZzScL2M+q+v xidyf8uuUEAvDNPiM80R5ghPCXFmgssCrWwbrfBllHplGBBQqsCBH8duhK8wCD9l41 LI4gHRS5u6IlwiDlVQqJ8Eaz1KyTwVTD8fme7AuY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C3EC8F805BF; Mon, 22 Jul 2024 19:57:02 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B59B6F805B1; Mon, 22 Jul 2024 19:57:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 366A0F8059F; Mon, 22 Jul 2024 19:52:02 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C5D41F8019B for ; Mon, 22 Jul 2024 19:51:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C5D41F8019B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=YXD+h0dr; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ZmZHmXYY; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=YXD+h0dr; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ZmZHmXYY Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D921E1FB7F; Mon, 22 Jul 2024 17:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qBuSHLceP67P+Iz3lEuhgQRdYv1BwF/lU+d2DtFYWcM=; b=YXD+h0drxm8fqaHdxmdwFnEPYtQZx3y0EsW7GiFj5N+nVkZBtH7PkE3+kAxDldDg6Elhpv daupB9KiVYF6TZT1u+MHTh1IzJfvf8fIXbiHt4Tue+V/VDhhdQKJ8FB0LZkRCpoLzxorfY abX3470uK1ZsovMZJSdkZVz/DldwLnw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qBuSHLceP67P+Iz3lEuhgQRdYv1BwF/lU+d2DtFYWcM=; b=ZmZHmXYYr0cuq5r2JukwbJF5+x4ujGnSxt8UrrtdwzCZKlPz7Dw4lZ4mqZRF7TuMY15lTD KUcT00GRpgoPMgBQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=YXD+h0dr; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=ZmZHmXYY DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qBuSHLceP67P+Iz3lEuhgQRdYv1BwF/lU+d2DtFYWcM=; b=YXD+h0drxm8fqaHdxmdwFnEPYtQZx3y0EsW7GiFj5N+nVkZBtH7PkE3+kAxDldDg6Elhpv daupB9KiVYF6TZT1u+MHTh1IzJfvf8fIXbiHt4Tue+V/VDhhdQKJ8FB0LZkRCpoLzxorfY abX3470uK1ZsovMZJSdkZVz/DldwLnw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qBuSHLceP67P+Iz3lEuhgQRdYv1BwF/lU+d2DtFYWcM=; b=ZmZHmXYYr0cuq5r2JukwbJF5+x4ujGnSxt8UrrtdwzCZKlPz7Dw4lZ4mqZRF7TuMY15lTD KUcT00GRpgoPMgBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A9C001398E; Mon, 22 Jul 2024 17:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id CFYzKDCcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:44 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 01/10] configure: Requires the latest ALSA-lib release 1.2.12 Date: Mon, 22 Jul 2024 19:52:05 +0200 Message-ID: <20240722175215.8223-2-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [0.19 / 50.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DWL_DNSWL_BLOCKED(0.00)[suse.de:dkim]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim,suse.de:email]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Queue-Id: D921E1FB7F X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Bar: / Message-ID-Hash: AXPIXXPD77ZMIEETW7K3H2LPTNL2PRQQ X-Message-ID-Hash: AXPIXXPD77ZMIEETW7K3H2LPTNL2PRQQ X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: New features such as MIDI 2.0 should be always enabled for the builds. Update the dependency to alsa-lib 1.2.12. Signed-off-by: Takashi Iwai --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 708380cf31dc..4803fe471c57 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ AC_PROG_SED AC_DISABLE_STATIC AM_PROG_LIBTOOL PKG_PROG_PKG_CONFIG -AM_PATH_ALSA(1.2.5) +AM_PATH_ALSA(1.2.12) if test "x$enable_alsatest" = "xyes"; then AC_CHECK_FUNC([snd_ctl_elem_add_enumerated], , [AC_ERROR([No user enum control support in alsa-lib])]) From patchwork Mon Jul 22 17:52:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 814184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 46B8CC3DA5D for ; Mon, 22 Jul 2024 17:59:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 69669E80; Mon, 22 Jul 2024 19:59:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 69669E80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671154; bh=56t8ipHb2mfcvnrsWTNKYT6LbSMTf3V6qbfYgIHpwH4=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=DxG93nB84Ob+OqKT9R8uA/lSQSKhAtHTOuckrNby8x7xby4GbqCwYETc9j1dfCKeR CKbFG0cMPyAUinahM4AypLtaHIh27+e1Qdb2UTCddFxhhJE7QmC413AmgvKwjzDkAZ mdIBvv0SAjkzRcz/5KcYH0n/dQoHJJd15jeSN1Eg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 67632F80692; Mon, 22 Jul 2024 19:57:14 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B440DF806AB; Mon, 22 Jul 2024 19:57:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4078FF80482; Mon, 22 Jul 2024 19:53:25 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C7B7FF801F5 for ; Mon, 22 Jul 2024 19:51:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C7B7FF801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=gRVWrF4H; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=QD/7H6FU; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=gRVWrF4H; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=QD/7H6FU Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 072131FB89; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zju2fQFIY4UatI8TrGriXrsh22Awz15vWQE7Xe4XeqE=; b=gRVWrF4H9bLiafr90o5+ZUWYwM5opUUlCOibfVmp7/ZqNrSXY6jB/pMhLjKTJmCbkjb+Y9 rUxACfA+xPCO8bZstqwzeYFC0Sp49Y4KBC0SXbiqFldEGWSwtUbUbuZyEfXXgKWD/d9HGS sz0OfGmUFmcEk62WWnCQg3SPHRJGPhw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zju2fQFIY4UatI8TrGriXrsh22Awz15vWQE7Xe4XeqE=; b=QD/7H6FU5YmiEt3ODccZQ+YM3xGwgEyhFdZRLrMxLLYwerCts3HPDpZV1UObcC7/42V3Zb +FgLm1lYjoAeIsBw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zju2fQFIY4UatI8TrGriXrsh22Awz15vWQE7Xe4XeqE=; b=gRVWrF4H9bLiafr90o5+ZUWYwM5opUUlCOibfVmp7/ZqNrSXY6jB/pMhLjKTJmCbkjb+Y9 rUxACfA+xPCO8bZstqwzeYFC0Sp49Y4KBC0SXbiqFldEGWSwtUbUbuZyEfXXgKWD/d9HGS sz0OfGmUFmcEk62WWnCQg3SPHRJGPhw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zju2fQFIY4UatI8TrGriXrsh22Awz15vWQE7Xe4XeqE=; b=QD/7H6FU5YmiEt3ODccZQ+YM3xGwgEyhFdZRLrMxLLYwerCts3HPDpZV1UObcC7/42V3Zb +FgLm1lYjoAeIsBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E101613996; Mon, 22 Jul 2024 17:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id gPesNTCcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:44 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 02/10] aplaymidi: Drop ifdef for UMP support Date: Mon, 22 Jul 2024 19:52:06 +0200 Message-ID: <20240722175215.8223-3-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-2.60 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Message-ID-Hash: 3YPU7J2CSOYJ6KGHHAIGNDOI2NJCSPVN X-Message-ID-Hash: 3YPU7J2CSOYJ6KGHHAIGNDOI2NJCSPVN X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now that the latest alsa-lib 1.2.12 became mandatory, all ugly ifdefs can be dropped. Signed-off-by: Takashi Iwai --- seq/aplaymidi/aplaymidi.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/seq/aplaymidi/aplaymidi.c b/seq/aplaymidi/aplaymidi.c index 66038e278d4a..dd8d07997985 100644 --- a/seq/aplaymidi/aplaymidi.c +++ b/seq/aplaymidi/aplaymidi.c @@ -30,9 +30,7 @@ #include #include #include "version.h" -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION #include -#endif /* * 31.25 kbaud, one start bit, eight data bits, two stop bits. @@ -78,9 +76,7 @@ static int file_offset; /* current offset in input file */ static int num_tracks; static struct track *tracks; static int smpte_timing; -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION static int ump_mode; -#endif /* prints an error message to stderr */ static void errormsg(const char *msg, ...) @@ -685,7 +681,6 @@ static int fill_legacy_event(struct event* event, snd_seq_event_t *ev) return 0; } -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION static unsigned char to_ump_status(unsigned char ev_type) { switch (ev_type) { @@ -762,13 +757,10 @@ static int fill_ump_event(struct event* event, snd_seq_ump_event_t *ump_ev, snd_seq_ev_set_ump_data(ump_ev, &ump, sizeof(ump)); return 0; } -#endif /* HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION */ static void play_midi(void) { -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION snd_seq_ump_event_t ump_ev; -#endif snd_seq_event_t ev; int i, max_tick, err; @@ -830,7 +822,7 @@ static void play_midi(void) if (err < 0) continue; } -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION + if (ump_mode) { err = fill_ump_event(event, &ump_ev, &ev); if (err < 0) @@ -839,7 +831,6 @@ static void play_midi(void) check_snd("output event", err); continue; } -#endif /* this blocks when the output pool has been filled */ err = snd_seq_event_output(seq, &ev); @@ -957,9 +948,7 @@ static void usage(const char *argv0) "-V, --version print current version\n" "-l, --list list all possible output ports\n" "-p, --port=client:port,... set port(s) to play to\n" -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION "-u, --ump=version UMP output (only version=1 is supported)\n" -#endif "-d, --delay=seconds delay after song ends\n", argv0); } @@ -969,12 +958,7 @@ static void version(void) puts("aplaymidi version " SND_UTIL_VERSION_STR); } -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION #define OPTIONS "hVlp:d:u:" -#else -#define OPTIONS "hVlp:d:" -#endif - int main(int argc, char *argv[]) { @@ -984,9 +968,7 @@ int main(int argc, char *argv[]) {"version", 0, NULL, 'V'}, {"list", 0, NULL, 'l'}, {"port", 1, NULL, 'p'}, -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION {"ump", 1, NULL, 'u'}, -#endif {"delay", 1, NULL, 'd'}, {0} }; @@ -1013,7 +995,6 @@ int main(int argc, char *argv[]) case 'd': end_delay = atoi(optarg); break; -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION case 'u': if (strcmp(optarg, "1")) { errormsg("Only MIDI 1.0 is supported"); @@ -1021,7 +1002,6 @@ int main(int argc, char *argv[]) } ump_mode = 1; break; -#endif default: usage(argv[0]); return 1; @@ -1029,13 +1009,11 @@ int main(int argc, char *argv[]) } -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION if (ump_mode) { int err; err = snd_seq_set_client_midi_version(seq, SND_SEQ_CLIENT_UMP_MIDI_1_0); check_snd("set midi version", err); } -#endif if (do_list) { list_ports(); From patchwork Mon Jul 22 17:52:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 813783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A68CBC3DA59 for ; Mon, 22 Jul 2024 18:00:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EA83986E; Mon, 22 Jul 2024 19:59:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA83986E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671201; bh=SGkXvjHI6nK1q31QhCcmfZ8ySNY8S0Yo6832vMO4FHE=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=fqz1HLdm2KsilEltaCaaYazwSeDal1d0dEHEzLKPsnzi0IlFQbiHZiAtigVvbqNgf m8bmcKRAIQqoR7joCFvNzyTgKvBP6ubDCYi6Hm9j7j5gHyRRPUiXsTu5g92sSmEtvu 5qJjCxcqytNoF4DhUXFQFv1lWoOJ/RCIOoNHiwjA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7963F8070C; Mon, 22 Jul 2024 19:57:20 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2CF0BF806ED; Mon, 22 Jul 2024 19:57:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0C9FCF801F5; Mon, 22 Jul 2024 19:54:20 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 50571F8007E for ; Mon, 22 Jul 2024 19:51:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 50571F8007E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=IMQ538DH; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=dO5zbBEu; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=IMQ538DH; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=dO5zbBEu Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 31B3B1FB8A; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvB4zTj4+FI/q1XI4nPbs1UMRAVo3A758XbZPAq5UN8=; b=IMQ538DHVXXE6xC3hxvgMMnaUOaZydSYpF7XwVITjb7R7Jnn9ray3AFy7H59E/tr/WHhN0 +wBRvVne4Ks2t1yXP0sBADVJ0GVxSdQLMqRtbS1Z6UdegUWWXfFBk7avO8W5JZzpJzu+ez RlDovVwjXQXqNz5ozanBiYECy9SD4n0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvB4zTj4+FI/q1XI4nPbs1UMRAVo3A758XbZPAq5UN8=; b=dO5zbBEuKntX1cAlYIfGAqC45MaPMntOL5xZy9qVMjR/xiYK7jz/CEwPa17MZ0JzjJ/ZzU FwgC5haeWmI8crAw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=IMQ538DH; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=dO5zbBEu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvB4zTj4+FI/q1XI4nPbs1UMRAVo3A758XbZPAq5UN8=; b=IMQ538DHVXXE6xC3hxvgMMnaUOaZydSYpF7XwVITjb7R7Jnn9ray3AFy7H59E/tr/WHhN0 +wBRvVne4Ks2t1yXP0sBADVJ0GVxSdQLMqRtbS1Z6UdegUWWXfFBk7avO8W5JZzpJzu+ez RlDovVwjXQXqNz5ozanBiYECy9SD4n0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvB4zTj4+FI/q1XI4nPbs1UMRAVo3A758XbZPAq5UN8=; b=dO5zbBEuKntX1cAlYIfGAqC45MaPMntOL5xZy9qVMjR/xiYK7jz/CEwPa17MZ0JzjJ/ZzU FwgC5haeWmI8crAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0F05F138A7; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id GGsgAjGcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 03/10] aplaymidi: Allow to pass 0 to -u option, too Date: Mon, 22 Jul 2024 19:52:07 +0200 Message-ID: <20240722175215.8223-4-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [0.19 / 50.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DWL_DNSWL_BLOCKED(0.00)[suse.de:dkim]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Queue-Id: 31B3B1FB8A X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Bar: / Message-ID-Hash: STJTT2OQKVMZ3E47HDIEDL2BBRUFDS7T X-Message-ID-Hash: STJTT2OQKVMZ3E47HDIEDL2BBRUFDS7T X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Specifying -u 0 shouldn't be treated as an error but it should mean the legacy MIDI 1.0 handling. Signed-off-by: Takashi Iwai --- seq/aplaymidi/aplaymidi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/seq/aplaymidi/aplaymidi.c b/seq/aplaymidi/aplaymidi.c index dd8d07997985..7aeea824ce0d 100644 --- a/seq/aplaymidi/aplaymidi.c +++ b/seq/aplaymidi/aplaymidi.c @@ -996,11 +996,9 @@ int main(int argc, char *argv[]) end_delay = atoi(optarg); break; case 'u': - if (strcmp(optarg, "1")) { - errormsg("Only MIDI 1.0 is supported"); - return 1; - } - ump_mode = 1; + ump_mode = atoi(optarg); + if (ump_mode < 0 || ump_mode > 1) + fatal("Only MIDI 1.0 is supported"); break; default: usage(argv[0]); From patchwork Mon Jul 22 17:52:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 814183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D079DC3DA59 for ; Mon, 22 Jul 2024 17:59:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DEE751F1; Mon, 22 Jul 2024 19:59:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DEE751F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671184; bh=Rdz8teq8YEm7WMPCEsxKWl1xx2hRJjoBIcw9Mu4S9PQ=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=Tth9vPXDX29cAx9BU6Bdqff+ynIPIcoZrIOamzNa9qrXVSgZT+4s6q+OBqaTCbWR+ qPkvrnjQIMVNRDHdxoi8BXa/9FHZfsZbDx+Ja6H0r5Xu4y2P6KHamsWP3JWrKNnEh3 sYKUE2L4hkqAAc0X+1WCmAv+YQXV/j2GJxGYALog= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B5D2FF806D7; Mon, 22 Jul 2024 19:57:18 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 344EEF806B1; Mon, 22 Jul 2024 19:57:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E57A0F801F5; Mon, 22 Jul 2024 19:54:18 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D2CC5F8026D for ; Mon, 22 Jul 2024 19:51:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D2CC5F8026D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=vcMdxSa1; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=4vu1PPN6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=vcMdxSa1; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=4vu1PPN6 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 521A91FB80; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KO79lRVs4iXZLsVOYYvWqFglcOqdiTSO0gdAEA/POic=; b=vcMdxSa14w50Ou0FEbTEwoyjNnNWVVr/EsZQDyv/3Ob15QyAtk8XZd9tPN68E8eEq4NXZt dd5qrjT9P8+v8nXqSsC9DM//19SPa40kiJr+il7mjINcUpCnt3G8Twg7XQK+NizxfWONJh YYdH7tovSoaa1H36sh4vmpyYF4X+tcA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KO79lRVs4iXZLsVOYYvWqFglcOqdiTSO0gdAEA/POic=; b=4vu1PPN6sPrXIPrX4xhKr+vJn4PTGnBSbROUAvSUZRNPBD4shGTEwLb+cC3odENQze0BM5 IAokKwS++xuRMVDA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KO79lRVs4iXZLsVOYYvWqFglcOqdiTSO0gdAEA/POic=; b=vcMdxSa14w50Ou0FEbTEwoyjNnNWVVr/EsZQDyv/3Ob15QyAtk8XZd9tPN68E8eEq4NXZt dd5qrjT9P8+v8nXqSsC9DM//19SPa40kiJr+il7mjINcUpCnt3G8Twg7XQK+NizxfWONJh YYdH7tovSoaa1H36sh4vmpyYF4X+tcA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KO79lRVs4iXZLsVOYYvWqFglcOqdiTSO0gdAEA/POic=; b=4vu1PPN6sPrXIPrX4xhKr+vJn4PTGnBSbROUAvSUZRNPBD4shGTEwLb+cC3odENQze0BM5 IAokKwS++xuRMVDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 37EDD1398E; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YDxSDDGcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 04/10] aconnect: Drop superfluous ifdefs Date: Mon, 22 Jul 2024 19:52:08 +0200 Message-ID: <20240722175215.8223-5-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-2.60 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,imap1.dmz-prg2.suse.org:helo]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Message-ID-Hash: BOORIXL6QZ4VHDDVNMCD75YQLXPP2TVI X-Message-ID-Hash: BOORIXL6QZ4VHDDVNMCD75YQLXPP2TVI X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now that the latest alsa-lib 1.2.12 became mandatory, all ugly ifdefs can be dropped. Signed-off-by: Takashi Iwai --- seq/aconnect/aconnect.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c index 371165d65323..edd028f0391d 100644 --- a/seq/aconnect/aconnect.c +++ b/seq/aconnect/aconnect.c @@ -29,12 +29,7 @@ #include #include "gettext.h" -#ifdef SND_SEQ_PORT_CAP_INACTIVE -#define HANDLE_SHOW_ALL static int show_all; -#else -#define show_all 0 -#endif static void error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...) { @@ -67,9 +62,7 @@ static void usage(void) printf(_(" aconnect -i|-o [-options]\n")); printf(_(" -i,--input list input (readable) ports\n")); printf(_(" -o,--output list output (writable) ports\n")); -#ifdef HANDLE_SHOW_ALL printf(_(" -a,--all show inactive ports, too\n")); -#endif printf(_(" -l,--list list current connections of each port\n")); printf(_(" * Remove all exported connections\n")); printf(_(" -x, --removeall\n")); @@ -84,15 +77,11 @@ static void usage(void) #define perm_ok(cap,bits) (((cap) & (bits)) == (bits)) -#ifdef SND_SEQ_PORT_DIR_INPUT static int check_direction(snd_seq_port_info_t *pinfo, int bit) { int dir = snd_seq_port_info_get_direction(pinfo); return !dir || (dir & bit); } -#else -#define check_direction(x, y) 1 -#endif static int check_permission(snd_seq_port_info_t *pinfo, int perm) { @@ -174,20 +163,16 @@ static void do_search_port(snd_seq_t *seq, int perm, action_func_t do_action) /* reset query info */ snd_seq_port_info_set_client(pinfo, snd_seq_client_info_get_client(cinfo)); snd_seq_port_info_set_port(pinfo, -1); -#ifdef HANDLE_SHOW_ALL if (show_all) snd_seq_port_info_set_capability(pinfo, SND_SEQ_PORT_CAP_INACTIVE); -#endif count = 0; while (snd_seq_query_next_port(seq, pinfo) >= 0) { if (check_permission(pinfo, perm)) { do_action(seq, cinfo, pinfo, count); count++; } -#ifdef HANDLE_SHOW_ALL if (show_all) snd_seq_port_info_set_capability(pinfo, SND_SEQ_PORT_CAP_INACTIVE); -#endif } } } @@ -205,7 +190,6 @@ static void print_port(snd_seq_t *seq ATTRIBUTE_UNUSED, snd_seq_client_info_get_name(cinfo), (snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT ? _("user") : _("kernel"))); -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION switch (snd_seq_client_info_get_midi_version(cinfo)) { case SND_SEQ_CLIENT_UMP_MIDI_1_0: printf(",UMP-MIDI1"); @@ -214,16 +198,11 @@ static void print_port(snd_seq_t *seq ATTRIBUTE_UNUSED, printf(",UMP-MIDI2"); break; } -#endif -#ifdef HAVE_SEQ_CLIENT_INFO_GET_CARD card = snd_seq_client_info_get_card(cinfo); -#endif if (card != -1) printf(",card=%d", card); -#ifdef HAVE_SEQ_CLIENT_INFO_GET_PID pid = snd_seq_client_info_get_pid(cinfo); -#endif if (pid != -1) printf(",pid=%d", pid); printf("]\n"); @@ -231,10 +210,8 @@ static void print_port(snd_seq_t *seq ATTRIBUTE_UNUSED, printf(" %3d '%-16s'", snd_seq_port_info_get_port(pinfo), snd_seq_port_info_get_name(pinfo)); -#ifdef HANDLE_SHOW_ALL if (snd_seq_port_info_get_capability(pinfo) & SND_SEQ_PORT_CAP_INACTIVE) printf(" [INACTIVE]"); -#endif printf("\n"); } @@ -299,11 +276,7 @@ enum { SUBSCRIBE, UNSUBSCRIBE, LIST, REMOVE_ALL }; -#ifdef HANDLE_SHOW_ALL #define ACONNECT_OPTS "dior:t:elxa" -#else -#define ACONNECT_OPTS "dior:t:elx" -#endif static const struct option long_option[] = { {"disconnect", 0, NULL, 'd'}, @@ -314,9 +287,7 @@ static const struct option long_option[] = { {"exclusive", 0, NULL, 'e'}, {"list", 0, NULL, 'l'}, {"removeall", 0, NULL, 'x'}, -#ifdef HANDLE_SHOW_ALL {"all", 0, NULL, 'a'}, -#endif {NULL, 0, NULL, 0}, }; @@ -370,12 +341,10 @@ int main(int argc, char **argv) case 'x': command = REMOVE_ALL; break; -#ifdef HANDLE_SHOW_ALL case 'a': command = LIST; show_all = 1; break; -#endif default: usage(); exit(1); From patchwork Mon Jul 22 17:52:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 813786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D633CC3DA5D for ; Mon, 22 Jul 2024 17:58:22 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A6B40E68; Mon, 22 Jul 2024 19:58:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A6B40E68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671100; bh=ea1tY4rPSr1ot2NjkYjIBRpcXo1PPYA86DyyleDXpoE=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=ipk2BFVMRqBb77Oi7pVp36Fp0r1kyXclGBt9hjh0BTqbF3uDvfLjHBx/Key0xIn0n uLqw95bPgeMkrKe4BLruhQH8vlGHYaCUbMn9kFTr2wxdsj3TqffXtScopv1FAGnQf1 y1t7UgmWiECYFd9pMq/dXeKP/X18t7oBVcQ4UQVE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7CA3FF80622; Mon, 22 Jul 2024 19:57:07 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 15D83F80621; Mon, 22 Jul 2024 19:57:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E1E64F80579; Mon, 22 Jul 2024 19:52:21 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7AFF4F8057A for ; Mon, 22 Jul 2024 19:51:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7AFF4F8057A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0JCOqXbW; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Q0FU7OKu; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0JCOqXbW; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Q0FU7OKu Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 71F3421B8C; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzZBoJJV3+a8Fx24p/q7BxF7y0t+V+uFrxnYwEIh5sQ=; b=0JCOqXbWyDyzcpbZWhJ2omhjfAtuquoql6HWOdyGKXj9NPXu/KnK/FtNVMe/XIi2x3fau0 XkNtcZNszuloTuO1AkQD0c1oVV2/mFP0a6XD23+j/KuKR2ArMKs8yN9dVOMfzOQCVusoVv 6xuvpCCkq0afQ23vNZLWsROHN4W/+Wg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzZBoJJV3+a8Fx24p/q7BxF7y0t+V+uFrxnYwEIh5sQ=; b=Q0FU7OKuvZcjEnHMYU3zg+fUOCioG69H5IPUmHPWI+All89rV6eg2kaa3eiKvjr/43phaG C1un+Wyx258sd8AQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzZBoJJV3+a8Fx24p/q7BxF7y0t+V+uFrxnYwEIh5sQ=; b=0JCOqXbWyDyzcpbZWhJ2omhjfAtuquoql6HWOdyGKXj9NPXu/KnK/FtNVMe/XIi2x3fau0 XkNtcZNszuloTuO1AkQD0c1oVV2/mFP0a6XD23+j/KuKR2ArMKs8yN9dVOMfzOQCVusoVv 6xuvpCCkq0afQ23vNZLWsROHN4W/+Wg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzZBoJJV3+a8Fx24p/q7BxF7y0t+V+uFrxnYwEIh5sQ=; b=Q0FU7OKuvZcjEnHMYU3zg+fUOCioG69H5IPUmHPWI+All89rV6eg2kaa3eiKvjr/43phaG C1un+Wyx258sd8AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 58EF0138A7; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sANMFDGcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 05/10] aseqdump: Drop ifdef for UMP support Date: Mon, 22 Jul 2024 19:52:09 +0200 Message-ID: <20240722175215.8223-6-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [0.40 / 50.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,imap1.dmz-prg2.suse.org:helo]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Message-ID-Hash: E5CVEHH3NFQRHRASA6DM3DECFHGL4LLB X-Message-ID-Hash: E5CVEHH3NFQRHRASA6DM3DECFHGL4LLB X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now that the latest alsa-lib 1.2.12 is mandatory, drop the ugly ifdefs. Signed-off-by: Takashi Iwai --- seq/aseqdump/aseqdump.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c index 6ac897c0710a..1c968b1cfc05 100644 --- a/seq/aseqdump/aseqdump.c +++ b/seq/aseqdump/aseqdump.c @@ -29,9 +29,7 @@ #include #include #include "version.h" -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION #include -#endif enum { VIEW_RAW, VIEW_NORMALIZED, VIEW_PERCENT @@ -41,11 +39,7 @@ static snd_seq_t *seq; static int port_count; static snd_seq_addr_t *ports; static volatile sig_atomic_t stop = 0; -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION static int ump_version; -#else -#define ump_version 0 -#endif static int view_mode = VIEW_RAW; /* prints an error message to stderr, and dies */ @@ -368,7 +362,6 @@ static void dump_event(const snd_seq_event_t *ev) } } -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION static int group_number(unsigned char c) { if (view_mode != VIEW_RAW) @@ -986,7 +979,6 @@ static void dump_ump_event(const snd_seq_ump_event_t *ev) break; } } -#endif /* HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION */ static void list_ports(void) { @@ -1029,10 +1021,8 @@ static void help(const char *argv0) " -N,--normalized-view show normalized values\n" " -P,--percent-view show percent values\n" " -R,--raw-view show raw values (default)\n" -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION " -u,--ump=version set client MIDI version (0=legacy, 1= UMP MIDI 1.0, 2=UMP MIDI2.0)\n" " -r,--raw do not convert UMP and legacy events\n" -#endif " -p,--port=client:port,... source port(s)\n", argv0); } @@ -1049,11 +1039,7 @@ static void sighandler(int sig ATTRIBUTE_UNUSED) int main(int argc, char *argv[]) { - static const char short_options[] = "hVlp:NPR" -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION - "u:r" -#endif - ; + static const char short_options[] = "hVlp:NPRu:r"; static const struct option long_options[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'V'}, @@ -1062,10 +1048,8 @@ int main(int argc, char *argv[]) {"normalized-view", 0, NULL, 'N'}, {"percent-view", 0, NULL, 'P'}, {"raw-view", 0, NULL, 'R'}, -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION {"ump", 1, NULL, 'u'}, {"raw", 0, NULL, 'r'}, -#endif {0} }; @@ -1100,7 +1084,6 @@ int main(int argc, char *argv[]) case 'N': view_mode = VIEW_NORMALIZED; break; -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION case 'u': ump_version = atoi(optarg); snd_seq_set_client_midi_version(seq, ump_version); @@ -1108,7 +1091,6 @@ int main(int argc, char *argv[]) case 'r': snd_seq_set_client_ump_conversion(seq, 0); break; -#endif default: help(argv[0]); return 1; @@ -1150,7 +1132,6 @@ int main(int argc, char *argv[]) break; for (;;) { snd_seq_event_t *event; -#ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION snd_seq_ump_event_t *ump_ev; if (ump_version > 0) { err = snd_seq_ump_event_input(seq, &ump_ev); @@ -1160,7 +1141,6 @@ int main(int argc, char *argv[]) dump_ump_event(ump_ev); continue; } -#endif err = snd_seq_event_input(seq, &event); if (err < 0) From patchwork Mon Jul 22 17:52:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 813785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 988D8C3DA5D for ; Mon, 22 Jul 2024 17:58:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C1BEB839; Mon, 22 Jul 2024 19:58:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C1BEB839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671133; bh=w8bg63e/HibGEU0KwqxTop7Z8B5+PNhIN4B9xcIG7J0=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=Cs7g/0Dw/sA39Zr0YVCJIqIbKt/2cmdvrvTiHtU/CuU3OpBLY4cNWvkcLyi1sJCMw YjZB7D1vdg1UCZCiC6FipqDphrp7TgDF2PlkMHquEEPtC6h/kZW8HuTx8TBXI/4OSW s8Dpxn2MqeH39jB2LZj5TLK1DMLnYPgWHCbwJbhI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 275EBF80673; Mon, 22 Jul 2024 19:57:11 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4EEE1F80684; Mon, 22 Jul 2024 19:57:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87D7DF80580; Mon, 22 Jul 2024 19:52:25 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5831BF80482 for ; Mon, 22 Jul 2024 19:51:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5831BF80482 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=H4Ix4XFq; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=W1s3VHK+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=H4Ix4XFq; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=W1s3VHK+ Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9B8231FB84; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg7vh9E+ufcn5qjiIxqKkktixa3lX5fo+aOzMJP6PFs=; b=H4Ix4XFqxr0PsAxk8G0UBolh3U+qjRrPKm/h+yddgCSOlBIfXEEKFYw7gsV7jQArPchOfF qD+q8vWmSZPAFC0d12HKpMCFRU4vHq3B1Zj1SXGalIKjccTAS7mFGgfvThFh9h/7OTF4ZI e9jWfu1NGwsZ5Qib/HOAZ/OOny2ws18= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg7vh9E+ufcn5qjiIxqKkktixa3lX5fo+aOzMJP6PFs=; b=W1s3VHK+1xXXrbjY8jHSyvAhx/S1fbXhivIZuiRI7GgQlYAMXN2NL/8+bPvMTNomQY2J+b C3YiJb9dJmgPYkCQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg7vh9E+ufcn5qjiIxqKkktixa3lX5fo+aOzMJP6PFs=; b=H4Ix4XFqxr0PsAxk8G0UBolh3U+qjRrPKm/h+yddgCSOlBIfXEEKFYw7gsV7jQArPchOfF qD+q8vWmSZPAFC0d12HKpMCFRU4vHq3B1Zj1SXGalIKjccTAS7mFGgfvThFh9h/7OTF4ZI e9jWfu1NGwsZ5Qib/HOAZ/OOny2ws18= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg7vh9E+ufcn5qjiIxqKkktixa3lX5fo+aOzMJP6PFs=; b=W1s3VHK+1xXXrbjY8jHSyvAhx/S1fbXhivIZuiRI7GgQlYAMXN2NL/8+bPvMTNomQY2J+b C3YiJb9dJmgPYkCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7838D1398E; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WE0gHDGcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 06/10] aseqdump: Check the -u option value properly Date: Mon, 22 Jul 2024 19:52:10 +0200 Message-ID: <20240722175215.8223-7-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-2.60 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,imap1.dmz-prg2.suse.org:helo]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Message-ID-Hash: CWDTVVTSAHMR7NKIDBE6SWHO5FTZF47D X-Message-ID-Hash: CWDTVVTSAHMR7NKIDBE6SWHO5FTZF47D X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Instead of passing the value as is, check the value passed to -u option and bail out for bad values. Signed-off-by: Takashi Iwai --- seq/aseqdump/aseqdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c index 1c968b1cfc05..f717557824ad 100644 --- a/seq/aseqdump/aseqdump.c +++ b/seq/aseqdump/aseqdump.c @@ -1086,6 +1086,8 @@ int main(int argc, char *argv[]) break; case 'u': ump_version = atoi(optarg); + if (ump_version < 0 || ump_version > 2) + fatal("Invalid UMP version %d", ump_version); snd_seq_set_client_midi_version(seq, ump_version); break; case 'r': From patchwork Mon Jul 22 17:52:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 813784 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 69239C3DA63 for ; Mon, 22 Jul 2024 17:59:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 65759E8E; Mon, 22 Jul 2024 19:59:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 65759E8E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671168; bh=KacJJTJ0Z7R/qqyVvxTxi/Vhrkx8zz0OGgiNHmrPvWA=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=QWDgzbz6xSONV3O7AOPzpNR8D9Od+EGQW0Ux6r1QhV8sA4yrPw/ki/rV6RGKUQ6Wi vWfVsXlI5xy+0T5MhdWb2azEO8wl5HDpGJFeULkYipBGZiqrnJhAKXgQUh5tJkYU4O Uo2zHK+mJ1nTIHC/cRXQbvtl+AFNPugqUWt84r4E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A752BF80689; Mon, 22 Jul 2024 19:57:16 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2EF38F806C2; Mon, 22 Jul 2024 19:57:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C707F801F5; Mon, 22 Jul 2024 19:54:15 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DFA9CF80588 for ; Mon, 22 Jul 2024 19:51:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DFA9CF80588 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=XNf0tZee; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=C2+GC2AQ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=XNf0tZee; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=C2+GC2AQ Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BF09F1FB8B; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=52jEXV13AQg8gaEfYy91n+uLzHY3Ta6hAdJxw1d55xA=; b=XNf0tZeeXh7Rpoz1Xy36FihwTSQvA8CuHlmhhTxXPuv5l0309JrwHLPGI0nQCBVFdBgf9J lWDOxgxg6XorHlxDPwJ0pwpIvJ5ERaFiM+PU+19YnjG4hVBib9d3w42v3TqL+dDIDKEpzN sIGQCy+85BxkpL4TnCIjzTdsPIoJp1w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=52jEXV13AQg8gaEfYy91n+uLzHY3Ta6hAdJxw1d55xA=; b=C2+GC2AQxMG5l5SkJOaEieGleaTPgNc59sZdtXzUs7uFx/sbJR7cpjd6NknhonXVbC97g7 BG5quGG/Ze1O9CBg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=52jEXV13AQg8gaEfYy91n+uLzHY3Ta6hAdJxw1d55xA=; b=XNf0tZeeXh7Rpoz1Xy36FihwTSQvA8CuHlmhhTxXPuv5l0309JrwHLPGI0nQCBVFdBgf9J lWDOxgxg6XorHlxDPwJ0pwpIvJ5ERaFiM+PU+19YnjG4hVBib9d3w42v3TqL+dDIDKEpzN sIGQCy+85BxkpL4TnCIjzTdsPIoJp1w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=52jEXV13AQg8gaEfYy91n+uLzHY3Ta6hAdJxw1d55xA=; b=C2+GC2AQxMG5l5SkJOaEieGleaTPgNc59sZdtXzUs7uFx/sbJR7cpjd6NknhonXVbC97g7 BG5quGG/Ze1O9CBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A2097138A7; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MAdSJjGcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 07/10] configure: Drop unused conditionals Date: Mon, 22 Jul 2024 19:52:11 +0200 Message-ID: <20240722175215.8223-8-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [0.40 / 50.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,imap1.dmz-prg2.suse.org:helo]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Message-ID-Hash: NSIM7A4V7RWONGHZRIBJZMSJJDNB7LGP X-Message-ID-Hash: NSIM7A4V7RWONGHZRIBJZMSJJDNB7LGP X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Since the required alsa-lib version was bumped and the relevant code cleanup, some conditionals are no longer referred. Drop them. Signed-off-by: Takashi Iwai --- configure.ac | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/configure.ac b/configure.ac index 4803fe471c57..bc33fecd72e1 100644 --- a/configure.ac +++ b/configure.ac @@ -47,17 +47,6 @@ AC_CHECK_HEADERS([samplerate.h], [have_samplerate="yes"], [have_samplerate="no"] [#include ]) AC_CHECK_LIB([asound], [snd_seq_client_info_get_card], [HAVE_SEQ_CLIENT_INFO_GET_CARD="yes"]) -if test "$HAVE_SEQ_CLIENT_INFO_GET_CARD" = "yes" ; then - AC_DEFINE([HAVE_SEQ_CLIENT_INFO_GET_CARD], 1, [alsa-lib supports snd_seq_client_info_get_card]) -fi -AC_CHECK_LIB([asound], [snd_seq_client_info_get_pid], [HAVE_SEQ_CLIENT_INFO_GET_PID="yes"]) -if test "$HAVE_SEQ_CLIENT_INFO_GET_PID" = "yes" ; then - AC_DEFINE([HAVE_SEQ_CLIENT_INFO_GET_PID], 1, [alsa-lib supports snd_seq_client_info_get_pid]) -fi -AC_CHECK_LIB([asound], [snd_seq_client_info_get_midi_version], [HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION="yes"]) -if test "$HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION" = "yes" -a "$have_rawmidi" = "yes"; then - AC_DEFINE([HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION], 1, [alsa-lib supports snd_seq_client_info_get_midi_version]) -fi AC_CHECK_LIB([atopology], [snd_tplg_save], [have_topology="yes"], [have_topology="no"]) # From patchwork Mon Jul 22 17:52:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 814186 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5CD4BC3DA5D for ; Mon, 22 Jul 2024 17:58:14 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 84BAF7F4; Mon, 22 Jul 2024 19:58:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 84BAF7F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671092; bh=jSXRBTmea23Bh6nLSKsfzc5du2S/jA66z5wIWiahhIE=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=PZHynpUq2S12xfGzzOr8pWYGXY/Uxv8fSzUVyiHJGKdBU8K80+dAPQhhNkR5TvtVq xGGeal6CWUMxyMw0wBb4PKC1feKSK/I0nHZiPMrD2rUJP4WRSe/tCXr/FQh7No/iS2 +Lz+70kQUYtHoYljMWUPflpqSmOrz0foo2WTGiV8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F2BBBF8060E; Mon, 22 Jul 2024 19:57:06 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AB258F80601; Mon, 22 Jul 2024 19:57:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C932DF80580; Mon, 22 Jul 2024 19:52:14 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5BE13F80579 for ; Mon, 22 Jul 2024 19:51:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BE13F80579 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=l+IWxvmh; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ylgCWHwS; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=PkynghIN; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=cT6akZwn Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EE1E721B9F; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6CFIWZTpRPaq/HrxpiVG6Y2tOufbF5OzW8UiwtRMJa4=; b=l+IWxvmhefEgsRJ3zuC2x8ggdz3mz+o1Swr4i/f2YGqRhKolEEivDMRUy6qt/OIBEHFHVG ekatkHkVlqBXb16qVtNmU8rfi7WFcs3nSuDDYN4IwfTWhJ91u5jbJnNMaz08o2ZIf5140E yH/iI2XgS4xy/DQyNPMZ51zqBnOzYyM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6CFIWZTpRPaq/HrxpiVG6Y2tOufbF5OzW8UiwtRMJa4=; b=ylgCWHwSvOgApJWU/kkUSLY2gIzsw9VylMsecEVyA3UUe2DJBPGMlkhZZnHGgZCEQCK6xq qfPB5L8dwxob5hBQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6CFIWZTpRPaq/HrxpiVG6Y2tOufbF5OzW8UiwtRMJa4=; b=PkynghINQBfa4HAI4WM2DNyNNztzF46G0c9QT/erW8BPvkTynJ1s09RIuI936xLGWWacug nM37wnnrFOsreEVMNduYQEIhpOAp26G35FqzP0lzTOZhRdynI7FuTlWi2iurgwSy/SKvC/ N0dyCuQsmbgCZ3z+360GzjAiuSMx8k8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6CFIWZTpRPaq/HrxpiVG6Y2tOufbF5OzW8UiwtRMJa4=; b=cT6akZwn+tgwa/iQblnwx5VM1R43Zffbzt6aZVWNNB8j8GyH81a8eUdqfz41J+R6M8U+F5 /nAFim3ouX1Ps3BQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C5A2D1398E; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6Aj0LjGcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 08/10] aseqdump: Show SysEx prefix to UMP SysEx data dump Date: Mon, 22 Jul 2024 19:52:12 +0200 Message-ID: <20240722175215.8223-9-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-2.60 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Message-ID-Hash: Q6R2HF6KMFPCX67K5LZ4YZZ6GW6Q75KO X-Message-ID-Hash: Q6R2HF6KMFPCX67K5LZ4YZZ6GW6Q75KO X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Show the event prefix "SysEx" for UMP SysEx data. Otherwise it's difficult to know what it is. Fixes: 506097ebb184 ("aseqdump: Show UMP SysEx messages") Signed-off-by: Takashi Iwai --- seq/aseqdump/aseqdump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c index f717557824ad..7be988fa094b 100644 --- a/seq/aseqdump/aseqdump.c +++ b/seq/aseqdump/aseqdump.c @@ -673,6 +673,7 @@ static void dump_ump_sysex_event(const unsigned int *ump) int i, length; printf("Group %2d, ", group_number(snd_ump_msg_group(ump))); + printf("SysEx "); switch (snd_ump_sysex_msg_status(ump)) { case SND_UMP_SYSEX_STATUS_SINGLE: printf("Single "); From patchwork Mon Jul 22 17:52:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 813787 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0BA87C3DA59 for ; Mon, 22 Jul 2024 17:57:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4791C84C; Mon, 22 Jul 2024 19:57:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4791C84C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671074; bh=+tpB5eqdy875gs58wJLc2B7iOxb/6Obx4HxfAyXXToo=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=mL8GzCGRxSHLzot9XNVy82CqNtwhvE0wDZtDHVfTECEyTXlk53pL7y+23FLDU2Pnk ZrgSUXo+W1UfRbPZsOcdS1lA2L/YlAXAwDyYpihgriPKpSgtZxvmQG6B7SspQ6xR+P sDf9/GlRV4lH7skiptd5Y0njFE+kO8jWbruA98Ak= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0215BF805EF; Mon, 22 Jul 2024 19:57:04 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9E8AEF805D6; Mon, 22 Jul 2024 19:57:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1CE65F8058C; Mon, 22 Jul 2024 19:52:09 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B4499F80580 for ; Mon, 22 Jul 2024 19:51:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B4499F80580 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=qlnFt8JQ; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=USFQFDs1; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=qlnFt8JQ; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=USFQFDs1 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1CEDE1FB8C; Mon, 22 Jul 2024 17:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o6TqIe/3TUfmEjqrPwJrqZLMAyiQupKUf/wJsTvS1Lc=; b=qlnFt8JQaLqQ6CV+O61uJpC+EMWYCTPEZQz29capM8Qt2WHrgGOaJ6UdE+0t2BhVClf2ij hHdObJupLspi9VlI8L7CgSRCnWXcMQYSdYqNSlDwJ/EgeTn0K16RCUaslccGlKpKlUlcm5 9uch72/VGYuxA2PVMTGAd+CoqUCDeIE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o6TqIe/3TUfmEjqrPwJrqZLMAyiQupKUf/wJsTvS1Lc=; b=USFQFDs1R4hnGLJ4vMwolfiyFixXmn6vnQS8kVy6qXHey5ftUMe80oxyUbSR1AQkFX6Sow SQOG1BXPCGBtTLDA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qlnFt8JQ; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=USFQFDs1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o6TqIe/3TUfmEjqrPwJrqZLMAyiQupKUf/wJsTvS1Lc=; b=qlnFt8JQaLqQ6CV+O61uJpC+EMWYCTPEZQz29capM8Qt2WHrgGOaJ6UdE+0t2BhVClf2ij hHdObJupLspi9VlI8L7CgSRCnWXcMQYSdYqNSlDwJ/EgeTn0K16RCUaslccGlKpKlUlcm5 9uch72/VGYuxA2PVMTGAd+CoqUCDeIE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o6TqIe/3TUfmEjqrPwJrqZLMAyiQupKUf/wJsTvS1Lc=; b=USFQFDs1R4hnGLJ4vMwolfiyFixXmn6vnQS8kVy6qXHey5ftUMe80oxyUbSR1AQkFX6Sow SQOG1BXPCGBtTLDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F4143138A7; Mon, 22 Jul 2024 17:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qI5SOjGcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 09/10] aseqsend: Support UMP mode Date: Mon, 22 Jul 2024 19:52:13 +0200 Message-ID: <20240722175215.8223-10-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [0.19 / 50.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DWL_DNSWL_BLOCKED(0.00)[suse.de:dkim]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim,suse.de:email]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Queue-Id: 1CEDE1FB8C X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Bar: / Message-ID-Hash: FYHDZME7QWAEO45M7QYY6WCX3A3TFRCM X-Message-ID-Hash: FYHDZME7QWAEO45M7QYY6WCX3A3TFRCM X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add a new option -u to specify the UMP MIDI1 or MIDI2 mode. As default (-u 0), the program reads the legacy MIDI 1.0 byte stream, while in UMP mode, it reads as UMP packets and send to the target. The UMP packet bytes are encoded in big endian. Signed-off-by: Takashi Iwai --- seq/aseqsend/aseqsend.1 | 13 ++++++++++--- seq/aseqsend/aseqsend.c | 43 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/seq/aseqsend/aseqsend.1 b/seq/aseqsend/aseqsend.1 index 340c3292f5ed..febbf55dfb16 100644 --- a/seq/aseqsend/aseqsend.1 +++ b/seq/aseqsend/aseqsend.1 @@ -14,6 +14,10 @@ It can also send any other MIDI commands. Messages to be send can be given in the last argument as hex encoded byte string or can be read from raw binary file. When sending several SysEx messages at once there is a delay of 1ms after each message as deafult and can be set to different value with option \-i. +A client can be specified by its number, its name, or a prefix of its +name. A port is specified by its number; for port 0 of a client, the +":0" part of the port specification can be omitted. + .SH OPTIONS .TP @@ -44,10 +48,13 @@ Send raw binary data from given file name \-i Interval between SysEx messages in miliseconds +.TP +\-u +Specify the MIDI version. 0 for the legacy MIDI 1.0 (default), +1 for UMP MIDI 1.0 protocol and 2 for UMP MIDI 2.0 protocol. -A client can be specified by its number, its name, or a prefix of its -name. A port is specified by its number; for port 0 of a client, the -":0" part of the port specification can be omitted. +When UMP MIDI 1.0 or MIDI 2.0 protocol is specified, \fBaseqsend\fP +reads the input as raw UMP packets, 4 each byte in big endian. .SH EXAMPLES diff --git a/seq/aseqsend/aseqsend.c b/seq/aseqsend/aseqsend.c index 95b0024c0fd6..bd1a221d4149 100644 --- a/seq/aseqsend/aseqsend.c +++ b/seq/aseqsend/aseqsend.c @@ -33,6 +33,7 @@ #include #include #include +#include typedef unsigned char mbyte_t; @@ -43,6 +44,7 @@ static char *send_hex; static mbyte_t *send_data; static snd_seq_addr_t addr; static int send_data_length; +static int ump_version; static void error(const char *format, ...) { @@ -320,6 +322,32 @@ static void send_midi_msg(snd_seq_event_type_t type, mbyte_t *data, int len) snd_seq_drain_output(seq); } +static int send_ump(const unsigned char *data) +{ + static int ump_len = 0, offset = 0; + unsigned int ump[4]; + snd_seq_ump_event_t ev; + + ump[offset] = (data[0] << 24) | (data[1] << 16) | + (data[2] << 8) | data[3]; + if (!offset) + ump_len = snd_ump_packet_length(snd_ump_msg_type(ump)); + + offset++; + if (offset < ump_len) + return 0; + + snd_seq_ump_ev_clear(&ev); + snd_seq_ev_set_source(&ev, 0); + snd_seq_ev_set_dest(&ev, addr.client, addr.port); + snd_seq_ev_set_direct(&ev); + snd_seq_ev_set_ump_data(&ev, ump, ump_len * 4); + snd_seq_ump_event_output(seq, &ev); + snd_seq_drain_output(seq); + offset = 0; + return ump_len * 4; +} + static int msg_byte_in_range(mbyte_t *data, mbyte_t len) { for (int i = 0; i < len; i++) { @@ -342,7 +370,7 @@ int main(int argc, char *argv[]) int sent_data_c; int k; - while ((c = getopt(argc, argv, "hi:Vvlp:s:")) != -1) { + while ((c = getopt(argc, argv, "hi:Vvlp:s:u:")) != -1) { switch (c) { case 'h': usage(); @@ -366,6 +394,9 @@ int main(int argc, char *argv[]) case 'i': sysex_interval = atoi(optarg) * 1000; //ms--->us break; + case 'u': + ump_version = atoi(optarg); + break; default: error("Try 'aseqsend -h' for more information."); exit(EXIT_FAILURE); @@ -401,7 +432,11 @@ int main(int argc, char *argv[]) if (!send_data) exit(EXIT_SUCCESS); + if (ump_version && (send_data_length % 4) != 0) + fatal("UMP data must be aligned to 4 bytes"); + init_seq(); + snd_seq_set_client_midi_version(seq, ump_version); create_port(); if (snd_seq_parse_address(seq, &addr, port_name) < 0) { @@ -414,6 +449,12 @@ int main(int argc, char *argv[]) while (k < send_data_length) { + if (ump_version) { + sent_data_c += send_ump(send_data + k); + k += 4; + continue; + } + if (send_data[k] == 0xF0) { int c1 = k; From patchwork Mon Jul 22 17:52:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 814185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 95F1CC3DA5D for ; Mon, 22 Jul 2024 17:58:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8BF72846; Mon, 22 Jul 2024 19:58:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8BF72846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721671127; bh=yjZ+lJ5QVBjJl/8+KeEEVd/F2jv25KiBP8twk7cW2cE=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=N4AuaU1mksI54rV88F79wYOpJwVQWgWkrTUIAXmBdGPUOzgxweyLzJPBBKWWCgvlH 4NqJoPErPV/HIYX35C6FvpqAB7bquHWbG6SMAyQppTLj/ZU+yElIQ7DSC55EnIlAUo tGxiqA/wyEhdi/rdmrR+QSosSf6Npiob2YjDCnfg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F3B73F8067A; Mon, 22 Jul 2024 19:57:10 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E177DF80631; Mon, 22 Jul 2024 19:57:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1F682F80579; Mon, 22 Jul 2024 19:52:24 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EC4ECF80589 for ; Mon, 22 Jul 2024 19:51:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EC4ECF80589 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0si+XVOu; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=5QBBCp/D; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0si+XVOu; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=5QBBCp/D Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3D87921BA1; Mon, 22 Jul 2024 17:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0nzjUSkS9MgOQuyIJeucD5i2WFOWwSvlyPam56XsqtY=; b=0si+XVOu5E12CvE3E6+iMRVvPEFt51ImN4Zr12YNBKIH5/IIsfxD5Of6oaB0cXMUMOU++B mTGA6hAj0KgcAzf4hcK8Oz8b96WGzgdBQ717/f+2Po8kfU32FN8132LGsC3LeAbvhqjq/B rBmenwaW/cNz9ap4A+Q3Swk5RRGcti4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0nzjUSkS9MgOQuyIJeucD5i2WFOWwSvlyPam56XsqtY=; b=5QBBCp/D6cZFisABBLxpoJUnQOlRSBt4SkBsmtK8N2KDAWRl1nClrs3mxCxWPa3CvblWMf rf/MRD64YbCtaGCQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=0si+XVOu; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="5QBBCp/D" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0nzjUSkS9MgOQuyIJeucD5i2WFOWwSvlyPam56XsqtY=; b=0si+XVOu5E12CvE3E6+iMRVvPEFt51ImN4Zr12YNBKIH5/IIsfxD5Of6oaB0cXMUMOU++B mTGA6hAj0KgcAzf4hcK8Oz8b96WGzgdBQ717/f+2Po8kfU32FN8132LGsC3LeAbvhqjq/B rBmenwaW/cNz9ap4A+Q3Swk5RRGcti4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1721670706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0nzjUSkS9MgOQuyIJeucD5i2WFOWwSvlyPam56XsqtY=; b=5QBBCp/D6cZFisABBLxpoJUnQOlRSBt4SkBsmtK8N2KDAWRl1nClrs3mxCxWPa3CvblWMf rf/MRD64YbCtaGCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 225961398E; Mon, 22 Jul 2024 17:51:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id aKktBzKcnmbyBgAAD6G6ig (envelope-from ); Mon, 22 Jul 2024 17:51:46 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: [PATCH alsa-utils 10/10] aseqsend: Support long options Date: Mon, 22 Jul 2024 19:52:14 +0200 Message-ID: <20240722175215.8223-11-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722175215.8223-1-tiwai@suse.de> References: <20240722175215.8223-1-tiwai@suse.de> MIME-Version: 1.0 X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 3D87921BA1 X-Spamd-Result: default: False [-2.81 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCPT_COUNT_ONE(0.00)[1]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; DWL_DNSWL_BLOCKED(0.00)[suse.de:dkim]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] Message-ID-Hash: ODVZCTAK6WFN2J2JQ4L4LGEJY3T645H3 X-Message-ID-Hash: ODVZCTAK6WFN2J2JQ4L4LGEJY3T645H3 X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add the support for long-style options such as --verbose. Signed-off-by: Takashi Iwai --- seq/aseqsend/aseqsend.1 | 16 ++++++++-------- seq/aseqsend/aseqsend.c | 13 ++++++++++++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/seq/aseqsend/aseqsend.1 b/seq/aseqsend/aseqsend.1 index febbf55dfb16..626f9ea1fb19 100644 --- a/seq/aseqsend/aseqsend.1 +++ b/seq/aseqsend/aseqsend.1 @@ -21,35 +21,35 @@ name. A port is specified by its number; for port 0 of a client, the .SH OPTIONS .TP -\-h +\-h, \-\-help Prints a list of options. .TP -\-V +\-V, \-\-version Prints the current version. .TP -\-l +\-l, \-\-list Prints a list of possible output ports. .TP -\-v +\-v, \-\-verbose Prints number of bytes actually sent .TP -\-p +\-p, -\-port=client:port Target port by number or name .TP -\-s +\-s, \-\-file=filename Send raw binary data from given file name .TP -\-i +\-i, \-\-interval=msec Interval between SysEx messages in miliseconds .TP -\-u +\-u, \-\-ump=version Specify the MIDI version. 0 for the legacy MIDI 1.0 (default), 1 for UMP MIDI 1.0 protocol and 2 for UMP MIDI 2.0 protocol. diff --git a/seq/aseqsend/aseqsend.c b/seq/aseqsend/aseqsend.c index bd1a221d4149..d98423c45c7c 100644 --- a/seq/aseqsend/aseqsend.c +++ b/seq/aseqsend/aseqsend.c @@ -362,6 +362,17 @@ static int msg_byte_in_range(mbyte_t *data, mbyte_t len) int main(int argc, char *argv[]) { + static const struct option long_options[] = { + {"help", 0, NULL, 'h'}, + {"version", 0, NULL, 'V'}, + {"verbose", 0, NULL, 'v'}, + {"list", 0, NULL, 'l'}, + {"port", 1, NULL, 'p'}, + {"file", 1, NULL, 's'}, + {"interval", 1, NULL, 'i'}, + {"ump", 1, NULL, 'u'}, + {0} + }; char c = 0; char do_send_file = 0; char do_port_list = 0; @@ -370,7 +381,7 @@ int main(int argc, char *argv[]) int sent_data_c; int k; - while ((c = getopt(argc, argv, "hi:Vvlp:s:u:")) != -1) { + while ((c = getopt_long(argc, argv, "hi:Vvlp:s:u:", long_options, NULL)) != -1) { switch (c) { case 'h': usage();