diff options
Diffstat (limited to 'include/sound/asound.h')
-rw-r--r-- | include/sound/asound.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h index 3eaf155b850d..0309da2f11d3 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -302,6 +302,8 @@ typedef int __bitwise snd_pcm_hw_param_t; | |||
302 | #define SNDRV_PCM_HW_PARAM_SUBFORMAT ((__force snd_pcm_hw_param_t) 2) /* Subformat */ | 302 | #define SNDRV_PCM_HW_PARAM_SUBFORMAT ((__force snd_pcm_hw_param_t) 2) /* Subformat */ |
303 | #define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS | 303 | #define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS |
304 | #define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT | 304 | #define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT |
305 | #define SNDRV_PCM_HW_PARAM_MASK_INDEX(var) \ | ||
306 | ((__force int)(var) - (__force int)SNDRV_PCM_HW_PARAM_FIRST_MASK) | ||
305 | 307 | ||
306 | #define SNDRV_PCM_HW_PARAM_SAMPLE_BITS ((__force snd_pcm_hw_param_t) 8) /* Bits per sample */ | 308 | #define SNDRV_PCM_HW_PARAM_SAMPLE_BITS ((__force snd_pcm_hw_param_t) 8) /* Bits per sample */ |
307 | #define SNDRV_PCM_HW_PARAM_FRAME_BITS ((__force snd_pcm_hw_param_t) 9) /* Bits per frame */ | 309 | #define SNDRV_PCM_HW_PARAM_FRAME_BITS ((__force snd_pcm_hw_param_t) 9) /* Bits per frame */ |
@@ -317,6 +319,8 @@ typedef int __bitwise snd_pcm_hw_param_t; | |||
317 | #define SNDRV_PCM_HW_PARAM_TICK_TIME ((__force snd_pcm_hw_param_t) 19) /* Approx tick duration in us */ | 319 | #define SNDRV_PCM_HW_PARAM_TICK_TIME ((__force snd_pcm_hw_param_t) 19) /* Approx tick duration in us */ |
318 | #define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS | 320 | #define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS |
319 | #define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME | 321 | #define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME |
322 | #define SNDRV_PCM_HW_PARAM_INTERVAL_INDEX(var) \ | ||
323 | ((__force int)(var) - (__force int)SNDRV_PCM_HW_PARAM_FIRST_INTERVAL) | ||
320 | 324 | ||
321 | #define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */ | 325 | #define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */ |
322 | 326 | ||
@@ -336,11 +340,11 @@ struct snd_mask { | |||
336 | 340 | ||
337 | struct snd_pcm_hw_params { | 341 | struct snd_pcm_hw_params { |
338 | unsigned int flags; | 342 | unsigned int flags; |
339 | struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - | 343 | struct snd_mask masks[ |
340 | SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; | 344 | SNDRV_PCM_HW_PARAM_MASK_INDEX(SNDRV_PCM_HW_PARAM_LAST_MASK) + 1]; |
341 | struct snd_mask mres[5]; /* reserved masks */ | 345 | struct snd_mask mres[5]; /* reserved masks */ |
342 | struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - | 346 | struct snd_interval intervals[ |
343 | SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; | 347 | SNDRV_PCM_HW_PARAM_INTERVAL_INDEX(SNDRV_PCM_HW_PARAM_LAST_INTERVAL) + 1]; |
344 | struct snd_interval ires[9]; /* reserved intervals */ | 348 | struct snd_interval ires[9]; /* reserved intervals */ |
345 | unsigned int rmask; /* W: requested masks */ | 349 | unsigned int rmask; /* W: requested masks */ |
346 | unsigned int cmask; /* R: changed masks */ | 350 | unsigned int cmask; /* R: changed masks */ |