ALSA project - the C library reference
|
Typedefs | |
typedef struct snd_use_case_mgr | snd_use_case_mgr_t |
Functions | |
char * | snd_use_case_identifier (const char *fmt,...) |
Create an identifier. More... | |
int | snd_use_case_free_list (const char *list[], int items) |
Free a string list. More... | |
int | snd_use_case_get_list (snd_use_case_mgr_t *uc_mgr, const char *identifier, const char **list[]) |
Obtain a list of entries. More... | |
int | snd_use_case_get (snd_use_case_mgr_t *uc_mgr, const char *identifier, const char **value) |
Get current - string. More... | |
int | snd_use_case_geti (snd_use_case_mgr_t *uc_mgr, const char *identifier, long *value) |
Get current - integer. More... | |
int | snd_use_case_set (snd_use_case_mgr_t *uc_mgr, const char *identifier, const char *value) |
Set new. More... | |
int | snd_use_case_mgr_open (snd_use_case_mgr_t **uc_mgr, const char *card_name) |
Open and initialise use case core for sound card. More... | |
int | snd_use_case_mgr_reload (snd_use_case_mgr_t *uc_mgr) |
Reload and re-parse use case configuration files for sound card. More... | |
int | snd_use_case_mgr_close (snd_use_case_mgr_t *uc_mgr) |
Close use case manager. More... | |
int | snd_use_case_mgr_reset (snd_use_case_mgr_t *uc_mgr) |
Reset use case manager verb, device, modifier to deafult settings. More... | |
int | snd_use_case_parse_ctl_elem_id (snd_ctl_elem_id_t *dst, const char *ucm_id, const char *value) |
Parse control element identifier. More... | |
int | snd_use_case_parse_selem_id (snd_mixer_selem_id_t *dst, const char *ucm_id, const char *value) |
Parse mixer element identifier. More... | |
The ALSA Use Case manager interface. See ALSA Use Case Interface page for more details.
#define SND_USE_CASE_DEV_BLUETOOTH "Bluetooth" |
Bluetooth Device
#define SND_USE_CASE_DEV_DIRECT "Direct" |
Direct Device (no channel remapping), (e.g. ProAudio usage)
#define SND_USE_CASE_DEV_EARPIECE "Earpiece" |
Earpiece Device
#define SND_USE_CASE_DEV_HANDSET "Handset" |
Handset Device
#define SND_USE_CASE_DEV_HDMI "HDMI" |
HDMI Device
#define SND_USE_CASE_DEV_HEADPHONES "Headphones" |
Headphones Device
#define SND_USE_CASE_DEV_HEADSET "Headset" |
Headset Device
#define SND_USE_CASE_DEV_LINE "Line" |
Line Device
#define SND_USE_CASE_DEV_MIC "Mic" |
Microphone Device
#define SND_USE_CASE_DEV_NONE "None" |
None Device
#define SND_USE_CASE_DEV_SPDIF "SPDIF" |
SPDIF Device
#define SND_USE_CASE_DEV_SPEAKER "Speaker" |
Speaker Device
#define SND_USE_CASE_DEV_USB "USB" |
USB Device (multifunctional)
#define SND_USE_CASE_MOD_CAPTURE_MUSIC "Capture Music" |
Capture Music Modifier
#define SND_USE_CASE_MOD_CAPTURE_VOICE "Capture Voice" |
Capture Voice Modifier
#define SND_USE_CASE_MOD_ECHO_REF "Echo Reference" |
Echo Reference Modifier
#define SND_USE_CASE_MOD_PLAY_MUSIC "Play Music" |
Play Music Modifier
#define SND_USE_CASE_MOD_PLAY_TONE "Play Tone" |
Play Tone Modifier
#define SND_USE_CASE_MOD_PLAY_VOICE "Play Voice" |
Play Voice Modifier
#define SND_USE_CASE_TQ_MUSIC "Music" |
TQ - Tone Quality
The interface allows clients to determine the audio TQ required for each use case verb and modifier. It's intended as an optional hint to the audio driver in order to lower power consumption. Music Tone Quality
#define SND_USE_CASE_TQ_TONES "Tones" |
Tones Tone Quality
#define SND_USE_CASE_TQ_VOICE "Voice" |
Voice Tone Quality
#define SND_USE_CASE_VERB_ANALOG_RADIO "FM Analog Radio" |
FM Analog Radio Verb
#define SND_USE_CASE_VERB_DIGITAL_RADIO "FM Digital Radio" |
FM Digital Radio Verb
#define SND_USE_CASE_VERB_HIFI "HiFi" |
HiFi Verb
#define SND_USE_CASE_VERB_HIFI_LOW_POWER "HiFi Low Power" |
HiFi Low Power Verb
#define SND_USE_CASE_VERB_INACTIVE "Inactive" |
Inactive Verb
#define SND_USE_CASE_VERB_IP_VOICECALL "Voice Call IP" |
Voice Call IP Verb
#define SND_USE_CASE_VERB_VOICE "Voice" |
Voice Verb
#define SND_USE_CASE_VERB_VOICE_LOW_POWER "Voice Low Power" |
Voice Low Power Verb
#define SND_USE_CASE_VERB_VOICECALL "Voice Call" |
Voice Call Verb
typedef struct snd_use_case_mgr snd_use_case_mgr_t |
use case container
int snd_use_case_free_list | ( | const char * | list[], |
int | items | ||
) |
Free a string list.
list | The string list to free |
items | Count of strings |
int snd_use_case_get | ( | snd_use_case_mgr_t * | uc_mgr, |
const char * | identifier, | ||
const char ** | value | ||
) |
Get current - string.
uc_mgr | Use case manager |
identifier | |
value | Value pointer |
Note: The returned string is dynamically allocated, use free() to deallocate this string. (Yes, the value parameter shouldn't be marked as "const", but it's too late to fix it, sorry about that.)
Known identifiers:
Recommended names for values:
can be parsed using snd_use_case_parse_ctl_elem_id()
can be parsed using snd_use_case_parse_ctl_elem_id()
can be parsed using snd_use_case_parse_ctl_elem_id()
can be parsed using snd_use_case_parse_ctl_elem_id()
can be parsed using snd_use_case_parse_selem_id()
can be parsed using snd_use_case_parse_selem_id()
can be parsed using snd_use_case_parse_selem_id()
can be parsed using snd_use_case_parse_selem_id()
uc_mgr | Use case manager |
identifier | |
value | Value pointer |
Note: String is dynamically allocated, use free() to deallocate this string.
int snd_use_case_get_list | ( | snd_use_case_mgr_t * | uc_mgr, |
const char * | identifier, | ||
const char ** | list[] | ||
) |
Obtain a list of entries.
uc_mgr | Use case manager (may be NULL - card list) |
identifier | (may be NULL - card list) |
list | Returned allocated list |
Defined identifiers:
Note that at most one of the supported/conflicting devs lists has any entries, and when neither is present, all devices are supported.
uc_mgr | Use case manager (may be NULL - card list) |
identifier | (may be NULL - card list) |
list | Returned allocated list |
int snd_use_case_geti | ( | snd_use_case_mgr_t * | uc_mgr, |
const char * | identifier, | ||
long * | value | ||
) |
Get current - integer.
uc_mgr | Use case manager |
identifier | |
value | result |
Known identifiers:
uc_mgr | Use case manager |
identifier |
char * snd_use_case_identifier | ( | const char * | fmt, |
... | |||
) |
Create an identifier.
fmt | Format (sprintf like) |
... | Optional arguments for sprintf like format |
int snd_use_case_mgr_close | ( | snd_use_case_mgr_t * | uc_mgr | ) |
Close use case manager.
uc_mgr | Use case manager |
uc_mgr | Use case manager |
int snd_use_case_mgr_open | ( | snd_use_case_mgr_t ** | uc_mgr, |
const char * | card_name | ||
) |
Open and initialise use case core for sound card.
uc_mgr | Returned use case manager pointer |
card_name | Sound card name. |
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.
Open and initialise use case core for sound card.
uc_mgr | Returned use case manager pointer |
card_name | name of card to open |
int snd_use_case_mgr_reload | ( | snd_use_case_mgr_t * | uc_mgr | ) |
Reload and re-parse use case configuration files for sound card.
uc_mgr | Use case manager |
Reload and re-parse use case configuration files for sound card.
uc_mgr | Use case manager |
int snd_use_case_mgr_reset | ( | snd_use_case_mgr_t * | uc_mgr | ) |
Reset use case manager verb, device, modifier to deafult settings.
uc_mgr | Use case manager |
Reset use case manager verb, device, modifier to deafult settings.
uc_mgr | Use case manager |
int snd_use_case_parse_ctl_elem_id | ( | snd_ctl_elem_id_t * | dst, |
const char * | ucm_id, | ||
const char * | value | ||
) |
Parse control element identifier.
elem_id | Element identifier |
ucm_id | Use case identifier |
value | String value to be parsed |
int snd_use_case_parse_selem_id | ( | snd_mixer_selem_id_t * | dst, |
const char * | ucm_id, | ||
const char * | value | ||
) |
Parse mixer element identifier.
dst | Simple mixer element identifier |
ucm_id | Use case identifier |
value | String value to be parsed |
int snd_use_case_set | ( | snd_use_case_mgr_t * | uc_mgr, |
const char * | identifier, | ||
const char * | value | ||
) |
Set new.
uc_mgr | Use case manager |
identifier | |
value | Value |
Known identifiers:
uc_mgr | Use case manager |
identifier | |
value | Value |