get_sound_devices

get_sound_devices() list[str][source]

Lists the sound cards, by ID, for the SOUND_DEVICE setting.

Returns entries like ‘DACPro (RPi DAC Pro)’. The ID is what gets stored, NOT the card index: indexes are handed out in the order the kernel registers the cards, so a kernel update or a config.txt change can renumber them and the setting would then point at the wrong card. The ID comes from the driver and does not move.