From 220377a2dd9910f78d0e7691b3d5d9cad9998796 Mon Sep 17 00:00:00 2001 From: borine <32966433+borine@users.noreply.github.com> Date: Sun, 30 Jul 2023 12:05:13 +0100 Subject: [PATCH] doxygen: topology: silence 'not documented' warnings From: borine@github Link: https://github.com/alsa-project/alsa-lib/pull/340 Signed-off-by: Jaroslav Kysela --- include/topology.h | 59 +++++++++++++++++++++++++-------------------- src/topology/ctl.c | 2 ++ src/topology/data.c | 2 ++ src/topology/elem.c | 2 ++ src/topology/pcm.c | 2 ++ 5 files changed, 41 insertions(+), 26 deletions(-) diff --git a/include/topology.h b/include/topology.h index d452f29b..2b83bbc8 100644 --- a/include/topology.h +++ b/include/topology.h @@ -840,7 +840,7 @@ struct snd_tplg_tlv_dbscale_template { int mute; /*!< is min dB value mute ? */ }; -/** \struct snd_tplg_channel_template +/** \struct snd_tplg_channel_elem * \brief Template type for single channel mapping. */ struct snd_tplg_channel_elem { @@ -1021,26 +1021,26 @@ struct snd_tplg_pcm_template { * hardware config, i.e. hardware audio formats. */ struct snd_tplg_hw_config_template { - int id; /* unique ID - - used to match */ - unsigned int fmt; /* SND_SOC_DAI_FORMAT_ format value */ - unsigned char clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ - unsigned char invert_bclk; /* 1 for inverted BCLK, 0 for normal */ - unsigned char invert_fsync; /* 1 for inverted frame clock, 0 for normal */ - unsigned char bclk_provider; /* SND_SOC_TPLG_BCLK_ value */ - unsigned char fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */ - unsigned char mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ - unsigned short reserved; /* for 32bit alignment */ - unsigned int mclk_rate; /* MCLK or SYSCLK freqency in Hz */ - unsigned int bclk_rate; /* BCLK freqency in Hz */ - unsigned int fsync_rate; /* frame clock in Hz */ - unsigned int tdm_slots; /* number of TDM slots in use */ - unsigned int tdm_slot_width; /* width in bits for each slot */ - unsigned int tx_slots; /* bit mask for active Tx slots */ - unsigned int rx_slots; /* bit mask for active Rx slots */ - unsigned int tx_channels; /* number of Tx channels */ - unsigned int *tx_chanmap; /* array of slot number */ - unsigned int rx_channels; /* number of Rx channels */ - unsigned int *rx_chanmap; /* array of slot number */ + int id; /*!< unique ID - - used to match */ + unsigned int fmt; /*!< SND_SOC_DAI_FORMAT_ format value */ + unsigned char clock_gated; /*!< SND_SOC_TPLG_DAI_CLK_GATE_ value */ + unsigned char invert_bclk; /*!< 1 for inverted BCLK, 0 for normal */ + unsigned char invert_fsync; /*!< 1 for inverted frame clock, 0 for normal */ + unsigned char bclk_provider; /*!< SND_SOC_TPLG_BCLK_ value */ + unsigned char fsync_provider; /*!< SND_SOC_TPLG_FSYNC_ value */ + unsigned char mclk_direction; /*!< SND_SOC_TPLG_MCLK_ value */ + unsigned short reserved; /*!< for 32bit alignment */ + unsigned int mclk_rate; /*!< MCLK or SYSCLK freqency in Hz */ + unsigned int bclk_rate; /*!< BCLK freqency in Hz */ + unsigned int fsync_rate; /*!< frame clock in Hz */ + unsigned int tdm_slots; /*!< number of TDM slots in use */ + unsigned int tdm_slot_width; /*!< width in bits for each slot */ + unsigned int tx_slots; /*!< bit mask for active Tx slots */ + unsigned int rx_slots; /*!< bit mask for active Rx slots */ + unsigned int tx_channels; /*!< number of Tx channels */ + unsigned int *tx_chanmap; /*!< array of slot number */ + unsigned int rx_channels; /*!< number of Rx channels */ + unsigned int *rx_chanmap; /*!< array of slot number */ }; /** \struct snd_tplg_dai_template @@ -1071,15 +1071,15 @@ struct snd_tplg_link_template { struct snd_tplg_stream_template *stream; /*!< supported configs */ struct snd_tplg_hw_config_template *hw_config; /*!< supported HW configs */ - int num_hw_configs; /* number of hw configs */ - int default_hw_config_id; /* default hw config ID for init */ + int num_hw_configs; /*!< number of hw configs */ + int default_hw_config_id; /*!< default hw config ID for init */ - unsigned int flag_mask; /* bitmask of flags to configure */ - unsigned int flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ + unsigned int flag_mask; /*!< bitmask of flags to configure */ + unsigned int flags; /*!< SND_SOC_TPLG_LNK_FLGBIT_* flag value */ struct snd_soc_tplg_private *priv; /*!< private data */ }; -/** \struct snd_tplg_obj_template +/** \struct snd_tplg_obj_template_t * \brief Generic Template Object */ typedef struct snd_tplg_obj_template { @@ -1152,7 +1152,13 @@ int snd_tplg_set_version(snd_tplg_t *tplg, unsigned int version); * \brief Save the topology to the text configuration string. * \param tplg Topology instance. * \param dst A pointer to string with result (malloc). + * \param flags save mode * \return Zero on success, otherwise a negative error code + * + * Valid flags are + * - SND_TPLG_SAVE_SORT + * - SND_TPLG_SAVE_GROUPS + * - SND_TPLG_SAVE_NOCHECK */ int snd_tplg_save(snd_tplg_t *tplg, char **dst, int flags); @@ -1161,6 +1167,7 @@ int snd_tplg_save(snd_tplg_t *tplg, char **dst, int flags); * \param tplg Topology instance. * \param bin Binary topology input buffer. * \param size Binary topology input buffer size. + * \param dflags - not used, must be set to 0. * \return Zero on success, otherwise a negative error code */ int snd_tplg_decode(snd_tplg_t *tplg, void *bin, size_t size, int dflags); diff --git a/src/topology/ctl.c b/src/topology/ctl.c index 04f39d77..67622957 100644 --- a/src/topology/ctl.c +++ b/src/topology/ctl.c @@ -19,12 +19,14 @@ #include "tplg_local.h" +#ifndef DOC_HIDDEN #define ENUM_VAL_SIZE (SNDRV_CTL_ELEM_ID_NAME_MAXLEN >> 2) struct ctl_access_elem { const char *name; unsigned int value; }; +#endif /* DOC_HIDDEN */ /* CTL access strings and codes */ /* place the multi-bit values on top - like read_write - for save */ diff --git a/src/topology/data.c b/src/topology/data.c index 2f077d36..e1611aea 100644 --- a/src/topology/data.c +++ b/src/topology/data.c @@ -712,11 +712,13 @@ static int build_tuples(snd_tplg_t *tplg, struct tplg_elem *elem) return 0; } +#ifndef DOC_HIDDEN struct tuple_type { unsigned int type; const char *name; unsigned int size; }; +#endif /* DOC_HIDDEN */ static struct tuple_type tuple_types[] = { { diff --git a/src/topology/elem.c b/src/topology/elem.c index a7a7241d..2e31da5d 100644 --- a/src/topology/elem.c +++ b/src/topology/elem.c @@ -481,10 +481,12 @@ struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg, return elem; } +#ifndef DOC_HIDDEN struct tplg_alloc { struct list_head list; void *data[0]; }; +#endif /* DOC_HIDDEN */ void *tplg_calloc(struct list_head *heap, size_t size) { diff --git a/src/topology/pcm.c b/src/topology/pcm.c index 539f258d..acec27f9 100644 --- a/src/topology/pcm.c +++ b/src/topology/pcm.c @@ -1364,10 +1364,12 @@ int tplg_save_cc(snd_tplg_t *tplg ATTRIBUTE_UNUSED, return err; } +#ifndef DOC_HIDDEN struct audio_hw_format { unsigned int type; const char *name; }; +#endif /* DOC_HIDDEN */ static struct audio_hw_format audio_hw_formats[] = { { -- 2.47.1