aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-02-08ASoC: fsl_esai: Remove unused 'imx' fieldFabio Estevam
The 'imx' field is not used anywhere, so get rid of it. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210206142753.536459-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: fsl: constify static snd_soc_dai_ops structsRikard Falkeborn
The only usage of these is to assign their address to the 'ops' field in the snd_soc_dai_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210206225849.51071-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: dt-bindings: renesas, rsnd: Group tuples in playback/capture propertiesGeert Uytterhoeven
To improve human readability and enable automatic validation, the tuples in "playback" and "capture" properties in sound device nodes should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20210204130022.1646427-1-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: dmaengine_pcm: add peripheral configurationShengjiu Wang
The commit e7bbb7acabf4 ("dmaengine: add peripheral configuration") adds peripheral configuration for dma_slave_config. This configuration is useful for some audio peripherals, for example, the peripheral supports multi fifos, we can let the DMA know which fifos are selected. So also add this configuration for snd_dmaengine_dai_dma_data. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1612509985-11063-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05Merge series "ASoC: stm32: i2s: add master clock provider" from Olivier ↵Mark Brown
Moysan <olivier.moysan@foss.st.com>: Add master clock generation support in STM32 I2S driver. Resend of patch https://lkml.org/lkml/2020/9/11/264 Olivier Moysan (2): ASoC: dt-bindings: add mclk provider support to stm32 i2s ASoC: stm32: i2s: add master clock provider .../bindings/sound/st,stm32-i2s.yaml | 4 + sound/soc/stm/stm32_i2s.c | 310 +++++++++++++++--- 2 files changed, 270 insertions(+), 44 deletions(-) -- 2.17.1
2021-02-05ASoC: mediatek: mt8183-mt6358: set playback and capture constraintsJiaxin Yu
Sets playback and capture constraints to S16_LE, stereo, 48kHz. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1612513012-27688-1-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: stm32: i2s: add master clock providerOlivier Moysan
Add master clock generation support in STM32 I2S driver. The master clock provided by I2S can be used to feed a codec. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://lore.kernel.org/r/20210205104404.18786-3-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: dt-bindings: add mclk provider support to stm32 i2sOlivier Moysan
Add master clock provider support to STM32 I2S. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://lore.kernel.org/r/20210205104404.18786-2-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05Merge branch 'asoc-5.11' into asoc-5.12Mark Brown
2021-02-05Merge series "ASoC: SOF/Intel/SoundWire: add missing quirks and DMIC ↵Mark Brown
support" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: HP Spectre x360 convertible devices rely on a mixed SoundWire+DMIC configuration which wasn't well supported. This lead to the discovery that we missed the TGL_HDMI quirk on a number of Dell devices, the addition of DMIC autodetection (based on NHLT tables), the addition of new component strings needed by UCM, and work-arounds due to problematic DSDT tables. Bard Liao (1): ASoC: Intel: sof_sdw: add trace for dai links Guennadi Liakhovetski (1): ASoC: SOF: Intel: HDA: don't keep a temporary variable Pierre-Louis Bossart (11): ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A3E ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A5E ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A32 ASoC: Intel: sof_sdw: reorganize quirks by generation ASoC: Intel: sof-sdw: indent and add quirks consistently ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible ASoC: Intel: sof_sdw: add mic:dmic and cfg-mics component strings ASoC: Intel: soc-acpi: add ACPI matching table for HP Spectre x360 ASoC: SOF: Intel: SoundWire: refine ACPI match ASoC: SOF: Intel: detect DMIC number in SoundWire mixed config ASoC: SOF: Intel: hda: add dev_dbg() when DMIC number is overridden Rander Wang (1): ASoC: Intel: sof_sdw: detect DMIC number based on mach params sound/soc/intel/boards/sof_sdw.c | 131 ++++++----- .../intel/common/soc-acpi-intel-tgl-match.c | 20 ++ sound/soc/sof/intel/hda.c | 208 ++++++++++++------ 3 files changed, 241 insertions(+), 118 deletions(-) -- 2.25.1
2021-02-05ASoC: rt5682: do nothing in rt5682_suspend/resume in sdw modeBard Liao
regcache sync will be done in sdw device suspend/resume functions. And we have different jack detection mechanism for SoundWire. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210204201739.25206-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: rt5682-sdw: cancel_work_sync() in .remove and .suspendPierre-Louis Bossart
Follow pattern from other drivers and use cancel_work_sync() for both .remove() and .suspend(). Fixes: 03f6fc6de919 ('ASoC: rt5682: Add the soundwire support') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20210204201739.25206-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: rt711-sdw: use cancel_work_sync() for .removePierre-Louis Bossart
Make sure the workqueues are not running after the .remove() callback, which can lead to timeout errors. A previous fix to use cancel_work_sync was applied for the suspend case but the remove case is missing Fixes: 501ef013390b ('ASoC: rt711: wait for the delayed work to finish when the system suspends') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20210204201739.25206-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: rt700-sdw: use cancel_work_sync() in .remove as well as .suspendPierre-Louis Bossart
Make sure the workqueues are not running after the .remove() callback, which can lead to timeout errors. A previous fix to use cancel_work_sync was applied for the suspend case but the remove case is missing Fixes: 5f2df2a4583b ('ASoC: rt700: wait for the delayed work to finish when the system suspends') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20210204201739.25206-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A3EPierre-Louis Bossart
We missed adding the TGL_HDMI quirk which is very much needed to expose the 4 display pipelines and will be required on TGL topologies. Fixes: e787f5b5b1406 ('ASoC: Intel: add support for new SoundWire hardware layout on TGL') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210204203312.27112-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A32Pierre-Louis Bossart
We missed adding the TGL_HDMI quirk which is very much needed to expose the 4 display pipelines and will be required on TGL topologies. Fixes: 488cdbd8931fe ('ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210204203312.27112-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A5EPierre-Louis Bossart
We missed adding the TGL_HDMI quirk which is very much needed to expose the 4 display pipelines and will be required on TGL topologies. Fixes: 9ad9bc59dde10 ('ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210204203312.27112-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-04Merge series "ASoC: mediatek: mt8192: apply some cleanup" from Tzung-Bi Shih ↵Mark Brown
<tzungbi@google.com>: The 1st and 2nd patch refactor to use asoc_substream_to_rtd(). The 3rd patch simplifies ops of Capture1 DAI link. Changes from v2[1]: - Fix typo in 3rd patch's title, s/simply/simplify/. Changes from v1[2]: - Separated from v1. [1]: https://patchwork.kernel.org/project/alsa-devel/list/?series=420919 [2]: https://patchwork.kernel.org/project/alsa-devel/list/?series=419769 Tzung-Bi Shih (3): ASoC: mediatek: mt8192-mt6359: use asoc_substream_to_rtd() ASoC: mediatek: mt8192: use asoc_substream_to_rtd() ASoC: mediatek: mt8192-mt6359: simplify ops for Capture1 DAI link sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 4 ++-- .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 24 ++++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) -- 2.30.0.365.g02bc693789-goog
2021-02-04ASoC: da7218: Drop CONFIG_OF ifdefStephen Boyd
This reverts commit a06cd8cf97a3 ("ASoC: da7218: skip of_device_id table when !CONFIG_OF") because we want to make of_match_device() stop using of_match_ptr() internally, confusing compilers and causing ifdef pollution. Reported-by: kernel test robot <lkp@intel.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20210202192016.49028-1-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-04ASoC: mediatek: mt8192-mt6359: simplify ops for Capture1 DAI linkTzung-Bi Shih
1. Uses rtd->dev to get the device. 2. Generalizes the variable name. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210203032201.2882158-4-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-04ASoC: mediatek: mt8192: use asoc_substream_to_rtd()Tzung-Bi Shih
Uses asoc_substream_to_rtd() helper. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210203032201.2882158-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-04ASoC: mediatek: mt8192-mt6359: use asoc_substream_to_rtd()Tzung-Bi Shih
Uses asoc_substream_to_rtd() helper. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210203032201.2882158-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03Merge series "ASoC: soc-pcm: cleanup soc_new_pcm() and bugfix" from Kuninori ↵Mark Brown
Morimoto <kuninori.morimoto.gx@renesas.com>: Hi Mark These are soc-pcm cleanup patchset. 1) - 3) : cleanup soc_new_pcm() function 4) : cleanup dpcm_runtime_merge_xxx() function 5) : bugfix of snd_pcm_limit_hw_rates() order Kuninori Morimoto (5): 1) ASoC: soc-pcm: tidyup pcm setting 2) ASoC: soc-pcm: add soc_get_playback_capture() and simplify soc_new_pcm() 3) ASoC: soc-pcm: add soc_create_pcm() and simplify soc_new_pcm() 4) ASoC: soc-pcm: use snd_pcm_hardware at dpcm_runtime_merge_xxx() 5) ASoC: soc-pcm: fixup snd_pcm_limit_hw_rates() timing sound/soc/soc-pcm.c | 124 +++++++++++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 49 deletions(-) -- 2.25.1
2021-02-03ASoC: soc-pcm: fixup snd_pcm_limit_hw_rates() timingKuninori Morimoto
soc-pcm has snd_pcm_limit_hw_rates() which determine rate_min/rate_max. It updates runtime->hw.rate_min/max (A) based on hw->rates (B). int snd_pcm_limit_hw_rates(...) { int i; for (...) { (B) if (runtime->hw.rates & (1 << i)) { (A) runtime->hw.rate_min = ... break; } } for (...) { (B) if (runtime->hw.rates & (1 << i)) { (A) runtime->hw.rate_max = ... break; } } return 0; } This means, setup order is 1) set hw->rates 2) call snd_pcm_limit_hw_rates() 3) update hw->rate_min/max soc_pcm_init_runtime_hw() is calling it in good order static void soc_pcm_init_runtime_hw(xxx) { ... 1) hw->rates = snd_pcm_rate_mask_intersect(...); 2) snd_pcm_limit_hw_rates(...); 3) hw->rate_min = max(...); hw->rate_min = max(...); hw->rate_max = min_not_zero(...); hw->rate_max = min_not_zero(...); } But, dpcm_fe_dai_startup() is not. static int dpcm_fe_dai_startup(xxx) { ... 1) 3) dpcm_set_fe_runtime(...); 2) snd_pcm_limit_hw_rates(...); ... } More detail of dpcm_set_fe_runtime() is static void dpcm_set_fe_runtime() { ... for_each_rtd_cpu_dais(rtd, i, cpu_dai) { ... 3) 1) dpcm_init_runtime_hw(...); } ... 3) 1) dpcm_runtime_merge_rate(...); } This patch fixup these into static void dpcm_set_fe_runtime() { ... for_each_rtd_cpu_dais(rtd, i, cpu_dai) { ... 1) 2) 3) dpcm_init_runtime_hw(...); } ... 1) 2) 3) dpcm_runtime_merge_rate(...); } static int dpcm_fe_dai_startup(xxx) { ... dpcm_set_fe_runtime(...); - snd_pcm_limit_hw_rates(...); ... } Link: https://lore.kernel.org/r/87k15l7ewd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/8735ytaig8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03ASoC: soc-pcm: use snd_pcm_hardware at dpcm_runtime_merge_xxx()Kuninori Morimoto
soc-pcm has dpcm_runtime_merge_xxx() functions, but uses parameters are very verbose. dpcm_runtime_merge_format(..., &runtime->hw.formats); dpcm_runtime_merge_chan(..., &runtime->hw.channels_min, &runtime->hw.channels_max); dpcm_runtime_merge_rate(..., &runtime->hw.rates, &runtime->hw.rate_min, &runtime->hw.rate_max); We want to replace it into dpcm_runtime_merge_format(..., runtime); dpcm_runtime_merge_chan(..., runtime); dpcm_runtime_merge_rate(..., runtime); This patch do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/874kj9aigd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03ASoC: soc-pcm: add soc_create_pcm() and simplify soc_new_pcm()Kuninori Morimoto
soc_new_pcm() implementation is very long / verbose / complex, thus, it is very difficult to read. If we read it carefully, we can notice that it is consisted by int soc_new_pcm(...) { (1) judging playback/caputre part (2) creating the PCM part (3) setup pcm/rtd part } This patch adds new soc_create_pcm() for (2) part and offload it from snd_pcm_new(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875z3paigi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03ASoC: soc-pcm: add soc_get_playback_capture() and simplify soc_new_pcm()Kuninori Morimoto
soc_new_pcm() implementation is very long / verbose / complex, thus, it is very difficult to read. If we read it carefully, we can notice that it is consisted by int soc_new_pcm(...) { (1) judging playback/caputre part (2) creating the PCM part (3) setup pcm/rtd part } This patch adds new soc_get_playback_capture() for (1) part and offload it from soc_new_pcm(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/877do5aign.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03ASoC: soc-pcm: tidyup pcm settingKuninori Morimoto
Current soc_new_pcm() setups pcm randomly. This patch tidyup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878s8laigt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03ASoC: Intel: catpt: remove unneeded semicolonYang Li
Eliminate the following coccicheck warning: ./sound/soc/intel/catpt/pcm.c:355:2-3: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/1612166481-121376-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-02ASoC: qcom: Fix typo error in HDMI regmap config callbacksSrinivasa Rao Mandadapu
Had a typo in lpass platform driver that resulted in crash during suspend/resume with an HDMI dongle connected. The regmap read/write/volatile regesters validation callbacks in lpass-cpu were using MI2S rdma_channels count instead of hdmi_rdma_channels. This typo error causing to read registers from the regmap beyond the length of the mapping created by ioremap(). This fix avoids the need for reducing number hdmi_rdma_channels, which is done in commit 7dfe20ee92f6 ("ASoC: qcom: Fix number of HDMI RDMA channels on sc7180"). So reverting the same. Fixes: 7cb37b7bd0d3c ("ASoC: qcom: Add support for lpass hdmi driver") Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org> Link: https://lore.kernel.org/r/20210202062727.22469-1-srivasam@codeaurora.org Reviewed-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-02ASoC: topology: KUnit: Convert from cpu to data formatAmadeusz Sławiński
When creating topology templates and overriding data in specific test cases it should be done with cpu_to_le32 macro, so we operate on correct data on all architectures, as topology parser use le32_to_cpu to parse data from structures. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20210202163123.3942040-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-02ASoC: fsl_spdif: Utilize the defined parameter to clear codeTang Bin
Utilize the defined parameter 'dev' to make the code cleaner. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210128112714.16324-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-02ASoC: mt6359: reduce log verbosity for optional DT propertiesTzung-Bi Shih
DT properties "dmic-mode" and "mic-type-X" are optional. Reduces the log verbosity and changes the message a bit to avoid misleading. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210202033557.1621029-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-02ASoC: SOF: add be_hw_params_fixup() for ALHRander Wang
Fixup BE DAI links channel count to match topology settings. Normally the channel count of BE is equal to FE's so we don't have any issue. For some cases like DSM with 2-channel FE and 4-channel BE the mismatch of BE and topology will result in audio issues. Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Keyon Jie <yang.jie@intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210201092345.1214232-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01ASoC: codecs: add missing max_register in regmap configSrinivas Kandagatla
For some reason setting max_register was missed from regmap_config. Without this cat /sys/kernel/debug/regmap/sdw:0:217:2010:0:1/range actually throws below Warning. WARNING: CPU: 7 PID: 540 at drivers/base/regmap/regmap-debugfs.c:160 regmap_debugfs_get_dump_start.part.10+0x1e0/0x220 ... Call trace: regmap_debugfs_get_dump_start.part.10+0x1e0/0x220 regmap_reg_ranges_read_file+0xc0/0x2e0 full_proxy_read+0x64/0x98 vfs_read+0xa8/0x1e0 ksys_read+0x6c/0x100 __arm64_sys_read+0x1c/0x28 el0_svc_common.constprop.3+0x6c/0x190 do_el0_svc+0x24/0x90 el0_svc+0x14/0x20 el0_sync_handler+0x90/0xb8 el0_sync+0x158/0x180 ... Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210201161429.28060-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01ASoC: cpcap: fix microphone timeslot maskSebastian Reichel
The correct mask is 0x1f8 (Bit 3-8), but due to missing BIT() 0xf (Bit 0-3) was set instead. This means setting of CPCAP_BIT_MIC1_RX_TIMESLOT0 (Bit 3) still worked (part of both masks). On the other hand the code does not properly clear the other MIC timeslot bits. I think this is not a problem, since they are probably initialized to 0 and not touched by the driver anywhere else. But the mask also contains some wrong bits, that will be cleared. Bit 0 (CPCAP_BIT_SMB_CDC) should be safe, since the driver enforces it to be 0 anyways. Bit 1-2 are CPCAP_BIT_FS_INV and CPCAP_BIT_CLK_INV. This means enabling audio recording forces the codec into SND_SOC_DAIFMT_NB_NF mode, which is obviously bad. The bug probably remained undetected, because there are not many use cases for routing microphone to the CPU on platforms using cpcap and user base is small. I do remember having some issues with bad sound quality when testing voice recording back when I wrote the driver. It probably was this bug. Fixes: f6cdf2d3445d ("ASoC: cpcap: new codec") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210123172945.3958622-1-sre@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01Merge series "Tegra186 and Tegra194 audio graph card" from Sameer Pujar ↵Mark Brown
<spujar@nvidia.com>: This series adds support for audio graph based solution on Tegra186 and Tegra194. This enables audio paths for I2S, DMIC and DSPK modules. Depending on the platform Jetson TX2 or Jetson AGX Xavier, required I/O module instances are enabled. Since the latter board has on board audio codec, DT support for the same is enabled and external audio playback and capture can be used. Changelog ========= v1 --> v2: ---------- - Dropped patch "ASoC: tegra: Select SND_SOC_RT5659" as per suggestion from Mark. - Add new patch "ASoC: rt5659: Add Kconfig prompt" - Add new patch "arm64: defconfig: Enable RT5659" - No changes in other patches from earlier series. Sameer Pujar (9): ASoC: dt-bindings: rt5659: Update binding doc ASoC: dt-bindings: tegra: Add iommus property to Tegra graph card ASoC: audio-graph-card: Add clocks property to endpoint node ASoC: rt5659: Add Kconfig prompt arm64: defconfig: Enable RT5659 arm64: tegra: Add RT5658 device entry Revert "arm64: tegra: Disable the ACONNECT for Jetson TX2" arm64: tegra: Audio graph sound card for Jetson TX2 arm64: tegra: Audio graph sound card for Jetson AGX Xavier .../bindings/sound/audio-graph-port.yaml | 3 + .../sound/nvidia,tegra-audio-graph-card.yaml | 3 + Documentation/devicetree/bindings/sound/rt5659.txt | 11 + arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 609 +++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra186.dtsi | 22 + arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 468 ++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra194.dtsi | 20 + arch/arm64/configs/defconfig | 1 + sound/soc/codecs/Kconfig | 2 +- 9 files changed, 1138 insertions(+), 1 deletion(-) -- 2.7.4
2021-02-01ASoC: tegra: SND_SOC_TEGRA_AUDIO_GRAPH_CARD should depend on SND_SOC_TEGRAGeert Uytterhoeven
Audio Graph Card based Tegra driver is only useful on NVIDIA Tegra SoCs. Hence add a dependency on SND_SOC_TEGRA, to prevent asking the user about this driver when configuring a kernel without Tegra sound support. Wrap all Tegra sound config options inside a big if/endif block, instead of just adding the dependency to the single config option that does not have it yet, to preventing similar future mistakes. Fixes: 202e2f7745437aa5 ("ASoC: tegra: Add audio graph based card driver") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/20210129125915.2652952-1-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01ASoC: rt5659: Add Kconfig promptSameer Pujar
Add tristate prompt to allow codec selection. Cc: Oder Chiou <oder_chiou@realtek.com> Cc: Bard Liao <bardliao@realtek.com> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1611944866-29373-5-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01ASoC: audio-graph-card: Add clocks property to endpoint nodeSameer Pujar
Add optional 'clocks' property to audio port 'endpoint' node. One such example is where SoC supplies a clock to external audio codec component. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/1611944866-29373-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01ASoC: dt-bindings: tegra: Add iommus property to Tegra graph cardSameer Pujar
Document 'iommus' property for APE (Audio Processing Engine) sound card. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1611944866-29373-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01ASoC: dt-bindings: rt5659: Update binding docSameer Pujar
Update following in rt5659.txt binding doc - Add JD source for Intel HDA header: Commit 041e74b71491 ("ASoC: rt5659: Add the support of Intel HDA Header") added driver support. Add missing info here. - sound-name-prefix: Used to prefix component widgets/kcontrols with given prefix. - ports: Helps to use the Codec with audio graph card Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reported-by: Jon Hunter <jonathanh@nvidia.com> Cc: Oder Chiou <oder_chiou@realtek.com> Cc: Bard Liao <bardliao@realtek.com> Link: https://lore.kernel.org/r/1611944866-29373-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-01ASoC: SOF: topology: Prevent NULL pointer dereference with no TLVRanjani Sridharan
When there is no TLV data in topology, extracting the TLV data could result in a NULL pointer exception. Prevent this by making sure that the TLV data exists before extracting it. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210201093128.1226603-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-29ASoC: soc-component: fix undefined reference to __ffssi2Srinivas Kandagatla
microblaze-linux-gcc (GCC) 9.3.0 complains about missing __ffssi2 symbol while using __builtin_ffs at runtime. This is because arch/h8300 is compiled with -fno-builtin option. so fallback and use kernel ffs() instead to all the arch builds happy! Fixes: 1da0b9899abd ("ASoC: soc-component: add snd_soc_component_read/write_field()") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210129100539.23459-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-28Merge series "ASoC: SOF: use common code for DSP core pm" from Kai Vehmanen ↵Mark Brown
<kai.vehmanen@linux.intel.com>: Series to refactor the DSP core management: - move tracking of powered up DSP cores to common SOF code - add logic filter unnecessary power actions - modify existing implementations to use common code whenever DSP cores are powered, so the state in common code stays in sync Bard Liao (5): ASoC: SOF: Intel: hda: use snd_sof_dsp_core_power_up/down API ASoC: SOF: Intel: hda-loader: keep init cores alive ASoC: SOF: update dsp core power status in common APIs ASoC: SOF: Filter out unneeded core power up/downs ASoC: SOF: intel: hda-loader: use snd_sof_dsp_core_power_down/up APIs sound/soc/sof/intel/hda-dsp.c | 2 +- sound/soc/sof/intel/hda-loader.c | 9 +++++---- sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/loader.c | 6 ------ sound/soc/sof/ops.h | 24 ++++++++++++++++++------ sound/soc/sof/pm.c | 1 - sound/soc/sof/topology.c | 8 -------- 7 files changed, 25 insertions(+), 27 deletions(-) base-commit: e32df142359fb6f4d27977b7652549f0844aa62f -- 2.29.2
2021-01-28ASoC: Intel: remove duplicate MODULE_LICENSE/DESCRIPTION tagsKai Vehmanen
The snd-soc-acpi-intel-match has duplicate module tags for all platforms separately. Remove all but one and save some storage space and cleanup modinfo output. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210128105751.1049837-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-28ASoC: SOF: intel: hda-loader: use snd_sof_dsp_core_power_down/up APIsBard Liao
To manage enabled_cores_mask flag, we should always use snd_sof_dsp_ core_power_down/up APIs to power up/down dsp cores. The APIs do a little bit more than the original functions, but it is harmless. Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210128093850.1041387-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-28ASoC: SOF: Filter out unneeded core power up/downsBard Liao
Exclude cores that are already powered on/off correctly. This allows to simplify dsp_power_up/down() implementations and avoid unexpected error. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210128093850.1041387-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-28ASoC: SOF: update dsp core power status in common APIsBard Liao
Only manage enabled_cores_mask in common snd_sof_dsp_core_power_up/down APIs to ensure it stays in sync with actual DSP core state. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210128093850.1041387-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-28ASoC: SOF: Intel: hda-loader: keep init cores aliveBard Liao
init_core_mask should be the available cores mask after fw boot. So we should keep not core 0 but init cores alive. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210128093850.1041387-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>