aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-03-10 18:08:15 -0700
committerSimon Wilson <simonwilson@google.com>2014-06-03 12:56:15 -0700
commitad80762a3b75e39bb26faf091b203c1d7c49fc05 (patch)
treeb799e94ee89e5d25b5f5034c15612a735604d76d /include
parent2516c01cfcc657add063cc1ab667d65c707b211e (diff)
Update tinypcminfo to display format information
Change-Id: I0e6a04da5a4b122a3748b16c7eb01c4a224c3d84 Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/tinyalsa/asoundlib.h13
1 files changed, 13 insertions, 0 deletions
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,