From patchwork Sun Jan 20 08:25:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 10772325 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CCD6E6C2 for ; Sun, 20 Jan 2019 08:26:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE9C42ADF4 for ; Sun, 20 Jan 2019 08:26:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0D462ADF6; Sun, 20 Jan 2019 08:26:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 107192ADF4 for ; Sun, 20 Jan 2019 08:26:41 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 41589267418; Sun, 20 Jan 2019 09:26:23 +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 D30872673B8; Sun, 20 Jan 2019 09:26:16 +0100 (CET) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by alsa0.perex.cz (Postfix) with ESMTP id B7247266A89 for ; Sun, 20 Jan 2019 09:26:14 +0100 (CET) Received: by mail-pl1-f193.google.com with SMTP id u18so8307925plq.7 for ; Sun, 20 Jan 2019 00:26:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X3iQ7DEbmj0vZn16+RJZKfqsimoR9oi29gwXgjzrtHA=; b=SerUBde0b+jQyT0LM6sEfMWoU2ihFDnuko8mQwkZ0wjIXzCMB+J8oNQYBAKZDSxdSs dRqNdYhK/6G5e/c8dlXmdv29ZpDN5ZP3eWrMl73pkeJEtARoDXfcCNKJc0nDVz3Kszva I6AFBr04/DYOEgGVuydaU0GbO/jxU9Ix0wgPt+f5QUOXd00f6hdqqFSru2SEs/SONI6I IfUqYAJDOrRN7sN+j3Cbt8fmIKjPuOP/I3WraIrPSfxw6RuybtthSm+TWbl9aUQLAMAb Jg2q0KcbmZ2re8XTYRtb+3Qh6mut050ELPdfsxGsAKJIdfCIlJrXoJ3HbPtT2V3YmQmk ErJg== X-Gm-Message-State: AJcUukeDYMRh+YTGL/ZsSurspsElltpIVyQ6PzwtpF4hL4JQy6k3h6+c Q+V8HJuqoP9agLJQpfvb1QU= X-Google-Smtp-Source: ALg8bN7rWApIEfuypiFy3fO8bzKrSTKn2XhWhoBJ1seTJvvImK2yMTtx5gByeH0K9KaM989LJtAX4A== X-Received: by 2002:a17:902:4681:: with SMTP id p1mr26123479pld.184.1547972773649; Sun, 20 Jan 2019 00:26:13 -0800 (PST) Received: from localhost.localdomain ([2405:6580:9660:3200:489b:ac9:70e4:1515]) by smtp.gmail.com with ESMTPSA id z186sm12214046pfz.119.2019.01.20.00.26.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jan 2019 00:26:13 -0800 (PST) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de Date: Sun, 20 Jan 2019 17:25:47 +0900 Message-Id: <20190120082553.17347-4-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190120082553.17347-1-o-takashi@sakamocchi.jp> References: <20190120082553.17347-1-o-takashi@sakamocchi.jp> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, ffado-devel@lists.sourceforge.net Subject: [alsa-devel] [PATCH 3/9] ALSA: fireface: obsolete proc node to leave one node 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP In a series of Fireface, latter protocol has no way for drivers to retrieve current clock configuration. On the other hand, this driver has proc node for it. This commit removes a proc node to dump both clock configuration and synchronization status in one proc node. Signed-off-by: Takashi Sakamoto --- sound/firewire/fireface/ff-proc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/firewire/fireface/ff-proc.c b/sound/firewire/fireface/ff-proc.c index a0c550dabe9a..37f84b7fc432 100644 --- a/sound/firewire/fireface/ff-proc.c +++ b/sound/firewire/fireface/ff-proc.c @@ -8,10 +8,8 @@ #include "./ff.h" -static void proc_dump_clock_config(struct snd_info_entry *entry, - struct snd_info_buffer *buffer) +static void dump_clock_config(struct snd_ff *ff, struct snd_info_buffer *buffer) { - struct snd_ff *ff = entry->private_data; __le32 reg; u32 data; unsigned int rate; @@ -87,10 +85,8 @@ static void proc_dump_clock_config(struct snd_info_entry *entry, snd_iprintf(buffer, "Sync to clock source: %s\n", src); } -static void proc_dump_sync_status(struct snd_info_entry *entry, - struct snd_info_buffer *buffer) +static void dump_sync_status(struct snd_ff *ff, struct snd_info_buffer *buffer) { - struct snd_ff *ff = entry->private_data; __le32 reg; u32 data; int err; @@ -213,6 +209,15 @@ static void proc_dump_sync_status(struct snd_info_entry *entry, snd_iprintf(buffer, "%d\n", (data & 0x3ff) * 250); } +static void proc_dump_status(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_ff *ff = entry->private_data; + + dump_clock_config(ff, buffer); + dump_sync_status(ff, buffer); +} + static void add_node(struct snd_ff *ff, struct snd_info_entry *root, const char *name, void (*op)(struct snd_info_entry *e, @@ -247,6 +252,5 @@ void snd_ff_proc_init(struct snd_ff *ff) return; } - add_node(ff, root, "clock-config", proc_dump_clock_config); - add_node(ff, root, "sync-status", proc_dump_sync_status); + add_node(ff, root, "status", proc_dump_status); }