The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062701.803865-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.
Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Link: https://lore.kernel.org/r/20210407095634.GA1379642@LEGION
Signed-off-by: Mark Brown <broonie@kernel.org>
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062643.802908-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
In DT binding is mentioned that this driver is compatible with 3106.
So added compatibility string and model number.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210408135908.125667-1-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062700.803792-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Current simple-card / audio-graph creates 1xCPU + 1xCodec + 1xPlatform
for all dai_link, but some of them is not needed.
For example Platform is not needed for DPCM BE case.
Moreover, we can share snd-soc-dummy DAI for CPU-dummy / dummy-Codec
in DPCM.
This patch adds dummy DAI and share it when DPCM case,
I beliave it can contribute to reduce memory.
By this patch, CPU-dummy / dummy-CPU are set at asoc_simple_init_priv(),
thus, its settings are no longer needed at DPCM detecting timing
on simple-card / audio-graph.
Moreover, we can remove triky Platform settings code for DPCM BE,
because un-needed Platform is not created.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tuoqod22.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Current simple-card / audio-graph are assuming fixed
single-CPU/Codec/Platform.
This patch prepares multi-CPU/Codec/Platform support.
Note is that it is not yet full-multi-support.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v996od2c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
On the AXG family, the fifo irq is not necessary for the HW to operate.
It is just used to notify that a period has elapsed. If userpace does not
care for these wakeups (such as pipewire), we are just wasting CPU cycles.
Add support for NO_PERIOD_WAKEUP and disable irq when they are no needed.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20210407145914.311479-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The 'single_cpu' local variable is assigned by asoc_simple_parse_dai()
and later used in a asoc_simple_canonicalize_cpu() call, assuming the
entire function did not exit on errors.
However the first function returns 0 if passed device_node is NULL,
thus leaving the variable uninitialized and reporting success.
Addresses-Coverity: Uninitialized scalar variable
Fixes: 8f7f298a33 ("ASoC: simple-card-utils: separate asoc_simple_card_parse_dai()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20210407092027.60769-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210407074218.3051979-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.corp-partner.google.com>:
From: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.corp-partner.google.com>
Hi all,
This patch series about creating dailink for Wake on voice functionality
and also adding MST route changes.
changes in v3:
-Remove DP from widgets
-Add MST support in other routing table for kbl_rt5663_max98927.c
v2 is here:
https://patchwork.kernel.org/project/alsa-devel/cover/20210325174325.31802-1-vamshi.krishna.gopal@intel.com/
v1 is here:
https://patchwork.kernel.org/project/alsa-devel/cover/20210324175200.44922-1-vamshi.krishna.gopal@intel.com/
Mac Chiang (1):
ASoc: Intel: board: add BE DAI link for WoV
Vamshi Krishna Gopal (1):
ASoC: Intel: kbl: Add MST route change to kbl machine drivers
sound/soc/intel/boards/kbl_da7219_max98357a.c | 58 +++++++++++++++++--
sound/soc/intel/boards/kbl_da7219_max98927.c | 10 ++--
sound/soc/intel/boards/kbl_rt5663_max98927.c | 14 +++--
3 files changed, 70 insertions(+), 12 deletions(-)
--
2.17.1
create dai link in kbl_da7219_max98357a driver for wake on voice
functionality.
changes picked from broonie's tree
commit 0c7941a63a
("ASoC: Intel: Skylake: Use refcap device for mono recording")
commit 2154be362c
("ASoc: Intel: boards: Add WOV as sink for nau88l25_ssm4567 machine")
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Tested-by: Kaiyen Chang <kaiyen.chang@intel.corp-partner.google.com>
Tested-by: luke yang <luke_yang@compal.corp-partner.google.com>
Tested-by: Grace Kao <grace.kao@intel.com>
Tested-by: Kaiyen Chang <kaiyen.chang@intel.com>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210405124835.71247-3-vamshi.krishna.gopal@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
To support MST hdmi audio, modify the current routes to be
based on port in kbl_da7219_max98357a, kbl_da7219_max98927 &
kbl_rt5663_max98927.
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210405124835.71247-2-vamshi.krishna.gopal@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Set the card.components string using the new rt5670_components() helper
which returns a components string based on the DMI quirks inside the
rt5670 codec driver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210402140747.174716-7-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The rt5670 codec driver uses DMI quirks to configure the DMIC data-pins,
which means that it knows which DMIC interface is used on a specific
device.
ATM we duplicate this DMI matching inside the UCM profiles to select
the right DMIC interface. Add a rt5670_components() helper which the
machine-driver can use to set the components string of the card so
that UCM can get the info from the components string.
This way we only need to add new DMI quirks in one place.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210402140747.174716-6-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Add a quirk with the jack-detect and dmic settings necessary to make
jack-detect and the builtin mic work on Dell Venue 10 Pro 5055 tablets.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210402140747.174716-5-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The rt5672 codec is used on some Bay Trail CR boards, on these SoCs SSP2
is not available and SSP0 should be used instead. At support for this.
This has been tested on a Dell Venue 10 Pro 5055.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210402140747.174716-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The Dell Venue 10 Pro 5055 tablet uses an ACPI HID of 10EC5640 while using
a rt5672 codec (instead of a rt5640 codec). Add a quirk for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210402140747.174716-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
There is no reason to have separate quirk-handlers / byt_machine_id-s
for these.
These are both cases of BYT devices with a 10EC5640 ACPI HID while using
a rt5672 codec.
The Dell Venue 10 Pro 5055 is another example of such a device, instead
of adding a third byt_machine_id definition for this Dell model, make
change the 2 existing cases into a generic BYT_RT5672 byt_machine_id
in preparation for adding a quirk for the Dell Venue 10 Pro 5055.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210402140747.174716-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The property "dmas" contains two items: DMA "TX" and "RX" channel,
Therefore, its value also needs to be written in two parts.
Otherwise, below YAML check warning is reported:
Documentation/devicetree/bindings/sound/intel,keembay-i2s.example.dt.yaml:\
i2s@20140000: dmas: [[4294967295, 29, 4294967295, 33]] is too short
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210329081435.2200-1-thunder.leizhen@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
There are the last two patches in the cleanups, this time I am not
sure what the code does and what the proper fix might be. Feedback
welcome.
Pierre-Louis Bossart (2):
ASoC: lm49453: fix useless assignment before return
ASoC: da732x: simplify code
sound/soc/codecs/da732x.c | 17 ++++++-----------
sound/soc/codecs/da732x.h | 12 ++++--------
sound/soc/codecs/lm49453.c | 2 --
3 files changed, 10 insertions(+), 21 deletions(-)
--
2.25.1
This series refactors the audio-graph-port.yaml schema moving the
'port' node out of the schema and updating to use graph.yaml schema.
This allows users to define what each 'port' node is like other graph
binding users.
v2:
- Rebase on ASoC tree
Rob
Cc: alsa-devel@alsa-project.org
Cc: linux-tegra@vger.kernel.org
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Mark Brown <broonie@kernel.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Sameer Pujar <spujar@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Rob Herring (3):
ASoC: dt-bindings: Move port/ports properties out of
audio-graph-port.yaml
ASoC: dt-bindings: Use OF graph schema
ASoC: dt-bindings: socionext: Use audio-graph-port schema
.../bindings/sound/audio-graph-port.yaml | 104 ++++++++----------
.../bindings/sound/marvell,mmp-sspa.yaml | 6 +-
.../bindings/sound/nvidia,tegra186-dspk.yaml | 11 +-
.../sound/nvidia,tegra210-admaif.yaml | 11 +-
.../bindings/sound/nvidia,tegra210-ahub.yaml | 11 +-
.../bindings/sound/nvidia,tegra210-dmic.yaml | 11 +-
.../bindings/sound/nvidia,tegra210-i2s.yaml | 11 +-
.../bindings/sound/renesas,rsnd.yaml | 5 +-
.../sound/socionext,uniphier-aio.yaml | 8 +-
.../sound/socionext,uniphier-evea.yaml | 8 +-
10 files changed, 89 insertions(+), 97 deletions(-)
--
2.27.0
Hi Mark
These are small clanup patches for soc-core.
[1/2] patch adds missing explanation, and
[2/2] patch fixup error handling of rtd.
Kuninori Morimoto (2):
ASoC: soc-core: add comment for rtd freeing
ASoC: soc-core: use device_unregister() if rtd allocation failed
sound/soc/soc-core.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--
2.25.1
cppcheck warning:
sound/soc/ti/omap-mcbsp.c:379:11: style: The if condition is the same
as the previous if condition [duplicateCondition]
if (mcbsp->irq) {
^
sound/soc/ti/omap-mcbsp.c:376:11: note: First condition
if (mcbsp->irq)
^
sound/soc/ti/omap-mcbsp.c:379:11: note: Second condition
if (mcbsp->irq) {
^
Keeping two separate tests was probably intentional for clarity, but
since this generates warnings we might as well make cppcheck happy so
that we have fewer warnings.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20210326215927.936377-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
cppcheck warning:
sound/soc/ti/omap-abe-twl6040.c:173:10: style: Variable 'ret' is
assigned a value that is never used. [unreadVariable]
int ret = 0;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20210326215927.936377-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
cppcheck warning:
sound/soc/tegra/tegra20_das.c:64:60: style: Boolean result is used in
bitwise operation. Clarify expression with
parentheses. [clarifyCondition]
reg = otherdap << TEGRA20_DAS_DAP_CTRL_SEL_DAP_CTRL_SEL_P |
^
sound/soc/tegra/tegra20_das.c:65:61: style: Boolean result is used in
bitwise operation. Clarify expression with
parentheses. [clarifyCondition]
!!sdata2rx << TEGRA20_DAS_DAP_CTRL_SEL_DAP_SDATA2_TX_RX_P |
^
sound/soc/tegra/tegra20_das.c:66:61: style: Boolean result is used in
bitwise operation. Clarify expression with
parentheses. [clarifyCondition]
!!sdata1rx << TEGRA20_DAS_DAP_CTRL_SEL_DAP_SDATA1_TX_RX_P |
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210326215927.936377-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
cppcheck warning:
sound/soc/stm/stm32_adfsdm.c:120:2: warning: %d in format
string (no. 1) requires 'int' but the argument type is 'unsigned
int'. [invalidPrintfArgType_sint]
snprintf(str_freq, sizeof(str_freq), "%d\n", freq);
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210326215927.936377-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
cppcheck warning:
sound/soc/sti/sti_uniperif.c:490:6: style: Variable 'ret' is
reassigned a value before the old one has been
used. [redundantAssignment]
ret = devm_snd_soc_register_component(&pdev->dev,
^
sound/soc/sti/sti_uniperif.c:486:6: note: ret is assigned
ret = sti_uniperiph_cpu_dai_of(node, priv);
^
sound/soc/sti/sti_uniperif.c:490:6: note: ret is overwritten
ret = devm_snd_soc_register_component(&pdev->dev,
^
sti_uniperiph_cpu_dai_of() can return -EINVAL which seems like a
good-enough reason to bail.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20210326215927.936377-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
cppcheck warning:
sound/soc/pxa/mmp-pcm.c:207:10: style: Variable 'ret' is assigned a
value that is never used. [unreadVariable]
int ret = 0, stream;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210326215927.936377-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
cppcheck complains about potential null pointer dereference but it's
rather an unnecessary assignment to NULL before walking through a
list.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210326215927.936377-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
cppcheck complains about potential null pointer dereference but it's
rather an unnecessary assignment to NULL before walking through a
list.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210326215927.936377-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cppcheck warning:
sound/soc/bcm/cygnus-ssp.c:1364:6: style: Redundant initialization for
'err'. The initialized value is overwritten before it is
read. [redundantInitialization]
err = devm_snd_soc_register_component(dev, &cygnus_ssp_component,
^
sound/soc/bcm/cygnus-ssp.c:1313:10: note: err is initialized
int err = -EINVAL;
^
sound/soc/bcm/cygnus-ssp.c:1364:6: note: err is overwritten
err = devm_snd_soc_register_component(dev, &cygnus_ssp_component,
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210326215927.936377-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>