Skip to content
Snippets Groups Projects
Commit d255249d authored by Simon Ser's avatar Simon Ser
Browse files

lib/igt_eld: print debug message when no ELD is found


When this happens, the logs were completely empty previously, which can be
quite confusing.

Signed-off-by: default avatarSimon Ser <simon.ser@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent 873df2fa
No related branches found
No related tags found
No related merge requests found
Pipeline #46336 passed
......@@ -207,10 +207,11 @@ bool eld_get_igt(struct eld_entry *eld)
{
DIR *dir;
struct dirent *dirent;
int i;
int i, n_elds;
char card[64];
char path[PATH_MAX];
n_elds = 0;
for (i = 0; i < 8; i++) {
snprintf(card, sizeof(card), "/proc/asound/card%d", i);
dir = opendir(card);
......@@ -222,6 +223,8 @@ bool eld_get_igt(struct eld_entry *eld)
strlen(ELD_PREFIX)) != 0)
continue;
n_elds++;
snprintf(path, sizeof(path), "%s/%s", card,
dirent->d_name);
if (!eld_parse_entry(path, eld)) {
......@@ -246,6 +249,9 @@ bool eld_get_igt(struct eld_entry *eld)
closedir(dir);
}
if (n_elds == 0)
igt_debug("Found zero ELDs\n");
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment