• Adrian Knoth's avatar
    ALSA: hdspm - Provide unique driver id based on card serial · f7de8ba3
    Adrian Knoth authored
    Before, /proc/asound looked like this:
    
     2 [Default        ]: HDSPM - RME RayDAT_f1cd85
                          RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18
    
    In case of a second HDSPM card, its name would be Default_1. This is
    cumbersome, because the order of the cards isn't stable across reboots.
    
    To help userspace tools referring to the correct card, this commit
    provides a unique id for each card:
    
     2 [HDSPMxf1cd85   ]: HDSPM - RME RayDAT_f1cd85
                          RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18
    
    In this example, userspace (configuration files) would then use
    hw:HDSPMxf1cd85 to choose the right card.
    
    The serial is masked to 24bits, so this string is always shorter than
    sixteen chars.
    Signed-off-by: default avatarAdrian Knoth <adi@drcomp.erfurt.thur.de>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    f7de8ba3
hdspm.c 180 KB