Salsa-lib : doesn't handle multiple device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

it seems there is a bug in card parsing (snd_card_get_index).

If the device name is "hw:0,1", then in _snd_dev_get_device,
snd_card_get_index will be called with "0,1".

But snd_card_get_index expect to be called with only the card string
number or name : it first check that the string is a number [1], and
then try for each card to compare with the card name [2]

I don't know what suppose to do snd_card_get_index, but I thing a easy
way to fix it is to pass to snd_card_get_index only the string before
the first comma.


Matthieu

[1]
(isdigit(*string) && *(string + 1) == 0) ||
        (isdigit(*string) && isdigit(*(string + 1)) && *(string + 2) == 0
[2]
if (!strcmp((const char *)info.id, string))
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux