*参照元 [#f5811402]
#backlinks

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

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


**引数 [#f9dd45c8]
-struct snd_pcm_substream *substream
--
--[[linux-4.4.1/snd_pcm_substream]]
-unsigned int hwoff
--
-unsigned long data
--
-unsigned int off
--
-snd_pcm_uframes_t frames
--
--[[linux-4.4.1/snd_pcm_uframes_t]]


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


**参考 [#wfc9e73a]


*実装 [#b941379c]
 static int snd_pcm_lib_write_transfer(struct snd_pcm_substream *substream,
                                       unsigned int hwoff,
                                       unsigned long data, unsigned int off,
                                       snd_pcm_uframes_t frames)
 {
         struct snd_pcm_runtime *runtime = substream->runtime;
         int err;
         char __user *buf = (char __user *) data + frames_to_bytes(runtime, off);
-
--[[linux-4.4.1/snd_pcm_runtime]]
--[[linux-4.4.1/frames_to_bytes()]]

         if (substream->ops->copy) {
-
--substream->ops は const struct snd_pcm_ops * 型
--[[linux-4.4.1/snd_pcm_ops]]

                 if ((err = substream->ops->copy(substream, -1, hwoff, buf, frames)) < 0)
                         return err;
         } else {
                 char *hwbuf = runtime->dma_area + frames_to_bytes(runtime, hwoff);
                 if (copy_from_user(hwbuf, buf, frames_to_bytes(runtime, frames)))
                         return -EFAULT;
-
--[[linux-4.4.1/copy_from_user()]]

         }
         return 0;
 }


*コメント [#h9b4a660]


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