summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/alsa/pcm-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/alsa/pcm-test.c')
-rw-r--r--tools/testing/selftests/alsa/pcm-test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/alsa/pcm-test.c b/tools/testing/selftests/alsa/pcm-test.c
index 58b525a4a32c..d73600e93e83 100644
--- a/tools/testing/selftests/alsa/pcm-test.c
+++ b/tools/testing/selftests/alsa/pcm-test.c
@@ -149,6 +149,7 @@ static void missing_devices(int card, snd_config_t *card_config)
static void find_pcms(void)
{
char name[32], key[64];
+ char *card_name, *card_longname;
int card, dev, subdev, count, direction, err;
snd_pcm_stream_t stream;
struct pcm_data *pcm_data;
@@ -175,6 +176,15 @@ static void find_pcms(void)
goto next_card;
}
+ err = snd_card_get_name(card, &card_name);
+ if (err != 0)
+ card_name = "Unknown";
+ err = snd_card_get_longname(card, &card_longname);
+ if (err != 0)
+ card_longname = "Unknown";
+ ksft_print_msg("Card %d - %s (%s)\n", card,
+ card_name, card_longname);
+
card_config = conf_by_card(card);
card_data = calloc(1, sizeof(*card_data));