linux-4.4.1/snd_soc_register_dais()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#zfa5f039]
#backlinks
*説明 [#c6d0cd7c]
-パス: [[linux-4.4.1/sound/soc/soc-core.c]]
-FIXME: これは何?
--説明
**引数 [#z10689a1]
-struct snd_soc_component *component
--
--[[linux-4.4.1/snd_soc_component]]
-struct snd_soc_dai_driver *dai_drv
--
--[[linux-4.4.1/snd_soc_dai_driver]]
-size_t count
--
-bool legacy_dai_naming
--
**返り値 [#y85edf0d]
-int
--
**参考 [#e314442b]
*実装 [#db9906dd]
/**
* snd_soc_register_dais - Register a DAI with the ASoC ...
*
* @component: The component the DAIs are registered for
* @dai_drv: DAI driver to use for the DAIs
* @count: Number of DAIs
* @legacy_dai_naming: Use the legacy naming scheme and ...
* parent's name.
*/
static int snd_soc_register_dais(struct snd_soc_componen...
struct snd_soc_dai_driver *dai_drv, size_t count,
bool legacy_dai_naming)
{
struct device *dev = component->dev;
struct snd_soc_dai *dai;
unsigned int i;
int ret;
-
--[[linux-4.4.1/device]]
--[[linux-4.4.1/snd_soc_dai]]
dev_dbg(dev, "ASoC: dai register %s #%Zu\n", dev...
-
--[[linux-4.4.1/dev_dbg()]]
--[[linux-4.4.1/dev_name()]]
component->dai_drv = dai_drv;
component->num_dai = count;
for (i = 0; i < count; i++) {
dai = kzalloc(sizeof(struct snd_soc_dai)...
if (dai == NULL) {
ret = -ENOMEM;
goto err;
}
-
--[[linux-4.4.1/kzalloc()]]
/*
* Back in the old days when we still ha...
* instead of having a static name, comp...
* inherit the name of the parent device...
* register multiple instances of the DA...
* the same naming style even though tho...
* component-less anymore.
*/
if (count == 1 && legacy_dai_naming &&
(dai_drv[i].id == 0 || dai_drv[i...
dai->name = fmt_single_name(dev,...
} else {
dai->name = fmt_multiple_name(de...
if (dai_drv[i].id)
dai->id = dai_drv[i].id;
else
dai->id = i;
}
-
--[[linux-4.4.1/fmt_single_name()]]
--[[linux-4.4.1/fmt_multiple_name()]]
if (dai->name == NULL) {
kfree(dai);
ret = -ENOMEM;
goto err;
}
-
--[[linux-4.4.1/kfree()]]
dai->component = component;
dai->dev = dev;
dai->driver = &dai_drv[i];
if (!dai->driver->ops)
dai->driver->ops = &null_dai_ops;
list_add(&dai->list, &component->dai_lis...
-
--[[linux-4.4.1/list_add()]]
dev_dbg(dev, "ASoC: Registered DAI '%s'\...
}
-
--[[linux-4.4.1/dev_dbg()]]
return 0;
err:
snd_soc_unregister_dais(component);
-
--[[linux-4.4.1/snd_soc_unregister_dais()]]
return ret;
}
*コメント [#j4d0febf]
終了行:
*参照元 [#zfa5f039]
#backlinks
*説明 [#c6d0cd7c]
-パス: [[linux-4.4.1/sound/soc/soc-core.c]]
-FIXME: これは何?
--説明
**引数 [#z10689a1]
-struct snd_soc_component *component
--
--[[linux-4.4.1/snd_soc_component]]
-struct snd_soc_dai_driver *dai_drv
--
--[[linux-4.4.1/snd_soc_dai_driver]]
-size_t count
--
-bool legacy_dai_naming
--
**返り値 [#y85edf0d]
-int
--
**参考 [#e314442b]
*実装 [#db9906dd]
/**
* snd_soc_register_dais - Register a DAI with the ASoC ...
*
* @component: The component the DAIs are registered for
* @dai_drv: DAI driver to use for the DAIs
* @count: Number of DAIs
* @legacy_dai_naming: Use the legacy naming scheme and ...
* parent's name.
*/
static int snd_soc_register_dais(struct snd_soc_componen...
struct snd_soc_dai_driver *dai_drv, size_t count,
bool legacy_dai_naming)
{
struct device *dev = component->dev;
struct snd_soc_dai *dai;
unsigned int i;
int ret;
-
--[[linux-4.4.1/device]]
--[[linux-4.4.1/snd_soc_dai]]
dev_dbg(dev, "ASoC: dai register %s #%Zu\n", dev...
-
--[[linux-4.4.1/dev_dbg()]]
--[[linux-4.4.1/dev_name()]]
component->dai_drv = dai_drv;
component->num_dai = count;
for (i = 0; i < count; i++) {
dai = kzalloc(sizeof(struct snd_soc_dai)...
if (dai == NULL) {
ret = -ENOMEM;
goto err;
}
-
--[[linux-4.4.1/kzalloc()]]
/*
* Back in the old days when we still ha...
* instead of having a static name, comp...
* inherit the name of the parent device...
* register multiple instances of the DA...
* the same naming style even though tho...
* component-less anymore.
*/
if (count == 1 && legacy_dai_naming &&
(dai_drv[i].id == 0 || dai_drv[i...
dai->name = fmt_single_name(dev,...
} else {
dai->name = fmt_multiple_name(de...
if (dai_drv[i].id)
dai->id = dai_drv[i].id;
else
dai->id = i;
}
-
--[[linux-4.4.1/fmt_single_name()]]
--[[linux-4.4.1/fmt_multiple_name()]]
if (dai->name == NULL) {
kfree(dai);
ret = -ENOMEM;
goto err;
}
-
--[[linux-4.4.1/kfree()]]
dai->component = component;
dai->dev = dev;
dai->driver = &dai_drv[i];
if (!dai->driver->ops)
dai->driver->ops = &null_dai_ops;
list_add(&dai->list, &component->dai_lis...
-
--[[linux-4.4.1/list_add()]]
dev_dbg(dev, "ASoC: Registered DAI '%s'\...
}
-
--[[linux-4.4.1/dev_dbg()]]
return 0;
err:
snd_soc_unregister_dais(component);
-
--[[linux-4.4.1/snd_soc_unregister_dais()]]
return ret;
}
*コメント [#j4d0febf]
ページ名: