~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/firewire/fireface/ff-proc.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * ff-proc.c - a part of driver for RME Fireface series
  4  *
  5  * Copyright (c) 2015-2017 Takashi Sakamoto
  6  */
  7 
  8 #include "./ff.h"
  9 
 10 const char *snd_ff_proc_get_clk_label(enum snd_ff_clock_src src)
 11 {
 12         static const char *const labels[] = {
 13                 "Internal",
 14                 "S/PDIF",
 15                 "ADAT1",
 16                 "ADAT2",
 17                 "Word",
 18                 "LTC",
 19         };
 20 
 21         if (src >= ARRAY_SIZE(labels))
 22                 return NULL;
 23 
 24         return labels[src];
 25 }
 26 
 27 static void proc_dump_status(struct snd_info_entry *entry,
 28                              struct snd_info_buffer *buffer)
 29 {
 30         struct snd_ff *ff = entry->private_data;
 31 
 32         ff->spec->protocol->dump_status(ff, buffer);
 33 }
 34 
 35 static void add_node(struct snd_ff *ff, struct snd_info_entry *root,
 36                      const char *name,
 37                      void (*op)(struct snd_info_entry *e,
 38                                 struct snd_info_buffer *b))
 39 {
 40         struct snd_info_entry *entry;
 41 
 42         entry = snd_info_create_card_entry(ff->card, name, root);
 43         if (entry)
 44                 snd_info_set_text_ops(entry, ff, op);
 45 }
 46 
 47 void snd_ff_proc_init(struct snd_ff *ff)
 48 {
 49         struct snd_info_entry *root;
 50 
 51         /*
 52          * All nodes are automatically removed at snd_card_disconnect(),
 53          * by following to link list.
 54          */
 55         root = snd_info_create_card_entry(ff->card, "firewire",
 56                                           ff->card->proc_root);
 57         if (root == NULL)
 58                 return;
 59         root->mode = S_IFDIR | 0555;
 60 
 61         add_node(ff, root, "status", proc_dump_status);
 62 }
 63 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php