// SPDX-License-Identifier: GPL-2.0-or-later1/*2* Advanced Linux Sound Architecture3* Copyright (c) by Jaroslav Kysela <[email protected]>4*/56#include <linux/init.h>7#include <sound/core.h>89static int __init alsa_sound_last_init(void)10{11struct snd_card *card;12int idx, ok = 0;1314printk(KERN_INFO "ALSA device list:\n");15for (idx = 0; idx < SNDRV_CARDS; idx++) {16card = snd_card_ref(idx);17if (card) {18printk(KERN_INFO " #%i: %s\n", idx, card->longname);19snd_card_unref(card);20ok++;21}22}23if (ok == 0)24printk(KERN_INFO " No soundcards found.\n");25return 0;26}2728late_initcall_sync(alsa_sound_last_init);293031