linux-4.4.1/snd_pcm_lib_default_mmap()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#hc3dc615]
#backlinks
*説明 [#if9de86c]
-パス: [[linux-4.4.1/sound/core/pcm_native.c]]
-FIXME: これは何?
--説明
**引数 [#u4efff76]
-struct snd_pcm_substream *substream
--
--[[linux-4.4.1/snd_pcm_substream]]
-struct vm_area_struct *area
--
--[[linux-4.4.1/vm_area_struct]]
**返り値 [#oa356611]
-int
--
**参考 [#abc16e4b]
*実装 [#s328591a]
/**
* snd_pcm_lib_default_mmap - Default PCM data mmap func...
* @substream: PCM substream
* @area: VMA
*
* This is the default mmap handler for PCM data. When ...
* this function is invoked implicitly.
*/
int snd_pcm_lib_default_mmap(struct snd_pcm_substream *s...
struct vm_area_struct *area)
{
area->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
#ifdef CONFIG_GENERIC_ALLOCATOR
-
--[[linux-4.4.1/CONFIG_GENERIC_ALLOCATOR]]
if (substream->dma_buffer.dev.type == SNDRV_DMA_...
area->vm_page_prot = pgprot_writecombine...
return remap_pfn_range(area, area->vm_st...
substream->dma_buffer.ad...
area->vm_end - area->vm_...
-
--substream->dma_buffer は struct snd_dma_buffer 型
--[[linux-4.4.1/snd_dma_buffer]]
--[[linux-4.4.1/pgprot_writecombine()]]
--[[linux-4.4.1/remap_pfn_range()]]
}
#endif /* CONFIG_GENERIC_ALLOCATOR */
#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/...
-
--[[linux-4.4.1/CONFIG_X86]]
if (!substream->ops->page &&
substream->dma_buffer.dev.type == SNDRV_DMA_...
return dma_mmap_coherent(substream->dma_...
area,
substream->runt...
substream->runt...
area->vm_end - ...
-
--substream->ops は const struct snd_pcm_ops * 型
--[[linux-4.4.1/snd_pcm_ops]]
--substream->runtime は struct snd_pcm_runtime * 型
--[[linux-4.4.1/snd_pcm_runtime]]
--[[linux-4.4.1/dma_mmap_coherent()]]
#endif /* CONFIG_X86 */
/* mmap with fault handler */
area->vm_ops = &snd_pcm_vm_ops_data_fault;
-
--[[linux-4.4.1/snd_pcm_vm_ops_data_fault(global)]]
return 0;
}
EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#baa8708a]
終了行:
*参照元 [#hc3dc615]
#backlinks
*説明 [#if9de86c]
-パス: [[linux-4.4.1/sound/core/pcm_native.c]]
-FIXME: これは何?
--説明
**引数 [#u4efff76]
-struct snd_pcm_substream *substream
--
--[[linux-4.4.1/snd_pcm_substream]]
-struct vm_area_struct *area
--
--[[linux-4.4.1/vm_area_struct]]
**返り値 [#oa356611]
-int
--
**参考 [#abc16e4b]
*実装 [#s328591a]
/**
* snd_pcm_lib_default_mmap - Default PCM data mmap func...
* @substream: PCM substream
* @area: VMA
*
* This is the default mmap handler for PCM data. When ...
* this function is invoked implicitly.
*/
int snd_pcm_lib_default_mmap(struct snd_pcm_substream *s...
struct vm_area_struct *area)
{
area->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
#ifdef CONFIG_GENERIC_ALLOCATOR
-
--[[linux-4.4.1/CONFIG_GENERIC_ALLOCATOR]]
if (substream->dma_buffer.dev.type == SNDRV_DMA_...
area->vm_page_prot = pgprot_writecombine...
return remap_pfn_range(area, area->vm_st...
substream->dma_buffer.ad...
area->vm_end - area->vm_...
-
--substream->dma_buffer は struct snd_dma_buffer 型
--[[linux-4.4.1/snd_dma_buffer]]
--[[linux-4.4.1/pgprot_writecombine()]]
--[[linux-4.4.1/remap_pfn_range()]]
}
#endif /* CONFIG_GENERIC_ALLOCATOR */
#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/...
-
--[[linux-4.4.1/CONFIG_X86]]
if (!substream->ops->page &&
substream->dma_buffer.dev.type == SNDRV_DMA_...
return dma_mmap_coherent(substream->dma_...
area,
substream->runt...
substream->runt...
area->vm_end - ...
-
--substream->ops は const struct snd_pcm_ops * 型
--[[linux-4.4.1/snd_pcm_ops]]
--substream->runtime は struct snd_pcm_runtime * 型
--[[linux-4.4.1/snd_pcm_runtime]]
--[[linux-4.4.1/dma_mmap_coherent()]]
#endif /* CONFIG_X86 */
/* mmap with fault handler */
area->vm_ops = &snd_pcm_vm_ops_data_fault;
-
--[[linux-4.4.1/snd_pcm_vm_ops_data_fault(global)]]
return 0;
}
EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#baa8708a]
ページ名: