]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: Intel: Skylake: Add deep buffer support
authorRamesh Babu <ramesh.babu@intel.com>
Mon, 19 Jun 2017 06:29:19 +0000 (11:59 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 19 Jun 2017 15:33:00 +0000 (16:33 +0100)
With this patch, the dma buffer size is fetched from topology binary. This
buffer size is applicable for gateway copier modules.

Now that we can configure DSP dma buffer size, the device can support deep
buffer playback. DSP fetches large buffer and can result fewer wakes,
which helps in power reduction.

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/uapi/sound/snd_sst_tokens.h
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.h

index 89b82f6256ad0a76d8a7d36daae24a9a5df4a434..dedb2056160d03a76ca2b1238652ad3afa64926e 100644 (file)
  *
  * %SKL_TKL_U32_D0I3_CAPS:     Specifies the D0i3 capability for module
  *
+ * %SKL_TKN_U32_DMA_BUF_SIZE:  DMA buffer size in millisec
+ *
  * module_id and loadable flags dont have tokens as these values will be
  * read from the DSP FW manifest
  */
@@ -215,7 +217,8 @@ enum SKL_TKNS {
        SKL_TKN_U32_PMODE,
        SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */
        SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS,
-       SKL_TKN_MAX = SKL_TKN_U32_D0I3_CAPS,
+       SKL_TKN_U32_DMA_BUF_SIZE,
+       SKL_TKN_MAX = SKL_TKN_U32_DMA_BUF_SIZE,
 };
 
 #endif
index 212cee71d5869ac2a7829602f4496b423561ca80..9569f118e97eba0fd782a5d8e8f86676a07d3407 100644 (file)
@@ -2212,6 +2212,10 @@ static int skl_tplg_get_token(struct device *dev,
 
                break;
 
+       case SKL_TKN_U32_DMA_BUF_SIZE:
+               mconfig->dma_buffer_size = tkn_elem->value;
+               break;
+
        case SKL_TKN_U8_IN_PIN_TYPE:
        case SKL_TKN_U8_OUT_PIN_TYPE:
        case SKL_TKN_U8_CONN_TYPE:
index 3f51a0a00093c73a8ba63f369e4d30aa58980995..c25e8868b84e670cb765f815d2b69f409c245c22 100644 (file)
@@ -321,6 +321,7 @@ struct skl_module_cfg {
        u32 vbus_id;
        u32 mem_pages;
        enum d0i3_capability d0i3_caps;
+       u32 dma_buffer_size; /* in milli seconds */
        struct skl_module_pin *m_in_pin;
        struct skl_module_pin *m_out_pin;
        enum skl_module_type m_type;