Lines Matching refs:dir
113 enum dai_dir dir) in sai_config_get() argument
124 *sai_get_properties(const struct device *dev, enum dai_dir dir, int stream_id) in sai_get_properties() argument
128 switch (dir) { in sai_get_properties()
134 LOG_ERR("invalid direction: %d", dir); in sai_get_properties()
460 static bool sai_dir_disable(struct sai_data *data, enum dai_dir dir) in sai_dir_disable() argument
468 sai_tx_rx_force_disable(dir, data->regmap); in sai_dir_disable()
479 return WAIT_FOR(!SAI_TX_RX_IS_HW_ENABLED(dir, data->regmap), in sai_dir_disable()
484 const struct sai_config *cfg, enum dai_dir dir) in sai_tx_rx_disable() argument
499 ret = sai_dir_disable(data, dir); in sai_tx_rx_disable()
501 LOG_ERR("timed out while waiting for dir %d disable", dir); in sai_tx_rx_disable()
508 if (dir == sync_dir) { in sai_tx_rx_disable()
540 enum dai_dir dir) in sai_trigger_pause() argument
549 if (dir != DAI_DIR_RX && dir != DAI_DIR_TX) { in sai_trigger_pause()
550 LOG_ERR("invalid direction: %d", dir); in sai_trigger_pause()
555 ret = sai_update_state(dir, data, DAI_STATE_PAUSED); in sai_trigger_pause()
558 sai_get_state(dir, data), ret); in sai_trigger_pause()
562 LOG_DBG("pause on direction %d", dir); in sai_trigger_pause()
564 ret = sai_tx_rx_disable(data, cfg, dir); in sai_trigger_pause()
570 sai_tx_rx_set_dline_mask(dir, data->regmap, 0x0); in sai_trigger_pause()
573 sai_tx_rx_sw_enable_disable(dir, data, false); in sai_trigger_pause()
579 enum dai_dir dir) in sai_trigger_stop() argument
588 old_state = sai_get_state(dir, data); in sai_trigger_stop()
590 if (dir != DAI_DIR_RX && dir != DAI_DIR_TX) { in sai_trigger_stop()
591 LOG_ERR("invalid direction: %d", dir); in sai_trigger_stop()
596 ret = sai_update_state(dir, data, DAI_STATE_STOPPING); in sai_trigger_stop()
599 sai_get_state(dir, data), ret); in sai_trigger_stop()
603 LOG_DBG("stop on direction %d", dir); in sai_trigger_stop()
613 ret = sai_tx_rx_disable(data, cfg, dir); in sai_trigger_stop()
619 sai_tx_rx_sw_enable_disable(dir, data, false); in sai_trigger_stop()
622 sai_tx_rx_set_dline_mask(dir, data->regmap, 0x0); in sai_trigger_stop()
626 SAI_TX_RX_DMA_ENABLE_DISABLE(dir, data->regmap, false); in sai_trigger_stop()
629 SAI_TX_RX_ENABLE_DISABLE_IRQ(dir, data->regmap, in sai_trigger_stop()
670 const struct sai_config *cfg, enum dai_dir dir) in sai_tx_rx_sw_reset() argument
679 SAI_TX_RX_SW_RESET(dir, data->regmap); in sai_tx_rx_sw_reset()
684 if (dir == sync_dir) { in sai_tx_rx_sw_reset()
699 enum dai_dir dir) in sai_trigger_start() argument
708 old_state = sai_get_state(dir, data); in sai_trigger_start()
711 if (dir != DAI_DIR_RX && dir != DAI_DIR_TX) { in sai_trigger_start()
712 LOG_ERR("invalid direction: %d", dir); in sai_trigger_start()
717 ret = sai_update_state(dir, data, DAI_STATE_RUNNING); in sai_trigger_start()
720 sai_get_state(dir, data), ret); in sai_trigger_start()
733 LOG_DBG("start on direction %d", dir); in sai_trigger_start()
741 sai_tx_rx_sw_reset(data, cfg, dir); in sai_trigger_start()
746 SAI_TX_RX_ENABLE_DISABLE_IRQ(dir, data->regmap, in sai_trigger_start()
750 if (dir == DAI_DIR_TX) { in sai_trigger_start()
757 SAI_TX_RX_DMA_ENABLE_DISABLE(dir, data->regmap, true); in sai_trigger_start()
765 sai_tx_rx_set_dline_mask(dir, data->regmap, in sai_trigger_start()
766 SAI_TX_RX_DLINE_MASK(dir, cfg)); in sai_trigger_start()
769 SAI_TX_RX_ENABLE_DISABLE(dir, data->regmap, true); in sai_trigger_start()
772 sai_tx_rx_sw_enable_disable(dir, data, true); in sai_trigger_start()
778 enum dai_dir dir, in sai_trigger() argument
783 return sai_trigger_start(dev, dir); in sai_trigger()
785 return sai_trigger_pause(dev, dir); in sai_trigger()
787 return sai_trigger_stop(dev, dir); in sai_trigger()