]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added snd_*_open_lconf functions.
authorJaroslav Kysela <perex@perex.cz>
Sat, 24 Nov 2001 17:47:01 +0000 (17:47 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sat, 24 Nov 2001 17:47:01 +0000 (17:47 +0000)
Some minor changes in config interface documentation.

14 files changed:
include/control.h
include/pcm.h
include/rawmidi.h
include/seq.h
include/timer.h
src/conf.c
src/confmisc.c
src/control/control.c
src/hwdep/hwdep.c
src/pcm/pcm.c
src/rawmidi/rawmidi.c
src/seq/seq.c
src/timer/timer.c
src/timer/timer_query.c

index 0c6ccc2110909bedeaaec8ace3c4b370f5860781..0567e1a2ffde2155c161a3a0b162211bbdd92fd1 100644 (file)
@@ -193,6 +193,7 @@ int snd_card_get_name(int card, char **name);
 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, 
index 6ab6cef3babcb05894edf0a8b3400ee9e64473ef..40a12e536e210bf2339650039e8dd2450d25f9a2 100644 (file)
@@ -350,6 +350,9 @@ typedef struct _snd_pcm_scope snd_pcm_scope_t;
 
 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);
index e7b37576e25fcda6201b2a90f2e26700072b1367..ba35584151bfbad59a7a86362d5b0dfd8178ba2a 100644 (file)
@@ -79,6 +79,8 @@ typedef enum _snd_rawmidi_type {
 
 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);
index f4fcbf4a7ecdeee2badb2b1f7c6c0d79eb5fdc9d..3cdd1ceefd4a5f413ede80e34294f8c30a42cfa6 100644 (file)
@@ -84,6 +84,7 @@ typedef enum _snd_seq_type {
 /*
  */
 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);
index 9aeeddbaac7b982738f10ed2b4a4b027cfd9d74f..b6bd11e5c45f31dfa75a0428b721da99ce088c08 100644 (file)
@@ -101,10 +101,12 @@ typedef struct _snd_timer snd_timer_t;
 
 
 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);
index 4568c775d5743494fa229642a261335b1845ada1..794e6ec83358d617c67a8d7ef7fdf308b9335150 100644 (file)
@@ -1,11 +1,14 @@
 /**
  * \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
@@ -216,7 +219,7 @@ a.0 "first"
 a.1 "second"
 \endcode
 
-\section conf_summary Summary
+\section conf_syntax_summary Syntax summary
 
 \code
 # Configuration file syntax
@@ -248,6 +251,8 @@ name.0 [=] value0 [,|;]
 name.1 [=] value1 [,|;]
 \endcode
 
+
+
 */
 
 /*! \page confarg Configuration - runtime arguments
@@ -2425,13 +2430,14 @@ SND_DLSYM_BUILD_VERSION(snd_config_hook_load_for_all_cards, SND_CONFIG_DLSYM_VER
 #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
  */
index 31c96156898a82974115d5c7e78ab3fdecc4d0c6..d93fe9c7c7d48c7a6c76fc95459bdbba863a522f 100644 (file)
@@ -1,11 +1,15 @@
 /**
  * \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>,
index 374b4d943e63ddefb1ff163bd7fedb733b80fc9f..c8292a09243c5d4364baee05c802e7d03ed02842 100644 (file)
@@ -592,6 +592,21 @@ int snd_ctl_open(snd_ctl_t **ctlp, const char *name, int mode)
        return snd_ctl_open_noupdate(ctlp, snd_config, name, mode);
 }
 
+/**
+ * \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
index 23dbf6a98352d4bce3a3e5ad63db49d42253708d..2d62a4e292ea95eca55d346e16d923051569c48d 100644 (file)
@@ -171,6 +171,22 @@ int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode)
        return snd_hwdep_open_noupdate(hwdep, snd_config, name, mode);
 }
 
+/**
+ * \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
index bc0e26e1bc98b0338b2c9d3626f0d42c7daf5d05..82a9a543297a0d75c3c8f4ebed932329e929fe4b 100644 (file)
@@ -1604,6 +1604,23 @@ int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
        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)
index 1d136d20288c1ac685d92994586bd15a5f062fc5..bef3d50d31a066882fe9ce7cc0dda4466559e762 100644 (file)
@@ -211,6 +211,25 @@ int snd_rawmidi_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
        return snd_rawmidi_open_noupdate(inputp, outputp, snd_config, name, 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
index da04532ef779eecd91bb93a70bde3f7c12f476a7..98b3cceda407d43b9d1ba539e66036747772005f 100644 (file)
@@ -214,6 +214,25 @@ int snd_seq_open(snd_seq_t **seqp, const char *name,
        return snd_seq_open_noupdate(seqp, snd_config, name, streams, mode);
 }
 
+/**
+ * \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()
index 248068995eb14f0c26fdb1dbe89c87394b8eb7ff..5ccc1cb13e9b5fc92230e486f85d203b9cba089d 100644 (file)
@@ -171,6 +171,24 @@ int snd_timer_open(snd_timer_t **timer, const char *name, int mode)
        return snd_timer_open_noupdate(timer, snd_config, name, mode);
 }
 
+/**
+ * \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
index 84559a7fa345dc75835fe3fe2391253f83185719..121c77e300bffa4c2890b9cbc7939cc334294efa 100644 (file)
@@ -169,6 +169,24 @@ int snd_timer_query_open(snd_timer_query_t **timer, const char *name, int mode)
        return snd_timer_query_open_noupdate(timer, snd_config, name, mode);
 }
 
+/**
+ * \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