Lines Matching +full:i2c +full:- +full:errors

4  * SPDX-License-Identifier: Apache-2.0
53 AUDIO_PCM_WIDTH_16_BITS = 16, /**< 16-bit sample width */
54 AUDIO_PCM_WIDTH_20_BITS = 20, /**< 20-bit sample width */
55 AUDIO_PCM_WIDTH_24_BITS = 24, /**< 24-bit sample width */
56 AUDIO_PCM_WIDTH_32_BITS = 32, /**< 32-bit sample width */
133 int vol; /**< Volume level (codec-specific) */
141 /** Output over-current */
144 /** Codec over-temperature */
153 /** Output direct-current */
162 * @param errors Device errors (bitmask of @ref audio_codec_error_type values)
164 typedef void (*audio_codec_error_callback_t)(const struct device *dev, uint32_t errors);
206 (const struct audio_codec_api *)dev->api; in audio_codec_configure()
208 return api->configure(dev, cfg); in audio_codec_configure()
221 (const struct audio_codec_api *)dev->api; in audio_codec_start_output()
223 api->start_output(dev); in audio_codec_start_output()
236 (const struct audio_codec_api *)dev->api; in audio_codec_stop_output()
238 api->stop_output(dev); in audio_codec_stop_output()
259 (const struct audio_codec_api *)dev->api; in audio_codec_set_property()
261 return api->set_property(dev, property, channel, val); in audio_codec_set_property()
278 (const struct audio_codec_api *)dev->api; in audio_codec_apply_properties()
280 return api->apply_properties(dev); in audio_codec_apply_properties()
284 * @brief Clear any codec errors
286 * Clear all codec errors.
287 * If an error interrupt exists, it will be de-asserted.
296 (const struct audio_codec_api *)dev->api; in audio_codec_clear_errors()
298 if (api->clear_errors == NULL) { in audio_codec_clear_errors()
299 return -ENOSYS; in audio_codec_clear_errors()
302 return api->clear_errors(dev); in audio_codec_clear_errors()
308 * The callback will be called from a thread, so I2C or SPI operations are
323 (const struct audio_codec_api *)dev->api; in audio_codec_register_error_callback()
325 if (api->register_error_callback == NULL) { in audio_codec_register_error_callback()
326 return -ENOSYS; in audio_codec_register_error_callback()
329 return api->register_error_callback(dev, cb); in audio_codec_register_error_callback()
341 * @param input The input terminal index, codec-specific
348 const struct audio_codec_api *api = (const struct audio_codec_api *)dev->api; in audio_codec_route_input()
350 if (api->route_input == NULL) { in audio_codec_route_input()
351 return -ENOSYS; in audio_codec_route_input()
354 return api->route_input(dev, channel, input); in audio_codec_route_input()
366 * @param output The output terminal index, codec-specific
373 const struct audio_codec_api *api = (const struct audio_codec_api *)dev->api; in audio_codec_route_output()
375 if (api->route_output == NULL) { in audio_codec_route_output()
376 return -ENOSYS; in audio_codec_route_output()
379 return api->route_output(dev, channel, output); in audio_codec_route_output()