mirror of https://github.com/thesofproject/sof.git
audio: DAI: Add a delayed_dma_stop flag to DAI data
Add a new field, delayed_dma_stop to struct dai_data that will be set by the host when the DAI_CONFIG IPC is sent during hw_params. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
f6c4853271
commit
6b420fd538
|
@ -73,6 +73,9 @@
|
||||||
*/
|
*/
|
||||||
#define SOF_DAI_CONFIG_FLAGS_2_STEP_STOP BIT(0)
|
#define SOF_DAI_CONFIG_FLAGS_2_STEP_STOP BIT(0)
|
||||||
|
|
||||||
|
#define SOF_DAI_QUIRK_IS_SET(flags, quirk) \
|
||||||
|
(((flags & SOF_DAI_CONFIG_FLAGS_QUIRK_MASK) >> SOF_DAI_CONFIG_FLAGS_QUIRK_SHIFT) & quirk)
|
||||||
|
|
||||||
/** \brief Types of DAI */
|
/** \brief Types of DAI */
|
||||||
enum sof_ipc_dai_type {
|
enum sof_ipc_dai_type {
|
||||||
SOF_DAI_INTEL_NONE = 0, /**< None */
|
SOF_DAI_INTEL_NONE = 0, /**< None */
|
||||||
|
|
|
@ -179,6 +179,15 @@ struct dai_data {
|
||||||
void *dai_spec_config; /* dai specific config from the host */
|
void *dai_spec_config; /* dai specific config from the host */
|
||||||
|
|
||||||
uint64_t wallclock; /* wall clock at stream start */
|
uint64_t wallclock; /* wall clock at stream start */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* flag indicating two-step stop/pause for DAI comp and DAI DMA.
|
||||||
|
* DAI stop occurs during STREAM_TRIG_STOP IPC and DMA stop during DAI_CONFIG IPC with
|
||||||
|
* the SOF_DAI_CONFIG_FLAGS_HW_FREE flag.
|
||||||
|
* DAI pause occurs during STREAM_TRIG_PAUSE IPC and DMA pause during DAI_CONFIG IPC with
|
||||||
|
* the SOF_DAI_CONFIG_FLAGS_PAUSE flag.
|
||||||
|
*/
|
||||||
|
bool delayed_dma_stop;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dai {
|
struct dai {
|
||||||
|
|
|
@ -288,6 +288,16 @@ int dai_config(struct comp_dev *dev, struct ipc_config_dai *common_config,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (config->flags & SOF_DAI_CONFIG_FLAGS_CMD_MASK) {
|
||||||
|
case SOF_DAI_CONFIG_FLAGS_HW_PARAMS:
|
||||||
|
/* set the delayed_dma_stop flag */
|
||||||
|
if (SOF_DAI_QUIRK_IS_SET(config->flags, SOF_DAI_CONFIG_FLAGS_2_STEP_STOP))
|
||||||
|
dd->delayed_dma_stop = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (dd->chan) {
|
if (dd->chan) {
|
||||||
comp_info(dev, "dai_config(): Configured. dma channel index %d, ignore...",
|
comp_info(dev, "dai_config(): Configured. dma channel index %d, ignore...",
|
||||||
dd->chan->index);
|
dd->chan->index);
|
||||||
|
|
Loading…
Reference in New Issue