static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
{
	struct snd_info_entry *entry;
	struct snd_card *card;
	char name[16];

	card = substream->pcm->card;

	sprintf(name, "sub%i", substream->number);
	entry = snd_info_create_card_entry(card, name,
					   substream->pstr->proc_root);
	if (!entry)
		return -ENOMEM;
	entry->mode = S_IFDIR | 0555;
	substream->proc_root = entry;

	create_substream_info_entry(substream, "info",
				    snd_pcm_substream_proc_info_read);
	create_substream_info_entry(substream, "hw_params",
				    snd_pcm_substream_proc_hw_params_read);
	create_substream_info_entry(substream, "sw_params",
				    snd_pcm_substream_proc_sw_params_read);
	create_substream_info_entry(substream, "status",
				    snd_pcm_substream_proc_status_read);

#ifdef CONFIG_SND_PCM_XRUN_DEBUG
	entry = create_substream_info_entry(substream, "xrun_injection", NULL);
	if (entry) {
		entry->c.text.write = snd_pcm_xrun_injection_write;
		entry->mode = S_IFREG | 0200;
	}
#endif /* CONFIG_SND_PCM_XRUN_DEBUG */

	return 0;
}
static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
{
	struct snd_info_entry *entry;
	struct snd_card *card;
	char name[16];

	card = substream->pcm->card;

	sprintf(name, "sub%i", substream->number);
	entry = snd_info_create_card_entry(card, name,
					   substream->pstr->proc_root);
	if (!entry)
		return -ENOMEM;
	entry->mode = S_IFDIR | 0555;
	substream->proc_root = entry;

	create_substream_info_entry(substream, "info",
				    snd_pcm_substream_proc_info_read);
	create_substream_info_entry(substream, "hw_params",
				    snd_pcm_substream_proc_hw_params_read);
	create_substream_info_entry(substream, "sw_params",
				    snd_pcm_substream_proc_sw_params_read);
	create_substream_info_entry(substream, "status",
				    snd_pcm_substream_proc_status_read);

#ifdef CONFIG_SND_PCM_XRUN_DEBUG
	entry = create_substream_info_entry(substream, "xrun_injection", NULL);
	if (entry) {
		entry->c.text.write = snd_pcm_xrun_injection_write;
		entry->mode = S_IFREG | 0200;
	}
#endif  

	return 0;
}