linux-4.4.1/dmaengine_pcm_new()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#v86277ee]
#backlinks
*説明 [#o171c679]
-パス: [[linux-4.4.1/sound/soc/soc-generic-dmaengine-pcm....
-FIXME: これは何?
--説明
**引数 [#m076f081]
-struct snd_soc_pcm_runtime *rtd
--
--[[linux-4.4.1/snd_soc_pcm_runtime]]
**返り値 [#w1ed46e3]
-int
--
**参考 [#p8a75663]
*実装 [#k6b8b773]
static int dmaengine_pcm_new(struct snd_soc_pcm_runtime ...
{
struct dmaengine_pcm *pcm = soc_platform_to_pcm(...
const struct snd_dmaengine_pcm_config *config = ...
struct device *dev = rtd->platform->dev;
struct snd_dmaengine_dai_dma_data *dma_data;
struct snd_pcm_substream *substream;
size_t prealloc_buffer_size;
size_t max_buffer_size;
unsigned int i;
int ret;
-
--[[linux-4.4.1/dmaengine_pcm]]
--[[linux-4.4.1/soc_platform_to_pcm()]]
--[[linux-4.4.1/snd_dmaengine_pcm_config]]
--[[linux-4.4.1/device]]
--[[linux-4.4.1/snd_dmaengine_dai_dma_data]]
--[[linux-4.4.1/snd_pcm_substream]]
if (config && config->prealloc_buffer_size) {
prealloc_buffer_size = config->prealloc_...
max_buffer_size = config->pcm_hardware->...
} else {
prealloc_buffer_size = 512 * 1024;
max_buffer_size = SIZE_MAX;
}
-
--config->pcm_hardware は const struct snd_pcm_hardware *...
--[[linux-4.4.1/snd_pcm_hardware]]
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_P...
substream = rtd->pcm->streams[i].substre...
if (!substream)
continue;
-
--rtd->pcm は struct snd_pcm * 型
--rtd->pcm->streams は struct snd_pcm_str[2] 型
--[[linux-4.4.1/snd_pcm]]
--[[linux-4.4.1/snd_pcm_str]]
dma_data = snd_soc_dai_get_dma_data(rtd-...
-
--[[linux-4.4.1/snd_soc_dai_get_dma_data()]]
if (!pcm->chan[i] &&
(pcm->flags & SND_DMAENGINE_PCM_FLAG...
pcm->chan[i] = dma_request_slave...
dma_data->chan_name);
-
--[[linux-4.4.1/dma_request_slave_channel()]]
if (!pcm->chan[i] && (pcm->flags & SND_D...
pcm->chan[i] = dmaengine_pcm_com...
substream);
}
-
--[[linux-4.4.1/dmaengine_pcm_compat_request_channel()]]
if (!pcm->chan[i]) {
dev_err(rtd->platform->dev,
"Missing dma channel for...
return -EINVAL;
}
-
--[[linux-4.4.1/dev_err()]]
ret = snd_pcm_lib_preallocate_pages(subs...
SNDRV_DMA_TYPE_DEV_IRAM,
dmaengine_dma_dev(pcm, s...
prealloc_buffer_size,
max_buffer_size);
if (ret)
return ret;
-
--[[linux-4.4.1/snd_pcm_lib_preallocate_pages()]]
--[[linux-4.4.1/dmaengine_dma_dev()]]
if (!dmaengine_pcm_can_report_residue(de...
pcm->flags |= SND_DMAENGINE_PCM_...
-
--[[linux-4.4.1/dmaengine_pcm_can_report_residue()]]
}
return 0;
}
*コメント [#fbbad646]
終了行:
*参照元 [#v86277ee]
#backlinks
*説明 [#o171c679]
-パス: [[linux-4.4.1/sound/soc/soc-generic-dmaengine-pcm....
-FIXME: これは何?
--説明
**引数 [#m076f081]
-struct snd_soc_pcm_runtime *rtd
--
--[[linux-4.4.1/snd_soc_pcm_runtime]]
**返り値 [#w1ed46e3]
-int
--
**参考 [#p8a75663]
*実装 [#k6b8b773]
static int dmaengine_pcm_new(struct snd_soc_pcm_runtime ...
{
struct dmaengine_pcm *pcm = soc_platform_to_pcm(...
const struct snd_dmaengine_pcm_config *config = ...
struct device *dev = rtd->platform->dev;
struct snd_dmaengine_dai_dma_data *dma_data;
struct snd_pcm_substream *substream;
size_t prealloc_buffer_size;
size_t max_buffer_size;
unsigned int i;
int ret;
-
--[[linux-4.4.1/dmaengine_pcm]]
--[[linux-4.4.1/soc_platform_to_pcm()]]
--[[linux-4.4.1/snd_dmaengine_pcm_config]]
--[[linux-4.4.1/device]]
--[[linux-4.4.1/snd_dmaengine_dai_dma_data]]
--[[linux-4.4.1/snd_pcm_substream]]
if (config && config->prealloc_buffer_size) {
prealloc_buffer_size = config->prealloc_...
max_buffer_size = config->pcm_hardware->...
} else {
prealloc_buffer_size = 512 * 1024;
max_buffer_size = SIZE_MAX;
}
-
--config->pcm_hardware は const struct snd_pcm_hardware *...
--[[linux-4.4.1/snd_pcm_hardware]]
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_P...
substream = rtd->pcm->streams[i].substre...
if (!substream)
continue;
-
--rtd->pcm は struct snd_pcm * 型
--rtd->pcm->streams は struct snd_pcm_str[2] 型
--[[linux-4.4.1/snd_pcm]]
--[[linux-4.4.1/snd_pcm_str]]
dma_data = snd_soc_dai_get_dma_data(rtd-...
-
--[[linux-4.4.1/snd_soc_dai_get_dma_data()]]
if (!pcm->chan[i] &&
(pcm->flags & SND_DMAENGINE_PCM_FLAG...
pcm->chan[i] = dma_request_slave...
dma_data->chan_name);
-
--[[linux-4.4.1/dma_request_slave_channel()]]
if (!pcm->chan[i] && (pcm->flags & SND_D...
pcm->chan[i] = dmaengine_pcm_com...
substream);
}
-
--[[linux-4.4.1/dmaengine_pcm_compat_request_channel()]]
if (!pcm->chan[i]) {
dev_err(rtd->platform->dev,
"Missing dma channel for...
return -EINVAL;
}
-
--[[linux-4.4.1/dev_err()]]
ret = snd_pcm_lib_preallocate_pages(subs...
SNDRV_DMA_TYPE_DEV_IRAM,
dmaengine_dma_dev(pcm, s...
prealloc_buffer_size,
max_buffer_size);
if (ret)
return ret;
-
--[[linux-4.4.1/snd_pcm_lib_preallocate_pages()]]
--[[linux-4.4.1/dmaengine_dma_dev()]]
if (!dmaengine_pcm_can_report_residue(de...
pcm->flags |= SND_DMAENGINE_PCM_...
-
--[[linux-4.4.1/dmaengine_pcm_can_report_residue()]]
}
return 0;
}
*コメント [#fbbad646]
ページ名: