]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: SOF: Intel: hda: add parameter to control SoundWire clock stop quirks
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 25 Mar 2020 21:50:24 +0000 (16:50 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 27 Mar 2020 15:16:34 +0000 (15:16 +0000)
Add module parameter so that the different modes can be quickly tested.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200325215027.28716-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c

index ee4f1ceca883967309164c52503900b39deb63d0..1e69cfcee8e0aaa58d15f0d7c12eba444669690c 100644 (file)
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE)
 
+/*
+ * The default for SoundWire clock stop quirks is to power gate the IP
+ * and do a Bus Reset, this will need to be modified when the DSP
+ * needs to remain in D0i3 so that the Master does not lose context
+ * and enumeration is not required on clock restart
+ */
+static int sdw_clock_stop_quirks = SDW_INTEL_CLK_STOP_BUS_RESET;
+module_param(sdw_clock_stop_quirks, int, 0444);
+MODULE_PARM_DESC(sdw_clock_stop_quirks, "SOF SoundWire clock stop quirks");
+
 static int sdw_params_stream(struct device *dev,
                             struct sdw_intel_stream_params_data *params_data)
 {
@@ -149,6 +159,7 @@ static int hda_sdw_probe(struct snd_sof_dev *sdev)
        res.parent = sdev->dev;
        res.ops = &sdw_callback;
        res.dev = sdev->dev;
+       res.clock_stop_quirks = sdw_clock_stop_quirks;
 
        /*
         * ops and arg fields are not populated for now,