1d5ac70f0Sopenharmony_ci/* hw_params */
2d5ac70f0Sopenharmony_cistruct snd_ext_parm {
3d5ac70f0Sopenharmony_ci	unsigned int min, max;
4d5ac70f0Sopenharmony_ci	unsigned int num_list;
5d5ac70f0Sopenharmony_ci	unsigned int *list;
6d5ac70f0Sopenharmony_ci	unsigned int active: 1;
7d5ac70f0Sopenharmony_ci	unsigned int integer: 1;
8d5ac70f0Sopenharmony_ci	unsigned int keep_link: 1;
9d5ac70f0Sopenharmony_ci};
10d5ac70f0Sopenharmony_ci
11d5ac70f0Sopenharmony_cistatic inline snd_mask_t *hw_param_mask(snd_pcm_hw_params_t *params,
12d5ac70f0Sopenharmony_ci					snd_pcm_hw_param_t var)
13d5ac70f0Sopenharmony_ci{
14d5ac70f0Sopenharmony_ci	return &params->masks[var - SND_PCM_HW_PARAM_FIRST_MASK];
15d5ac70f0Sopenharmony_ci}
16d5ac70f0Sopenharmony_ci
17d5ac70f0Sopenharmony_cistatic inline snd_interval_t *hw_param_interval(snd_pcm_hw_params_t *params,
18d5ac70f0Sopenharmony_ci						snd_pcm_hw_param_t var)
19d5ac70f0Sopenharmony_ci{
20d5ac70f0Sopenharmony_ci	return &params->intervals[var - SND_PCM_HW_PARAM_FIRST_INTERVAL];
21d5ac70f0Sopenharmony_ci}
22d5ac70f0Sopenharmony_ci
23d5ac70f0Sopenharmony_ci/* make local functions really local */
24d5ac70f0Sopenharmony_ci#define snd_ext_parm_set_minmax \
25d5ac70f0Sopenharmony_ci	snd1_ext_parm_set_minmax
26d5ac70f0Sopenharmony_ci#define snd_ext_parm_set_list \
27d5ac70f0Sopenharmony_ci	snd1_ext_parm_set_list
28d5ac70f0Sopenharmony_ci#define snd_ext_parm_clear \
29d5ac70f0Sopenharmony_ci	snd1_ext_parm_clear
30d5ac70f0Sopenharmony_ci#define snd_interval_list \
31d5ac70f0Sopenharmony_ci	snd1_interval_list
32d5ac70f0Sopenharmony_ci#define snd_ext_parm_interval_refine \
33d5ac70f0Sopenharmony_ci	snd1_ext_parm_interval_refine
34d5ac70f0Sopenharmony_ci#define snd_ext_parm_mask_refine \
35d5ac70f0Sopenharmony_ci	snd1_ext_parm_mask_refine
36d5ac70f0Sopenharmony_ci
37d5ac70f0Sopenharmony_ciint snd_ext_parm_set_minmax(struct snd_ext_parm *parm, unsigned int min, unsigned int max);
38d5ac70f0Sopenharmony_ciint snd_ext_parm_set_list(struct snd_ext_parm *parm, unsigned int num_list, const unsigned int *list);
39d5ac70f0Sopenharmony_civoid snd_ext_parm_clear(struct snd_ext_parm *parm);
40d5ac70f0Sopenharmony_ciint snd_interval_list(snd_interval_t *ival, int num_list, unsigned int *list);
41d5ac70f0Sopenharmony_ciint snd_ext_parm_interval_refine(snd_interval_t *ival, struct snd_ext_parm *parm, int type);
42d5ac70f0Sopenharmony_ciint snd_ext_parm_mask_refine(snd_mask_t *mask, struct snd_ext_parm *parm, int type);
43