Commit 2f8af5b3 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: fireface: obsolete proc node to leave one node

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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9dd466ac
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
#include "./ff.h" #include "./ff.h"
static void proc_dump_clock_config(struct snd_info_entry *entry, static void dump_clock_config(struct snd_ff *ff, struct snd_info_buffer *buffer)
struct snd_info_buffer *buffer)
{ {
struct snd_ff *ff = entry->private_data;
__le32 reg; __le32 reg;
u32 data; u32 data;
unsigned int rate; unsigned int rate;
...@@ -87,10 +85,8 @@ static void proc_dump_clock_config(struct snd_info_entry *entry, ...@@ -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); snd_iprintf(buffer, "Sync to clock source: %s\n", src);
} }
static void proc_dump_sync_status(struct snd_info_entry *entry, static void dump_sync_status(struct snd_ff *ff, struct snd_info_buffer *buffer)
struct snd_info_buffer *buffer)
{ {
struct snd_ff *ff = entry->private_data;
__le32 reg; __le32 reg;
u32 data; u32 data;
int err; int err;
...@@ -213,6 +209,15 @@ static void proc_dump_sync_status(struct snd_info_entry *entry, ...@@ -213,6 +209,15 @@ static void proc_dump_sync_status(struct snd_info_entry *entry,
snd_iprintf(buffer, "%d\n", (data & 0x3ff) * 250); 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, static void add_node(struct snd_ff *ff, struct snd_info_entry *root,
const char *name, const char *name,
void (*op)(struct snd_info_entry *e, void (*op)(struct snd_info_entry *e,
...@@ -247,6 +252,5 @@ void snd_ff_proc_init(struct snd_ff *ff) ...@@ -247,6 +252,5 @@ void snd_ff_proc_init(struct snd_ff *ff)
return; return;
} }
add_node(ff, root, "clock-config", proc_dump_clock_config); add_node(ff, root, "status", proc_dump_status);
add_node(ff, root, "sync-status", proc_dump_sync_status);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment