ALSA: Core - add snd_card_set_id() function
Introduce snd_card_set_id() function to allow lowlevel drivers to set default identification name for card slot. The function checks also for identification name collisions and tries to create unique name. Also, the snd_card_create() function is simplified, because this new function is used. As bonus, proper name collision checks are evaluated at the card create time. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

parent
3218911f83
commit
10a8ebbb08
@@ -313,6 +313,7 @@ struct snd_card *snd_card_new(int idx, const char *id,
|
||||
int snd_card_disconnect(struct snd_card *card);
|
||||
int snd_card_free(struct snd_card *card);
|
||||
int snd_card_free_when_closed(struct snd_card *card);
|
||||
void snd_card_set_id(struct snd_card *card, const char *id);
|
||||
int snd_card_register(struct snd_card *card);
|
||||
int snd_card_info_init(void);
|
||||
int snd_card_info_done(void);
|
||||
|
Reference in New Issue
Block a user