From 1d2d64807e14b549fb8b4be90f4c3e9235be2d6c Mon Sep 17 00:00:00 2001 From: WhaleChang Date: Fri, 13 Sep 2024 11:49:50 +0800 Subject: [PATCH] cras: include pcm_name in log when set_active_node This can help understand which pcm device is used by current active node. BUG=b:363241483 TEST=CQ Change-Id: I4e681705ceebccee91cbbefbb1b069af7a758d2e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5856753 Commit-Queue: Ching Yun Chang Tested-by: chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com Reviewed-by: Yu-Hsuan Hsu --- cras/src/server/cras_alsa_common_io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cras/src/server/cras_alsa_common_io.c b/cras/src/server/cras_alsa_common_io.c index f9ab91c7c..a5b628f78 100644 --- a/cras/src/server/cras_alsa_common_io.c +++ b/cras/src/server/cras_alsa_common_io.c @@ -171,11 +171,13 @@ int cras_alsa_common_set_active_node(struct cras_iodev* iodev, struct alsa_common_io* aio = (struct alsa_common_io*)iodev; cras_iodev_set_active_node(iodev, ionode); syslog(LOG_INFO, - "card type: %s, Set active node. name: %s, id: %d, direction: %s, " + "card type: %s, Set active node. name: %s, pcm_name: %s, id: %d, " + "direction: %s, " "type: %s, " "enable software volume: %d, intrinsic_sensitivity: %ld, volume: %d, " "number_of_volume_steps: %d", - cras_card_type_to_string(aio->card_type), ionode->name, ionode->idx, + cras_card_type_to_string(aio->card_type), ionode->name, aio->pcm_name, + ionode->idx, iodev->direction == CRAS_STREAM_OUTPUT ? "output" : "input", cras_node_type_to_str(ionode->type, ionode->position), ionode->software_volume_needed, ionode->intrinsic_sensitivity,