asoc: update snd info api
Update snd info API and userspace and get codec info. Change-Id: Ic9cfc89365cf6263a9b1c02403d68e7740bebbeb Signed-off-by: Meng Wang <mengw@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

부모
11d5299f26
커밋
4a03bd5171
@@ -2944,19 +2944,26 @@ int wcd938x_info_create_codec_entry(struct snd_info_entry *codec_root,
|
||||
return 0;
|
||||
}
|
||||
card = component->card;
|
||||
priv->entry = snd_info_create_subdir(codec_root->module,
|
||||
|
||||
priv->entry = snd_info_create_module_entry(codec_root->module,
|
||||
"wcd938x", codec_root);
|
||||
if (!priv->entry) {
|
||||
dev_dbg(component->dev, "%s: failed to create wcd938x entry\n",
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
priv->entry->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(priv->entry) < 0) {
|
||||
snd_info_free_entry(priv->entry);
|
||||
return -ENOMEM;
|
||||
}
|
||||
version_entry = snd_info_create_card_entry(card->snd_card,
|
||||
"version",
|
||||
priv->entry);
|
||||
if (!version_entry) {
|
||||
dev_dbg(component->dev, "%s: failed to create wcd938x version entry\n",
|
||||
__func__);
|
||||
snd_info_free_entry(priv->entry);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -2967,6 +2974,7 @@ int wcd938x_info_create_codec_entry(struct snd_info_entry *codec_root,
|
||||
|
||||
if (snd_info_register(version_entry) < 0) {
|
||||
snd_info_free_entry(version_entry);
|
||||
snd_info_free_entry(priv->entry);
|
||||
return -ENOMEM;
|
||||
}
|
||||
priv->version_entry = version_entry;
|
||||
@@ -2977,6 +2985,8 @@ int wcd938x_info_create_codec_entry(struct snd_info_entry *codec_root,
|
||||
if (!variant_entry) {
|
||||
dev_dbg(component->dev, "%s: failed to create wcd938x variant entry\n",
|
||||
__func__);
|
||||
snd_info_free_entry(version_entry);
|
||||
snd_info_free_entry(priv->entry);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -2987,6 +2997,8 @@ int wcd938x_info_create_codec_entry(struct snd_info_entry *codec_root,
|
||||
|
||||
if (snd_info_register(variant_entry) < 0) {
|
||||
snd_info_free_entry(variant_entry);
|
||||
snd_info_free_entry(version_entry);
|
||||
snd_info_free_entry(priv->entry);
|
||||
return -ENOMEM;
|
||||
}
|
||||
priv->variant_entry = variant_entry;
|
||||
|
Reference in New Issue
Block a user