Lines Matching +full:active +full:- +full:range +full:- +full:x +full:- +full:min

4  * SPDX-License-Identifier: Apache-2.0
29 #define DMIC_HW_CIC_SHIFT_MIN -8
38 #define DMIC_HW_PDM_CLK_MIN 100000 /* Note: Practical min value */
39 #define DMIC_HW_DUTY_MIN 20 /* Note: Practical min value */
53 #define DMIC_HW_FIR_COEF_MAX ((1 << (DMIC_HW_BITS_FIR_COEF - 1)) - 1)
54 #define DMIC_HW_FIR_COEF_Q (DMIC_HW_BITS_FIR_COEF - 1)
60 #define DMIC_HW_FIR_GAIN_MAX ((1 << (DMIC_HW_BITS_FIR_GAIN - 1)) - 1)
67 * decibels, set to -90 dB.
72 * dy = y48 - y16; dx = 48000 - 16000;
74 * offs = round(y16 - coef/2^15 * 16000)
78 #define LOGRAMP_START_DB Q_CONVERT_FLOAT(-90, DB2LIN_FIXED_INPUT_QY)
79 #define LOGRAMP_TIME_COEF_Q15 -102 /* coef = dy/dx */
83 #define LOGRAMP_TIME_MIN_MS 10 /* Min. 10 ms */
88 ((int64_t)-LOGRAMP_START_DB * DMIC_UNMUTE_RAMP_US / 1000))
96 * range as INT64_MAX/MIN is greater than 32 bit Q shift parameter
99 ((qx + qy - qz) <= 63 ? (((qx + qy - qz) >= 0) ? \
100 (qx + qy - qz) : INT64_MIN) : INT64_MAX)
103 ((qx + qy - qz) <= 31 ? (((qx + qy - qz) >= 0) ? \
104 (qx + qy - qz) : INT32_MIN) : INT32_MAX)
110 ((((px) * (py) >> ((qx)+(qy)-(qp)-1)) + 1) >> 1)
112 /* A more clever macro for Q-shifts */
113 #define Q_SHIFT(x, src_q, dst_q) ((x) >> ((src_q) - (dst_q))) argument
114 #define Q_SHIFT_RND(x, src_q, dst_q) \ argument
115 ((((x) >> ((src_q) - (dst_q) - 1)) + 1) >> 1)
117 /* Alternative version since compiler does not allow (x >> -1) */
118 #define Q_SHIFT_LEFT(x, src_q, dst_q) ((x) << ((dst_q) - (src_q))) argument
128 #define MINUS_TWO_Q27 Q_CONVERT_FLOAT(-2.0, 27) /* Use Q5.27 */
147 uint32_t active_fifos_mask; /* Bits (dai->index) are set to indicate active FIFO */
148 uint32_t pause_mask; /* Bits (dai->index) are set to indicate driver pause */
186 static inline int32_t sat_int32(int64_t x) in sat_int32() argument
188 if (x > INT32_MAX) { in sat_int32()
190 } else if (x < INT32_MIN) { in sat_int32()
193 return (int32_t)x; in sat_int32()
197 static inline int32_t q_multsr_sat_32x32(int32_t x, int32_t y, in q_multsr_sat_32x32() argument
200 return sat_int32(((((int64_t)x * y) >> (shift_bits - 1)) + 1) >> 1); in q_multsr_sat_32x32()