Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  *  Advanced Linux Sound Architecture
0004  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
0005  */
0006 
0007 #include <linux/init.h>
0008 #include <sound/core.h>
0009 
0010 static int __init alsa_sound_last_init(void)
0011 {
0012     struct snd_card *card;
0013     int idx, ok = 0;
0014     
0015     printk(KERN_INFO "ALSA device list:\n");
0016     for (idx = 0; idx < SNDRV_CARDS; idx++) {
0017         card = snd_card_ref(idx);
0018         if (card) {
0019             printk(KERN_INFO "  #%i: %s\n", idx, card->longname);
0020             snd_card_unref(card);
0021             ok++;
0022         }
0023     }
0024     if (ok == 0)
0025         printk(KERN_INFO "  No soundcards found.\n");
0026     return 0;
0027 }
0028 
0029 late_initcall_sync(alsa_sound_last_init);