aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c13
-rw-r--r--sound/soc/intel/skylake/skl-sst-ipc.c15
2 files changed, 28 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index b89ae6f7c096..8039a0479053 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -25,6 +25,8 @@
25#include <sound/soc.h> 25#include <sound/soc.h>
26#include "skl.h" 26#include "skl.h"
27#include "skl-topology.h" 27#include "skl-topology.h"
28#include "skl-sst-dsp.h"
29#include "skl-sst-ipc.h"
28 30
29#define HDA_MONO 1 31#define HDA_MONO 1
30#define HDA_STEREO 2 32#define HDA_STEREO 2
@@ -272,6 +274,7 @@ static void skl_pcm_close(struct snd_pcm_substream *substream,
272 struct hdac_ext_stream *stream = get_hdac_ext_stream(substream); 274 struct hdac_ext_stream *stream = get_hdac_ext_stream(substream);
273 struct hdac_ext_bus *ebus = dev_get_drvdata(dai->dev); 275 struct hdac_ext_bus *ebus = dev_get_drvdata(dai->dev);
274 struct skl_dma_params *dma_params = NULL; 276 struct skl_dma_params *dma_params = NULL;
277 struct skl *skl = ebus_to_skl(ebus);
275 278
276 dev_dbg(dai->dev, "%s: %s\n", __func__, dai->name); 279 dev_dbg(dai->dev, "%s: %s\n", __func__, dai->name);
277 280
@@ -285,6 +288,16 @@ static void skl_pcm_close(struct snd_pcm_substream *substream,
285 snd_soc_dai_set_dma_data(dai, substream, NULL); 288 snd_soc_dai_set_dma_data(dai, substream, NULL);
286 skl_set_suspend_active(substream, dai, false); 289 skl_set_suspend_active(substream, dai, false);
287 290
291 /*
292 * check if close is for "Reference Pin" and set back the
293 * CGCTL.MISCBDCGE if disabled by driver
294 */
295 if (!strncmp(dai->name, "Reference Pin", 13) &&
296 skl->skl_sst->miscbdcg_disabled) {
297 skl->skl_sst->enable_miscbdcge(dai->dev, true);
298 skl->skl_sst->miscbdcg_disabled = false;
299 }
300
288 kfree(dma_params); 301 kfree(dma_params);
289} 302}
290 303
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c
index 62e665a3b8f7..543460293b00 100644
--- a/sound/soc/intel/skylake/skl-sst-ipc.c
+++ b/sound/soc/intel/skylake/skl-sst-ipc.c
@@ -16,8 +16,10 @@
16 16
17#include "../common/sst-dsp.h" 17#include "../common/sst-dsp.h"
18#include "../common/sst-dsp-priv.h" 18#include "../common/sst-dsp-priv.h"
19#include "skl.h"
19#include "skl-sst-dsp.h" 20#include "skl-sst-dsp.h"
20#include "skl-sst-ipc.h" 21#include "skl-sst-ipc.h"
22#include "sound/hdaudio_ext.h"
21 23
22 24
23#define IPC_IXC_STATUS_BITS 24 25#define IPC_IXC_STATUS_BITS 24
@@ -322,6 +324,19 @@ static int skl_ipc_process_notification(struct sst_generic_ipc *ipc,
322 wake_up(&skl->boot_wait); 324 wake_up(&skl->boot_wait);
323 break; 325 break;
324 326
327 case IPC_GLB_NOTIFY_PHRASE_DETECTED:
328 dev_dbg(ipc->dev, "***** Phrase Detected **********\n");
329
330 /*
331 * Per HW recomendation, After phrase detection,
332 * clear the CGCTL.MISCBDCGE.
333 *
334 * This will be set back on stream closure
335 */
336 skl->enable_miscbdcge(ipc->dev, false);
337 skl->miscbdcg_disabled = true;
338 break;
339
325 default: 340 default:
326 dev_err(ipc->dev, "ipc: Unhandled error msg=%x", 341 dev_err(ipc->dev, "ipc: Unhandled error msg=%x",
327 header.primary); 342 header.primary);