linux/include/sound/pcm_params.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __SOUND_PCM_PARAMS_H
#define __SOUND_PCM_PARAMS_H

/*
 *  PCM params helpers
 *  Copyright (c) by Abramo Bagnara <[email protected]>
 */

#include <sound/pcm.h>

int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, 
			   struct snd_pcm_hw_params *params,
			   snd_pcm_hw_param_t var, int *dir);
int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, 
			  struct snd_pcm_hw_params *params,
			  snd_pcm_hw_param_t var, int *dir);
int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params,
			   snd_pcm_hw_param_t var, int *dir);

#define SNDRV_MASK_BITS
#define SNDRV_MASK_SIZE
#define MASK_OFS(i)
#define MASK_BIT(i)

static inline void snd_mask_none(struct snd_mask *mask)
{}

static inline void snd_mask_any(struct snd_mask *mask)
{}

static inline int snd_mask_empty(const struct snd_mask *mask)
{}

static inline unsigned int snd_mask_min(const struct snd_mask *mask)
{}

static inline unsigned int snd_mask_max(const struct snd_mask *mask)
{}

static inline void snd_mask_set(struct snd_mask *mask, unsigned int val)
{}

/* Most of drivers need only this one */
static inline void snd_mask_set_format(struct snd_mask *mask,
				       snd_pcm_format_t format)
{}

static inline void snd_mask_reset(struct snd_mask *mask, unsigned int val)
{}

static inline void snd_mask_set_range(struct snd_mask *mask,
				      unsigned int from, unsigned int to)
{}

static inline void snd_mask_reset_range(struct snd_mask *mask,
					unsigned int from, unsigned int to)
{}

static inline void snd_mask_leave(struct snd_mask *mask, unsigned int val)
{}

static inline void snd_mask_intersect(struct snd_mask *mask,
				      const struct snd_mask *v)
{}

static inline int snd_mask_eq(const struct snd_mask *mask,
			      const struct snd_mask *v)
{}

static inline void snd_mask_copy(struct snd_mask *mask,
				 const struct snd_mask *v)
{}

static inline int snd_mask_test(const struct snd_mask *mask, unsigned int val)
{}

/* Most of drivers need only this one */
static inline int snd_mask_test_format(const struct snd_mask *mask,
				       snd_pcm_format_t format)
{}

static inline int snd_mask_single(const struct snd_mask *mask)
{}

static inline int snd_mask_refine(struct snd_mask *mask,
				  const struct snd_mask *v)
{}

static inline int snd_mask_refine_first(struct snd_mask *mask)
{}

static inline int snd_mask_refine_last(struct snd_mask *mask)
{}

static inline int snd_mask_refine_min(struct snd_mask *mask, unsigned int val)
{}

static inline int snd_mask_refine_max(struct snd_mask *mask, unsigned int val)
{}

static inline int snd_mask_refine_set(struct snd_mask *mask, unsigned int val)
{}

static inline int snd_mask_value(const struct snd_mask *mask)
{}

static inline void snd_interval_any(struct snd_interval *i)
{}

static inline void snd_interval_none(struct snd_interval *i)
{}

static inline int snd_interval_checkempty(const struct snd_interval *i)
{}

static inline int snd_interval_empty(const struct snd_interval *i)
{}

static inline int snd_interval_single(const struct snd_interval *i)
{}

static inline int snd_interval_value(const struct snd_interval *i)
{}

static inline int snd_interval_min(const struct snd_interval *i)
{}

static inline int snd_interval_max(const struct snd_interval *i)
{}

static inline int snd_interval_test(const struct snd_interval *i, unsigned int val)
{}

static inline void snd_interval_copy(struct snd_interval *d, const struct snd_interval *s)
{}

static inline int snd_interval_setinteger(struct snd_interval *i)
{}

static inline int snd_interval_eq(const struct snd_interval *i1, const struct snd_interval *i2)
{}

/**
 * params_access - get the access type from the hw params
 * @p: hw params
 */
static inline snd_pcm_access_t params_access(const struct snd_pcm_hw_params *p)
{}

/**
 * params_format - get the sample format from the hw params
 * @p: hw params
 */
static inline snd_pcm_format_t params_format(const struct snd_pcm_hw_params *p)
{}

/**
 * params_subformat - get the sample subformat from the hw params
 * @p: hw params
 */
static inline snd_pcm_subformat_t
params_subformat(const struct snd_pcm_hw_params *p)
{}

/**
 * params_period_bytes - get the period size (in bytes) from the hw params
 * @p: hw params
 */
static inline unsigned int
params_period_bytes(const struct snd_pcm_hw_params *p)
{}

/**
 * params_width - get the number of bits of the sample format from the hw params
 * @p: hw params
 *
 * This function returns the number of bits per sample that the selected sample
 * format of the hw params has.
 */
static inline int params_width(const struct snd_pcm_hw_params *p)
{}

/*
 * params_physical_width - get the storage size of the sample format from the hw params
 * @p: hw params
 *
 * This functions returns the number of bits per sample that the selected sample
 * format of the hw params takes up in memory. This will be equal or larger than
 * params_width().
 */
static inline int params_physical_width(const struct snd_pcm_hw_params *p)
{}

int snd_pcm_hw_params_bits(const struct snd_pcm_hw_params *p);

static inline void
params_set_format(struct snd_pcm_hw_params *p, snd_pcm_format_t fmt)
{}

#endif /* __SOUND_PCM_PARAMS_H */