linux-2.6.33/snd_pcm_lib_ready_transfer()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#o9465765]
#backlinks
*説明 [#gf657628]
-パス: [[linux-2.6.33/sound/core/pcm_lib.c]]
-FIXME: これは何?
--説明
**引数 [#f9aee086]
-struct snd_pcm_substream *substream
--
--[[linux-2.6.33/snd_pcm_substream]]
-unsigned int hwoff
--
-unsigned long data
--
-unsigned int off
--
-snd_pcm_uframes_t frames
--
--[[linux-2.6.33/snd_pcm_uframes_t]]
**返り値 [#qd17c367]
-int
--
**参考 [#a25e8913]
*実装 [#wcd41e48]
static int snd_pcm_lib_readv_transfer(struct snd_pcm_sub...
unsigned int hwoff,
unsigned long data, unsigned int off,
snd_pcm_uframes_t frames)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int err;
void __user **bufs = (void __user **)data;
int channels = runtime->channels;
int c;
-
--[[linux-2.6.33/snd_pcm_runtime]]
if (substream->ops->copy) {
for (c = 0; c < channels; ++c, ++bufs) {
char __user *buf;
if (*bufs == NULL)
continue;
buf = *bufs + samples_to_bytes(runtime, off);
if ((err = substream->ops->copy(substream, c, hwoff, ...
return err;
}
-
--substream->ops は snd_pcm_ops 型のメンバ
--[[linux-2.6.33/snd_pcm_ops]]
-
--[[linux-2.6.33/samples_to_bytes()]]
} else {
snd_pcm_uframes_t dma_csize = runtime->dma_bytes / cha...
-
--[[linux-2.6.33/snd_pcm_uframes_t]]
for (c = 0; c < channels; ++c, ++bufs) {
char *hwbuf;
char __user *buf;
if (*bufs == NULL)
continue;
hwbuf = runtime->dma_area + (c * dma_csize) + samples...
buf = *bufs + samples_to_bytes(runtime, off);
if (copy_to_user(buf, hwbuf, samples_to_bytes(runtime...
return -EFAULT;
}
-
--[[linux-2.6.33/copy_to_user()]]
}
return 0;
}
*コメント [#n15f49c0]
終了行:
*参照元 [#o9465765]
#backlinks
*説明 [#gf657628]
-パス: [[linux-2.6.33/sound/core/pcm_lib.c]]
-FIXME: これは何?
--説明
**引数 [#f9aee086]
-struct snd_pcm_substream *substream
--
--[[linux-2.6.33/snd_pcm_substream]]
-unsigned int hwoff
--
-unsigned long data
--
-unsigned int off
--
-snd_pcm_uframes_t frames
--
--[[linux-2.6.33/snd_pcm_uframes_t]]
**返り値 [#qd17c367]
-int
--
**参考 [#a25e8913]
*実装 [#wcd41e48]
static int snd_pcm_lib_readv_transfer(struct snd_pcm_sub...
unsigned int hwoff,
unsigned long data, unsigned int off,
snd_pcm_uframes_t frames)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int err;
void __user **bufs = (void __user **)data;
int channels = runtime->channels;
int c;
-
--[[linux-2.6.33/snd_pcm_runtime]]
if (substream->ops->copy) {
for (c = 0; c < channels; ++c, ++bufs) {
char __user *buf;
if (*bufs == NULL)
continue;
buf = *bufs + samples_to_bytes(runtime, off);
if ((err = substream->ops->copy(substream, c, hwoff, ...
return err;
}
-
--substream->ops は snd_pcm_ops 型のメンバ
--[[linux-2.6.33/snd_pcm_ops]]
-
--[[linux-2.6.33/samples_to_bytes()]]
} else {
snd_pcm_uframes_t dma_csize = runtime->dma_bytes / cha...
-
--[[linux-2.6.33/snd_pcm_uframes_t]]
for (c = 0; c < channels; ++c, ++bufs) {
char *hwbuf;
char __user *buf;
if (*bufs == NULL)
continue;
hwbuf = runtime->dma_area + (c * dma_csize) + samples...
buf = *bufs + samples_to_bytes(runtime, off);
if (copy_to_user(buf, hwbuf, samples_to_bytes(runtime...
return -EFAULT;
}
-
--[[linux-2.6.33/copy_to_user()]]
}
return 0;
}
*コメント [#n15f49c0]
ページ名: