1 // SPDX-License-Identifier: GPL-2.0-only
3 * ff-proc.c - a part of driver for RME Fireface series
5 * Copyright (c) 2015-2017 Takashi Sakamoto
10 const char *snd_ff_proc_get_clk_label(enum snd_ff_clock_src src)
12 static const char *const labels[] = {
21 if (src >= ARRAY_SIZE(labels))
27 static void proc_dump_status(struct snd_info_entry *entry,
28 struct snd_info_buffer *buffer)
30 struct snd_ff *ff = entry->private_data;
32 ff->spec->protocol->dump_status(ff, buffer);
35 static void add_node(struct snd_ff *ff, struct snd_info_entry *root,
37 void (*op)(struct snd_info_entry *e,
38 struct snd_info_buffer *b))
40 struct snd_info_entry *entry;
42 entry = snd_info_create_card_entry(ff->card, name, root);
44 snd_info_set_text_ops(entry, ff, op);
47 void snd_ff_proc_init(struct snd_ff *ff)
49 struct snd_info_entry *root;
52 * All nodes are automatically removed at snd_card_disconnect(),
53 * by following to link list.
55 root = snd_info_create_card_entry(ff->card, "firewire",
59 root->mode = S_IFDIR | 0555;
61 add_node(ff, root, "status", proc_dump_status);