- 11 Feb, 2020 40 commits
-
-
Kuninori Morimoto authored
commit 3635bf09 ("ASoC: soc-pcm: add symmetry for channels and sample bits") set 0 not only to dai->rate but also to dai->channels and dai->sample_bits if DAI was not active at soc_pcm_close(). and commit d3383420 ("ASoC: soc-pcm: move DAIs parameters cleaning into hw_free()") moved it from soc_pcm_close() to soc_pcm_hw_free(). These happen at v3.14. But, maybe because of branch merge conflict or something similar happen then, soc_pcm_close() still has old settings (care only dai->rate, doesn't care dai->channels/sample_bits). This is 100% duplicated operation. This patch removes soc_pcm_close() side operation which supposed to already moved to soc_pcm_hw_free(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87a75rceyl.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
ALSA SoC has snd_soc_runtime_activate() / snd_soc_runtime_deactivate(). These increment or decrement DAI/Component activity, but the code difference is only +1 or -1. This patch adds common snd_soc_runtime_action() which can get +1 or -1 as parameter, and use it from snd_soc_runtime_activate/deactivate() to avoid duplicate implementation. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87blq7ceyq.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
Some DMA engines can have big FIFOs which adds to the latency. The DMAengine framework can report the FIFO utilization in bytes. Use this information for the delay reporting. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200210151402.29634-1-peter.ujfalusi@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
Trace DMA is disabled by default when the DSP is in D0I3. Add a debug option to keep trace DMA enabled when the DSP is in D0I3 during S0. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-10-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
This patch implements support for DSP D0i3 when the system is in S0. The basic idea is to schedule a delayed work after every successful IPC TX that checks if there are only D0I3-compatible streams active and if so transition the DSP to D0I3. With the introduction of DSP D0I3 in S0, we need to ensure that the DSP is in D0I0 before sending any new IPCs. The exception for this would be the compact IPCs that are used to set the DSP in D0I3/D0I0 states. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-9-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
Amend the DSP state transition diagram in preparation for introducing the feature to support opportunistic DSP D0I3 state when the system is in S0. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-8-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
Add a helper function to check if only D0i3-compatible streams are active. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-7-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
The DSP device substates such as D0I0/D0I3 are platform-specific. Therefore, the d0_substate field of struct snd_sof_dev is replaced with the dsp_power_state field which represents the current state of the DSP. This field holds both the device state and the platform-specific substate values. With the DSP device substates being platform-specific, the DSP power state transitions need to be performed in the platform-specific suspend/resume ops as well. In order to achieve this, the ops signature has to be modified to pass the target device state as an argument. The target substate will be determined by the platform-specific ops before performing the transition. For example, in the case of the system suspending to S0IX, the top-level SOF device suspend callback needs to only determine if the DSP will be entering D3 or remain in D0. The target substate in case the device needs to remain in D0 (D0I0 or D0I3) will be determined by the platform-specific suspend op. With the addition of the extended set of power states for the DSP, the set_power_state op for HDA platforms has to be extended to handle only the appropriate state transitions. So, the implementation for the Intel HDA platforms is also modified. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-6-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
Add a new enum sof_dsp_power_states for all the possible the DSP device states. The SOF driver currently handles only the D0 and D3 states and support for other states will be added later as needed. Also, add a helper to determine the target DSP power state based on the system suspend target. The snd_sof_dsp_d0i3_on_suspend() function is renamed to snd_sof_stream_suspend_ignored() to be more indicative of what it does and it used to determine the target DSP state during system suspend. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-5-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
Add the system_suspend_target field to struct snd_sof_dev to track the intended system suspend power target. This will be used as one of the criteria for determining the final DSP power state. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
Unify the suspend/resume routines for both the D0I3/D3 DSP targets in sof_suspend()/sof_resume(). Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
Setting the prepared flag to false marks the streams for the hw_params to be reset upon resuming. In the case of the D0i3-compatible streams that ignored suspend to keep the pipeline active in the DSP during suspend, this should not be done. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
1. Provides a callback (i.e. mtk_hdmi_audio_hook_plugged_cb) to hdmi-codec. When ASoC machine driver calls hdmi_codec_set_jack_detect(), the callback will be invoked to save plugged_cb and codec_dev parameters. +---------+ set_jack_ +------------+ plugged_cb +----------+ | machine | ----------> | hdmi-codec | ----------> | mtk-hdmi | +---------+ detect() +------------+ codec_dev +----------+ 2. When there is any jack status changes, mtk-hdmi will call the plugged_cb() to notify hdmi-codec. And then hdmi-codec will call snd_soc_jack_report(). +----------+ plugged_cb +------------+ | mtk-hdmi | ----------> | hdmi-codec | -> snd_soc_jack_report() +----------+ codec_dev +------------+ connector_status Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200206102509.2.I230fd59de28e73934a91cb01424e25b9e84727f4@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Exits earlier if register_audio_driver() returns errors. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Acked-by: CK Hu <ck.hu@mediatek.com> Link: https://lore.kernel.org/r/20200206102509.1.Ieba8d422486264eb7aaa3aa257620a1b0c74c6db@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Colin Ian King authored
The assignment to ret is redundant as it is not used in the error return path and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200210092423.327499-1-colin.king@canonical.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
YueHaibing authored
sound/soc/codecs/wcd934x.c: In function wcd934x_codec_hphdelay_lutbypass: sound/soc/codecs/wcd934x.c:3395:6: warning: variable hph_comp_ctrl7 set but not used [-Wunused-but-set-variable] commit da3e83f8 ("ASoC: wcd934x: add audio routings") involved this unused variable. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20200210150421.34680-1-yuehaibing@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Uses hdmi-codec to support HDMI jack reporting. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200206102509.3.I253f51edff62df1d88005de12ba601aa029b1e99@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
k3 devices including am654 and j721e are using UDMA Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200210140950.11090-3-peter.ujfalusi@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
Platform driver glue for platforms using UDMA (am654 and j721e). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200210140950.11090-2-peter.ujfalusi@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Geert Uytterhoeven authored
Currently SND_SOC_ALL_CODECS selects the config symbols for all codec drivers. As "select" bypasses dependencies, lots of "select" statements need explicit dependencies, which are hard to get right, and hard to maintain[*]. Fix this by using "imply" instead, which is a weak version of "select", and which obeys dependencies of target symbols. Add dependencies to invisible symbols that are currently selected only if their dependencies are fulfilled. [*] See e.g. commit 13426fea ("ASoC: wcd934x: Add missing COMMON_CLK dependency to SND_SOC_ALL_CODECS"). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20200207091351.18133-1-geert@linux-m68k.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Paul Olaru authored
Add SOF device and DT descriptors for i.MX8QM platform. Signed-off-by: Paul Olaru <paul.olaru@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200210095817.13226-4-daniel.baluta@oss.nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Paul Olaru authored
i.MX8QM and i.MX8QXP are mostly identical platforms with minor hardware differences. One of these differences affects the firmware boot process, requiring the run operation to differ. All other ops are reused. Signed-off-by: Paul Olaru <paul.olaru@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200210095817.13226-3-daniel.baluta@oss.nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Paul Olaru authored
i.MX8 and i.MX8X platforms are very similar and were treated the same. Anyhow, we need to account for the differences somehow. Current supported platform is i.MX8QXP which is from i.MX8X family. Rename i.MX8 platform to i.MX8X to prepare for future i.MX8 platforms. Signed-off-by: Paul Olaru <paul.olaru@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200210095817.13226-2-daniel.baluta@oss.nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Geert Uytterhoeven authored
m68k/allmodconfig: WARNING: unmet direct dependencies detected for SPI_PXA2XX Depends on [n]: SPI [=y] && SPI_MASTER [=y] && (ARCH_PXA || ARCH_MMP || PCI [=n] || ACPI) Selected by [m]: - SND_SOC_INTEL_BDW_RT5677_MACH [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SND_SOC_INTEL_MACH [=y] && (SND_SOC_INTEL_HASWELL [=n] || SND_SOC_SOF_BROADWELL [=m]) && I2C [=m] && (I2C_DESIGNWARE_PLATFORM [=m] || COMPILE_TEST [=y]) && (GPIOLIB [=y] || COMPILE_TEST [=y]) && (X86_INTEL_LPSS || COMPILE_TEST [=y]) && SPI_MASTER [=y] This happens because SND_SOC_INTEL_BDW_RT5677_MACH selects SPI_PXA2XX, and the former depends on COMPILE_TEST, while the latter does not. Fix this by enabling compile-testing for SPI_PXA2XX. Fixes: 630db154 ("ASoC: Intel: bdw-rt5677: fix Kconfig dependencies") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200210093027.6672-1-geert@linux-m68k.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Colin Ian King authored
Variable idx is being assigned with a value that is never idx, it is assigned a new value a couple of statements later. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200208221529.37105-1-colin.king@canonical.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Colin Ian King authored
Currently function sst_platform_get_resources always returns zero and error return codes set by the function are never returned. Fix this by returning the error return code in variable ret rather than the hard coded zero. Addresses-Coverity: ("Unused value") Fixes: f533a035 ("ASoC: Intel: mrfld - create separate module for pci part") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200208220720.36657-1-colin.king@canonical.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Olivier Moysan authored
Do not print an error trace when deferring probe for I2S driver. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200203100814.22944-7-olivier.moysan@st.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Olivier Moysan authored
Do not print an error trace when deferring probe for SPDIFRX driver. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200203100814.22944-6-olivier.moysan@st.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Olivier Moysan authored
Do not print an error trace when deferring probe for SAI driver. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200203100814.22944-5-olivier.moysan@st.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Olivier Moysan authored
Return an error when the i2s driver fails to get a reset controller. Also add an error trace, except on probe defer status. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200203100814.22944-4-olivier.moysan@st.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Olivier Moysan authored
Return an error when the SPDIFRX driver fails to get a reset controller. Also add an error trace, except on probe defer status. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200203100814.22944-3-olivier.moysan@st.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Olivier Moysan authored
Return an error when the SAI driver fails to get a reset controller. Also add an error trace, except on probe defer status. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20200203100814.22944-2-olivier.moysan@st.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Oder Chiou authored
The field "is_sdw" is used for distinguishing the driver whether is run in soundwire mode or not. That will run the separated setting in runtime to make sure the driver can be run with the same build between i2s mode and soundwire mode. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/980b97e1ab9c4fab8bd345ec2158f1fd@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Derek Fang authored
1. Increases the max limit of PLL input frequency on RL6231 shared support. 2. Add a new pll preset map. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/1580970133-14089-1-git-send-email-derek.fang@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Nathan Chancellor authored
Clang warns: ../sound/soc/codecs/wcd934x.c:1886:11: warning: address of array 'wcd->rx_chs' will always evaluate to 'true' [-Wpointer-bool-conversion] if (wcd->rx_chs) { ~~ ~~~~~^~~~~~ ../sound/soc/codecs/wcd934x.c:1894:11: warning: address of array 'wcd->tx_chs' will always evaluate to 'true' [-Wpointer-bool-conversion] if (wcd->tx_chs) { ~~ ~~~~~^~~~~~ 2 warnings generated. Arrays that are in the middle of a struct are never NULL so they don't need a check like this. Fixes: a61f3b4f ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Link: https://github.com/ClangBuiltLinux/linux/issues/854Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Link: https://lore.kernel.org/r/20200204060143.23393-1-natechancellor@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
YueHaibing authored
Remove including <linux/version.h> that don't need it. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20200202073917.195880-1-yuehaibing@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Add support for Cherrytrail boards, using the pcm512x audio codec using the new sof_pcm512x machine driver. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129223603.2569-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Switch over Broxton platforms with the pcm512x codec from the legacy bxt-pcm512x to the new sof_pcm512x machine driver. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200129223603.2569-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Add support for multiple platforms, e.g. Apollolake based, using the pcm512x audio codec. The SOF developers and CI rely on the Up^2 and Hifiberry DAC+ boards based on this codec for tests. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129223603.2569-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yu-Hsuan Hsu authored
Support setting bclk ratio from machine drivers. Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200125162917.247485-1-yuhsuan@chromium.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-