summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/hdac_hda.h
diff options
context:
space:
mode:
authorRander Wang <rander.wang@linux.intel.com>2019-03-08 09:38:58 +0100
committerMark Brown <broonie@kernel.org>2019-03-11 17:58:40 +0100
commit03d0aa4d4fddce4a5d865d819a4d98bfc3d451e6 (patch)
tree595af41c458161133be9be09c958909564349aae /sound/soc/codecs/hdac_hda.h
parentASoC:soc-pcm:fix a codec fixup issue in TDM case (diff)
downloadlinux-03d0aa4d4fddce4a5d865d819a4d98bfc3d451e6.tar.xz
linux-03d0aa4d4fddce4a5d865d819a4d98bfc3d451e6.zip
ASoC:hdac_hda:use correct format to setup hda codec
The current implementation of the hdac_hda codec results in zero-valued samples on capture and noise with headset playback when SOF is used on platforms with an on-board HDaudio codec. This is root-caused to SOF using be_hw_params_fixup, and the prepare() call using invalid runtime fields to determine the format. This patch moves the format handling to the hw_params() callback, as done already for hdac_hdmi, to make sure the fixed-up information is taken into account but keeps the codec initialization in prepare() as the stream_tag is only available at that time. Moving everything in the prepare() callback is possible but the code is less elegant so this two-step solution was chosen. The solution was tested with the SST driver with no regressions, and all the issues with SOF playback and capture are solved. Signed-off-by: Rander Wang <rander.wang@linux.intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/hdac_hda.h')
-rw-r--r--sound/soc/codecs/hdac_hda.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/hdac_hda.h b/sound/soc/codecs/hdac_hda.h
index e444ef593360..6b1bd4f428e7 100644
--- a/sound/soc/codecs/hdac_hda.h
+++ b/sound/soc/codecs/hdac_hda.h
@@ -8,6 +8,7 @@
struct hdac_hda_pcm {
int stream_tag[2];
+ unsigned int format_val[2];
};
struct hdac_hda_priv {