Lines Matching +full:configuration +full:- +full:dir
4 * SPDX-License-Identifier: Apache-2.0
38 /** Used to extract the clock configuration from the format attribute of struct dai_config */
48 * clock-related configurations w.r.t the DAI
99 * different configuration data to cater for different use cases. We
100 * usually need to pass extra bespoke configuration prior to DAI start.
164 /** @brief Optional - Pre Start the transmission / reception of data.
188 /** @brief Optional - Post Stop the transmission / reception of data.
250 * Generic DAI interface configuration options.
263 /** DAI specific configuration options. */
269 /** DAI specific link configuration. */
276 * @brief DAI timestamp configuration
318 enum dai_dir dir);
321 enum dai_dir dir,
324 int (*trigger)(const struct device *dev, enum dai_dir dir,
354 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_probe()
356 return api->probe(dev); in dai_probe()
371 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_remove()
373 return api->remove(dev); in dai_remove()
379 * The dir parameter specifies if Transmit (TX) or Receive (RX) direction
385 * If the function is called with the parameter cfg->frame_clk_freq set to 0
389 * @param cfg Pointer to the structure containing configuration parameters.
393 * @retval -EINVAL Invalid argument.
394 * @retval -ENOSYS DAI_DIR_BOTH value is not supported.
400 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_config_set()
402 return api->config_set(dev, cfg, bespoke_cfg); in dai_config_set()
406 * @brief Fetch configuration information of a DAI driver
410 * @param dir Stream direction: RX or TX as defined by DAI_DIR_*
411 * @retval 0 if success, negative if invalid parameters or DAI un-configured
415 enum dai_dir dir) in dai_config_get() argument
417 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_config_get()
419 return api->config_get(dev, cfg, dir); in dai_config_get()
426 * @param dir Stream direction: RX or TX as defined by DAI_DIR_*
433 enum dai_dir dir, in dai_get_properties() argument
436 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_get_properties()
438 return api->get_properties(dev, dir, stream_id); in dai_get_properties()
445 * @param dir Stream direction: RX, TX, or both, as defined by DAI_DIR_*.
452 * @retval -EINVAL Invalid argument.
453 * @retval -EIO The trigger cannot be executed in the current state or a DMA
455 * @retval -ENOMEM RX/TX memory block not available.
456 * @retval -ENOSYS DAI_DIR_BOTH value is not supported.
459 enum dai_dir dir, in dai_trigger() argument
462 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_trigger()
464 return api->trigger(dev, dir, cmd); in dai_trigger()
478 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_ts_config()
480 if (!api->ts_config) { in dai_ts_config()
481 return -EINVAL; in dai_ts_config()
484 return api->ts_config(dev, cfg); in dai_ts_config()
498 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_ts_start()
500 if (!api->ts_start) { in dai_ts_start()
501 return -EINVAL; in dai_ts_start()
504 return api->ts_start(dev, cfg); in dai_ts_start()
518 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_ts_stop()
520 if (!api->ts_stop) { in dai_ts_stop()
521 return -EINVAL; in dai_ts_stop()
524 return api->ts_stop(dev, cfg); in dai_ts_stop()
540 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_ts_get()
542 if (!api->ts_get) { in dai_ts_get()
543 return -EINVAL; in dai_ts_get()
546 return api->ts_get(dev, cfg, tsd); in dai_ts_get()
550 * @brief Update DAI configuration at runtime.
552 * This function updates the configuration of a DAI interface at runtime.
553 * It allows setting bespoke configuration parameters that are specific to
555 * the full configuration blob. The details of the bespoke configuration are
557 * when the DAI is in the READY state, ensuring that the configuration updates
561 * @param bespoke_cfg Pointer to the buffer containing bespoke configuration parameters.
565 * @retval -ENOSYS If the configuration update operation is not implemented.
572 const struct dai_driver_api *api = (const struct dai_driver_api *)dev->api; in dai_config_update()
574 if (!api->config_update) { in dai_config_update()
575 return -ENOSYS; in dai_config_update()
578 return api->config_update(dev, bespoke_cfg, size); in dai_config_update()