summaryrefslogtreecommitdiff
path: root/drivers/soundwire/intel.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-07-13 18:52:55 +0300
committerMark Brown <broonie@kernel.org>2022-07-13 18:52:55 +0300
commit09cf6054c859d408cc60024808bfda931bf8ca0e (patch)
tree8876b9e24967bac5b43fe49bfe43d366bb87ed8a /drivers/soundwire/intel.c
parenta8d5df69e2ec702d979f7d04ed519caf8691a032 (diff)
parent2a1be12c4d77d4f7b122568383382e006a60381b (diff)
downloadlinux-09cf6054c859d408cc60024808bfda931bf8ca0e.tar.xz
ASoC/SoundWire: Intel: add sdw BE dai trigger
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: For SOF IPC4, we need to set pipeline state in BE DAI trigger.
Diffstat (limited to 'drivers/soundwire/intel.c')
-rw-r--r--drivers/soundwire/intel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 0268fa527c0c..fed6418d6375 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -1004,9 +1004,18 @@ static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct sn
{
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
struct sdw_intel *sdw = cdns_to_intel(cdns);
+ struct sdw_intel_link_res *res = sdw->link_res;
struct sdw_cdns_dma_data *dma;
int ret = 0;
+ /*
+ * The .trigger callback is used to send required IPC to audio
+ * firmware. The .free_stream callback will still be called
+ * by intel_free_stream() in the TRIGGER_SUSPEND case.
+ */
+ if (res->ops && res->ops->trigger)
+ res->ops->trigger(dai, cmd, substream->stream);
+
dma = snd_soc_dai_get_dma_data(dai, substream);
if (!dma) {
dev_err(dai->dev, "failed to get dma data in %s\n",