*参照元 [#m389a486]
#backlinks

*説明 [#n600820c]
-パス: [[linux-2.6.33/sound/core/pcm_native.c]]

-FIXME: これは何?
--説明


**引数 [#m8bc5ff3]
-struct snd_pcm *pcm
--
--[[linux-2.6.33/snd_pcm]]
-int stream
--
--[[linux-2.6.33/]]
-struct file *file
--
--[[linux-2.6.33/file]]
-struct snd_pcm_substream **rsubstream
--
--[[linux-2.6.33/snd_pcm_substream]]


**返り値 [#ud2dea47]
-int
--


**参考 [#j4e3cdee]


*実装 [#t86dfc63]
 int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
 			   struct file *file,
 			   struct snd_pcm_substream **rsubstream)
 {
 	struct snd_pcm_substream *substream;
 	int err;
 
-
--[[linux-2.6.33/snd_pcm_substream]]

 	err = snd_pcm_attach_substream(pcm, stream, file, &substream);
 	if (err < 0)
 		return err;
 	if (substream->ref_count > 1) {
 		*rsubstream = substream;
 		return 0;
 	}
 
-
--[[linux-2.6.33/snd_pcm_attach_substream()]]

 	err = snd_pcm_hw_constraints_init(substream);
 	if (err < 0) {
 		snd_printd("snd_pcm_hw_constraints_init failed\n");
 		goto error;
 	}
 
-
--[[linux-2.6.33/snd_pcm_hw_constraints_init()]]
-
--[[linux-2.6.33/snd_printd()]]

 	if ((err = substream->ops->open(substream)) < 0)
 		goto error;
 
 	substream->hw_opened = 1;
 
 	err = snd_pcm_hw_constraints_complete(substream);
 	if (err < 0) {
 		snd_printd("snd_pcm_hw_constraints_complete failed\n");
 		goto error;
 	}
 
-
--[[linux-2.6.33/snd_pcm_hw_constraints_complete()]]

 	*rsubstream = substream;
 	return 0;
 
  error:
 	snd_pcm_release_substream(substream);
 	return err;
-
--[[linux-2.6.33/snd_pcm_release_substream()]]

 }
 
 EXPORT_SYMBOL(snd_pcm_open_substream);
-ライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]


*コメント [#xf7f647e]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS