linux-4.4.1/soc_probe_component()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#g245d1f4]
#backlinks
*説明 [#oe476474]
-パス: [[linux-4.4.1/sound/soc/soc-core.c]]
-FIXME: これは何?
--説明
**引数 [#nddf600f]
-struct snd_soc_card *card
--
--[[linux-4.4.1/snd_soc_card]]
-struct snd_soc_component *component
--
--[[linux-4.4.1/snd_soc_component]]
**返り値 [#p05cea50]
-int
--
**参考 [#o1851b13]
*実装 [#j29db930]
static int soc_probe_component(struct snd_soc_card *card,
struct snd_soc_component *component)
{
struct snd_soc_dapm_context *dapm = snd_soc_comp...
struct snd_soc_dai *dai;
int ret;
-
--[[linux-4.4.1/snd_soc_dapm_context]]
--[[linux-4.4.1/snd_soc_component_get_dapm()]]
--[[linux-4.4.1/snd_soc_dai]]
if (!strcmp(component->name, "snd-soc-dummy"))
return 0;
-
--[[linux-4.4.1/strcmp()]]
if (component->card) {
if (component->card != card) {
dev_err(component->dev,
"Trying to bind componen...
card->name, component->c...
return -ENODEV;
}
return 0;
}
-
--[[linux-4.4.1/dev_err()]]
if (!try_module_get(component->dev->driver->owne...
return -ENODEV;
-
--[[linux-4.4.1/try_module_get()]]
component->card = card;
dapm->card = card;
soc_set_name_prefix(card, component);
soc_init_component_debugfs(component);
-
--[[linux-4.4.1/soc_set_name_prefix()]]
--[[linux-4.4.1/soc_init_component_debugfs()]]
if (component->dapm_widgets) {
ret = snd_soc_dapm_new_controls(dapm, co...
component->num_dapm_widgets);
-
--[[linux-4.4.1/snd_soc_dapm_new_controls()]]
if (ret != 0) {
dev_err(component->dev,
"Failed to create new co...
goto err_probe;
}
}
list_for_each_entry(dai, &component->dai_list, l...
ret = snd_soc_dapm_new_dai_widgets(dapm,...
if (ret != 0) {
dev_err(component->dev,
"Failed to create DAI wi...
goto err_probe;
}
}
-
--[[linux-4.4.1/list_for_each_entry()]]
--[[linux-4.4.1/snd_soc_dapm_new_dai_widgets()]]
if (component->probe) {
ret = component->probe(component);
if (ret < 0) {
dev_err(component->dev,
"ASoC: failed to probe c...
goto err_probe;
}
WARN(dapm->idle_bias_off &&
dapm->bias_level != SND_SOC_BIAS...
"codec %s can not start from non...
component->name);
}
-
--[[linux-4.4.1/WARN()]]
if (component->controls)
snd_soc_add_component_controls(component...
component->num_cont...
-
--[[linux-4.4.1/snd_soc_add_component_controls()]]
if (component->dapm_routes)
snd_soc_dapm_add_routes(dapm, component-...
component->num_d...
-
--[[linux-4.4.1/snd_soc_dapm_add_routes()]]
list_add(&dapm->list, &card->dapm_list);
-
--[[linux-4.4.1/list_add()]]
/* This is a HACK and will be removed soon */
if (component->codec)
list_add(&component->codec->card_list, &...
return 0;
err_probe:
soc_cleanup_component_debugfs(component);
component->card = NULL;
module_put(component->dev->driver->owner);
-
--[[linux-4.4.1/soc_cleanup_component_debugfs()]]
--[[linux-4.4.1/module_put()]]
return ret;
}
*コメント [#u5143770]
終了行:
*参照元 [#g245d1f4]
#backlinks
*説明 [#oe476474]
-パス: [[linux-4.4.1/sound/soc/soc-core.c]]
-FIXME: これは何?
--説明
**引数 [#nddf600f]
-struct snd_soc_card *card
--
--[[linux-4.4.1/snd_soc_card]]
-struct snd_soc_component *component
--
--[[linux-4.4.1/snd_soc_component]]
**返り値 [#p05cea50]
-int
--
**参考 [#o1851b13]
*実装 [#j29db930]
static int soc_probe_component(struct snd_soc_card *card,
struct snd_soc_component *component)
{
struct snd_soc_dapm_context *dapm = snd_soc_comp...
struct snd_soc_dai *dai;
int ret;
-
--[[linux-4.4.1/snd_soc_dapm_context]]
--[[linux-4.4.1/snd_soc_component_get_dapm()]]
--[[linux-4.4.1/snd_soc_dai]]
if (!strcmp(component->name, "snd-soc-dummy"))
return 0;
-
--[[linux-4.4.1/strcmp()]]
if (component->card) {
if (component->card != card) {
dev_err(component->dev,
"Trying to bind componen...
card->name, component->c...
return -ENODEV;
}
return 0;
}
-
--[[linux-4.4.1/dev_err()]]
if (!try_module_get(component->dev->driver->owne...
return -ENODEV;
-
--[[linux-4.4.1/try_module_get()]]
component->card = card;
dapm->card = card;
soc_set_name_prefix(card, component);
soc_init_component_debugfs(component);
-
--[[linux-4.4.1/soc_set_name_prefix()]]
--[[linux-4.4.1/soc_init_component_debugfs()]]
if (component->dapm_widgets) {
ret = snd_soc_dapm_new_controls(dapm, co...
component->num_dapm_widgets);
-
--[[linux-4.4.1/snd_soc_dapm_new_controls()]]
if (ret != 0) {
dev_err(component->dev,
"Failed to create new co...
goto err_probe;
}
}
list_for_each_entry(dai, &component->dai_list, l...
ret = snd_soc_dapm_new_dai_widgets(dapm,...
if (ret != 0) {
dev_err(component->dev,
"Failed to create DAI wi...
goto err_probe;
}
}
-
--[[linux-4.4.1/list_for_each_entry()]]
--[[linux-4.4.1/snd_soc_dapm_new_dai_widgets()]]
if (component->probe) {
ret = component->probe(component);
if (ret < 0) {
dev_err(component->dev,
"ASoC: failed to probe c...
goto err_probe;
}
WARN(dapm->idle_bias_off &&
dapm->bias_level != SND_SOC_BIAS...
"codec %s can not start from non...
component->name);
}
-
--[[linux-4.4.1/WARN()]]
if (component->controls)
snd_soc_add_component_controls(component...
component->num_cont...
-
--[[linux-4.4.1/snd_soc_add_component_controls()]]
if (component->dapm_routes)
snd_soc_dapm_add_routes(dapm, component-...
component->num_d...
-
--[[linux-4.4.1/snd_soc_dapm_add_routes()]]
list_add(&dapm->list, &card->dapm_list);
-
--[[linux-4.4.1/list_add()]]
/* This is a HACK and will be removed soon */
if (component->codec)
list_add(&component->codec->card_list, &...
return 0;
err_probe:
soc_cleanup_component_debugfs(component);
component->card = NULL;
module_put(component->dev->driver->owner);
-
--[[linux-4.4.1/soc_cleanup_component_debugfs()]]
--[[linux-4.4.1/module_put()]]
return ret;
}
*コメント [#u5143770]
ページ名: