ASoC: Intel: Skylake: correct direction in blob query
authorJeeja KP <jeeja.kp@intel.com>
Tue, 1 Mar 2016 02:29:10 +0000 (07:59 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 2 Mar 2016 03:54:23 +0000 (12:54 +0900)
The blob query for BE skl_tplg_update_be_blob() was not using
right values for direction for blob query, so fix that.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c

index c95bbce8ad5d3dda1ce28cc48c80e80ba129c11b..af7722ab720776a194ed403bc9a851dc2f5cef29 100644 (file)
@@ -273,10 +273,11 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,
        if (m_cfg->formats_config.caps_size > 0)
                return 0;
 
+       dev_dbg(ctx->dev, "Applying default cfg blob\n");
        switch (m_cfg->dev_type) {
        case SKL_DEVICE_DMIC:
                link_type = NHLT_LINK_DMIC;
-               dir = 1;
+               dir = SNDRV_PCM_STREAM_CAPTURE;
                s_freq = m_cfg->in_fmt[0].s_freq;
                s_fmt = m_cfg->in_fmt[0].bit_depth;
                ch = m_cfg->in_fmt[0].channels;
@@ -285,15 +286,15 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,
        case SKL_DEVICE_I2S:
                link_type = NHLT_LINK_SSP;
                if (m_cfg->hw_conn_type == SKL_CONN_SOURCE) {
-                       dir = 1;
-                       s_freq = m_cfg->in_fmt[0].s_freq;
-                       s_fmt = m_cfg->in_fmt[0].bit_depth;
-                       ch = m_cfg->in_fmt[0].channels;
-               } else {
-                       dir = 0;
+                       dir = SNDRV_PCM_STREAM_PLAYBACK;
                        s_freq = m_cfg->out_fmt[0].s_freq;
                        s_fmt = m_cfg->out_fmt[0].bit_depth;
                        ch = m_cfg->out_fmt[0].channels;
+               } else {
+                       dir = SNDRV_PCM_STREAM_CAPTURE;
+                       s_freq = m_cfg->in_fmt[0].s_freq;
+                       s_fmt = m_cfg->in_fmt[0].bit_depth;
+                       ch = m_cfg->in_fmt[0].channels;
                }
                break;