all places: doxygen cleanups

I see no errors with these changes using doxygen 1.8.1.1 .

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2013-04-08 16:42:24 +02:00
parent e23fb2c4de
commit b6eb0f9bfd
15 changed files with 140 additions and 105 deletions

View file

@ -1,4 +1,4 @@
/*! \page Index Preamble and License /*! \mainpage Index Preamble and License
\author Jaroslav Kysela <perex@perex.cz> \author Jaroslav Kysela <perex@perex.cz>
\author Abramo Bagnara <abramo@alsa-project.org> \author Abramo Bagnara <abramo@alsa-project.org>

View file

@ -60,6 +60,11 @@ typedef struct snd_ctl_ext snd_ctl_ext_t;
typedef struct snd_ctl_ext_callback snd_ctl_ext_callback_t; typedef struct snd_ctl_ext_callback snd_ctl_ext_callback_t;
/** Key to access a control pointer */ /** Key to access a control pointer */
typedef unsigned long snd_ctl_ext_key_t; typedef unsigned long snd_ctl_ext_key_t;
#ifdef DOC_HIDDEN
/* redefine typedef's for stupid doxygen */
typedef snd_ctl_ext snd_ctl_ext_t;
typedef snd_ctl_ext_callback snd_ctl_ext_callback_t;
#endif
/** Callback to handle TLV commands. */ /** Callback to handle TLV commands. */
typedef int (snd_ctl_ext_tlv_rw_t)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key, int op_flag, unsigned int numid, typedef int (snd_ctl_ext_tlv_rw_t)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key, int op_flag, unsigned int numid,
unsigned int *tlv, unsigned int tlv_size); unsigned int *tlv, unsigned int tlv_size);
@ -138,7 +143,7 @@ struct snd_ctl_ext {
} tlv; } tlv;
}; };
/** Callback table of ext */ /** Callback table of ext. */
struct snd_ctl_ext_callback { struct snd_ctl_ext_callback {
/** /**
* close the control handle; optional * close the control handle; optional

View file

@ -74,6 +74,7 @@ extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
} }
#endif #endif
/** Local error handler function type */
typedef void (*snd_local_error_handler_t)(const char *file, int line, typedef void (*snd_local_error_handler_t)(const char *file, int line,
const char *func, int err, const char *func, int err,
const char *fmt, va_list arg); const char *fmt, va_list arg);

View file

@ -154,7 +154,7 @@ void *snd_mixer_class_get_private(const snd_mixer_class_t *class_);
snd_mixer_compare_t snd_mixer_class_get_compare(const snd_mixer_class_t *class_); snd_mixer_compare_t snd_mixer_class_get_compare(const snd_mixer_class_t *class_);
int snd_mixer_class_set_event(snd_mixer_class_t *class_, snd_mixer_event_t event); int snd_mixer_class_set_event(snd_mixer_class_t *class_, snd_mixer_event_t event);
int snd_mixer_class_set_private(snd_mixer_class_t *class_, void *private_data); int snd_mixer_class_set_private(snd_mixer_class_t *class_, void *private_data);
int snd_mixer_class_set_private_free(snd_mixer_class_t *class_, void (*private_free)(snd_mixer_class_t *class_)); int snd_mixer_class_set_private_free(snd_mixer_class_t *class_, void (*private_free)(snd_mixer_class_t *));
int snd_mixer_class_set_compare(snd_mixer_class_t *class_, snd_mixer_compare_t compare); int snd_mixer_class_set_compare(snd_mixer_class_t *class_, snd_mixer_compare_t compare);
/** /**

View file

@ -491,43 +491,43 @@ enum snd_pcm_chmap_type {
/** channel positions */ /** channel positions */
enum snd_pcm_chmap_position { enum snd_pcm_chmap_position {
SND_CHMAP_UNKNOWN = 0, /** unspecified */ SND_CHMAP_UNKNOWN = 0, /**< unspecified */
SND_CHMAP_NA, /** N/A, silent */ SND_CHMAP_NA, /**< N/A, silent */
SND_CHMAP_MONO, /** mono stream */ SND_CHMAP_MONO, /**< mono stream */
SND_CHMAP_FL, /** front left */ SND_CHMAP_FL, /**< front left */
SND_CHMAP_FR, /** front right */ SND_CHMAP_FR, /**< front right */
SND_CHMAP_RL, /** rear left */ SND_CHMAP_RL, /**< rear left */
SND_CHMAP_RR, /** rear right */ SND_CHMAP_RR, /**< rear right */
SND_CHMAP_FC, /** front center */ SND_CHMAP_FC, /**< front center */
SND_CHMAP_LFE, /** LFE */ SND_CHMAP_LFE, /**< LFE */
SND_CHMAP_SL, /** side left */ SND_CHMAP_SL, /**< side left */
SND_CHMAP_SR, /** side right */ SND_CHMAP_SR, /**< side right */
SND_CHMAP_RC, /** rear center */ SND_CHMAP_RC, /**< rear center */
SND_CHMAP_FLC, /** front left center */ SND_CHMAP_FLC, /**< front left center */
SND_CHMAP_FRC, /** front right center */ SND_CHMAP_FRC, /**< front right center */
SND_CHMAP_RLC, /** rear left center */ SND_CHMAP_RLC, /**< rear left center */
SND_CHMAP_RRC, /** rear right center */ SND_CHMAP_RRC, /**< rear right center */
SND_CHMAP_FLW, /** front left wide */ SND_CHMAP_FLW, /**< front left wide */
SND_CHMAP_FRW, /** front right wide */ SND_CHMAP_FRW, /**< front right wide */
SND_CHMAP_FLH, /** front left high */ SND_CHMAP_FLH, /**< front left high */
SND_CHMAP_FCH, /** front center high */ SND_CHMAP_FCH, /**< front center high */
SND_CHMAP_FRH, /** front right high */ SND_CHMAP_FRH, /**< front right high */
SND_CHMAP_TC, /** top center */ SND_CHMAP_TC, /**< top center */
SND_CHMAP_TFL, /** top front left */ SND_CHMAP_TFL, /**< top front left */
SND_CHMAP_TFR, /** top front right */ SND_CHMAP_TFR, /**< top front right */
SND_CHMAP_TFC, /** top front center */ SND_CHMAP_TFC, /**< top front center */
SND_CHMAP_TRL, /** top rear left */ SND_CHMAP_TRL, /**< top rear left */
SND_CHMAP_TRR, /** top rear right */ SND_CHMAP_TRR, /**< top rear right */
SND_CHMAP_TRC, /** top rear center */ SND_CHMAP_TRC, /**< top rear center */
SND_CHMAP_TFLC, /* top front left center */ SND_CHMAP_TFLC, /**< top front left center */
SND_CHMAP_TFRC, /* top front right center */ SND_CHMAP_TFRC, /**< top front right center */
SND_CHMAP_TSL, /* top side left */ SND_CHMAP_TSL, /**< top side left */
SND_CHMAP_TSR, /* top side right */ SND_CHMAP_TSR, /**< top side right */
SND_CHMAP_LLFE, /* left LFE */ SND_CHMAP_LLFE, /**< left LFE */
SND_CHMAP_RLFE, /* right LFE */ SND_CHMAP_RLFE, /**< right LFE */
SND_CHMAP_BC, /* bottom center */ SND_CHMAP_BC, /**< bottom center */
SND_CHMAP_BLC, /* bottom left center */ SND_CHMAP_BLC, /**< bottom left center */
SND_CHMAP_BRC, /* bottom right center */ SND_CHMAP_BRC, /**< bottom right center */
SND_CHMAP_LAST = SND_CHMAP_BRC, SND_CHMAP_LAST = SND_CHMAP_BRC,
}; };
@ -541,14 +541,14 @@ enum snd_pcm_chmap_position {
/** the channel map header */ /** the channel map header */
typedef struct snd_pcm_chmap { typedef struct snd_pcm_chmap {
unsigned int channels; /** number of channels */ unsigned int channels; /**< number of channels */
unsigned int pos[0]; /** channel position array */ unsigned int pos[0]; /**< channel position array */
} snd_pcm_chmap_t; } snd_pcm_chmap_t;
/** the header of array items returned from snd_pcm_query_chmaps() */ /** the header of array items returned from snd_pcm_query_chmaps() */
typedef struct snd_pcm_chmap_query { typedef struct snd_pcm_chmap_query {
enum snd_pcm_chmap_type type; /** channel map type */ enum snd_pcm_chmap_type type; /**< channel map type */
snd_pcm_chmap_t map; /** available channel map */ snd_pcm_chmap_t map; /**< available channel map */
} snd_pcm_chmap_query_t; } snd_pcm_chmap_query_t;

View file

@ -49,6 +49,11 @@ enum {
typedef struct snd_pcm_extplug snd_pcm_extplug_t; typedef struct snd_pcm_extplug snd_pcm_extplug_t;
/** Callback table of extplug */ /** Callback table of extplug */
typedef struct snd_pcm_extplug_callback snd_pcm_extplug_callback_t; typedef struct snd_pcm_extplug_callback snd_pcm_extplug_callback_t;
#ifdef DOC_HIDDEN
/* redefine typedefs for stupid doxygen */
typedef snd_pcm_extplug snd_pcm_extplug_t;
typedef snd_pcm_extplug_callback snd_pcm_extplug_callback_t;
#endif
/* /*
* Protocol version * Protocol version

View file

@ -54,6 +54,11 @@ enum {
typedef struct snd_pcm_ioplug snd_pcm_ioplug_t; typedef struct snd_pcm_ioplug snd_pcm_ioplug_t;
/** Callback table of ioplug */ /** Callback table of ioplug */
typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t; typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
#ifdef DOC_HIDDEN
/* redefine typedefs for stupid doxygen */
typedef snd_pcm_ioplug snd_pcm_ioplug_t;
typedef snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
#endif
/* /*
* bit flags for additional conditions * bit flags for additional conditions

View file

@ -254,10 +254,16 @@ typedef struct snd_seq_ev_raw32 {
} snd_seq_ev_raw32_t; } snd_seq_ev_raw32_t;
/** external stored data */ /** external stored data */
typedef struct snd_seq_ev_ext { struct snd_seq_ev_ext {
unsigned int len; /**< length of data */ unsigned int len; /**< length of data */
void *ptr; /**< pointer to data (note: can be 64-bit) */ void *ptr; /**< pointer to data (note: can be 64-bit) */
} __attribute__((packed)) snd_seq_ev_ext_t; } __attribute__((packed));
/** external stored data */
typedef struct snd_seq_ev_ext snd_seq_ev_ext_t;
#ifdef DOC_HIDDEN
/* redefine typedef for stupid doxygen */
typedef snd_seq_ev_ext snd_seq_ev_ext_t;
#endif
/** Result events */ /** Result events */
typedef struct snd_seq_result { typedef struct snd_seq_result {

View file

@ -49,7 +49,8 @@ extern "C" {
* \{ * \{
*/ */
/** /*! \page Usecase ALSA Use Case Interface
*
* ALSA Use Case Interface * ALSA Use Case Interface
* *
* The use case manager works by configuring the sound card ALSA kcontrols to * The use case manager works by configuring the sound card ALSA kcontrols to
@ -96,15 +97,15 @@ extern "C" {
* case verb will configure the audio hardware for HiFi Music playback * case verb will configure the audio hardware for HiFi Music playback
* and capture. * and capture.
*/ */
#define SND_USE_CASE_VERB_INACTIVE "Inactive" #define SND_USE_CASE_VERB_INACTIVE "Inactive" /**< Inactive Verb */
#define SND_USE_CASE_VERB_HIFI "HiFi" #define SND_USE_CASE_VERB_HIFI "HiFi" /**< HiFi Verb */
#define SND_USE_CASE_VERB_HIFI_LOW_POWER "HiFi Low Power" #define SND_USE_CASE_VERB_HIFI_LOW_POWER "HiFi Low Power" /**< HiFi Low Power Verb */
#define SND_USE_CASE_VERB_VOICE "Voice" #define SND_USE_CASE_VERB_VOICE "Voice" /**< Voice Verb */
#define SND_USE_CASE_VERB_VOICE_LOW_POWER "Voice Low Power" #define SND_USE_CASE_VERB_VOICE_LOW_POWER "Voice Low Power" /**< Voice Low Power Verb */
#define SND_USE_CASE_VERB_VOICECALL "Voice Call" #define SND_USE_CASE_VERB_VOICECALL "Voice Call" /**< Voice Call Verb */
#define SND_USE_CASE_VERB_IP_VOICECALL "Voice Call IP" #define SND_USE_CASE_VERB_IP_VOICECALL "Voice Call IP" /**< Voice Call IP Verb */
#define SND_USE_CASE_VERB_ANALOG_RADIO "FM Analog Radio" #define SND_USE_CASE_VERB_ANALOG_RADIO "FM Analog Radio" /**< FM Analog Radio Verb */
#define SND_USE_CASE_VERB_DIGITAL_RADIO "FM Digital Radio" #define SND_USE_CASE_VERB_DIGITAL_RADIO "FM Digital Radio" /**< FM Digital Radio Verb */
/* add new verbs to end of list */ /* add new verbs to end of list */
@ -114,16 +115,16 @@ extern "C" {
* Physical system devices the render and capture audio. Devices can be OR'ed * Physical system devices the render and capture audio. Devices can be OR'ed
* together to support audio on simultaneous devices. * together to support audio on simultaneous devices.
*/ */
#define SND_USE_CASE_DEV_NONE "None" #define SND_USE_CASE_DEV_NONE "None" /**< None Device */
#define SND_USE_CASE_DEV_SPEAKER "Speaker" #define SND_USE_CASE_DEV_SPEAKER "Speaker" /**< Speaker Device */
#define SND_USE_CASE_DEV_LINE "Line" #define SND_USE_CASE_DEV_LINE "Line" /**< Line Device */
#define SND_USE_CASE_DEV_HEADPHONES "Headphones" #define SND_USE_CASE_DEV_HEADPHONES "Headphones" /**< Headphones Device */
#define SND_USE_CASE_DEV_HEADSET "Headset" #define SND_USE_CASE_DEV_HEADSET "Headset" /**< Headset Device */
#define SND_USE_CASE_DEV_HANDSET "Handset" #define SND_USE_CASE_DEV_HANDSET "Handset" /**< Handset Device */
#define SND_USE_CASE_DEV_BLUETOOTH "Bluetooth" #define SND_USE_CASE_DEV_BLUETOOTH "Bluetooth" /**< Bluetooth Device */
#define SND_USE_CASE_DEV_EARPIECE "Earpiece" #define SND_USE_CASE_DEV_EARPIECE "Earpiece" /**< Earpiece Device */
#define SND_USE_CASE_DEV_SPDIF "SPDIF" #define SND_USE_CASE_DEV_SPDIF "SPDIF" /**< SPDIF Device */
#define SND_USE_CASE_DEV_HDMI "HDMI" #define SND_USE_CASE_DEV_HDMI "HDMI" /**< HDMI Device */
/* add new devices to end of list */ /* add new devices to end of list */
@ -145,12 +146,12 @@ extern "C" {
* 3. Call snd_use_case_get("PlaybackPCM") to get ALSA PCM sink name for * 3. Call snd_use_case_get("PlaybackPCM") to get ALSA PCM sink name for
* ringtone pcm data. * ringtone pcm data.
*/ */
#define SND_USE_CASE_MOD_CAPTURE_VOICE "Capture Voice" #define SND_USE_CASE_MOD_CAPTURE_VOICE "Capture Voice" /**< Capture Voice Modifier */
#define SND_USE_CASE_MOD_CAPTURE_MUSIC "Capture Music" #define SND_USE_CASE_MOD_CAPTURE_MUSIC "Capture Music" /**< Capture Music Modifier */
#define SND_USE_CASE_MOD_PLAY_MUSIC "Play Music" #define SND_USE_CASE_MOD_PLAY_MUSIC "Play Music" /**< Play Music Modifier */
#define SND_USE_CASE_MOD_PLAY_VOICE "Play Voice" #define SND_USE_CASE_MOD_PLAY_VOICE "Play Voice" /**< Play Voice Modifier */
#define SND_USE_CASE_MOD_PLAY_TONE "Play Tone" #define SND_USE_CASE_MOD_PLAY_TONE "Play Tone" /**< Play Tone Modifier */
#define SND_USE_CASE_MOD_ECHO_REF "Echo Reference" #define SND_USE_CASE_MOD_ECHO_REF "Echo Reference" /**< Echo Reference Modifier */
/* add new modifiers to end of list */ /* add new modifiers to end of list */
@ -162,9 +163,9 @@ extern "C" {
* audio driver in order to lower power consumption. * audio driver in order to lower power consumption.
* *
*/ */
#define SND_USE_CASE_TQ_MUSIC "Music" #define SND_USE_CASE_TQ_MUSIC "Music" /**< Music Tone Quality */
#define SND_USE_CASE_TQ_VOICE "Voice" #define SND_USE_CASE_TQ_VOICE "Voice" /**< Voice Tone Quality */
#define SND_USE_CASE_TQ_TONES "Tones" #define SND_USE_CASE_TQ_TONES "Tones" /**< Tones Tone Quality */
/** use case container */ /** use case container */
typedef struct snd_use_case_mgr snd_use_case_mgr_t; typedef struct snd_use_case_mgr snd_use_case_mgr_t;
@ -197,16 +198,16 @@ int snd_use_case_free_list(const char *list[], int items);
* (in pair cardname+comment) * (in pair cardname+comment)
* _verbs - get verb list * _verbs - get verb list
* (in pair verb+comment) * (in pair verb+comment)
* _devices[/<verb>] - get list of supported devices * _devices[/{verb}] - get list of supported devices
* (in pair device+comment) * (in pair device+comment)
* _modifiers[/<verb>]- get list of supported modifiers * _modifiers[/{verb}]- get list of supported modifiers
* (in pair modifier+comment) * (in pair modifier+comment)
* TQ[/<verb>] - get list of TQ identifiers * TQ[/{verb}] - get list of TQ identifiers
* _enadevs - get list of enabled devices * _enadevs - get list of enabled devices
* _enamods - get list of enabled modifiers * _enamods - get list of enabled modifiers
* *
* _supporteddevs/<modifier>|<device>[/<verb>] - list of supported devices * _supporteddevs/{modifier}|{device}[/{verb}] - list of supported devices
* _conflictingdevs/<modifier>|<device>[/<verb>] - list of conflicting devices * _conflictingdevs/{modifier}|{device}[/{verb}] - list of conflicting devices
* Note that at most one of the supported/conflicting devs lists has * Note that at most one of the supported/conflicting devs lists has
* any entries, and when neither is present, all devices are supported. * any entries, and when neither is present, all devices are supported.
* *
@ -230,8 +231,8 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* NULL - return current card * NULL - return current card
* _verb - return current verb * _verb - return current verb
* *
* [=]<NAME>[/[<modifier>|</device>][/<verb>]] * [=]{NAME}[/[{modifier}|{/device}][/{verb}]]
* - value identifier <NAME> * - value identifier {NAME}
* - Search starts at given modifier or device if any, * - Search starts at given modifier or device if any,
* else at a verb * else at a verb
* - Search starts at given verb if any, * - Search starts at given verb if any,
@ -281,8 +282,8 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
* \return Zero if success, otherwise a negative error code * \return Zero if success, otherwise a negative error code
* *
* Known identifiers: * Known identifiers:
* _devstatus/<device> - return status for given device * _devstatus/{device} - return status for given device
* _modstatus/<modifier> - return status for given modifier * _modstatus/{modifier} - return status for given modifier
*/ */
int snd_use_case_geti(snd_use_case_mgr_t *uc_mgr, int snd_use_case_geti(snd_use_case_mgr_t *uc_mgr,
const char *identifier, const char *identifier,
@ -299,13 +300,13 @@ int snd_use_case_geti(snd_use_case_mgr_t *uc_mgr,
* _verb - set current verb = value * _verb - set current verb = value
* _enadev - enable given device = value * _enadev - enable given device = value
* _disdev - disable given device = value * _disdev - disable given device = value
* _swdev/<old_device> - new_device = value * _swdev/{old_device} - new_device = value
* - disable old_device and then enable new_device * - disable old_device and then enable new_device
* - if old_device is not enabled just return * - if old_device is not enabled just return
* - check transmit sequence firstly * - check transmit sequence firstly
* _enamod - enable given modifier = value * _enamod - enable given modifier = value
* _dismod - disable given modifier = value * _dismod - disable given modifier = value
* _swmod/<old_modifier> - new_modifier = value * _swmod/{old_modifier} - new_modifier = value
* - disable old_modifier and then enable new_modifier * - disable old_modifier and then enable new_modifier
* - if old_modifier is not enabled just return * - if old_modifier is not enabled just return
* - check transmit sequence firstly * - check transmit sequence firstly

View file

@ -3505,10 +3505,12 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t
struct dirent **namelist; struct dirent **namelist;
int n; int n;
#ifndef DOC_HIDDEN
#ifdef _GNU_SOURCE #ifdef _GNU_SOURCE
#define SORTFUNC versionsort #define SORTFUNC versionsort
#else #else
#define SORTFUNC alphasort #define SORTFUNC alphasort
#endif
#endif #endif
n = scandir(fi[idx].name, &namelist, config_filename_filter, SORTFUNC); n = scandir(fi[idx].name, &namelist, config_filename_filter, SORTFUNC);
if (n > 0) { if (n > 0) {

View file

@ -2323,8 +2323,8 @@ void snd_ctl_elem_value_copy(snd_ctl_elem_value_t *dst, const snd_ctl_elem_value
/** /**
* \brief compare one #snd_ctl_elem_value_t to another * \brief compare one #snd_ctl_elem_value_t to another
* \param dst pointer to destination * \param left pointer to first value
* \param src pointer to source * \param right pointer to second value
* \return 0 on match, less than or greater than otherwise, see memcmp * \return 0 on match, less than or greater than otherwise, see memcmp
*/ */
int snd_ctl_elem_value_compare(snd_ctl_elem_value_t *left, const snd_ctl_elem_value_t *right) int snd_ctl_elem_value_compare(snd_ctl_elem_value_t *left, const snd_ctl_elem_value_t *right)

View file

@ -297,6 +297,7 @@ static int get_ctl_enum_item_index(snd_ctl_t *handle,
/** /**
* \brief parse ASCII string as CTL element value * \brief parse ASCII string as CTL element value
* \param handle CTL handle
* \param dst destination CTL element value * \param dst destination CTL element value
* \param info CTL element info structure * \param info CTL element info structure
* \param value source ASCII string * \param value source ASCII string

View file

@ -60,14 +60,21 @@ const char *snd_strerror(int errnum)
return snd_error_codes[errnum]; return snd_error_codes[errnum];
} }
#ifndef DOC_HIDDEN
#ifdef HAVE___THREAD #ifdef HAVE___THREAD
#define TLS_PFX __thread #define TLS_PFX __thread
#else #else
#define TLS_PFX /* NOP */ #define TLS_PFX /* NOP */
#endif #endif
#endif
static TLS_PFX snd_local_error_handler_t local_error = NULL; static TLS_PFX snd_local_error_handler_t local_error = NULL;
/**
* \brief Install local error handler
* \param func The local error handler function
* \retval Previous local error handler function
*/
snd_local_error_handler_t snd_lib_error_set_local(snd_local_error_handler_t func) snd_local_error_handler_t snd_lib_error_set_local(snd_local_error_handler_t func)
{ {
snd_local_error_handler_t old = local_error; snd_local_error_handler_t old = local_error;

View file

@ -1062,7 +1062,7 @@ int snd_mixer_class_set_private(snd_mixer_class_t *obj, void *private_data)
* \param private_free Mixer class private data free callback * \param private_free Mixer class private data free callback
* \return zero if success, otherwise a negative error code * \return zero if success, otherwise a negative error code
*/ */
int snd_mixer_class_set_private_free(snd_mixer_class_t *obj, void (*private_free)(snd_mixer_class_t *class)) int snd_mixer_class_set_private_free(snd_mixer_class_t *obj, void (*private_free)(snd_mixer_class_t *))
{ {
assert(obj); assert(obj);
obj->private_free = private_free; obj->private_free = private_free;

View file

@ -702,42 +702,42 @@ static int set_device(snd_use_case_mgr_t *uc_mgr,
* \param card_name name of card to open * \param card_name name of card to open
* \return zero on success, otherwise a negative error code * \return zero on success, otherwise a negative error code
*/ */
int snd_use_case_mgr_open(snd_use_case_mgr_t **mgr, int snd_use_case_mgr_open(snd_use_case_mgr_t **uc_mgr,
const char *card_name) const char *card_name)
{ {
snd_use_case_mgr_t *uc_mgr; snd_use_case_mgr_t *mgr;
int err; int err;
/* create a new UCM */ /* create a new UCM */
uc_mgr = calloc(1, sizeof(snd_use_case_mgr_t)); mgr = calloc(1, sizeof(snd_use_case_mgr_t));
if (uc_mgr == NULL) if (mgr == NULL)
return -ENOMEM; return -ENOMEM;
INIT_LIST_HEAD(&uc_mgr->verb_list); INIT_LIST_HEAD(&mgr->verb_list);
INIT_LIST_HEAD(&uc_mgr->default_list); INIT_LIST_HEAD(&mgr->default_list);
INIT_LIST_HEAD(&uc_mgr->value_list); INIT_LIST_HEAD(&mgr->value_list);
INIT_LIST_HEAD(&uc_mgr->active_modifiers); INIT_LIST_HEAD(&mgr->active_modifiers);
INIT_LIST_HEAD(&uc_mgr->active_devices); INIT_LIST_HEAD(&mgr->active_devices);
pthread_mutex_init(&uc_mgr->mutex, NULL); pthread_mutex_init(&mgr->mutex, NULL);
uc_mgr->card_name = strdup(card_name); mgr->card_name = strdup(card_name);
if (uc_mgr->card_name == NULL) { if (mgr->card_name == NULL) {
free(uc_mgr); free(mgr);
return -ENOMEM; return -ENOMEM;
} }
/* get info on use_cases and verify against card */ /* get info on use_cases and verify against card */
err = import_master_config(uc_mgr); err = import_master_config(mgr);
if (err < 0) { if (err < 0) {
uc_error("error: failed to import %s use case configuration %d", uc_error("error: failed to import %s use case configuration %d",
card_name, err); card_name, err);
goto err; goto err;
} }
*mgr = uc_mgr; *uc_mgr = mgr;
return 0; return 0;
err: err:
uc_mgr_free(uc_mgr); uc_mgr_free(mgr);
return err; return err;
} }
@ -973,10 +973,12 @@ static int get_conflicting_device_list(snd_use_case_mgr_t *uc_mgr,
return get_supcon_device_list(uc_mgr, list, name, DEVLIST_CONFLICTING); return get_supcon_device_list(uc_mgr, list, name, DEVLIST_CONFLICTING);
} }
#ifndef DOC_HIDDEN
struct myvalue { struct myvalue {
struct list_head list; struct list_head list;
char *value; char *value;
}; };
#endif
static int add_values(struct list_head *list, static int add_values(struct list_head *list,
const char *identifier, const char *identifier,