There may be nested iterations for hw: card names.
Handle this card name in snd_card_iterator_sinit().
BugLink: https://github.com/alsa-project/alsa-lib/issues/142
Fixes: eefc2c6 ("alsactl: use card iterator functions for all card loops")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
int cardno = -1;
if (cardname) {
+ if (strncmp(cardname, "hw:", 3) == 0)
+ cardname += 3;
cardno = snd_card_get_index(cardname);
if (cardno < 0) {
error("Cannot find soundcard '%s'...", cardname);