Lines Matching refs:card
55 return info.card;
61 static int snd_card_load1(int card)
66 sprintf(control, SND_FILE_CONTROL, card);
71 sprintf(aload, SND_FILE_LOAD, card);
79 * \brief Try to load the driver for a card.
80 * \param card Card index.
83 int snd_card_load(int card)
85 return !!(snd_card_load1(card) >= 0);
91 * This function takes the index of a physical sound card and sets it to the
92 * index of the next card. If index is -1, it is set to the index of the first
93 * card. After the last card, the index is set to -1.
104 * \param rcard Index of current card. The index of the next card is stored
110 int card;
114 card = *rcard;
115 card = card < 0 ? 0 : card + 1;
116 for (; card < SND_MAX_CARDS; card++) {
117 if (snd_card_load(card)) {
118 *rcard = card;
127 * \brief Convert a card string to the card index.
131 * \param string A string identifying the card.
132 * \return The index of the card. On error, a a negative error code
136 * - The index of the card (as listed in /proc/asound/cards), given as string
137 * - The ID of the card (as listed in /proc/asound/cards)
142 int card, err;
151 if (sscanf(string, "%i", &card) != 1)
153 if (card < 0 || card >= SND_MAX_CARDS)
155 err = snd_card_load1(card);
157 return card;
164 for (card = 0; card < SND_MAX_CARDS; card++) {
166 if (! snd_card_load(card))
169 if (snd_ctl_hw_open(&handle, NULL, card, 0) < 0)
177 return card;
183 * \brief Obtain the card name.
185 * \param card The index of the card.
186 * \param name Result - card name corresponding to card index.
192 int snd_card_get_name(int card, char **name)
200 if ((err = snd_ctl_hw_open(&handle, NULL, card, 0)) < 0)
214 * \brief Obtain the card long name.
215 * \param card Index of the card.
216 * \param name Result - card long name corresponding to card index.
222 int snd_card_get_longname(int card, char **name)
230 if ((err = snd_ctl_hw_open(&handle, NULL, card, 0)) < 0)