Re: [PATCH v2 03/13] ALSA: dice: add proc node for stream formation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On May 1 2018 00:12, Takashi Iwai wrote:
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@xxxxxxxxxxxxx>
---
  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.

Indeed. I was a bit rude. I'm OK to utilize constants for this purpose.


Thanks

Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux