summaryrefslogtreecommitdiff
path: root/cras
diff options
context:
space:
mode:
authorYu-Hsuan Hsu <yuhsuan@chromium.org>2020-04-21 11:57:51 +0800
committerCommit Bot <commit-bot@chromium.org>2020-04-25 20:28:49 +0000
commit288cd83af938e9517696a1522a08e40edda9d91d (patch)
tree54a8fee0694fbe2e5c53cf64304e2c2a55a0f265 /cras
parentd66831f82873d57a34bb57563c61c95df50e9038 (diff)
downloadadhd-288cd83af938e9517696a1522a08e40edda9d91d.tar.gz
CRAS: cras_alsa_card - Log errors if no UCM on internal cards
We should print some error messages when failing to find UCM on internal cards. Notice that it will also print errors on HDMI cards. We should add UCM for those devices in the future. BUG=b:154563115 TEST=Remove the HiFi.conf and restart cras. Make sure there is an error in /var/log/messages Change-Id: Id2c25110898cf176ad47d7673996f0c9e0eff1c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2156678 Reviewed-by: En-Shuo Hsu <enshuo@chromium.org> Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Commit-Queue: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Diffstat (limited to 'cras')
-rw-r--r--cras/src/server/cras_alsa_card.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cras/src/server/cras_alsa_card.c b/cras/src/server/cras_alsa_card.c
index d9fa319a..a868c372 100644
--- a/cras/src/server/cras_alsa_card.c
+++ b/cras/src/server/cras_alsa_card.c
@@ -506,6 +506,9 @@ struct cras_alsa_card *cras_alsa_card_create(
card_name, alsa_card->ucm ? "yes" : "no");
}
+ if (info->card_type == ALSA_CARD_TYPE_INTERNAL && !alsa_card->ucm)
+ syslog(LOG_ERR, "No ucm config on internal card %s", card_name);
+
rc = snd_hctl_open(&alsa_card->hctl, alsa_card->name, SND_CTL_NONBLOCK);
if (rc < 0) {
syslog(LOG_DEBUG, "failed to get hctl for %s", alsa_card->name);