Some minor changes in config interface documentation.
int snd_card_get_longname(int card, char **name);
int snd_ctl_open(snd_ctl_t **ctl, const char *name, int mode);
+int snd_ctl_open_lconf(snd_ctl_t **ctl, const char *name, int mode, snd_config_t *lconf);
int snd_ctl_close(snd_ctl_t *ctl);
int snd_ctl_nonblock(snd_ctl_t *ctl, int nonblock);
int snd_async_add_ctl_handler(snd_async_handler_t **handler, snd_ctl_t *ctl,
int snd_pcm_open(snd_pcm_t **pcm, const char *name,
snd_pcm_stream_t stream, int mode);
+int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name,
+ snd_pcm_stream_t stream, int mode,
+ snd_config_t *lconf);
int snd_pcm_close(snd_pcm_t *pcm);
const char *snd_pcm_name(snd_pcm_t *pcm);
int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
const char *name, int mode);
+int snd_rawmidi_open_lconf(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
+ const char *name, int mode, snd_config_t *lconf);
int snd_rawmidi_close(snd_rawmidi_t *rmidi);
int snd_rawmidi_poll_descriptors_count(snd_rawmidi_t *rmidi);
int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rmidi, struct pollfd *pfds, unsigned int space);
/*
*/
int snd_seq_open(snd_seq_t **handle, const char *name, int streams, int mode);
+int snd_seq_open_lconf(snd_seq_t **handle, const char *name, int streams, int mode, snd_config_t *lconf);
const char *snd_seq_name(snd_seq_t *seq);
snd_seq_type_t snd_seq_type(snd_seq_t *seq);
int snd_seq_close(snd_seq_t *handle);
int snd_timer_query_open(snd_timer_query_t **handle, const char *name, int mode);
+int snd_timer_query_open_lconf(snd_timer_query_t **handle, const char *name, int mode, snd_config_t *lconf);
int snd_timer_query_close(snd_timer_query_t *handle);
int snd_timer_query_next_device(snd_timer_query_t *handle, snd_timer_id_t *tid);
int snd_timer_open(snd_timer_t **handle, const char *name, int mode);
+int snd_timer_open_lconf(snd_timer_t **handle, const char *name, int mode, snd_config_t *lconf);
int snd_timer_close(snd_timer_t *handle);
int snd_timer_poll_descriptors_count(snd_timer_t *handle);
int snd_timer_poll_descriptors(snd_timer_t *handle, struct pollfd *pfds, unsigned int space);
/**
* \file conf.c
+ * \ingroup Configuration
* \brief Configuration helper functions
* \author Abramo Bagnara <abramo@alsa-project.org>
* \author Jaroslav Kysela <perex@suse.cz>
* \date 2000-2001
*
* Tree based, full nesting configuration functions.
+ *
+ * See the \ref conf page for more details.
*/
/*
* Configuration helper functions
a.1 "second"
\endcode
-\section conf_summary Summary
+\section conf_syntax_summary Syntax summary
\code
# Configuration file syntax
name.1 [=] value1 [,|;]
\endcode
+
+
*/
/*! \page confarg Configuration - runtime arguments
#endif
/**
- * \brief Update #snd_config rereading (if needed) files specified in
- * environment variable ALSA_CONFIG_PATH. If it's not set the default value is
- * "/usr/share/alsa/alsa.conf".
+ * \brief Update #snd_config rereading (if needed) global configuration files.
* \return non-negative value on success, otherwise a negative error code
* \retval 0 no action is needed
* \retval 1 tree has been rebuild
*
+ * The global configuration files are specified in environment variable ALSA_CONFIG_PATH.
+ * If it is not set the default value is "/usr/share/alsa/alsa.conf".
+ *
* Warning: If config tree is reread all the string pointer and config
* node handle previously obtained from this tree become invalid
*/
/**
* \file confmisc.c
+ * \ingroup Configuration
* \brief Configuration helper functions
* \author Abramo Bagnara <abramo@alsa-project.org>
* \author Jaroslav Kysela <perex@suse.cz>
* \date 2000-2001
*
* Configuration helper functions.
+ *
+ * See the \ref conffunc page for more details.
+ */
/*
* Miscellaneous configuration helper functions
* Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org>,
}
/**
+ * \brief Opens a CTL using local configuration
+ * \param ctlp Returned CTL handle
+ * \param name ASCII identifier of the CTL handle
+ * \param mode Open mode (see #SND_CTL_NONBLOCK, #SND_CTL_ASYNC)
+ * \param lconf Local configuration
+ * \return 0 on success otherwise a negative error code
+ */
+int snd_ctl_open_lconf(snd_ctl_t **ctlp, const char *name,
+ int mode, snd_config_t *lconf)
+{
+ assert(ctlp && name && lconf);
+ return snd_ctl_open_noupdate(ctlp, lconf, name, mode);
+}
+
+/**
* \brief Set CTL element #SND_CTL_ELEM_TYPE_BYTES value
* \param ctl CTL handle
* \param data Bytes value
}
/**
+ * \brief Opens a new connection to the HwDep interface using local configuration
+ * \param hwdep Returned handle (NULL if not wanted)
+ * \param name ASCII identifier of the HwDep handle
+ * \param mode Open mode
+ * \return 0 on success otherwise a negative error code
+ *
+ * Opens a new connection to the HwDep interface specified with
+ * an ASCII identifier and mode.
+ */
+int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode, snd_config_t *lconf)
+{
+ assert(hwdep && name);
+ return snd_hwdep_open_noupdate(hwdep, lconf, name, mode);
+}
+
+/**
* \brief close HwDep handle
* \param hwdep HwDep handle
* \return 0 on success otherwise a negative error code
return snd_pcm_open_noupdate(pcmp, snd_config, name, stream, mode);
}
+/**
+ * \brief Opens a PCM using local configuration
+ * \param pcmp Returned PCM handle
+ * \param name ASCII identifier of the PCM handle
+ * \param stream Wanted stream
+ * \param mode Open mode (see #SND_PCM_NONBLOCK, #SND_PCM_ASYNC)
+ * \param lconf Local configuration
+ * \return 0 on success otherwise a negative error code
+ */
+int snd_pcm_open_lconf(snd_pcm_t **pcmp, const char *name,
+ snd_pcm_stream_t stream, int mode,
+ snd_config_t *lconf)
+{
+ assert(pcmp && name && lconf);
+ return snd_pcm_open_noupdate(pcmp, lconf, name, stream, mode);
+}
+
#ifndef DOC_HIDDEN
int snd_pcm_new(snd_pcm_t **pcmp, snd_pcm_type_t type, const char *name,
snd_pcm_stream_t stream, int mode)
}
/**
+ * \brief Opens a new connection to the RawMidi interface using local configuration
+ * \param inputp Returned input handle (NULL if not wanted)
+ * \param outputp Returned output handle (NULL if not wanted)
+ * \param name ASCII identifier of the RawMidi handle
+ * \param mode Open mode
+ * \param lconf Local configuration
+ * \return 0 on success otherwise a negative error code
+ *
+ * Opens a new connection to the RawMidi interface specified with
+ * an ASCII identifier and mode.
+ */
+int snd_rawmidi_open_lconf(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
+ const char *name, int mode, snd_config_t *lconf)
+{
+ assert((inputp || outputp) && name && lconf);
+ return snd_rawmidi_open_noupdate(inputp, outputp, lconf, name, mode);
+}
+
+/**
* \brief close RawMidi handle
* \param rawmidi RawMidi handle
* \return 0 on success otherwise a negative error code
}
/**
+ * \brief Open the ALSA sequencer using local configuration
+ *
+ * \param seqp Pointer to a snd_seq_t pointer.
+ * \param streams The read/write mode of the sequencer.
+ * \param mode Optional modifier
+ * \param lconf Local configuration
+ * \return 0 on success otherwise a negative error code
+ *
+ * See the snd_seq_open() function for further details. The extension
+ * is that the given configuration is used to resolve abstract name.
+ */
+int snd_seq_open_lconf(snd_seq_t **seqp, const char *name,
+ int streams, int mode, snd_config_t *lconf)
+{
+ assert(seqp && name && lconf);
+ return snd_seq_open_noupdate(seqp, lconf, name, streams, mode);
+}
+
+/**
* \brief Close the sequencer
* \param handle Handle returned from #snd_seq_open()
* \return 0 on success otherwise a negative error code
}
/**
+ * \brief Opens a new connection to the timer interface using local configuration
+ * \param timer Returned handle (NULL if not wanted)
+ * \param name ASCII identifier of the timer handle
+ * \param mode Open mode
+ * \param lconf Local configuration
+ * \return 0 on success otherwise a negative error code
+ *
+ * Opens a new connection to the timer interface specified with
+ * an ASCII identifier and mode.
+ */
+int snd_timer_open_lconf(snd_timer_t **timer, const char *name,
+ int mode, snd_config_t *lconf)
+{
+ assert(timer && name && lconf);
+ return snd_timer_open_noupdate(timer, lconf, name, mode);
+}
+
+/**
* \brief close timer handle
* \param timer timer handle
* \return 0 on success otherwise a negative error code
}
/**
+ * \brief Opens a new connection to the timer query interface using local configuration
+ * \param timer Returned handle (NULL if not wanted)
+ * \param name ASCII identifier of the RawMidi handle
+ * \param mode Open mode
+ * \param lconf Local configuration
+ * \return 0 on success otherwise a negative error code
+ *
+ * Opens a new connection to the RawMidi interface specified with
+ * an ASCII identifier and mode.
+ */
+int snd_timer_query_open_lconf(snd_timer_query_t **timer, const char *name,
+ int mode, snd_config_t *lconf)
+{
+ assert(timer && name && lconf);
+ return snd_timer_query_open_noupdate(timer, lconf, name, mode);
+}
+
+/**
* \brief close timer query handle
* \param timer timer handle
* \return 0 on success otherwise a negative error code