*参照元 [#l1f1db51]
#backlinks

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

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


**引数 [#z45ef8ea]
-struct snd_pcm_substream *substream
--


**返り値 [#ze3b4bbf]
-int
--0 なら read/write 可能、負の値ならエラー


**参考 [#e369b66c]


*実装 [#tfc917c3]
 /* sanity-check for read/write methods */
 static int pcm_sanity_check(struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime;
-
--[[linux-2.6.33/snd_pcm_runtime]]

 	if (PCM_RUNTIME_CHECK(substream))
 		return -ENXIO;
-
--[[linux-2.6.33/PCM_RUNTIME_CHECK()]]

 	runtime = substream->runtime;
 	if (snd_BUG_ON(!substream->ops->copy && !runtime->dma_area))
 		return -EINVAL;
-
--substream->ops は snd_pcm_ops 型のメンバ
--[[linux-2.6.33/snd_pcm_ops]]
-
--[[linux-2.6.33/snd_BUG_ON()]]

 	if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
 		return -EBADFD;
-
--runtime->statue は snd_pcm_mmap_status 型のメンバ
--[[linux-2.6.33/snd_pcm_mmap_status]]
-
--[[linux-2.6.33/SNDRV_PCM_STATE_OPEN]]

 	return 0;
 }


*コメント [#lc10df91]


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