summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)AuthorFilesLines
2020-03-11Merge tag 'v5.6-rc5' into asoc-5.7Mark Brown1-1/+1
Linux 5.6-rc5
2020-03-11ASoC: zte: zx-tdm: remove redundant variables devtangbin1-2/+1
In this function, the variable 'dev' is assigned to '&pdev->dev', but in the following code, all the assignments to 'struce device' are used '&pdev->dev' instead of 'dev',except 'zx_tdm->dev'. So,the variable 'dev' in this function is redundant and can be replaced by '&pdev->dev' as elsewhere. Signed-off-by: tangbin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20200311144646.11292-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10Merge series "ASoC: rt5682: fix Kconfig/compilation issues when I2C is not ↵Mark Brown2-3/+3
selected" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: RT5682 can work in I2C or SoundWire mode, but the code will not compile if I2C is not selected. Reported-by: kbuild test robot <lkp@intel.com> Pierre-Louis Bossart (3): ASoC: rt5682: fix unmet dependencies ASoC: rt5682: fix compilation issues without I2C ASoC: rt5682-sdw: fix 'defined but not used' pm functions sound/soc/codecs/Kconfig | 2 +- sound/soc/codecs/rt5682-sdw.c | 4 ++-- sound/soc/codecs/rt5682.c | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) -- 2.20.1
2020-03-10ASoC: pcm: Fix (again) possible buffer overflow in dpcm state sysfs outputTakashi Iwai1-8/+8
This is re-applying the fix that went into 5.6 (commit 6c89ffea60aa) as the changes were wiped out after merging the other code refactoring. Basically the same changes, just replacing the suspicious calls of snprintf() with scnprintf(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200310163625.10838-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: rt5682-sdw: fix 'defined but not used' pm functionsPierre-Louis Bossart1-2/+2
Gcc reports the following warnings: sound/soc/codecs/rt5682-sdw.c:286:12: warning: 'rt5682_dev_resume' defined but not used [-Wunused-function] static int rt5682_dev_resume(struct device *dev) ^~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5682-sdw.c:273:12: warning: 'rt5682_dev_suspend' defined but not used [-Wunused-function] static int rt5682_dev_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~ Fix by adding maybe_unused as done for other SoundWire codecs Fixes: 03f6fc6de9192f ('ASoC: rt5682: Add the soundwire support') Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20200310163509.14466-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: rt5682: fix unmet dependenciesPierre-Louis Bossart1-1/+1
The rt5682 code can be used in I2C or SoundWire mode. When I2C is not selected, we have the following issue: WARNING: unmet direct dependencies detected for SND_SOC_RT5682 Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && I2C [=n] Selected by [m]: - SND_SOC_RT5682_SDW [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SOUNDWIRE [=m] Fix by adding SOUNDWIRE as a dependency. Fixes: 03f6fc6de9192f ('ASoC: rt5682: Add the soundwire support') Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20200310163509.14466-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10Merge series "ASoC: soc-pcm cleanup step6" from Kuninori Morimoto ↵Mark Brown16-114/+115
<kuninori.morimoto.gx@renesas.com>: Hi Mark We are using plural form for for_each_xxx() macro. But, for_each_rtd_codec/cpu_dai() are out of this rule. 1) - 7) are for it. 8) - 9) add new for_each_card_xxx() macros. Kuninori Morimoto (9): 1) ASoC: soc.h: add for_each_rtd_codecs/cpus_dai() macro 2) ASoC: Intel: use for_each_rtd_codecs/cpus_dai() macro 3) ASoC: mediatek: use for_each_rtd_codecs/cpus_dai() macro 4) ASoC: meson: use for_each_rtd_codecs/cpus_dai() macro 5) ASoC: qcom: use for_each_rtd_codecs/cpus_dai() macro 6) ASoC: soc: use for_each_rtd_codecs/cpus_dai() macro 7) ASoC: soc.h: remove non plural form for_each_xxx macro 8) ASoC: soc-dapm: add for_each_card_dapms() macro 9) ASoC: soc-dapm: add for_each_card_widgets() macro drivers/soundwire/qcom.c | 2 +- include/sound/soc.h | 28 ++-- sound/soc/intel/boards/cml_rt1011_rt5682.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 4 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 2 +- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 4 +- sound/soc/meson/axg-card.c | 2 +- sound/soc/meson/meson-card-utils.c | 2 +- sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/sdm845.c | 8 +- sound/soc/soc-core.c | 16 +-- sound/soc/soc-dapm.c | 53 ++++---- sound/soc/soc-pcm.c | 124 +++++++++--------- sound/soc/soc-topology.c | 2 +- 18 files changed, 134 insertions(+), 125 deletions(-) -- 2.17.1
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-10ASoC: soc-dapm: add for_each_card_widgets() macroKuninori Morimoto2-13/+14
To be more readable code, this patch adds new for_each_card_widgets() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87r1y2goga.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: soc-dapm: add for_each_card_dapms() macroKuninori Morimoto1-9/+9
To be more readable code, this patch adds new for_each_card_dapms() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87sgiigogf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: soc: use for_each_rtd_codecs/cpus_dai() macroKuninori Morimoto3-75/+75
This patch switch to use plural form macro. - for_each_rtd_codec_dai() + for_each_rtd_codec_dais() - for_each_rtd_codec_dai_rollback() + for_each_rtd_codec_dais_rollback() - for_each_rtd_cpu_dai() + for_each_rtd_cpu_dais() - for_each_rtd_cpu_dai_rollback() + for_each_rtd_cpu_dais_rollback() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87v9negogr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: qcom: use for_each_rtd_codecs/cpus_dai() macroKuninori Morimoto2-5/+5
This patch switch to use plural form macro. - for_each_rtd_codec_dai() + for_each_rtd_codec_dais() - for_each_rtd_codec_dai_rollback() + for_each_rtd_codec_dais_rollback() - for_each_rtd_cpu_dai() + for_each_rtd_cpu_dais() - for_each_rtd_cpu_dai_rollback() + for_each_rtd_cpu_dais_rollback() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87wo7ugogy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: meson: use for_each_rtd_codecs/cpus_dai() macroKuninori Morimoto2-2/+2
This patch switch to use plural form macro. - for_each_rtd_codec_dai() + for_each_rtd_codec_dais() - for_each_rtd_codec_dai_rollback() + for_each_rtd_codec_dais_rollback() - for_each_rtd_cpu_dai() + for_each_rtd_cpu_dais() - for_each_rtd_cpu_dai_rollback() + for_each_rtd_cpu_dais_rollback() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87y2sagoh7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: mediatek: use for_each_rtd_codecs/cpus_dai() macroKuninori Morimoto4-5/+5
This patch switch to use plural form macro. - for_each_rtd_codec_dai() + for_each_rtd_codec_dais() - for_each_rtd_codec_dai_rollback() + for_each_rtd_codec_dais_rollback() - for_each_rtd_cpu_dai() + for_each_rtd_cpu_dais() - for_each_rtd_cpu_dai_rollback() + for_each_rtd_cpu_dais_rollback() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87zhcqgohd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-10ASoC: Intel: use for_each_rtd_codecs/cpus_dai() macroKuninori Morimoto4-5/+5
This patch switch to use plural form macro. - for_each_rtd_codec_dai() + for_each_rtd_codec_dais() - for_each_rtd_codec_dai_rollback() + for_each_rtd_codec_dais_rollback() - for_each_rtd_cpu_dai() + for_each_rtd_cpu_dais() - for_each_rtd_cpu_dai_rollback() + for_each_rtd_cpu_dais_rollback() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/871rq2i320.wl-kuninori.morimoto.gx@renesas.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-07Merge tag 'asoc-fix-v5.6-rc4' of ↵Takashi Iwai14-51/+70
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.6 More fixes that have arrived since the merge window, spread out all over. There's a few things like the operation callback addition for rt1015 and the meson reset addition which add small new bits of functionality to fix non-working systems, they're all very small and for parts of newly added functionality.
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 Brown2-18/+86
<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-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 Holland1-0/+48
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 Holland1-18/+38
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-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-05ASoC: wm8741: Fix typo in Kconfig promptAxel Lin1-1/+1
Fix trivial copy-n-paste mistake. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200304140241.340-1-axel.lin@ingics.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 Brown3-9/+15
<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>