13 Jul
2015
13 Jul
'15
1:28 p.m.
On Sat, Jul 11, 2015 at 11:12:45PM +0900, Takashi Sakamoto wrote:
This commit adds a proc node for debugging purpose. : +static void proc_read_clock(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
+{
- struct snd_motu *motu = entry->private_data;
- unsigned int rate;
- enum snd_motu_clock src;
- if (snd_motu_stream_get_rate(motu, &rate) < 0)
return;
- if (snd_motu_stream_get_clock(motu, &src) < 0)
return;
- snd_iprintf(buffer, "Rate:\t%d\n", rate);
- snd_iprintf(buffer, "Source:\t%s\n", clock_names[src]);
+}
Is it necessary to define a proc node for this information? It is trivial to obtain the status of MOTU devices directly from the device regardless of the state of the streaming system. In fact, while the above code seems to be linked to a running stream, the concept of the device clock persists even when no streams are running. Or is the intent here to verify the internal state of any running ALSA stream structures rather than the physical device itself?
Regards jonathan