Merge branch 'topic/drm_audio_component' of https://git.kernel.org/pub/scm/linux...
authorMark Brown <broonie@kernel.org>
Wed, 1 Aug 2018 09:32:05 +0000 (10:32 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 1 Aug 2018 09:32:05 +0000 (10:32 +0100)
1  2 
sound/soc/codecs/hdac_hdmi.c
sound/soc/intel/skylake/skl-pcm.c
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.h
sound/soc/intel/skylake/skl.c

index 30ccc902e5cfd15bb95e05b1bf1256b3b710c648,4748a9d5de3bd4d127922830cca4e01a826968a5..7b8533abf637319e56de6f68a37e88912d7a0c2f
@@@ -2103,81 -2093,10 +2093,79 @@@ static int hdac_hdmi_dev_remove(struct 
  }
  
  #ifdef CONFIG_PM
 +/*
 + * Power management sequences
 + * ==========================
 + *
 + * The following explains the PM handling of HDAC HDMI with its parent
 + * device SKL and display power usage
 + *
 + * Probe
 + * -----
 + * In SKL probe,
 + * 1. skl_probe_work() powers up the display (refcount++ -> 1)
 + * 2. enumerates the codecs on the link
 + * 3. powers down the display  (refcount-- -> 0)
 + *
 + * In HDAC HDMI probe,
 + * 1. hdac_hdmi_dev_probe() powers up the display (refcount++ -> 1)
 + * 2. probe the codec
 + * 3. put the HDAC HDMI device to runtime suspend
 + * 4. hdac_hdmi_runtime_suspend() powers down the display (refcount-- -> 0)
 + *
 + * Once children are runtime suspended, SKL device also goes to runtime
 + * suspend
 + *
 + * HDMI Playback
 + * -------------
 + * Open HDMI device,
 + * 1. skl_runtime_resume() invoked
 + * 2. hdac_hdmi_runtime_resume() powers up the display (refcount++ -> 1)
 + *
 + * Close HDMI device,
 + * 1. hdac_hdmi_runtime_suspend() powers down the display (refcount-- -> 0)
 + * 2. skl_runtime_suspend() invoked
 + *
 + * S0/S3 Cycle with playback in progress
 + * -------------------------------------
 + * When the device is opened for playback, the device is runtime active
 + * already and the display refcount is 1 as explained above.
 + *
 + * Entering to S3,
 + * 1. hdmi_codec_prepare() invoke the runtime resume of codec which just
 + *    increments the PM runtime usage count of the codec since the device
 + *    is in use already
 + * 2. skl_suspend() powers down the display (refcount-- -> 0)
 + *
 + * Wakeup from S3,
 + * 1. skl_resume() powers up the display (refcount++ -> 1)
 + * 2. hdmi_codec_complete() invokes the runtime suspend of codec which just
 + *    decrements the PM runtime usage count of the codec since the device
 + *    is in use already
 + *
 + * Once playback is stopped, the display refcount is set to 0 as explained
 + * above in the HDMI playback sequence. The PM handlings are designed in
 + * such way that to balance the refcount of display power when the codec
 + * device put to S3 while playback is going on.
 + *
 + * S0/S3 Cycle without playback in progress
 + * ----------------------------------------
 + * Entering to S3,
 + * 1. hdmi_codec_prepare() invoke the runtime resume of codec
 + * 2. skl_runtime_resume() invoked
 + * 3. hdac_hdmi_runtime_resume() powers up the display (refcount++ -> 1)
 + * 4. skl_suspend() powers down the display (refcount-- -> 0)
 + *
 + * Wakeup from S3,
 + * 1. skl_resume() powers up the display (refcount++ -> 1)
 + * 2. hdmi_codec_complete() invokes the runtime suspend of codec
 + * 3. hdac_hdmi_runtime_suspend() powers down the display (refcount-- -> 0)
 + * 4. skl_runtime_suspend() invoked
 + */
  static int hdac_hdmi_runtime_suspend(struct device *dev)
  {
-       struct hdac_ext_device *edev = to_hda_ext_device(dev);
-       struct hdac_device *hdev = &edev->hdev;
+       struct hdac_device *hdev = dev_to_hdac_dev(dev);
        struct hdac_bus *bus = hdev->bus;
-       struct hdac_ext_bus *ebus = hbus_to_ebus(bus);
        struct hdac_ext_link *hlink = NULL;
        int err;
  
Simple merge
index 9845d853644c2bf9124e2609ddf77fcf2ca3f806,abfdb67c05cc3e47a7adc423fc9ce75219666032..2620d77729c52edf06dd4d347825b9872b9070da
@@@ -3623,12 -3617,11 +3621,11 @@@ static int skl_tplg_get_manifest_data(s
        return 0;
  }
  
 -static int skl_manifest_load(struct snd_soc_component *cmpnt,
 +static int skl_manifest_load(struct snd_soc_component *cmpnt, int index,
                                struct snd_soc_tplg_manifest *manifest)
  {
-       struct hdac_ext_bus *ebus = snd_soc_component_get_drvdata(cmpnt);
-       struct hdac_bus *bus = ebus_to_hbus(ebus);
-       struct skl *skl = ebus_to_skl(ebus);
+       struct hdac_bus *bus = snd_soc_component_get_drvdata(cmpnt);
+       struct skl *skl = bus_to_skl(bus);
  
        /* proceed only if we have private data defined */
        if (manifest->priv.size == 0)
index 670ff9aaca55de69b35579a56c41f4ce11e56a73,00e051467a40e6b7c1baee84aa73194d48839419..dce64948564940ea7383e0f4975de4b4ec7293ec
@@@ -929,8 -915,10 +916,8 @@@ static int skl_probe(struct pci_dev *pc
  
        skl_nhlt_update_topology_bin(skl);
  
-       pci_set_drvdata(skl->pci, ebus);
+       pci_set_drvdata(skl->pci, bus);
  
 -      skl_dmic_data.dmic_num = skl_get_dmic_geo(skl);
 -
        /* check if dsp is there */
        if (bus->ppcap) {
                /* create device for dsp clk */