Lines Matching refs:dir

117 			  enum dai_dir dir)  in sai_config_get()  argument
128 *sai_get_properties(const struct device *dev, enum dai_dir dir, int stream_id) in sai_get_properties() argument
132 switch (dir) { in sai_get_properties()
138 LOG_ERR("invalid direction: %d", dir); in sai_get_properties()
457 static bool sai_dir_disable(struct sai_data *data, enum dai_dir dir) in sai_dir_disable() argument
465 sai_tx_rx_force_disable(dir, data->regmap); in sai_dir_disable()
476 return WAIT_FOR(!SAI_TX_RX_IS_HW_ENABLED(dir, data->regmap), in sai_dir_disable()
481 const struct sai_config *cfg, enum dai_dir dir) in sai_tx_rx_disable() argument
496 ret = sai_dir_disable(data, dir); in sai_tx_rx_disable()
498 LOG_ERR("timed out while waiting for dir %d disable", dir); in sai_tx_rx_disable()
505 if (dir == sync_dir) { in sai_tx_rx_disable()
537 enum dai_dir dir) in sai_trigger_pause() argument
546 if (dir != DAI_DIR_RX && dir != DAI_DIR_TX) { in sai_trigger_pause()
547 LOG_ERR("invalid direction: %d", dir); in sai_trigger_pause()
552 ret = sai_update_state(dir, data, DAI_STATE_PAUSED); in sai_trigger_pause()
555 sai_get_state(dir, data), ret); in sai_trigger_pause()
559 LOG_DBG("pause on direction %d", dir); in sai_trigger_pause()
561 ret = sai_tx_rx_disable(data, cfg, dir); in sai_trigger_pause()
567 sai_tx_rx_set_dline_mask(dir, data->regmap, 0x0); in sai_trigger_pause()
570 sai_tx_rx_sw_enable_disable(dir, data, false); in sai_trigger_pause()
576 enum dai_dir dir) in sai_trigger_stop() argument
585 old_state = sai_get_state(dir, data); in sai_trigger_stop()
587 if (dir != DAI_DIR_RX && dir != DAI_DIR_TX) { in sai_trigger_stop()
588 LOG_ERR("invalid direction: %d", dir); in sai_trigger_stop()
593 ret = sai_update_state(dir, data, DAI_STATE_STOPPING); in sai_trigger_stop()
596 sai_get_state(dir, data), ret); in sai_trigger_stop()
600 LOG_DBG("stop on direction %d", dir); in sai_trigger_stop()
610 ret = sai_tx_rx_disable(data, cfg, dir); in sai_trigger_stop()
616 sai_tx_rx_sw_enable_disable(dir, data, false); in sai_trigger_stop()
619 sai_tx_rx_set_dline_mask(dir, data->regmap, 0x0); in sai_trigger_stop()
623 SAI_TX_RX_DMA_ENABLE_DISABLE(dir, data->regmap, false); in sai_trigger_stop()
626 SAI_TX_RX_ENABLE_DISABLE_IRQ(dir, data->regmap, in sai_trigger_stop()
665 const struct sai_config *cfg, enum dai_dir dir) in sai_tx_rx_sw_reset() argument
674 SAI_TX_RX_SW_RESET(dir, data->regmap); in sai_tx_rx_sw_reset()
679 if (dir == sync_dir) { in sai_tx_rx_sw_reset()
694 enum dai_dir dir) in sai_trigger_start() argument
703 old_state = sai_get_state(dir, data); in sai_trigger_start()
706 if (dir != DAI_DIR_RX && dir != DAI_DIR_TX) { in sai_trigger_start()
707 LOG_ERR("invalid direction: %d", dir); in sai_trigger_start()
712 ret = sai_update_state(dir, data, DAI_STATE_RUNNING); in sai_trigger_start()
715 sai_get_state(dir, data), ret); in sai_trigger_start()
728 LOG_DBG("start on direction %d", dir); in sai_trigger_start()
730 sai_tx_rx_sw_reset(data, cfg, dir); in sai_trigger_start()
733 SAI_TX_RX_ENABLE_DISABLE_IRQ(dir, data->regmap, in sai_trigger_start()
737 if (dir == DAI_DIR_TX) { in sai_trigger_start()
744 SAI_TX_RX_DMA_ENABLE_DISABLE(dir, data->regmap, true); in sai_trigger_start()
752 sai_tx_rx_set_dline_mask(dir, data->regmap, in sai_trigger_start()
753 SAI_TX_RX_DLINE_MASK(dir, cfg)); in sai_trigger_start()
756 SAI_TX_RX_ENABLE_DISABLE(dir, data->regmap, true); in sai_trigger_start()
759 sai_tx_rx_sw_enable_disable(dir, data, true); in sai_trigger_start()
765 enum dai_dir dir, in sai_trigger() argument
770 return sai_trigger_start(dev, dir); in sai_trigger()
772 return sai_trigger_pause(dev, dir); in sai_trigger()
774 return sai_trigger_stop(dev, dir); in sai_trigger()