summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-03-10ASoC: SOF: Fix probe point getterCezary Rojewski1-2/+6
Firmware API changes which introduced 'num_elems' param in several probe structs such as sof_ipc_probe_dma_add_params also impacted getter for both, DMA and probe points. All struct handlers except for sof_ipc_probe_info_params have been updated. Align said handler too to calculate payload size correctly. Fixes: f3b433e4699f ("ASoC: SOF: Implement Probe IPC API") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200309142124.29262-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-09ASoC: jz4740-i2s: Avoid passing enum as match dataPaul Cercueil1-13/+23
Instead of passing an enum as match data, and checking its value in the probe to register one or the other dai, pass a pointer to a struct i2s_soc_info, which contains all the information relative to one SoC. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200306222931.39664-4-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-09ASoC: jz4740-i2s: Add local dev variable in probe functionPaul Cercueil1-9/+9
Make the code cleaner by using a "struct device *dev" variable instead of dereferencing it everytime from within the struct platform_device. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200306222931.39664-3-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-09ASoC: amd: Adding TDM support in hw_params.Ravulapati Vishnu vardhan rao1-31/+13
TDM related settings for ACP registers in hw_params. When TDM mode is enabled, Hw_params needs to read and write from/to respective TX/RX (ACP_(I2S/BT)TDM_(TX/RX)FRMT) registers. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/1583751029-2850-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-09ASoC: simple-card-utils: use for_each_pcm_streams()Kuninori Morimoto1-1/+1
We already have for_each_pcm_streams() macro. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875zfei3aa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06Merge series "ASoC: soc-pcm cleanup step5" from Kuninori Morimoto ↵Mark Brown1-50/+47
<kuninori.morimoto.gx@renesas.com>: Hi Mark These are v2 resend of soc-pcm cleanup step5. 1) - 4) are rebased to latest for-5.7 branch. 5) - 6) are remaked of previous [6/8], [7/8] which were mistaken patch. Kuninori Morimoto (6): 1) ASoC: soc-pcm: move dpcm_fe_dai_close() 2) ASoC: soc-pcm: add dpcm_fe_dai_cleanup() 3) ASoC: soc-pcm: use snd_soc_dai_get_pcm_stream() at dpcm_set_fe_runtime() 4) ASoC: soc-pcm: tidyup dulicate handing at dpcm_fe_dai_startup() 5) ASoC: soc-pcm: check DAI's activity more simply 6) ASoC: soc-pcm: Do Digital Mute for both CPU/Codec in same timing. sound/soc/soc-pcm.c | 97 ++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 50 deletions(-) -- 2.17.1
2020-03-06Merge series "simple-audio-card codec2codec support" from Samuel Holland ↵Mark Brown6-30/+113
<samuel@sholland.org>: We are currently using simple-audio-card on the Allwinner A64 SoC. The digital audio codec there (sun8i-codec) has 3 AIFs, one each for the CPU, the modem, and Bluetooth. Adding support for the secondary AIFs requires adding codec2codec DAI links. Since the modem and bt-sco codec DAI drivers only have one set of possible PCM parameters (namely, 8kHz mono S16LE), there's no real need for a machine driver to specify the DAI link configuration. The parameters for these "simple" DAI links can be chosen automatically. This series adds codec2codec DAI link support to simple-audio-card. Codec to codec links are automatically detected when all DAIs in the link belong to codec components. I tried to reuse as much code as possible, so the first two patches refactor a couple of helper functions to be more generic. The last patch adds the new feature and its documentation. Changes in v4: - Rebased on top of asoc/for-next, several changes to patch 2 - Removed unused variable from patch 3 Changes in v3: - Update use of for_each_rtd_components for v5.6 Changes in v2: - Drop patch 1 as it was merged - Automatically detect codec2codec links instead of using a DT property Samuel Holland (3): ALSA: pcm: Add a standalone version of snd_pcm_limit_hw_rates ASoC: pcm: Export parameter intersection logic ASoC: simple-card: Add support for codec2codec DAI links Documentation/sound/soc/codec-to-codec.rst | 9 +++- include/sound/pcm.h | 9 +++- include/sound/soc.h | 3 ++ sound/core/pcm_misc.c | 18 +++---- sound/soc/generic/simple-card-utils.c | 48 ++++++++++++++++++ sound/soc/soc-pcm.c | 59 ++++++++++++++-------- 6 files changed, 114 insertions(+), 32 deletions(-) -- 2.24.1
2020-03-06Merge series "ASoC: wcd934x: minor fixes" from Srinivas Kandagatla ↵Mark Brown1-9/+5
<srinivas.kandagatla@linaro.org>: This patchset has 1 fix and a header cleanup found during recent testing. Srinivas Kandagatla (2): ASoC: wcd934x: fix High Accuracy Buck enable ASoC: wcd934x: remove unused headers sound/soc/codecs/wcd934x.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) -- 2.21.0
2020-03-06ALSA: dmaengine_pcm: No need to take runtime reference twice in pcm_pointerPeter Ujfalusi1-2/+0
The runtime pointer has been taken in functional level so there is no need to take it again under the if () case. Fixes: 9d789dc047e3 ("ALSA: dmaengine_pcm: Consider DMA cache caused delay in pointer callback") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200227093544.27723-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: soc-pcm: Do Digital Mute for both CPU/Codec in same timing.Kuninori Morimoto1-3/+8
Digital Mute for CPU is done at soc_pcm_close(), and Digital Mute for Codec is done at soc_pcm_hw_free(). It is just confusable. This patch do Digital Mute for both CPU/Codec in same timing. Then, it cares DAI activity Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87imjip9ty.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: soc-pcm: check DAI's activity more simplyKuninori Morimoto1-5/+2
soc_pcm_hw_free() want to call snd_soc_dai_digital_mute() if it was last user of Playback or Capture. bool playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; int playback_active = dai->stream_active[SNDRV_PCM_STREAM_PLAYBACK]; int capture_active = dai->stream_active[SNDRV_PCM_STREAM_CAPTURE]; if ((playback && playback_active == 1) || (!playback && capture_active == 1)) snd_soc_dai_digital_mute(...) But it is same as int active = dai->stream_active[substream->stream]; if (active == 1) snd_soc_dai_digital_mute(...) This patch simplify the code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87k13yp9ub.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: soc-pcm: tidyup dulicate handing at dpcm_fe_dai_startup()Kuninori Morimoto1-7/+3
error handling at dpcm_fe_dai_startup() has duplicate code. This patch tidyup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87lfoep9ug.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: soc-pcm: use snd_soc_dai_get_pcm_stream() at dpcm_set_fe_runtime()Kuninori Morimoto1-6/+3
We already have snd_soc_dai_get_pcm_stream(), let's use it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87mu8up9ul.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: soc-pcm: add dpcm_fe_dai_cleanup()Kuninori Morimoto1-14/+16
dpcm_fe_dai_close() and error case of dpcm_fe_dai_open() need to do same cleanup operation. To avoid duplicate code, this patch adds dpcm_fe_dai_cleanup() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87o8tap9uq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: soc-pcm: move dpcm_fe_dai_close()Kuninori Morimoto1-20/+20
move dpcm_fe_dai_close() next to dpcm_fe_dai_open(). This is prepare for dpcm_fe_dai_open() cleanup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87pndqp9uv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: simple-card: Add support for codec2codec DAI linksSamuel Holland2-2/+55
Following the example in cb2cf0de1174 ("ASoC: soc-core: care Codec <-> Codec case by non_legacy_dai_naming"), determine if a DAI link contains only codec DAIs by examining the non_legacy_dai_naming flag in each DAI's component. For now, we assume there is only one or a small set of valid PCM stream parameters, so num_params == 1 is good enough. We also assume that the same params are valid for all supported streams. params is set to the subset of parameters common among all DAIs, and then the existing code automatically chooses the highest quality of the remaining values when the link is brought up. Signed-off-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/20200305051143.60691-4-samuel@sholland.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: pcm: Export parameter intersection logicSamuel Holland2-18/+41
The logic to calculate the subset of stream parameters supported by all DAIs associated with a PCM stream is nontrivial. Export a helper function so it can be used to set up simple codec2codec DAI links. Signed-off-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/20200305051143.60691-3-samuel@sholland.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ALSA: pcm: Add a standalone version of snd_pcm_limit_hw_ratesSamuel Holland2-10/+17
It can be useful to derive min/max rates of a snd_pcm_hardware without having a snd_pcm_runtime, such as before constructing an ASoC DAI link. Create a new helper that takes a pointer to a snd_pcm_hardware directly, and refactor the original function as a wrapper around it, to avoid needing to update any call sites. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200305051143.60691-2-samuel@sholland.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: wcd934x: remove unused headersSrinivas Kandagatla1-4/+0
Looks like there are some unused headers, remove them. Seems to be missed while moving to mfd. Reported-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200306132806.19684-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-06ASoC: wcd934x: fix High Accuracy Buck enableSrinivas Kandagatla1-5/+5
High Accuracy buck is not applicable when we use RCO Band Gap source, so move it back to correct place. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200306132806.19684-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-05ASoC: soc-pcm: remove duplicate be check from dpcm_add_paths()Kuninori Morimoto1-4/+0
dpcm_add_paths() checks returned be from dpcm_get_be() static int dpcm_add_paths(...) { ... for_each_dapm_widgets(list, i, widget) { ... be = dpcm_get_be(...); ... /* make sure BE is a real BE */ => if (!be->dai_link->no_pcm) continue; ... } ... } But, dpcm_get_be() itself is checking it already. dpcm_get_be(...) { ... for_each_card_rtds(card, be) { => if (!be->dai_link->no_pcm) continue; ... if (...) => return be; } return NULL } This patch removes duplicate check Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87lfoo7q1j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-05ASoC: soc-pcm: use defined streamKuninori Morimoto1-8/+7
Many functions defines "stream = substream->stream", but some of them is using "substream->stream" instead of "stream". It is pointless. This patch uses defined stream. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87mu947q1t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-05ASoC: sprd: Allow the MCDT driver to build into modulesBaolin Wang2-2/+2
Change the config to 'tristate' for MCDT driver to allow it to build into modules, as well as changing to use IS_ENABLED() to validate if need supply dummy functions when building the MCDT driver as a module. Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Link: https://lore.kernel.org/r/9306f2b99641136653ae4fe6cf9e859b7f698f77.1583387748.git.baolin.wang7@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-05ASoC: tlv320adcx140: Fix mic_bias and vref device tree verificationDan Murphy1-6/+4
Fix the range verification check for the mic_bias and vref device tree entries. Fixes 37bde5acf040 ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200304193427.16886-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-04Merge branch 'for-5.6' of ↵Mark Brown1-9/+11
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-03-04Merge branch 'for-5.6' of ↵Mark Brown2-2/+2
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-03-04ASoc: amd: acp3x: Add missing include <linux/io.h>YueHaibing1-0/+1
gcc 7.4.0 build fails: In file included from sound/soc/amd/acp3x-rt5682-max9836.c:20:0: sound/soc/amd/raven/acp3x.h: In function rv_readl: sound/soc/amd/raven/acp3x.h:113:9: error: implicit declaration of function readl; did you mean rv_readl? [-Werror=implicit-function-declaration] return readl(base_addr - ACP3x_PHY_BASE_ADDRESS); ^~~~~ rv_readl sound/soc/amd/raven/acp3x.h: In function rv_writel: sound/soc/amd/raven/acp3x.h:118:2: error: implicit declaration of function writel; did you mean rv_writel? [-Werror=implicit-function-declaration] writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS); ^~~~~~ rv_writel Add <linux/io.h> to fix this. Fixes: 6b8e4e7db3cd ("ASoC: amd: Add machine driver for Raven based platform") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Message-Id: <20200304084057.44764-1-yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-04ASoC: stm32: sai: manage rebind issueOlivier Moysan1-8/+10
The commit e894efef9ac7 ("ASoC: core: add support to card rebind") allows to rebind the sound card after a rebind of one of its component. With this commit, the sound card is actually rebound, but may be no more functional. The following problems have been seen with STM32 SAI driver. 1) DMA channel is not requested: With the sound card rebind the simplified call sequence is: stm32_sai_sub_probe snd_soc_register_component snd_soc_try_rebind_card snd_soc_instantiate_card devm_snd_dmaengine_pcm_register The problem occurs because the pcm must be registered, before snd_soc_instantiate_card() is called. Modify SAI driver, to change the call sequence as follows: stm32_sai_sub_probe devm_snd_dmaengine_pcm_register snd_soc_register_component snd_soc_try_rebind_card 2) DMA channel is not released: dma_release_channel() is not called when devm_dmaengine_pcm_release() is executed. This occurs because SND_DMAENGINE_PCM_DRV_NAME component, has already been released through devm_component_release(). devm_dmaengine_pcm_release() should be called before devm_component_release() to avoid this problem. Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component() explicitly from SAI driver, to have the right sequence. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Message-Id: <20200304102406.8093-1-olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-03ASoC: amd: Fix compile warning of argument typeAkshu Agrawal1-1/+1
Fixes: >> sound/soc//amd/acp3x-rt5682-max9836.c:341:23: warning: format '%d' >> expects argument of type 'int', but argument 3 has type 'long int' >> [-Wformat=] dev_err(&pdev->dev, "DMIC gpio failed err=%d\n", Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Link: https://lore.kernel.org/r/20200303090444.95805-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-03ASoC: amd: AMD RV RT5682 should depends on CROS_ECEnric Balletbo i Serra1-1/+1
If SND_SOC_AMD_RV_RT5682_MACH=y, below kconfig and build errors can be seen: WARNING: unmet direct dependencies detected for SND_SOC_CROS_EC_CODEC WARNING: unmet direct dependencies detected for I2C_CROS_EC_TUNNEL ld: drivers/i2c/busses/i2c-cros-ec-tunnel.o: in function `ec_i2c_xfer': i2c-cros-ec-tunnel.c:(.text+0x2fc): undefined reference to `cros_ec_cmd_xfer_status' ld: sound/soc/codecs/cros_ec_codec.o: in function `wov_host_event': cros_ec_codec.c:(.text+0x4fb): undefined reference to `cros_ec_get_host_event' ld: sound/soc/codecs/cros_ec_codec.o: in function `send_ec_host_command': cros_ec_codec.c:(.text+0x831): undefined reference to `cros_ec_cmd_xfer_status' This is because it will select SND_SOC_CROS_EC_CODEC and I2c_CROS_EC_TUNNEL but both depends on CROS_EC. Fixes: 6b8e4e7db3cd ("ASoC: amd: Add machine driver for Raven based platform") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200303110514.3267126-1-enric.balletbo@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-03ASoC: SOF: Fix snd_sof_ipc_stream_posn()Dan Carpenter1-1/+1
We're passing "&posn" instead of "posn" so it ends up corrupting memory instead of doing something useful. Fixes: 53e0c72d98ba ("ASoC: SOF: Add support for IPC IO between DSP and Host") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200303101858.ytehbrivocyp3cnf@kili.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-03ASoC: rt1015: modify pre-divider for sysclkJack Yu1-1/+1
Modify pre-divider for system clock. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20200303025913.24499-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02Merge branch 'for-5.6' of ↵Mark Brown4-4/+4
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-03-02Merge series "ASoC: SOF: updates for 5.7" from Pierre-Louis Bossart ↵Mark Brown5-11/+18
<pierre-louis.bossart@linux.intel.com>: 4 unrelated improvements grouped in one bundle. Jaska Uimonen (1): ASoC: SOF: ipc: check ipc return value before data copy Keyon Jie (2): ASoC: SOF: pcm: skip DMA buffer pre-allocation ASoC: SOF: Intel: hda-loader: clear the IPC ack bit after FW_PURGE done Tomasz Lauda (1): ASoC: SOF: add core id to sof_ipc_comp include/sound/sof/topology.h | 3 ++- include/uapi/sound/sof/abi.h | 2 +- sound/soc/sof/intel/hda-loader.c | 6 ++++++ sound/soc/sof/ipc.c | 12 +++++++----- sound/soc/sof/pcm.c | 6 ++---- 5 files changed, 18 insertions(+), 11 deletions(-) base-commit: 6941b0b5f919e9839e8c25efaeb53854efee14e5 -- 2.20.1
2020-03-02ASoC: rt1015: set snd_soc_dai_ops in rt1015_dai driverYueHaibing1-0/+1
snd_soc_dai_driver should set ops in rt1015_dai driver. Also make the two variable static to fix sparse warnings. Fixes: df31007400c3 ("ASoC: rt1015: add rt1015 amplifier driver") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20200302070522.48104-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02ASoc: amd: Add DMIC switch capability to machine driverAkshu Agrawal1-6/+47
Switch between DMIC0 and DMIC1 based on recording device selected. This is done by toggling the dmic select gpio. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Link: https://lore.kernel.org/r/20200302082443.51587-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02ASoC: SOF: Intel: hda: use snd_sof_dsp_set_power_state() opRanjani Sridharan1-8/+7
Replace the calls to hda_dsp_set_power_state() with the top-level SOF op snd_sof_set_power_state(). Along with this, modify the hda_dsp_resume() function to return the value of snd_sof_set_power_state() directly. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Jaska Uimonen <jaska.uimonen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200228234225.6963-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02ASoC: SOF: add core id to sof_ipc_compTomasz Lauda2-2/+3
Adds core id to sof_ipc_comp. The intention of this change is to inform FW on which core that particular component should run. Right now core id is only passed when pipeline is created, which is not flexible enough and doesn't allow for FW to handle this the right way. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com> Link: https://lore.kernel.org/r/20200228231850.9226-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02ASoC: SOF: Intel: hda-loader: clear the IPC ack bit after FW_PURGE doneKeyon Jie1-0/+6
Set DONE bit after the FW_PURGE IPC is polled successfully, to clear the interrupt and avoid the arrival of the confusing unexpected ipc. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Link: https://lore.kernel.org/r/20200228231850.9226-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02ASoC: SOF: ipc: check ipc return value before data copyJaska Uimonen1-5/+7
In tx_wait_done the ipc payload is copied before the DSP transaction error code is checked. This might lead to corrupted data in kernel side even though the error would be handled later. It is also pointless to copy the data in case of error. So change the order of error check and copy. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com> Link: https://lore.kernel.org/r/20200228231850.9226-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02ASoC: SOF: pcm: skip DMA buffer pre-allocationKeyon Jie1-4/+2
As discussion in ALSA https://patchwork.kernel.org/patch/11336023/, it is suggested to skip DMA buffer pre-allocation with passing size=0 when calling snd_pcm_set_managed_buffer(), to make the full buffer_bytes range configured in topology file selectable from user space, here do the corresponding change in SOF PCM driver to implement it. This change doesn't have dependency to the change that Takashi will do in the ALSA core by adding total_pcm_alloc_bytes limitation to the struct snd_card, it passes tests both with or without Takashi's coming change on SOF CML platform. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Link: https://lore.kernel.org/r/20200228231850.9226-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02ASoC: rt1015: add operation callback function for rt1015_dai[]Jack Yu1-0/+1
Add operation callback function for rt1015_dai[]. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20200302015424.9075-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28ASoC: zte: zx-spdif: remove redundant dev_err messagetangbin1-1/+0
devm_ioremap_resource has already contains error message, so remove the redundant dev_err message Signed-off-by: tangbin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20200227150701.15652-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28ASoC: soc-dapm: don't use rtd->cpu_dai on for_each_rtd_cpu_dai()Kuninori Morimoto1-1/+1
soc_dapm_stream_event() is using for_each_rtd_cpu_dais(). It should use "cpu_dai", instead of "rtd->cpu_dai". This patch fixup it. Fixes: commit de6214a33633d ("ASoC: Add multiple CPU DAI support in DAPM") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pne07qeh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28ASoC: samsung: Silence warnings during deferred probeMarek Szyprowski10-10/+17
Don't confuse user with meaningless warning about the failure in getting resources and registering card in case of deferred probe. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200228101120.28819-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28ASoC: rt5682: Make rt5682_clock_config staticYueHaibing1-1/+1
Fix sparse warning: sound/soc/codecs/rt5682-sdw.c:163:5: warning: symbol 'rt5682_clock_config' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20200228075609.38236-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28ASoC: rt1015: modify some structure to be static.Jack Yu1-2/+2
Modify rt1015_aif_dai_ops and rt1015_dai[] to be static. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20200227020637.15135-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28ASoC: soc-component: tidyup snd_soc_pcm_component_sync_stop()Kuninori Morimoto1-1/+1
commit 1e5ddb6ba73894 ("ASoC: component: Add sync_stop PCM ops") added snd_soc_pcm_component_sync_stop(), but it is checking ioctrl instead of sync_stop. This is bug. This patch fixup it. Fixes: commit 1e5ddb6ba73894 ("ASoC: component: Add sync_stop PCM ops") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/8736av7a8c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28ASoC: dapm: Correct DAPM handling of active widgets during shutdownCharles Keepax1-1/+1
commit c2caa4da46a4 ("ASoC: Fix widget powerdown on shutdown") added a set of the power state during snd_soc_dapm_shutdown to ensure the widgets powered off. However, when commit 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written") added the new_power member of the widget structure, to differentiate between the current power state and the target power state, it did not update the shutdown to use the new_power member. As new_power has not updated it will be left in the state set by the last DAPM sequence, ie. 1 for active widgets. So as the DAPM sequence for the shutdown proceeds it will turn the widgets on (despite them already being on) rather than turning them off. Fixes: 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200228153145.21013-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-26ASoC: Add Multi CPU DAI supportMark Brown6-271/+531
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: As discussed in [1], ASoC core supports multi codec DAIs on a DAI link. However it does not do so for CPU DAIs. So, add support for multi CPU DAIs on a DAI Link by adding multi CPU DAI in Card instantiation, suspend and resume functions, PCM ops, stream handling functions and DAPM. [1]: https://www.spinics.net/lists/alsa-devel/msg71369.html changes in v5: - rebase to latest kernel base Bard Liao (2): ASoC: Return error if the function does not support multi-cpu ASoC: pcm: check if cpu-dai supports a given stream Shreyas NC (4): ASoC: Add initial support for multiple CPU DAIs ASoC: Add multiple CPU DAI support for PCM ops ASoC: Add dapm_add_valid_dai_widget helper ASoC: Add multiple CPU DAI support in DAPM include/sound/soc.h | 15 + sound/soc/soc-compress.c | 5 +- sound/soc/soc-core.c | 168 +++++----- sound/soc/soc-dapm.c | 133 ++++---- sound/soc/soc-generic-dmaengine-pcm.c | 18 + sound/soc/soc-pcm.c | 463 ++++++++++++++++++-------- 6 files changed, 531 insertions(+), 271 deletions(-) -- 2.17.1