Mark Brown [Thu, 4 Feb 2021 19:49:57 +0000 (19:49 +0000)]
Merge series "ASoC: mediatek: mt8192: apply some cleanup" from Tzung-Bi Shih <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
Stephen Boyd [Tue, 2 Feb 2021 19:20:16 +0000 (11:20 -0800)]
ASoC: da7218: Drop CONFIG_OF ifdef
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>
Tzung-Bi Shih [Wed, 3 Feb 2021 03:22:01 +0000 (11:22 +0800)]
ASoC: mediatek: mt8192-mt6359: simplify ops for Capture1 DAI link
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>
Tzung-Bi Shih [Wed, 3 Feb 2021 03:22:00 +0000 (11:22 +0800)]
ASoC: mediatek: mt8192: use asoc_substream_to_rtd()
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>
Tzung-Bi Shih [Wed, 3 Feb 2021 03:21:59 +0000 (11:21 +0800)]
ASoC: mediatek: mt8192-mt6359: use asoc_substream_to_rtd()
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>
Mark Brown [Wed, 3 Feb 2021 21:02:32 +0000 (21:02 +0000)]
Merge series "ASoC: soc-pcm: cleanup soc_new_pcm() and bugfix" from Kuninori 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
Kuninori Morimoto [Fri, 22 Jan 2021 01:13:53 +0000 (10:13 +0900)]
ASoC: soc-pcm: fixup snd_pcm_limit_hw_rates() timing
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>
Kuninori Morimoto [Fri, 22 Jan 2021 01:13:48 +0000 (10:13 +0900)]
ASoC: soc-pcm: use snd_pcm_hardware at dpcm_runtime_merge_xxx()
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>
Kuninori Morimoto [Fri, 22 Jan 2021 01:13:43 +0000 (10:13 +0900)]
ASoC: soc-pcm: add soc_create_pcm() and simplify soc_new_pcm()
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>
Kuninori Morimoto [Fri, 22 Jan 2021 01:13:38 +0000 (10:13 +0900)]
ASoC: soc-pcm: add soc_get_playback_capture() and simplify soc_new_pcm()
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>
Kuninori Morimoto [Fri, 22 Jan 2021 01:13:32 +0000 (10:13 +0900)]
ASoC: soc-pcm: tidyup pcm setting
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>
Yang Li [Mon, 1 Feb 2021 08:01:21 +0000 (16:01 +0800)]
ASoC: Intel: catpt: remove unneeded semicolon
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>
Amadeusz Sławiński [Tue, 2 Feb 2021 16:31:23 +0000 (17:31 +0100)]
ASoC: topology: KUnit: Convert from cpu to data format
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>
Tang Bin [Thu, 28 Jan 2021 11:27:14 +0000 (19:27 +0800)]
ASoC: fsl_spdif: Utilize the defined parameter to clear code
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>
Tzung-Bi Shih [Tue, 2 Feb 2021 03:35:57 +0000 (11:35 +0800)]
ASoC: mt6359: reduce log verbosity for optional DT properties
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>
Mark Brown [Mon, 1 Feb 2021 14:52:59 +0000 (14:52 +0000)]
Merge series "Tegra186 and Tegra194 audio graph card" from Sameer Pujar <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
Geert Uytterhoeven [Fri, 29 Jan 2021 12:59:15 +0000 (13:59 +0100)]
ASoC: tegra: SND_SOC_TEGRA_AUDIO_GRAPH_CARD should depend on SND_SOC_TEGRA
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>
Sameer Pujar [Fri, 29 Jan 2021 18:27:41 +0000 (23:57 +0530)]
ASoC: rt5659: Add Kconfig prompt
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>
Sameer Pujar [Fri, 29 Jan 2021 18:27:40 +0000 (23:57 +0530)]
ASoC: audio-graph-card: Add clocks property to endpoint node
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>
Sameer Pujar [Fri, 29 Jan 2021 18:27:39 +0000 (23:57 +0530)]
ASoC: dt-bindings: tegra: Add iommus property to Tegra graph card
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>
Sameer Pujar [Fri, 29 Jan 2021 18:27:38 +0000 (23:57 +0530)]
ASoC: dt-bindings: rt5659: Update binding doc
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>
Srinivas Kandagatla [Fri, 29 Jan 2021 10:05:39 +0000 (10:05 +0000)]
ASoC: soc-component: fix undefined reference to __ffssi2
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>
Mark Brown [Thu, 28 Jan 2021 20:50:07 +0000 (20:50 +0000)]
Merge series "ASoC: SOF: use common code for DSP core pm" from Kai Vehmanen <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
Kai Vehmanen [Thu, 28 Jan 2021 10:57:51 +0000 (12:57 +0200)]
ASoC: Intel: remove duplicate MODULE_LICENSE/DESCRIPTION tags
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>
Bard Liao [Thu, 28 Jan 2021 09:38:50 +0000 (11:38 +0200)]
ASoC: SOF: intel: hda-loader: use snd_sof_dsp_core_power_down/up APIs
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>
Bard Liao [Thu, 28 Jan 2021 09:38:49 +0000 (11:38 +0200)]
ASoC: SOF: Filter out unneeded core power up/downs
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>
Bard Liao [Thu, 28 Jan 2021 09:38:48 +0000 (11:38 +0200)]
ASoC: SOF: update dsp core power status in common APIs
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>
Bard Liao [Thu, 28 Jan 2021 09:38:47 +0000 (11:38 +0200)]
ASoC: SOF: Intel: hda-loader: keep init cores alive
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>
Bard Liao [Thu, 28 Jan 2021 09:38:46 +0000 (11:38 +0200)]
ASoC: SOF: Intel: hda: use snd_sof_dsp_core_power_up/down API
To implement common logic in SOF core, core power up/down flows should
use common SOF API and not directly use low-level platform specific
helper functions.
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-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Libin Yang [Mon, 25 Jan 2021 07:05:00 +0000 (09:05 +0200)]
ASoC: Intel: adl: remove sof_fw_filename setting in ADL snd_soc_acpi_mach
ADL will use sof-adl-s.ri if it is ADL-S platform. So let's use
the default_fw_filename in pdata->desc for the ADL FW filename.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.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/20210125070500.807474-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 27 Jan 2021 15:27:11 +0000 (15:27 +0000)]
Merge series "ASoC: SOF: Intel: hda: Enable DMI L1 for power savings" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:
This series includes 2 patches that enable DMI L1 for D0I3-compatible
streams and trace DMA stream to maximise power savings on Intel
HDA platforms.
v2 changes:
FIx compilation error when probes feature is enabled in SOF Kconfig.
Ranjani Sridharan (2):
ASoC: SOF: Intel: hda: enable DMI L1 for D0i3-compatible streams
ASoC: SOF: Intel: hda: Enable DMI L1 for trace
sound/soc/sof/intel/hda-compress.c | 2 +-
sound/soc/sof/intel/hda-loader.c | 2 +-
sound/soc/sof/intel/hda-pcm.c | 16 ++++++++++++-
sound/soc/sof/intel/hda-stream.c | 38 +++++++++++++++++-------------
sound/soc/sof/intel/hda-trace.c | 4 ++--
sound/soc/sof/intel/hda.h | 6 ++++-
6 files changed, 46 insertions(+), 22 deletions(-)
--
2.25.1
Bjorn Helgaas [Tue, 26 Jan 2021 21:20:23 +0000 (15:20 -0600)]
ASoC: q6asm: fix 'physical' typos
Fix misspellings of "physical".
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210126212023.2921168-1-helgaas@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 26 Jan 2021 17:17:49 +0000 (17:17 +0000)]
ASoC: codecs: lpass-wsa-macro: make use of snd_soc_component_read_field()
Make use of snd_soc_component_read_field() to make the code more readable!
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210126171749.1863-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 26 Jan 2021 17:17:48 +0000 (17:17 +0000)]
ASoC: soc-component: add snd_soc_component_read/write_field()
It's often the case that we would write or read a particular field
in register. With the current soc_component apis, reading a particular
field in register would involve first read the register and then
perform shift operations.
Ex:
to read from a field mask of 0xf0
val = snd_soc_component_read(component, reg);
field = ((val & 0xf0) >> 0x4);
This is sometimes prone to errors and code become less readable!
With this new api we could just do
field = snd_soc_component_read_field(component, reg, 0xf0);
this makes it bit simple, easy to write and less error prone!
This also applies to writing!
There are various places in kernel which provides such field interfaces
however soc_component seems to be missing this.
This patch is inspired by FIELD_GET/FIELD_PREP macros in include/linux/bitfield.h
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210126171749.1863-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Wed, 27 Jan 2021 02:07:37 +0000 (18:07 -0800)]
ASoC: SOF: Intel: hda: Enable DMI L1 for trace
Enabling DMI L1 for capture streams could result in xruns during
pause/release. As pause/release is not a valid scenario for trace,
we can safely enable DMI L1 for it.
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210127020737.1088960-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Wed, 27 Jan 2021 02:07:36 +0000 (18:07 -0800)]
ASoC: SOF: Intel: hda: enable DMI L1 for D0i3-compatible streams
DMI L1 entry is currently disabled whenever any capture stream is
opened to prevent xruns during pause/release. But, in
order to maximise power savings for the wake-on-voice usecase,
DMI L1 entry should be enabled for D0i3-compatible capture streams.
Introduce a new field, flags in struct sof_intel_hda_stream
that stores whether a stream is dmi_l1_compatible. All playback streams,
and D0i3-compatible capture streams are DMI L1 compatible.
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210127020737.1088960-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Dmitry Osipenko [Wed, 20 Jan 2021 00:31:54 +0000 (03:31 +0300)]
ASoC: tegra: ahub: Reset hardware properly
Assert hardware resets before clocks are enabled and then de-assert them
after clocks are enabled. This brings hardware into a predictable state.
Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30 audio works
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30 boot-tested
Tested-by: Dmitry Osipenko <digetx@gmail.com> # Nexus7 T30 audio works
Tested-by: Nicolas Chauvet <kwizart@gmail.com> # TK1 boot-tested
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210120003154.26749-7-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Dmitry Osipenko [Wed, 20 Jan 2021 00:31:53 +0000 (03:31 +0300)]
ASoC: tegra: ahub: Use clk_bulk helpers
Use clk_bulk helpers to make code cleaner.
Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30 audio works
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30 boot-tested
Tested-by: Dmitry Osipenko <digetx@gmail.com> # Nexus7 T30 audio works
Tested-by: Nicolas Chauvet <kwizart@gmail.com> # TK1 boot-tested
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210120003154.26749-6-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Dmitry Osipenko [Wed, 20 Jan 2021 00:31:52 +0000 (03:31 +0300)]
ASoC: tegra: ahub: Add missing resets
AHUB driver misses D_AUDIO and APBIF resets. CPU hangs on trying to
access hardware if resets aren't de-asserted. This problem is currently
masked by the tegra-clk driver which implicitly de-asserts the resets when
the corresponding clocks are enabled. Soon the implicit de-assertion will
be gone from the tegra-clk driver, thus we need to fix the AHUB driver.
Add the missing resets to the driver.
Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30 audio works
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30 boot-tested
Tested-by: Dmitry Osipenko <digetx@gmail.com> # Nexus7 T30 audio works
Tested-by: Nicolas Chauvet <kwizart@gmail.com> # TK1 boot-tested
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210120003154.26749-5-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 21 Jan 2021 18:13:27 +0000 (18:13 +0000)]
Merge series "Add sanity checks for topology API calls" from Amadeusz Sławiński<amadeuszx.slawinski@linux.intel.com>:
Topology API exposes just 2 function calls, to load and unload topology.
This adds sanity checks to make sure that it behaves well when some of
parameters are set incoorectly or not needed.
This makes developer live easier by failing early instead of proceeding
on and then failing in unexpected ways.
As loading and unloading topology usually happens one the overhead of
additional checks should be negligible.
Amadeusz Sławiński (2):
ASoC: topology: Ensure that needed parameters are set
ASoC: topology: Check if ops is set before dereference
sound/soc/soc-topology.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
--
2.25.1
Mark Brown [Thu, 21 Jan 2021 18:13:25 +0000 (18:13 +0000)]
Merge series "ASoC: sync parameter naming : rate / sample_bits" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
snd_pcm_runtime / snd_soc_dai / snd_soc_dai_driver / snd_soc_dai_link
have related parameter which is similar but not same naming.
struct snd_pcm_runtime {
...
(A) unsigned int rate;
...
(B) unsigned int sample_bits;
...
};
struct snd_soc_dai {
...
(A) unsigned int rate;
(B) unsigned int sample_bits;
...
};
struct snd_soc_dai_driver {
...
(A) unsigned int symmetric_rates:1;
(B) unsigned int symmetric_samplebits:1;
...
};
struct snd_soc_dai_link {
...
(A) unsigned int symmetric_rates:1;
(B) unsigned int symmetric_samplebits:1;
...
};
Because it is similar but not same naming rule,
code can be verbose / can't share macro.
This patch-set sync naming rule
to struct snd_pcm_runtime base.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Kuninori Morimoto (44):
ASoC: soc-pcm: revert soc_pcm_apply_symmetry()
ASoC: sync parameter naming : rate / sample_bits
ASoC: adi: sync parameter naming (rate/sample_bits)
ASoC: atmel: sync parameter naming (rate/sample_bits)
ASoC: au1x: sync parameter naming (rate/sample_bits)
ASoC: bcm: sync parameter naming (rate/sample_bits)
ASoC: cirrus: sync parameter naming (rate/sample_bits)
ASoC: tegra: sync parameter naming (rate/sample_bits)
ASoC: rockchip: sync parameter naming (rate/sample_bits)
ASoC: samsung: sync parameter naming (rate/sample_bits)
ASoC: sh: sync parameter naming (rate/sample_bits)
ASoC: ti: sync parameter naming (rate/sample_bits)
ASoC: pxa: sync parameter naming (rate/sample_bits)
ASoC: mediatek: sync parameter naming (rate/sample_bits)
ASoC: fsl: sync parameter naming (rate/sample_bits)
ASoC: wm*: sync parameter naming (rate/sample_bits)
ASoC: tlv*: sync parameter naming (rate/sample_bits)
ASoC: rt*: sync parameter naming (rate/sample_bits)
ASoC: nau*: sync parameter naming (rate/sample_bits)
ASoC: tas*: sync parameter naming (rate/sample_bits)
ASoC: da*: sync parameter naming (rate/sample_bits)
ASoC: es*: sync parameter naming (rate/sample_bits)
ASoC: max*: sync parameter naming (rate/sample_bits)
ASoC: cs*: sync parameter naming (rate/sample_bits)
ASoC: tscs*: sync parameter naming (rate/sample_bits)
ASoC: ak*: sync parameter naming (rate/sample_bits)
ASoC: adau*: sync parameter naming (rate/sample_bits)
ASoC: jz4740: sync parameter naming (rate/sample_bits)
ASoC: sunxi: sync parameter naming (rate/sample_bits)
ASoC: zl38060: sync parameter naming (rate/sample_bits)
ASoC: ssm2602: sync parameter naming (rate/sample_bits)
ASoC: sgtl5000: sync parameter naming (rate/sample_bits)
ASoC: mc13783: sync parameter naming (rate/sample_bits)
ASoC: mt6660: sync parameter naming (rate/sample_bits)
ASoC: lochnagar-sc: sync parameter naming (rate/sample_bits)
ASoC: ab8500: sync parameter naming (rate/sample_bits)
ASoC: alc5632: sync parameter naming (rate/sample_bits)
ASoC: cx2072x: sync parameter naming (rate/sample_bits)
ASoC: inno_rk3036: sync parameter naming (rate/sample_bits)
ASoC: lm49453: sync parameter naming (rate/sample_bits)
ASoC: ml26124: sync parameter naming (rate/sample_bits)
ASoC: soc-dai.h: remove symmetric_rates/samplebits
ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()
ASoC: soc-pcm: cleanup soc_pcm_params_symmetry()
include/sound/soc-dai.h | 4 +-
include/sound/soc.h | 4 +-
sound/soc/adi/axi-i2s.c | 2 +-
sound/soc/atmel/atmel-i2s.c | 2 +-
sound/soc/atmel/mchp-i2s-mcc.c | 4 +-
sound/soc/au1x/i2sc.c | 2 +-
sound/soc/bcm/bcm2835-i2s.c | 4 +-
sound/soc/bcm/bcm63xx-i2s-whistler.c | 2 +-
sound/soc/cirrus/ep93xx-i2s.c | 2 +-
sound/soc/codecs/ab8500-codec.c | 4 +-
sound/soc/codecs/adau1372.c | 2 +-
sound/soc/codecs/adau1373.c | 6 +-
sound/soc/codecs/adau1701.c | 2 +-
sound/soc/codecs/ak4554.c | 2 +-
sound/soc/codecs/ak4613.c | 2 +-
sound/soc/codecs/ak4641.c | 4 +-
sound/soc/codecs/ak4642.c | 2 +-
sound/soc/codecs/alc5632.c | 2 +-
sound/soc/codecs/cs35l32.c | 2 +-
sound/soc/codecs/cs35l33.c | 2 +-
sound/soc/codecs/cs35l34.c | 2 +-
sound/soc/codecs/cs35l35.c | 2 +-
sound/soc/codecs/cs35l36.c | 2 +-
sound/soc/codecs/cs4234.c | 2 +-
sound/soc/codecs/cs4271.c | 2 +-
sound/soc/codecs/cs42l73.c | 6 +-
sound/soc/codecs/cs43130.c | 6 +-
sound/soc/codecs/cs4341.c | 2 +-
sound/soc/codecs/cs4349.c | 2 +-
sound/soc/codecs/cs47l15.c | 12 ++--
sound/soc/codecs/cs47l24.c | 12 ++--
sound/soc/codecs/cs47l35.c | 12 ++--
sound/soc/codecs/cs47l85.c | 16 ++---
sound/soc/codecs/cs47l90.c | 16 ++---
sound/soc/codecs/cs47l92.c | 12 ++--
sound/soc/codecs/cs53l30.c | 2 +-
sound/soc/codecs/cx2072x.c | 2 +-
sound/soc/codecs/da7210.c | 2 +-
sound/soc/codecs/da7213.c | 2 +-
sound/soc/codecs/da7218.c | 4 +-
sound/soc/codecs/da7219.c | 4 +-
sound/soc/codecs/da9055.c | 2 +-
sound/soc/codecs/es8316.c | 2 +-
sound/soc/codecs/es8328.c | 2 +-
sound/soc/codecs/inno_rk3036.c | 2 +-
sound/soc/codecs/jz4740.c | 2 +-
sound/soc/codecs/lm49453.c | 2 +-
sound/soc/codecs/lochnagar-sc.c | 12 ++--
sound/soc/codecs/max9860.c | 2 +-
sound/soc/codecs/max9867.c | 2 +-
sound/soc/codecs/mc13783.c | 2 +-
sound/soc/codecs/ml26124.c | 2 +-
sound/soc/codecs/mt6660.c | 4 +-
sound/soc/codecs/nau8810.c | 2 +-
sound/soc/codecs/nau8822.c | 2 +-
sound/soc/codecs/rt274.c | 2 +-
sound/soc/codecs/rt286.c | 4 +-
sound/soc/codecs/rt298.c | 4 +-
sound/soc/codecs/rt5670.c | 4 +-
sound/soc/codecs/sgtl5000.c | 2 +-
sound/soc/codecs/ssm2602.c | 4 +-
sound/soc/codecs/tas2764.c | 2 +-
sound/soc/codecs/tas2770.c | 2 +-
sound/soc/codecs/tlv320adcx140.c | 2 +-
sound/soc/codecs/tlv320aic31xx.c | 4 +-
sound/soc/codecs/tlv320aic32x4.c | 2 +-
sound/soc/codecs/tlv320aic3x.c | 2 +-
sound/soc/codecs/tscs42xx.c | 4 +-
sound/soc/codecs/tscs454.c | 12 ++--
sound/soc/codecs/wm5102.c | 12 ++--
sound/soc/codecs/wm5110.c | 12 ++--
sound/soc/codecs/wm8510.c | 2 +-
sound/soc/codecs/wm8731.c | 2 +-
sound/soc/codecs/wm8770.c | 2 +-
sound/soc/codecs/wm8804.c | 2 +-
sound/soc/codecs/wm8903.c | 2 +-
sound/soc/codecs/wm8904.c | 2 +-
sound/soc/codecs/wm8940.c | 2 +-
sound/soc/codecs/wm8960.c | 2 +-
sound/soc/codecs/wm8962.c | 2 +-
sound/soc/codecs/wm8974.c | 2 +-
sound/soc/codecs/wm8978.c | 2 +-
sound/soc/codecs/wm8983.c | 2 +-
sound/soc/codecs/wm8985.c | 2 +-
sound/soc/codecs/wm8988.c | 2 +-
sound/soc/codecs/wm8993.c | 2 +-
sound/soc/codecs/wm8994.c | 4 +-
sound/soc/codecs/wm8997.c | 8 +--
sound/soc/codecs/wm8998.c | 12 ++--
sound/soc/codecs/wm9713.c | 2 +-
sound/soc/codecs/zl38060.c | 4 +-
sound/soc/fsl/fsl_esai.c | 4 +-
sound/soc/fsl/fsl_sai.c | 8 +--
sound/soc/fsl/fsl_ssi.c | 4 +-
sound/soc/jz4740/jz4740-i2s.c | 2 +-
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 10 +--
sound/soc/mediatek/mt6797/mt6797-dai-pcm.c | 8 +--
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +-
sound/soc/mediatek/mt8183/mt8183-dai-pcm.c | 8 +--
sound/soc/mediatek/mt8192/mt8192-dai-pcm.c | 8 +--
sound/soc/pxa/pxa2xx-i2s.c | 2 +-
sound/soc/rockchip/rockchip_i2s.c | 4 +-
sound/soc/rockchip/rockchip_pdm.c | 2 +-
sound/soc/samsung/i2s.c | 2 +-
sound/soc/samsung/pcm.c | 2 +-
sound/soc/sh/rcar/core.c | 4 +-
sound/soc/soc-pcm.c | 80 +++++++---------------
sound/soc/soc-topology.c | 8 +--
sound/soc/sunxi/sun4i-i2s.c | 2 +-
sound/soc/sunxi/sun8i-codec.c | 12 ++--
sound/soc/tegra/tegra186_dspk.c | 2 +-
sound/soc/tegra/tegra20_i2s.c | 2 +-
sound/soc/tegra/tegra210_dmic.c | 2 +-
sound/soc/tegra/tegra210_i2s.c | 2 +-
sound/soc/tegra/tegra30_i2s.c | 2 +-
sound/soc/ti/davinci-mcasp.c | 2 +-
116 files changed, 253 insertions(+), 283 deletions(-)
--
2.25.1
Mark Brown [Thu, 21 Jan 2021 18:13:24 +0000 (18:13 +0000)]
Merge series "Add KUNIT tests for ASoC topology" from Amadeusz Sławiński<amadeuszx.slawinski@linux.intel.com>:
This series adds unit tests for ASoC topology.
First fix problems found when developing and running test cases and
then add tests implementation.
Tests themselves are quite simple and just call
snd_soc_tplg_component_load() with various parameters and check the
result. Tests themselves are described in more detail in commits
adding them.
Goal is to expand the amount of test cases in following patches.
Prerequisity for this patchset are 2 patches which have already been
sent:
https://lore.kernel.org/alsa-devel/
20210114163602.911205-1-amadeuszx.slawinski@linux.intel.com/T/#t
Description on how typical test case itself works:
In order to load topology we need to have 3 things:
card, codec component & platform component.
In typical test case we register card and platform component and bind
to dummy codec. There are of course execeptions, when we want to
test behaviour of topology API when component or card is missing.
Note that this is bit different from typical scenario (in SOF and skylake
drivers) where card is registered by machine driver and component by
platform driver, as we register both when setting up test.
If you check the test case most of them have similar architecture of:
1.
/* run test */
ret = snd_soc_register_card(&kunit_comp->card);
if (ret != 0 && ret != -EPROBE_DEFER)
KUNIT_FAIL(test, "Failed to register card");
2.
ret = snd_soc_component_initialize(&kunit_comp->comp, &test_component, test_dev);
KUNIT_EXPECT_EQ(test, 0, ret);
3.
ret = snd_soc_add_component(&kunit_comp->comp, NULL, 0);
KUNIT_EXPECT_EQ(test, 0, ret);
Ad. 1.
First we register card, which in most tests returns -EPROBE_DEFER
(from snd_soc_bind_card()), as platform component is not yet created.
I test for both 0 and -EPROBE_DEFER, as it makes it easier to reshuffle
this code around if needed and there is one test case which does it in
different order.
Ad. 2.
Then we initialize platform component with structure pointing at proper
probe function, which calls snd_soc_tplg_component_load() with test
parameters and checks expected result.
Ad. 3.
And then in follow up we call snd_soc_add_component() which creates
platform component for us and calls snd_soc_try_rebind_card() which
if everything is bound properly calls previously set probe function.
Amadeusz Sławiński (5):
ASoC: topology: Properly unregister DAI on removal
Revert "ASoC: soc-devres: add devm_snd_soc_register_dai()"
ASoC: topology: KUnit: Add KUnit tests passing various arguments to
snd_soc_tplg_component_load
ASoC: topology: KUnit: Add KUnit tests passing empty topology with
variants to snd_soc_tplg_component_load
ASoC: topology: KUnit: Add KUnit tests passing topology with PCM to
snd_soc_tplg_component_load
include/sound/soc.h | 4 -
sound/soc/Kconfig | 17 +
sound/soc/Makefile | 5 +
sound/soc/soc-devres.c | 37 --
sound/soc/soc-topology-test.c | 843 ++++++++++++++++++++++++++++++++++
sound/soc/soc-topology.c | 9 +-
6 files changed, 870 insertions(+), 45 deletions(-)
create mode 100644 sound/soc/soc-topology-test.c
--
2.25.1
Shuming Fan [Thu, 21 Jan 2021 10:03:53 +0000 (18:03 +0800)]
ASoC: rt5682: remove connection with LDO2 in DAPM graph
The application circuit shall provide MICVDD power.
In default, the codec driver doesn't need to enable LDO2.
In case, a board wants to use VBAT for micbias,
it should add a DAPM route which IN1P connects with LDO2 in the machine driver.
e.g. { "IN1P", NULL, "LDO2" },
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20210121100353.6402-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:39 +0000 (13:56 +0900)]
ASoC: soc-pcm: cleanup soc_pcm_params_symmetry()
soc_pcm_params_symmetry() checks rate/channel/sample_bits state.
These are very similar but different, thus, it needs to have very
verbose code.
This patch use macro for it and make code more simple.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878s8un6si.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:35 +0000 (13:56 +0900)]
ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()
soc_pcm_apply_symmetry() want to call snd_pcm_hw_constraint_single()
for rate/channel/sample_bits, but, it needs many condition checks.
These are very similar but different, thus, it needs to have very
verbose code.
This patch use macro for it and make code more simple.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6tan6sm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:30 +0000 (13:56 +0900)]
ASoC: soc-dai.h: remove symmetric_rates/samplebits
All drivers are using new name.
Let's remove old one.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bldqn6sr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:21 +0000 (13:56 +0900)]
ASoC: ml26124: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87czy6n6t0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:16 +0000 (13:56 +0900)]
ASoC: lm49453: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eeimn6t4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:12 +0000 (13:56 +0900)]
ASoC: inno_rk3036: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ft32n6t8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:09 +0000 (13:56 +0900)]
ASoC: cx2072x: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7nin6tc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:04 +0000 (13:56 +0900)]
ASoC: alc5632: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im7yn6th.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:00 +0000 (13:56 +0900)]
ASoC: ab8500: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0sen6tl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:56 +0000 (13:55 +0900)]
ASoC: lochnagar-sc: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfcun6tp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:51 +0000 (13:55 +0900)]
ASoC: mt6660: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtxan6tt.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:47 +0000 (13:55 +0900)]
ASoC: mc13783: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8hqn6ty.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:40 +0000 (13:55 +0900)]
ASoC: sgtl5000: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pn26n6u4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:34 +0000 (13:55 +0900)]
ASoC: ssm2602: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1mmn6ub.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:29 +0000 (13:55 +0900)]
ASoC: zl38060: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg72n6ug.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:25 +0000 (13:55 +0900)]
ASoC: sunxi: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87turin6uk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:20 +0000 (13:55 +0900)]
ASoC: jz4740: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9byn6uo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:01 +0000 (13:55 +0900)]
ASoC: adau*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wnwen6v8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:56 +0000 (13:54 +0900)]
ASoC: ak*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2gun6vc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:52 +0000 (13:54 +0900)]
ASoC: tscs*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zh1an6vh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:48 +0000 (13:54 +0900)]
ASoC: cs*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871remolg1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:44 +0000 (13:54 +0900)]
ASoC: max*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735z2olg5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:39 +0000 (13:54 +0900)]
ASoC: es*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kjiolga.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:33 +0000 (13:54 +0900)]
ASoC: da*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875z3yolgf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:29 +0000 (13:54 +0900)]
ASoC: tas*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877doeolgk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:25 +0000 (13:54 +0900)]
ASoC: nau*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878s8uolgo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:21 +0000 (13:54 +0900)]
ASoC: rt*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6taolgs.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:17 +0000 (13:54 +0900)]
ASoC: tlv*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bldqolgw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:13 +0000 (13:54 +0900)]
ASoC: wm*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87czy6olh0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:08 +0000 (13:54 +0900)]
ASoC: fsl: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eeimolh5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:03 +0000 (13:54 +0900)]
ASoC: mediatek: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ft32olha.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:58 +0000 (13:53 +0900)]
ASoC: pxa: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7niolhf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:53 +0000 (13:53 +0900)]
ASoC: ti: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im7yolhk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:49 +0000 (13:53 +0900)]
ASoC: sh: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0seolho.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:43 +0000 (13:53 +0900)]
ASoC: samsung: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfcuolhu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:38 +0000 (13:53 +0900)]
ASoC: rockchip: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtxaolhz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:33 +0000 (13:53 +0900)]
ASoC: tegra: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8hqoli4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:29 +0000 (13:53 +0900)]
ASoC: cirrus: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pn26oli8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:23 +0000 (13:53 +0900)]
ASoC: bcm: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1mmolie.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:18 +0000 (13:53 +0900)]
ASoC: au1x: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg72olij.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:13 +0000 (13:53 +0900)]
ASoC: atmel: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87turiolio.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:00 +0000 (13:53 +0900)]
ASoC: adi: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9byolj1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:52:54 +0000 (13:52 +0900)]
ASoC: sync parameter naming : rate / sample_bits
snd_pcm_runtime / snd_soc_dai / snd_soc_dai_driver / snd_soc_dai_link
have related parameter which is similar but not same naming.
struct snd_pcm_runtime {
...
(A) unsigned int rate;
...
(B) unsigned int sample_bits;
...
};
struct snd_soc_dai {
...
(A) unsigned int rate;
(B) unsigned int sample_bits;
...
};
struct snd_soc_dai_driver {
...
(A) unsigned int symmetric_rates:1;
(B) unsigned int symmetric_samplebits:1;
...
};
struct snd_soc_dai_link {
...
(A) unsigned int symmetric_rates:1;
(B) unsigned int symmetric_samplebits:1;
...
};
Because it is similar but not same naming rule,
code can be verbose / can't share macro.
This patch sync naming rule for framework.
- xxx_rates;
+ xxx_rate;
- xxx_samplebits;
+ xxx_sample_bits;
old name will be removed if all drivers were switched
to new naming rule.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wnweolj6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 15 Jan 2021 04:52:38 +0000 (13:52 +0900)]
ASoC: soc-pcm: revert soc_pcm_apply_symmetry()
commit
a39748d03cbc ("ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()")
was applied by miscommunication.
To more cleanup code, and to be easy review, this patch reverts it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2guoljm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Thu, 14 Jan 2021 16:36:02 +0000 (11:36 -0500)]
ASoC: topology: Check if ops is set before dereference
Topology can be created without ops overrides, in that case trying to
assign any value would lead to dereferencing NULL pointer.
Other places in code have either checks for tplg->ops or loop using
*_count variables, hence they can't dereference NULL pointer and there
is no need to add more checks.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20210114163602.911205-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Thu, 14 Jan 2021 16:36:01 +0000 (11:36 -0500)]
ASoC: topology: Ensure that needed parameters are set
As snd_soc_tplg_component_load is exported function, which means it is
part of API, there should be checks if it is called with proper
parameters.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20210114163602.911205-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Wed, 20 Jan 2021 15:28:46 +0000 (16:28 +0100)]
ASoC: topology: KUnit: Add KUnit tests passing topology with PCM to snd_soc_tplg_component_load
In order to ensure correct behaviour of topology API, add unit tests
exercising topology functionality.
Add topology containing PCM template and tests for parsing it. Also
adds test cases simulating modules reloads in case of separate drivers
for card and component.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210120152846.1703655-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Wed, 20 Jan 2021 15:28:45 +0000 (16:28 +0100)]
ASoC: topology: KUnit: Add KUnit tests passing empty topology with variants to snd_soc_tplg_component_load
In order to ensure correct behaviour of topology API, add unit tests
exercising topology functionality.
Add "empty" topology template and tests for parsing it. Also adds few
variants with bad magic numbers.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210120152846.1703655-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Wed, 20 Jan 2021 15:28:44 +0000 (16:28 +0100)]
ASoC: topology: KUnit: Add KUnit tests passing various arguments to snd_soc_tplg_component_load
In order to ensure correct behaviour of topology API, add unit tests
exercising topology functionality.
Start with adding cases for passing various arguments to
snd_soc_tplg_component_load as it is part of exposed topology API.
First test case adds test passing NULL component as argument.
Following one adds test case for passing NULL ops as argument.
Finally add test case passing NULL fw as argument.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210120152846.1703655-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 21 Jan 2021 00:00:58 +0000 (00:00 +0000)]
Merge series "ASoC: mediatek: mt8192-mt6359: support DP audio" from Tzung-Bi Shih <tzungbi@google.com>:
The 1st and 2nd patches refactor the machine driver.
The 3rd patch changes the platform driver to support TDM 8 channel output.
The 4th patch adds an optional DT property.
The 5th patch makes the machine driver support DP audio if the optional DT
property is specified.
Tzung-Bi Shih (5):
ASoC: mediatek: mt8192-mt6359: move headset_jack to card specific data
ASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_init
ASoC: mediatek: mt8192: change mclk_multiple of TDM from 128 to 512
ASoC: dt-bindings: mt8192-mt6359: add hdmi-codec property
ASoC: mediatek: mt8192-mt6359: support audio over DP
.../sound/mt8192-mt6359-rt1015-rt5682.yaml | 5 ++
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 2 +-
.../mt8192/mt8192-mt6359-rt1015-rt5682.c | 54 ++++++++++++++++---
3 files changed, 52 insertions(+), 9 deletions(-)
--
2.30.0.284.gd98b1dd5eaa7-goog
Mark Brown [Thu, 21 Jan 2021 00:00:56 +0000 (00:00 +0000)]
Merge series "ASoC: remove obsolete drivers" from Arnd Bergmann <arnd@>
Arnd Bergmann <arnd@arndb.de>:
From: Arnd Bergmann <arnd@arndb.de>
A few Arm platforms are getting removed in v5.12, this removes
the corresponding sound drivers.
Link: https://lore.kernel.org/linux-arm-kernel/20210120124812.2800027-1-arnd@kernel.org/T/
Arnd Bergmann (2):
ASoC: remove sirf prima/atlas drivers
ASoC: remove zte zx drivers
.../bindings/sound/sirf-audio-codec.txt | 17 -
.../devicetree/bindings/sound/sirf-usp.txt | 27 -
.../devicetree/bindings/sound/zte,tdm.txt | 30 -
.../bindings/sound/zte,zx-aud96p22.txt | 24 -
.../devicetree/bindings/sound/zte,zx-i2s.txt | 45 --
.../bindings/sound/zte,zx-spdif.txt | 27 -
sound/soc/Kconfig | 2 -
sound/soc/Makefile | 2 -
sound/soc/codecs/Makefile | 4 -
sound/soc/codecs/sirf-audio-codec.c | 575 ------------------
sound/soc/codecs/zx_aud96p22.c | 401 ------------
sound/soc/sirf/Kconfig | 21 -
sound/soc/sirf/Makefile | 8 -
sound/soc/sirf/sirf-audio-port.c | 86 ---
sound/soc/sirf/sirf-audio.c | 160 -----
sound/soc/sirf/sirf-usp.c | 435 -------------
sound/soc/sirf/sirf-usp.h | 292 ---------
sound/soc/zte/Kconfig | 26 -
sound/soc/zte/Makefile | 4 -
sound/soc/zte/zx-i2s.c | 452 --------------
sound/soc/zte/zx-spdif.c | 363 -----------
sound/soc/zte/zx-tdm.c | 458 --------------
22 files changed, 3459 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-codec.txt
delete mode 100644 Documentation/devicetree/bindings/sound/sirf-usp.txt
delete mode 100644 Documentation/devicetree/bindings/sound/zte,tdm.txt
delete mode 100644 Documentation/devicetree/bindings/sound/zte,zx-aud96p22.txt
delete mode 100644 Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
delete mode 100644 Documentation/devicetree/bindings/sound/zte,zx-spdif.txt
delete mode 100644 sound/soc/codecs/sirf-audio-codec.c
delete mode 100644 sound/soc/codecs/zx_aud96p22.c
delete mode 100644 sound/soc/sirf/Kconfig
delete mode 100644 sound/soc/sirf/Makefile
delete mode 100644 sound/soc/sirf/sirf-audio-port.c
delete mode 100644 sound/soc/sirf/sirf-audio.c
delete mode 100644 sound/soc/sirf/sirf-usp.c
delete mode 100644 sound/soc/sirf/sirf-usp.h
delete mode 100644 sound/soc/zte/Kconfig
delete mode 100644 sound/soc/zte/Makefile
delete mode 100644 sound/soc/zte/zx-i2s.c
delete mode 100644 sound/soc/zte/zx-spdif.c
delete mode 100644 sound/soc/zte/zx-tdm.c
--
2.29.2
Arnd Bergmann [Wed, 20 Jan 2021 16:25:53 +0000 (17:25 +0100)]
ASoC: remove zte zx drivers
The zte zx platform is getting removed, so this driver is no
longer needed.
Cc: Jun Nie <jun.nie@linaro.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210120162553.21666-3-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Wed, 20 Jan 2021 16:25:52 +0000 (17:25 +0100)]
ASoC: remove sirf prima/atlas drivers
The CSR SiRF prima2/atlas platforms are getting removed, so this driver
is no longer needed.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Barry Song <baohua@kernel.org>
Link: https://lore.kernel.org/r/20210120162553.21666-2-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Fabio Estevam [Mon, 18 Jan 2021 12:38:15 +0000 (09:38 -0300)]
ASoC: fsl_spdif: Remove of_device_get_match_data() error check
The only way this driver can be probed is via devicetree, which always
provides driver data.
Remove the unneeded of_device_get_match_data() error check, as it
can never fail.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-6-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fabio Estevam [Mon, 18 Jan 2021 12:38:14 +0000 (09:38 -0300)]
ASoC: fsl_esai: Remove of_device_get_match_data() error check
The only way this driver can be probed is via devicetree, which always
provides driver data.
Remove the unneeded of_device_get_match_data() error check, as it
can never fail.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-5-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fabio Estevam [Mon, 18 Jan 2021 12:38:13 +0000 (09:38 -0300)]
ASoC: fsl_asrc: Remove of_device_get_match_data() error check
The only way this driver can be probed is via devicetree, which always
provides driver data.
Remove the unneeded of_device_get_match_data() error check, as it
can never fail.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-4-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fabio Estevam [Mon, 18 Jan 2021 12:38:12 +0000 (09:38 -0300)]
ASoC: fsl_xcvr: Remove unused of_id variable
The of_id variable is not used, so just remove it.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-3-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>