mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-07 04:06:06 -05:00
ucm: extend snd_use_case_mgr_open() to address the sound card directly
Some clients like pulseaudio wants to access the multiple instances of sound cards. This patch adds prefixes like "hw:" to the card_name argument to handle this. The card index (value) or card identification (string) can be used for this prefix. Also the prefix "strict:" was added to avoid the driver name and driver long name matching. It might be useable for use case configurations which are not bound to the one sound card. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
aba2260ae7
commit
be6deb927f
2 changed files with 98 additions and 47 deletions
|
|
@ -371,8 +371,25 @@ int snd_use_case_set(snd_use_case_mgr_t *uc_mgr,
|
|||
* \param uc_mgr Returned use case manager pointer
|
||||
* \param card_name Sound card name.
|
||||
* \return zero if success, otherwise a negative error code
|
||||
*
|
||||
* By default only first card is used when the driver card
|
||||
* name or long name is passed in the card_name argument.
|
||||
*
|
||||
* The "strict:" prefix in the card_name defines that
|
||||
* there is no driver name / long name matching. The straight
|
||||
* configuration is used.
|
||||
*
|
||||
* The "hw:" prefix in the card_name will load the configuration
|
||||
* for the ALSA card specified by the card index (value) or
|
||||
* the card string identificator.
|
||||
*
|
||||
* The sound card might be also composed from several physical
|
||||
* sound cards (for the default and strict card_name).
|
||||
* The application cannot expect that the device names will refer
|
||||
* only one ALSA sound card in this case.
|
||||
*/
|
||||
int snd_use_case_mgr_open(snd_use_case_mgr_t **uc_mgr, const char *card_name);
|
||||
int snd_use_case_mgr_open(snd_use_case_mgr_t **uc_mgr,
|
||||
const char *card_name);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue