Lines Matching +full:mic +full:- +full:channel +full:- +full:s
7 * SPDX-License-Identifier: Apache-2.0
71 PDM_CHAN_LEFT, /**< Left channel */
72 PDM_CHAN_RIGHT, /**< Right channel */
83 /** Minimum clock frequency supported by the mic */
85 /** Maximum clock frequency supported by the mic */
87 /** Minimum duty cycle in % supported by the mic */
89 /** Maximum duty cycle in % supported by the mic */
101 /** Bit mask to optionally invert mic data */
128 * Mapping/ordering of the PDM channels to logical PCM output channel
134 * If 2 streams are enabled, the channel order will be the same for
137 * Each channel is described as a 4-bit number, the least significant
141 * - bits 0-3 are for channel 0, bit 0 indicates LEFT or RIGHT
142 * - bits 4-7 are for channel 1, bit 4 indicates LEFT or RIGHT
150 * @name Requested channel map
158 * @name Actual channel map that the driver could configure
169 /** Requested number of streams for each channel */
185 struct pdm_chan_cfg channel; member
199 * Build the channel map to populate struct pdm_chan_cfg
201 * Returns the map of PDM controller and LEFT/RIGHT channel shifted to
202 * the bit position corresponding to the input logical channel value
204 * @param channel The logical channel number
206 * @param lr LEFT/RIGHT channel within the chosen PDM hardware controller
208 * @return Bit-map containing the PDM and L/R channel information
210 static inline uint32_t dmic_build_channel_map(uint8_t channel, uint8_t pdm, in dmic_build_channel_map() argument
214 ((channel & BIT_MASK(3)) * 4U)); in dmic_build_channel_map()
218 * Helper function to parse the channel map in pdm_chan_cfg
220 * Returns the PDM controller and LEFT/RIGHT channel corresponding to
221 * the channel map and the logical channel provided as input
223 * @param channel_map_lo Lower order/significant bits of the channel map
224 * @param channel_map_hi Higher order/significant bits of the channel map
225 * @param channel The logical channel number
227 * @param lr Pointer to the LEFT/RIGHT channel within the PDM controller
230 uint32_t channel_map_hi, uint8_t channel, uint8_t *pdm, enum pdm_lr *lr) in dmic_parse_channel_map() argument
234 channel_map = (channel < 8) ? channel_map_lo : channel_map_hi; in dmic_parse_channel_map()
235 channel_map >>= ((channel & BIT_MASK(3)) * 4U); in dmic_parse_channel_map()
242 * Build a bit map of clock skew values for each PDM channel
244 * Returns the bit-map of clock skew value shifted to the bit position
250 * @return Bit-map containing the clock skew information
258 * Configure the DMIC driver and controller(s)
261 * channel mapping, PDM I/O configuration, PCM stream configuration, etc.
272 (const struct _dmic_ops *)dev->api; in dmic_configure()
274 return api->configure(dev, cfg); in dmic_configure()
291 (const struct _dmic_ops *)dev->api; in dmic_trigger()
293 return api->trigger(dev, cmd); in dmic_trigger()
316 (const struct _dmic_ops *)dev->api; in dmic_read()
318 return api->read(dev, stream, buffer, size, timeout); in dmic_read()