summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2015-11-23 22:26:25 +0530
committerMark Brown <broonie@kernel.org>2015-11-25 17:55:41 +0000
commit98256f83d2895fda3e596824797762937ab79f6b (patch)
treefe4020f85e2ab3eef51148f3223a0b1e7f9a4927 /sound
parent7e3a17d311ca89a74cfd39e02e96d29d92849d34 (diff)
downloadop-kernel-dev-98256f83d2895fda3e596824797762937ab79f6b.zip
op-kernel-dev-98256f83d2895fda3e596824797762937ab79f6b.tar.gz
ASoC: Intel: Skylake: Fix to update bit depth for module params
Module hw param fixup will change the valid bit depth based on the fixup flag. If valid bit depth changes, need to set the bit depth according to valid bit depth. This patch fixes this issue of updating bit depth correctly. 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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/skylake/skl-topology.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 0937ea2..698c4aa 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -147,8 +147,24 @@ static void skl_tplg_update_params(struct skl_module_fmt *fmt,
fmt->s_freq = params->s_freq;
if (fixup & SKL_CH_FIXUP_MASK)
fmt->channels = params->ch;
- if (fixup & SKL_FMT_FIXUP_MASK)
- fmt->valid_bit_depth = params->s_fmt;
+ if (fixup & SKL_FMT_FIXUP_MASK) {
+ fmt->valid_bit_depth = skl_get_bit_depth(params->s_fmt);
+
+ /*
+ * 16 bit is 16 bit container whereas 24 bit is in 32 bit
+ * container so update bit depth accordingly
+ */
+ switch (fmt->valid_bit_depth) {
+ case SKL_DEPTH_16BIT:
+ fmt->bit_depth = fmt->valid_bit_depth;
+ break;
+
+ default:
+ fmt->bit_depth = SKL_DEPTH_32BIT;
+ break;
+ }
+ }
+
}
/*
OpenPOWER on IntegriCloud