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
@@ -786,19 +786,26 @@ int bolero_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,
|
||||
"bolero", codec_root);
|
||||
if (!priv->entry) {
|
||||
dev_dbg(component->dev, "%s: failed to create bolero 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_err(component->dev, "%s: failed to create bolero version entry\n",
|
||||
__func__);
|
||||
snd_info_free_entry(priv->entry);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -809,6 +816,7 @@ int bolero_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;
|
||||
|
Reference in New Issue
Block a user