On Sun, 29 Apr 2018 08:50:22 +0200, Takashi Sakamoto wrote:
Products with DICE interface in market can support variable stream formats for three levels of sampling transmission frequencies. To record these formats, a proxy structure got several fields in former commit.
This commit adds a proc node to output the stream formats for debugging purpose.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp
sound/firewire/dice/dice-proc.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
diff --git a/sound/firewire/dice/dice-proc.c b/sound/firewire/dice/dice-proc.c index 43b130b7aa07..f967e0ec7598 100644 --- a/sound/firewire/dice/dice-proc.c +++ b/sound/firewire/dice/dice-proc.c @@ -243,6 +243,40 @@ static void dice_proc_read(struct snd_info_entry *entry, } }
+static void dice_proc_read_formation(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
+{
- static const char *const rate_labels[] = {
[0] = "low",
[1] = "middle",
[2] = "high",
- };
This doesn't look smart :)
How about defining these three numbers as constants (or macros)? Also the magic number 3 appearing everywhere can be defined properly, too.
Takashi