*参照元 [#p7053384] #backlinks *説明 [#yd555cd2] -パス: [[linux-2.6.33/sound/core/pcm_lib.c]] -FIXME: これは何? --説明 **引数 [#a324901d] -struct snd_pcm_substream *substream -- --[[linux-2.6.33/snd_pcm_substream]] -struct snd_pcm_runtime *runtime -- --[[linux-2.6.33/snd_pcm_runtime]] **返り値 [#b1fea8ed] -int **参考 [#i04cd681] *実装 [#v7a217c4] static int snd_pcm_update_hw_ptr_post(struct snd_pcm_substream *substream, struct snd_pcm_runtime *runtime) { snd_pcm_uframes_t avail; - --[[linux-2.6.33/snd_pcm_uframes_t]] if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) avail = snd_pcm_playback_avail(runtime); else avail = snd_pcm_capture_avail(runtime); - --[[linux-2.6.33/snd_pcm_playback_avail()]] - --[[linux-2.6.33/snd_pcm_capture_avail()]] if (avail > runtime->avail_max) runtime->avail_max = avail; if (runtime->status->state == SNDRV_PCM_STATE_DRAINING) { if (avail >= runtime->buffer_size) { snd_pcm_drain_done(substream); return -EPIPE; } - --[[linux-2.6.33/snd_pcm_drain_done()]] } else { if (avail >= runtime->stop_threshold) { xrun(substream); return -EPIPE; } } - --[[linux-2.6.33/xrun()]] if (avail >= runtime->control->avail_min) wake_up(&runtime->sleep); - --[[linux-2.6.33/wake_up()]] return 0; } *コメント [#q365e3c1]