From patchwork Fri Feb 12 18:56:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Koegler X-Patchwork-Id: 8295411 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 85FA7C02AA for ; Fri, 12 Feb 2016 18:57:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4DBA20439 for ; Fri, 12 Feb 2016 18:57:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C8A4720421 for ; Fri, 12 Feb 2016 18:57:10 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BB96C260732; Fri, 12 Feb 2016 19:57:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 029B6260688; Fri, 12 Feb 2016 19:57:01 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B00192606A0; Fri, 12 Feb 2016 19:56:59 +0100 (CET) Received: from vie01a-dmta-pe02-1.mx.upcmail.net (vie01a-dmta-pe02-1.mx.upcmail.net [62.179.121.157]) by alsa0.perex.cz (Postfix) with ESMTP id 9EBDC2605FF for ; Fri, 12 Feb 2016 19:56:52 +0100 (CET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.72) (envelope-from ) id 1aUItg-0000SJ-8D for alsa-devel@alsa-project.org; Fri, 12 Feb 2016 19:56:52 +0100 Received: from master.zuhause ([80.108.242.240]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id HWwq1s00P5BuuEg01WwrvB; Fri, 12 Feb 2016 19:56:52 +0100 X-SourceIP: 80.108.242.240 Received: by master.zuhause (Postfix, from userid 1006) id 8B6804AFBF0E; Fri, 12 Feb 2016 19:56:50 +0100 (CET) From: Martin Koegler To: alsa-devel@alsa-project.org Date: Fri, 12 Feb 2016 19:56:36 +0100 Message-Id: <1455303396-13915-1-git-send-email-martin@mail.zuhause> X-Mailer: git-send-email 2.1.4 Cc: Martin Koegler Subject: [alsa-devel] [PATCH] Show sequencer sound card numer/PID via aconnect X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Martin Koegler Signed-off-by: Martin Koegler --- seq/aconnect/aconnect.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c index 8d6cebb..3508e1b 100644 --- a/seq/aconnect/aconnect.c +++ b/seq/aconnect/aconnect.c @@ -166,11 +166,19 @@ static void print_port(snd_seq_t *seq, snd_seq_client_info_t *cinfo, snd_seq_port_info_t *pinfo, int count) { if (! count) { - printf(_("client %d: '%s' [type=%s]\n"), + printf(_("client %d: '%s' [type=%s"), snd_seq_client_info_get_client(cinfo), snd_seq_client_info_get_name(cinfo), (snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT ? _("user") : _("kernel"))); + int owner = snd_seq_client_info_get_owner(cinfo); + if (owner != -1) { + if (snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT) + printf(",pid=%d", owner); + else + printf(",card=%d", owner); + } + printf("]\n"); } printf(" %3d '%-16s'\n", snd_seq_port_info_get_port(pinfo),