From ad80762a3b75e39bb26faf091b203c1d7c49fc05 Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Mon, 10 Mar 2014 18:08:15 -0700 Subject: Update tinypcminfo to display format information Change-Id: I0e6a04da5a4b122a3748b16c7eb01c4a224c3d84 Signed-off-by: Andy Hung --- include/tinyalsa/asoundlib.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index e9861e3..a85e810 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -74,6 +74,11 @@ enum pcm_format { PCM_FORMAT_MAX, }; +/* Bitmask has 256 bits (32 bytes) in asound.h */ +struct pcm_mask { + unsigned int bits[32 / sizeof(unsigned int)]; +}; + /* Configuration for a stream */ struct pcm_config { unsigned int channels; @@ -98,6 +103,11 @@ struct pcm_config { /* PCM parameters */ enum pcm_param { + /* mask parameters */ + PCM_PARAM_ACCESS, + PCM_PARAM_FORMAT, + PCM_PARAM_SUBFORMAT, + /* interval parameters */ PCM_PARAM_SAMPLE_BITS, PCM_PARAM_FRAME_BITS, PCM_PARAM_CHANNELS, @@ -135,6 +145,9 @@ int pcm_is_ready(struct pcm *pcm); struct pcm_params *pcm_params_get(unsigned int card, unsigned int device, unsigned int flags); void pcm_params_free(struct pcm_params *pcm_params); + +struct pcm_mask *pcm_params_get_mask(struct pcm_params *pcm_params, + enum pcm_param param); unsigned int pcm_params_get_min(struct pcm_params *pcm_params, enum pcm_param param); unsigned int pcm_params_get_max(struct pcm_params *pcm_params, -- cgit v1.2.3