Nathan Chancellor [Wed, 23 Aug 2023 16:32:50 +0000 (09:32 -0700)]
ASoC: cs42l43: Initialize ret in default case in cs42l43_pll_ev()
clang warns (or errors with CONFIG_WERROR=y):
sound/soc/codecs/cs42l43.c:1371:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
1371 | default:
| ^~~~~~~
sound/soc/codecs/cs42l43.c:1377:9: note: uninitialized use occurs here
1377 | return ret;
| ^~~
sound/soc/codecs/cs42l43.c:1349:9: note: initialize the variable 'ret' to silence this warning
1349 | int ret;
| ^
| = 0
1 error generated.
Initialize ret to 0 in the default case, as there was nothing to do for
other event types.
Closes: https://github.com/ClangBuiltLinux/linux/issues/1922
Fixes:
fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20230823-cs42l43_pll_ev-init-ret-v1-1-5836f1ad5dad@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 23 Aug 2023 18:54:51 +0000 (19:54 +0100)]
Add I2S support for the StarFive JH7110 SoC
Merge series from Xingyu Wu <xingyu.wu@starfivetech.com>:
This patch series adds I2S support for the StarFive JH7110 RISC-V
SoC based on Designware I2S controller. There has three I2S channels
(RX/TX0/TX1) on the JH7110 SoC, one of which is for record(RX) and
two for playback(TX).
The first patch adds support for the StarFive JH7110 SoC in the
Designware I2S bindings.
The second patch adds the ops to get data from platform bus in the
I2S driver.
The third patch adds support for the StarFive JH7110 SoC in
the Designware I2S driver.
The fourth patch fixes the name of I2STX1 pinmux.
The last patch adds device node of I2S RX/TX0/TX1 in JH7110 dts.
This patch series is based on Linux-next(
20230818) which is merge
clock, syscon and dma nodes for the StarFive JH7110 SoC.
The series has been tested and works normally on the VisionFive 2
board by plugging an audio expansion board.
Mark Brown [Wed, 23 Aug 2023 18:54:43 +0000 (19:54 +0100)]
ASoC: rsnd: tidyup ADG
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Renesas Sound has ADG for clock control. Basically it needs
accurately divisible external input clock. But sometimes
sometimes it doesn't have to be accurate for some reason.
We can use ADG clk_i for such case. It came from CPG as
very high rate clock, but is not accurately divisible for
48kHz/44.1kHz rate, but enough for approximate rate.
This patch set support such use case.
Kuninori Morimoto [Wed, 23 Aug 2023 00:19:42 +0000 (00:19 +0000)]
ASoC: audio-graph-card2: add comment for format property
We don't need to have "format" property on DT any more if
CPU/Codec driver has .auto_selectable_formats settings
on snd_soc_dai_ops. The sample dtsi doesn't have it.
To avoid user confusion, this patch indicates it on comment.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87edjuzk2p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xingyu Wu [Mon, 21 Aug 2023 14:41:49 +0000 (22:41 +0800)]
ASoC: dwc: i2s: Add StarFive JH7110 SoC support
Add StarFive JH7110(TX0/TX1/RX channels) SoC support in the
designware I2S driver and a flag to check if it is on the JH7110 SoC.
These channels need to enable clocks, resets and syscon register on the
JH7110 SoC. So add init ops in platform data for the JH7110 SoC to do this.
Their resets should be deassert before changing the parent of clocks so
these are done in the init ops of platform data.
The I2S controllers use DMA controller by platform data on the JH7110
and their settings about snd_dmaengine_dai_dma_data() should be added
in the dw_configure_dai_by_pd(). And use dmaengine PCM registration if
these do not have IRQ on the JH7110 SoC.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Link: https://lore.kernel.org/r/20230821144151.207339-4-xingyu.wu@starfivetech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xingyu Wu [Mon, 21 Aug 2023 14:41:48 +0000 (22:41 +0800)]
ASoC: dwc: Use ops to get platform data
Use of_device_get_match_data() to get platform data.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Link: https://lore.kernel.org/r/20230821144151.207339-3-xingyu.wu@starfivetech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xingyu Wu [Mon, 21 Aug 2023 14:41:47 +0000 (22:41 +0800)]
ASoC: dt-bindings: snps,designware-i2s: Add StarFive JH7110 SoC support
Add the StarFive JH7110 (TX0/TX1/RX channel) SoC support in the bindings
of Designware I2S controller. The I2S controller needs two reset items
to work properly on the JH7110 SoC. And TX0 channel as master mode needs
5 clock items and TX1/RX channels as slave mode need 9 clock items on
the JH7110 SoC. The RX channel needs System Register Controller property
to enable it and other platforms do not need it.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230821144151.207339-2-xingyu.wu@starfivetech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:51:02 +0000 (23:51 +0000)]
ASoC: rsnd: setup BRGCKR/BRRA/BRRB on rsnd_adg_clk_control()
Current adg.c will configure BRGCKR/BRRA/BRRB to output clock
when it start sound. OTAH, rsnd_adg_clk_enable() will enables
clk_a/b/c when driver was probed.
But it is strange, these should be set in the same time.
This patch fixup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h6oqzlei.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:54 +0000 (23:50 +0000)]
ASoC: rsnd: remove default division of clock out
Current adg has default division for BRRA/BRRB, but it was created at
very beginning of the driver implementation, and is now an unnecessary
settings.
Because it has this default division, unexpected clockout might
be selected. For example if it requests only 44.1kHz base clockout,
unrequested 48kHz base clockout also will be selected.
This patch remove default division of clock out
Reported-by: Vincenzo De Michele <vincenzo.michele@davinci.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87il96zlep.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:48 +0000 (23:50 +0000)]
ASoC: rsnd: tidyup brga/brgb default value
default value for brga/brgb should be 0xff instead of 0x2.
This patch tidyup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87jztmzlew.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:36 +0000 (23:50 +0000)]
ASoC: rsnd: setup clock-out only when all conditions are right
Current adg.c doesn't assume that requested clock out divide condition
doesn't match. In such case, it will indicate strange message, and will
register NULL clock, etc. It is just a DT setting miss, but is
confusable. This patch check all conditions for it.
Reported-by: Vincenzo De Michele <vincenzo.michele@davinci.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lee2zlf7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:31 +0000 (23:50 +0000)]
ASoC: rsnd: enable clk_i approximate rate usage
Basically Renesas sound ADG is assuming that it has accurately
divisible input clock. But sometimes / some board might not have it.
The clk_i from CPG is used for such case. It can't calculate accurate
division, but can be used as approximate rate.
This patch enable clk_i for such case.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Adnan Ali <adnan.ali@bp.renesas.com>
Tested-by: Vincenzo De Michele <vincenzo.michele@davinci.de>
Tested-by: Patrick Keil <patrick.keil@conti-engineering.com>
Link: https://lore.kernel.org/r/87msyizlfd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Seven Lee [Wed, 23 Aug 2023 07:12:44 +0000 (15:12 +0800)]
ASoC: nau8821: Improve AMIC recording performance.
Since the hardware may be designed as a single-ended input, the headset mic
record only supports single-ended input on the left side. This patch
will enhance microphone recording performance for single-end.
Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20230823071244.1861487-2-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Seven Lee [Wed, 23 Aug 2023 07:12:43 +0000 (15:12 +0800)]
ASoC: dt-bindings: nau8821: Add single-ended input feature
Add input with single-ended control.
Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20230823071244.1861487-1-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Linus Walleij [Tue, 22 Aug 2023 20:55:44 +0000 (22:55 +0200)]
ASoC: Delete UDA134x/L3 audio codec
This codec was used by the deleted S3C board
sound/soc/samsung/s3c24xx_uda134x.c.
Fixes:
503278c12701 ("ASoC: samsung: remove unused drivers")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230822-delete-l3-v2-1-b3ffc07348af@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:39 +0000 (13:03 +0530)]
ASoC: SOF: amd: clear dsp to host interrupt status
DSP_SW_INTR_STAT_OFFSET is a common interrupt register which will be
accessed by both ACP firmware and driver. This register contains register
bits corresponds to host to dsp interrupts and vice versa.
when dsp to host interrupt is reported, only clear dsp to host
interrupt bit in DSP_SW_INTR_STAT_OFFSET.
Fixes:
2e7c6652f9b8 ("ASoC: SOF: amd: Fix for handling spurious interrupts from DSP")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:38 +0000 (13:03 +0530)]
ASoC: SOF: amd: clear panic mask status when panic occurs
Due to scratch memory persistence, Once the DSP panic is reported, need to
clear the panic mask after handling DSP panic. Otherwise, It results in DSP
panic on next reboot.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:37 +0000 (13:03 +0530)]
ASoC: SOF: amd: add conditional check for acp_clkmux_sel register
Few AMD platforms require ACP ACLK as clock source.
Add conditional check for clock mux selection register for
switching between internal clock and ACP ACLK.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:36 +0000 (13:03 +0530)]
ASoC: SOF: amd: remove redundant clock mux selection register write
ACP clock mux selection register is already programmed during acp init
sequence.
Remove the redundant register write.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:35 +0000 (13:03 +0530)]
ASoC: SOF: amd: add module parameter for firmware debug
Add module parameter for firmware debug. If firmware debug
flag is enabled, clear the fusion stall bit which is required
for enabling firmware debugging through JTAG.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:34 +0000 (13:03 +0530)]
ASoC: SOF: amd: enable ACP external global interrupt
Previously ACP SOF firmware used to enable the ACP external
global interrupt register.
This will restrict to report ACP host interrupts only after
firmware loading is successful.
This register needs to be set from host driver to handle
other ACP interrupts(SoundWire Interrupts) before loading
the ACP firmware.
Add field for external interrupt enable register in acp descriptor
structure and enable the external interrupt enable register.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:33 +0000 (13:03 +0530)]
ASoC: SOF: amd: remove unused sha dma interrupt code
During initial development time for RN platform, when SHA
dma gets completed, SHA DMA engine used to raise the ACP interrupt.
In ACP interrupt handler, SHA DMA interrupt got handled.
Currently SHA DMA compleition is verified by checking
transfer count using read poll time out logic.
Remove unused SHA dma interrupt handling code.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 01:10:59 +0000 (01:10 +0000)]
ASoC: fsl: merge DAI call back functions into ops
ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202308152047.psX1QNDh-lkp@intel.com/
Cc: Randy Dunlap <rdunlap@infradead.org>
Fixes:
446b31e89493 ("ASoC: soc-dai.h: remove unused call back functions")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://lore.kernel.org/r/87a5ujubj0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Tue, 22 Aug 2023 06:54:19 +0000 (09:54 +0300)]
ASoC: SOF: ipc4-topology: Add module parameter to ignore the CPC value
Add a new module parameter ipc4_ignore_cpc which can be used to force the
kernel to ignore the queried CPC value for all firmware modules and use 0
instead.
The CPC lookup is still done to report missing configurations and the
debug print is going to be different to be explicit that the CPC is ignored
and what was the value we would have used.
The CPC value is sent to the firmware with the MOD_INIT_INSTANCE message
and it is used by the firmware as a parameter for clock scaling.
The flag is intended to be used only when there is a need to validate the
firmware behavior regarding to clock scaling since the 0 CPC value will
force the DSP to run in full speed, disabling the scaling and provides
additional counter point to rule out clock management related issues.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20230822065419.24374-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 01:11:23 +0000 (01:11 +0000)]
ASoC: pxa: merge DAI call back functions into ops
ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202308151142.hoM5o9LV-lkp@intel.com/
Fixes:
446b31e89493 ("ASoC: soc-dai.h: remove unused call back functions")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878ra3ubid.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 22 Aug 2023 11:48:16 +0000 (12:48 +0100)]
ASoC: SOF: ipc4-topology: Fixes for pipelines with SRC
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
The SRC component in a pipeline provides flexibility on the sampling
rate which was not handled previously. This series will improve the
kernel side with the needed logic to be able to deal with the SRC type
of components in pipelines.
Mark Brown [Tue, 22 Aug 2023 11:48:04 +0000 (12:48 +0100)]
Add cs42l43 PC focused SoundWire CODEC
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
This patch chain adds support for the Cirrus Logic cs42l43 PC focused
SoundWire CODEC. The chain is currently based of Lee's for-mfd-next
branch.
This series is mostly just a resend keeping pace with the kernel under
it, except for a minor fixup in the ASoC stuff.
Thanks,
Charles
Charles Keepax (4):
dt-bindings: mfd: cirrus,cs42l43: Add initial DT binding
mfd: cs42l43: Add support for cs42l43 core driver
pinctrl: cs42l43: Add support for the cs42l43
ASoC: cs42l43: Add support for the cs42l43
Lucas Tanure (2):
soundwire: bus: Allow SoundWire peripherals to register IRQ handlers
spi: cs42l43: Add SPI controller support
.../bindings/sound/cirrus,cs42l43.yaml | 313 +++
MAINTAINERS | 4 +
drivers/mfd/Kconfig | 23 +
drivers/mfd/Makefile | 3 +
drivers/mfd/cs42l43-i2c.c | 98 +
drivers/mfd/cs42l43-sdw.c | 239 ++
drivers/mfd/cs42l43.c | 1188 +++++++++
drivers/mfd/cs42l43.h | 28 +
drivers/pinctrl/cirrus/Kconfig | 11 +
drivers/pinctrl/cirrus/Makefile | 2 +
drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 609 +++++
drivers/soundwire/bus.c | 32 +
drivers/soundwire/bus_type.c | 12 +
drivers/spi/Kconfig | 7 +
drivers/spi/Makefile | 1 +
drivers/spi/spi-cs42l43.c | 284 ++
include/linux/mfd/cs42l43-regs.h | 1184 +++++++++
include/linux/mfd/cs42l43.h | 102 +
include/linux/soundwire/sdw.h | 9 +
include/sound/cs42l43.h | 17 +
sound/soc/codecs/Kconfig | 16 +
sound/soc/codecs/Makefile | 4 +
sound/soc/codecs/cs42l43-jack.c | 946 +++++++
sound/soc/codecs/cs42l43-sdw.c | 74 +
sound/soc/codecs/cs42l43.c | 2278 +++++++++++++++++
sound/soc/codecs/cs42l43.h | 131 +
26 files changed, 7615 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs42l43.yaml
create mode 100644 drivers/mfd/cs42l43-i2c.c
create mode 100644 drivers/mfd/cs42l43-sdw.c
create mode 100644 drivers/mfd/cs42l43.c
create mode 100644 drivers/mfd/cs42l43.h
create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs42l43.c
create mode 100644 drivers/spi/spi-cs42l43.c
create mode 100644 include/linux/mfd/cs42l43-regs.h
create mode 100644 include/linux/mfd/cs42l43.h
create mode 100644 include/sound/cs42l43.h
create mode 100644 sound/soc/codecs/cs42l43-jack.c
create mode 100644 sound/soc/codecs/cs42l43-sdw.c
create mode 100644 sound/soc/codecs/cs42l43.c
create mode 100644 sound/soc/codecs/cs42l43.h
--
2.30.2
Senhong Liu [Sat, 19 Aug 2023 13:33:45 +0000 (06:33 -0700)]
ASoC: rt5640: fix typos
I noticed typos and i fixed them.
Signed-off-by: Senhong Liu <liusenhong2022@email.szu.edu.cn>
Link: https://lore.kernel.org/r/20230819133345.39961-1-liusenhong2022@email.szu.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Wed, 9 Aug 2023 12:35:22 +0000 (18:05 +0530)]
ASoC: SOF: amd: Enable signed firmware image loading for Vangogh platform
Enable signed firmware loading for Vangogh platform using dmi quirks.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230809123534.287707-3-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Wed, 9 Aug 2023 12:35:21 +0000 (18:05 +0530)]
ASoC: SOF: amd: Add support for signed fw image loading
Add support for signed firmware code bin and data bin
loading for amd platforms.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230809123534.287707-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Wed, 9 Aug 2023 12:35:20 +0000 (18:05 +0530)]
ASoC: SOF: amd: Add sof support for vangogh platform
Add pci driver and platform driver to enable SOF support
on ACP5x architecture based Vangogh platform.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230809123534.287707-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:29 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Modify the reference output valid_bits for copier
If the copier has only output valid_bits across all its output
formats, the reference for selecting the output format must be set that
instead of the valid_bits from the selected input format.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:28 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Fix pipeline params at the output of copier
When we walk the list of connected widgets from the source to the sink
to prepare all widgets, the pipeline_params must be modified to reflect
the output audio format at each widget. But, the copier only modifies
the sample format in the pipeline_params. So, fix it to also modify the
rate and channels.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:27 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Fix the output reference params for SRC
For playback, the SRC sink rate must be configured based on the requested
output format which is restricted to only handle DAI's that support a
single audio format for now. For capture, the SRC module should convert
the rate to match the rate requested by the PCM hw_params.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:26 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Modify pipeline params based on SRC output format
Modify the pipeline_params based on the SRC output format and set the
sink_rate in the IPC data.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Fri, 4 Aug 2023 10:46:02 +0000 (11:46 +0100)]
ASoC: cs42l43: Add support for the cs42l43
The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
(Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
for portable applications. It provides a high dynamic range, stereo
DAC for headphone output, two integrated Class D amplifiers for
loudspeakers, and two ADCs for wired headset microphone input or
stereo line input. PDM inputs are provided for digital microphones.
The ASoC component provides the majority of the functionality of the
device, all the audio functions.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230804104602.395892-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 18 Aug 2023 16:37:08 +0000 (17:37 +0100)]
mfd: Immutable branch between MFD, Pinctrl and soundwire due for the v6.6 merge window
Merge tag 'ib-mfd-pinctrl-soundwire-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into tmp
Immutable branch between MFD, Pinctrl and soundwire due for the v6.6 merge window
Alper Nebi Yasak [Fri, 18 Aug 2023 08:03:14 +0000 (11:03 +0300)]
ASoC: amd: acp: Add kcontrols and widgets per-codec in common code
Commit
7ac3404c2e21 ("ASoC: amd: acp: Map missing jack kcontrols") adds
card kcontrols and DAPM widgets corresponding to jacks for Headphone and
Headset Mic. But these were already being added in acp-legacy-mach.c and
acp-sof-mach.c, so this causes a probe error:
sof_mach rt5682s-hs-rt1019: control 2:0:0:Headphone Jack Switch:0 is already present
sof_mach rt5682s-hs-rt1019: ASoC: Failed to add Headphone Jack Switch: -16
sof_mach rt5682s-hs-rt1019: devm_snd_soc_register_card(sof-rt5682s-hs-rt1019) failed: -16
sof_mach: probe of rt5682s-hs-rt1019 failed with error -16
Removing the new duplicates from the common code might be enough to fix
the issue. But some of the codecs use different kcontrols and widgets.
NAU8821 alone has an "Int Mic". MAX98360A has a single "Spk", while
RT1019 has "Left Spk" and "Right Spk" (and two codec instances with name
prefixes).
Since there are per-codec differences, add the kcontrols and widgets
in the common code as each dai-link is being initialized, instead of in
the two machine drivers' probe().
Also, MAX98388 has Left and Right instances, but uses a single "SPK"
widget. That seems weird, so normalize it to use two widgets (one per
each instance like RT1019) while we're adding controls.
Fixes:
7ac3404c2e21 ("ASoC: amd: acp: Map missing jack kcontrols")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20230818080314.32991-1-alpernebiyasak@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shuming Fan [Fri, 18 Aug 2023 02:37:32 +0000 (02:37 +0000)]
ASoC: rt5645: improve the depop sequences of CBJ detection
This patch will improve the depop function of CBJ detection before the headphone playback
when the system resumes.
We also want to complete the CBJ detection in the system-level resume function.
It could avoid triggering the detection at the playing state of headphones.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20230818023732.2153170-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 17 Aug 2023 18:18:58 +0000 (19:18 +0100)]
ASoC: Merge up fixes
For the benefit of CI.
Mark Brown [Thu, 17 Aug 2023 17:36:42 +0000 (18:36 +0100)]
ASoC: Convert remaining Realtek codecs to GPIO
Merge series from Linus Walleij <linus.walleij@linaro.org>:
After dropping unused headers a few Realtek devices
actually using the GPIO descriptors remain.
Converting them to use optional GPIO descriptors is
pretty straight-forward.
Mark Brown [Thu, 17 Aug 2023 17:36:28 +0000 (18:36 +0100)]
ASoC: cs35l56: Update ACPI HID and property
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
These two patches add an ACPI HID and update the way the platform-
specific firmware identifier is extracted from the ACPI.
Linus Walleij [Thu, 17 Aug 2023 14:03:21 +0000 (16:03 +0200)]
ASoC: rt5682s: Convert to use GPIO descriptors
Convert the RT5682S to use GPIO descriptors and drop the
legacy GPIO headers.
We remove the global GPIO number from the platform data,
but it is still possible to create board files using GPIO
descriptor tables, if desired.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230817-descriptors-asoc-rt-v2-5-02fa2ca3e5b0@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Linus Walleij [Thu, 17 Aug 2023 14:03:20 +0000 (16:03 +0200)]
ASoC: rt5682: Convert to use GPIO descriptors
Convert the RT5682 to use GPIO descriptors and drop the
legacy GPIO headers.
We remove the global GPIO number from the platform data,
but it is still possible to create board files using GPIO
descriptor tables, if desired.
Make sure to make sure SDW devices can associate with
an LDO1 EN descriptor too, if they so desire by putting
the lookup into the common code.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230817-descriptors-asoc-rt-v2-4-02fa2ca3e5b0@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Linus Walleij [Thu, 17 Aug 2023 14:03:19 +0000 (16:03 +0200)]
ASoC: rt5668: Convert to use GPIO descriptors
Convert the RT5668 to use GPIO descriptors and drop the
legacy GPIO headers.
We remove the global GPIO number from the platform data,
but it is still possible to create board files using GPIO
descriptor tables, if desired.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230817-descriptors-asoc-rt-v2-3-02fa2ca3e5b0@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Linus Walleij [Thu, 17 Aug 2023 14:03:18 +0000 (16:03 +0200)]
ASoC: rt5665: Convert to use GPIO descriptors
The RT5665 driver has some stub support for GPIO descriptors
going back to the initial driver commit, where there are
two GPIO descriptors for the LDO and headphone detection
defined in the device state. Well, let's make use of the
descriptor properly.
We remove the global GPIO number from the platform data,
but it is still possible to create board files using GPIO
descriptor tables, if desired.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230817-descriptors-asoc-rt-v2-2-02fa2ca3e5b0@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Linus Walleij [Thu, 17 Aug 2023 14:03:17 +0000 (16:03 +0200)]
ASoC: rt5640: Convert to just use GPIO descriptors
The RT5640 driver is already using GPIO descriptors for some
stuff, all that is needed is to convert the remaining LDO1
control line to also use descriptors.
Simplify the code using gpiod_get_optional() and drop the
special "of" parsing function: these descriptors need not
come from device tree and it's optional so hey.
Keep some NULL checks around the GPIO operations even though
gpiolib is essentially NULL-tolerant, because by checking
for whether we have a valid GPIO descriptor or not we can
avoid a 400 ms delay which is great.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230817-descriptors-asoc-rt-v2-1-02fa2ca3e5b0@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Maso Huang [Thu, 17 Aug 2023 10:13:38 +0000 (18:13 +0800)]
ASoC: dt-bindings: mediatek,mt7986-afe: add audio afe document
Add mt7986 audio afe document.
Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230817101338.18782-7-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maso Huang [Thu, 17 Aug 2023 10:13:37 +0000 (18:13 +0800)]
ASoC: dt-bindings: mediatek,mt7986-wm8960: add mt7986-wm8960 document
Add document for mt7986 board with wm8960.
Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230817101338.18782-6-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maso Huang [Thu, 17 Aug 2023 10:13:36 +0000 (18:13 +0800)]
ASoC: mediatek: mt7986: add machine driver with wm8960
Add support for mt7986 board with wm8960.
Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230817101338.18782-5-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maso Huang [Thu, 17 Aug 2023 10:13:35 +0000 (18:13 +0800)]
ASoC: mediatek: mt7986: add platform driver
Add mt7986 platform driver.
Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230817101338.18782-4-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maso Huang [Thu, 17 Aug 2023 10:13:34 +0000 (18:13 +0800)]
ASoC: mediatek: mt7986: support etdm in platform driver
Add mt7986 etdm dai driver support.
Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230817101338.18782-3-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maso Huang [Thu, 17 Aug 2023 10:13:33 +0000 (18:13 +0800)]
ASoC: mediatek: mt7986: add common header
Add header files for register definition and structure.
Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230817101338.18782-2-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shenghao Ding [Thu, 17 Aug 2023 09:32:56 +0000 (17:32 +0800)]
ASoC: tas2781: fixed register access error when switching to other chips
fixed register access error when switching to other tas2781 -- refresh the page
inside regmap on the switched tas2781
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20230817093257.951-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Simon Trimmer [Thu, 17 Aug 2023 11:27:12 +0000 (12:27 +0100)]
ASoC: cs35l56: Add an ACPI match table
An ACPI ID has been allocated for CS35L56 ASoC devices so that they can
be instantiated from ACPI Device entries.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230817112712.16637-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maciej Strozek [Thu, 17 Aug 2023 11:27:11 +0000 (12:27 +0100)]
ASoC: cs35l56: Read firmware uuid from a device property instead of _SUB
Use a device property "cirrus,firmware-uid" to get the unique firmware
identifier instead of using ACPI _SUB. There aren't any products that use
_SUB.
There will not usually be a _SUB in Soundwire nodes. The ACPI can use a
_DSD section for custom properties.
There is also a need to support instantiating this driver using software
nodes. This is for systems where the CS35L56 is a back-end device and the
ACPI refers only to the front-end audio device - there will not be any ACPI
references to CS35L56.
Fixes:
e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230817112712.16637-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Fri, 4 Aug 2023 10:46:00 +0000 (11:46 +0100)]
pinctrl: cs42l43: Add support for the cs42l43
The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
(Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
for portable applications. It provides a high dynamic range, stereo
DAC for headphone output, two integrated Class D amplifiers for
loudspeakers, and two ADCs for wired headset microphone input or
stereo line input. PDM inputs are provided for digital microphones.
Add a basic pinctrl driver which supports driver strength for the
various pins, gpios, and pinmux for the 2 multi-function pins.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230804104602.395892-5-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Charles Keepax [Fri, 4 Aug 2023 10:45:59 +0000 (11:45 +0100)]
mfd: cs42l43: Add support for cs42l43 core driver
The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
(Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
for portable applications. It provides a high dynamic range, stereo
DAC for headphone output, two integrated Class D amplifiers for
loudspeakers, and two ADCs for wired headset microphone input or
stereo line input. PDM inputs are provided for digital microphones.
The MFD component registers and initialises the device and provides
PM/system power management.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230804104602.395892-4-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Charles Keepax [Fri, 4 Aug 2023 10:45:58 +0000 (11:45 +0100)]
dt-bindings: mfd: cirrus,cs42l43: Add initial DT binding
The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
(Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
for portable applications. It provides a high dynamic range, stereo
DAC for headphone output, two integrated Class D amplifiers for
loudspeakers, and two ADCs for wired headset microphone input or
stereo line input. PDM inputs are provided for digital microphones.
Add a YAML DT binding document for this device.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230804104602.395892-3-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Lucas Tanure [Fri, 4 Aug 2023 10:45:57 +0000 (11:45 +0100)]
soundwire: bus: Allow SoundWire peripherals to register IRQ handlers
Currently the in-band alerts for SoundWire peripherals can only
be communicated to the driver through the interrupt_callback
function. This however is slightly inconvenient for devices that wish
to share IRQ handling code between SoundWire and I2C/SPI, the later
would normally register an IRQ handler with the IRQ subsystem. However
there is no reason the SoundWire in-band IRQs can not also be
communicated as an actual IRQ to the driver.
Add support for SoundWire peripherals to register a normal IRQ
handler to receive SoundWire in-band alerts, allowing code to be
shared across control buses. Note that we allow users to use both the
interrupt_callback and the IRQ handler, this is useful for devices
which must clear additional chip specific SoundWire registers that are
not a part of the normal IRQ flow, or the SoundWire specification.
Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230804104602.395892-2-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:59 +0000 (08:32 +0200)]
ASoC: samsung: tm2_wm5110: parse audio-routing
Parse generic sound card "audio-routing" property and fallback to
"samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:58 +0000 (08:32 +0200)]
ASoC: samsung: odroid: parse audio-routing
Parse generic sound card "audio-routing" property and fallback to
"samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:57 +0000 (08:32 +0200)]
ASoC: samsung: midas_wm1811: parse audio-routing
Parse generic sound card "audio-routing" property and fallback to
"samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:56 +0000 (08:32 +0200)]
ASoC: samsung: aries_wm8994: parse audio-routing
Parse generic sound card "audio-routing" property and fallback to
"samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:55 +0000 (08:32 +0200)]
ASoC: samsung: odroid: use of_property_present to check for property
"samsung,audio-widgets" and "samsung,audio-routing" are not boolean
properties, thus more appropriate is to use of_property_present() to
check if they are present.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:54 +0000 (08:32 +0200)]
ASoC: dt-bindings: samsung,tm2: use common sound card
Reference the common sound card properties and deprecate the
custom "samsung,audio-routing" in favor of generic one. This allows to
remove "model" property and make the binding closer to other sounds
cards.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:53 +0000 (08:32 +0200)]
ASoC: dt-bindings: samsung,odroid: use common sound card
Reference the common sound card properties and deprecate the
custom "samsung,audio-routing" in favor of generic one. This allows to
remove "model" property and make the binding closer to other sounds
cards.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:52 +0000 (08:32 +0200)]
ASoC: dt-bindings: samsung,midas-audio: use common sound card
Reference the common sound card properties and deprecate the
custom "samsung,audio-routing" in favor of generic one. This allows to
remove "model" property and make the binding closer to other sounds
cards.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:51 +0000 (08:32 +0200)]
ASoC: dt-bindings: samsung,aries-wm8994: use common sound card
Reference the common sound card properties and deprecate the
custom "samsung,audio-routing" in favor of generic one. This allows to
remove "model" property and make the binding closer to other sounds
cards.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:50 +0000 (08:32 +0200)]
ASoC: dt-bindings: mediatek,mt8188-mt6359: use common sound card
The mediatek,mt8188-mt6359 Linux sound machine driver requires the
"model" property, so binding was incomplete. Reference the common sound
card properties to fix that which also allows to remove duplicated
property definitions. Leave the relevant parts of "audio-routing"
description.
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20230810063300.20151-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 10 Aug 2023 06:32:49 +0000 (08:32 +0200)]
ASoC: dt-bindings: Add common sound card properties
Almost every board machine / sound cards has "audio-routing" and "model"
properties, so move them to common schema to have only one definition of
these properties.
For amlogic,gx-sound-card, drop the minItems: 2 from the
"audio-routing", because any limit here - lower or upper- is rather
meaningless. This will also fix `dtbs_check` warnings like:
meson-gxm-s912-libretech-pc.dtb: sound: audio-routing: ['AU2 INL', 'ACODEC LOLN', 'AU2 INR', 'ACODEC LORN', '7J4-14 LEFT', 'AU2 OUTL', '7J4-11 RIGHT', 'AU2 OUTR'] is too long
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Chao Song [Wed, 16 Aug 2023 13:33:11 +0000 (16:33 +0300)]
ASoC: SOF: ipc4-pcm: fix possible null pointer deference
The call to snd_sof_find_spcm_dai() could return NULL,
add nullable check for the return value to avoid null
pointer defenrece.
Fixes:
7cb19007baba ("ASoC: SOF: ipc4-pcm: add hw_params")
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230816133311.7523-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vlad Karpovich [Tue, 15 Aug 2023 17:29:08 +0000 (12:29 -0500)]
firmware: cs_dsp: Fix new control name check
Before adding a new FW control, its name is checked against
existing controls list. But the string length in strncmp used
to compare controls names is taken from the list, so if beginnings
of the controls are matching, then the new control is not created.
For example, if CAL_R control already exists, CAL_R_SELECTED
is not created.
The fix is to compare string lengths as well.
Fixes:
6477960755fb ("ASoC: wm_adsp: Move check for control existence")
Signed-off-by: Vlad Karpovich <vkarpovi@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230815172908.3454056-1-vkarpovi@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Tue, 15 Aug 2023 14:32:04 +0000 (16:32 +0200)]
ASoC: rockchip: Fix Wvoid-pointer-to-enum-cast warning
'version' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:
rockchip_pdm.c:587:18: error: cast to smaller integer type 'enum rk_pdm_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230815143204.379708-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Tue, 15 Aug 2023 14:32:03 +0000 (16:32 +0200)]
ASoC: codecs: wm8904: Fix Wvoid-pointer-to-enum-cast warning
'devtype' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:
wm8904.c:2205:21: error: cast to smaller integer type 'enum wm8904_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230815143204.379708-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Tue, 15 Aug 2023 14:32:02 +0000 (16:32 +0200)]
ASoC: codecs: tlv320aic32x4: Fix Wvoid-pointer-to-enum-cast warning
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:
tlv320aic32x4.c:1352:18: error: cast to smaller integer type 'enum aic32x4_type' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230815143204.379708-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 15 Aug 2023 18:22:40 +0000 (19:22 +0100)]
ASoC: cs35l56: Don't patch firmware that is already
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
Use the FIRMWARE_MISSING flag in the CS35L56 to determine whether it is
safe to download a firmware patch.
Mark Brown [Tue, 15 Aug 2023 18:22:33 +0000 (19:22 +0100)]
Use devm_kmemdup to replace devm_kmalloc + memcpy
Merge series from Li Zetao <lizetao1@huawei.com>:
This patch set use the helper function devm_kmemdup() to replace
devm_kmalloc + memcpy, which is the same as implementing the function
separately.
Mark Brown [Tue, 15 Aug 2023 18:22:25 +0000 (19:22 +0100)]
ASoC: SOF: topology: simplify kcontrol names with
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
The use of the widget name as a prefix for the kcontrol name is quite
useful in the case of multiple pipelines going to the same endpoint,
but it's overkill in simpler cases.
This patchset extends the existing DAPM code to drop the widget name
prefix and make the kcontrol names simpler when there's no possible
ambiguity, e.g. "gain.2.1 Main Playback Volume" becomes just "Main
Playback Volume".
Mark Brown [Tue, 15 Aug 2023 18:22:03 +0000 (19:22 +0100)]
ASoC: Intel: RPL/MTL machine updates for 6.6
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
4 commits with the match tables for RaptorLake and MeteorLake devices.
Kevin-Lu [Tue, 15 Aug 2023 09:56:31 +0000 (17:56 +0800)]
MAINTAINERS: Add entries for TEXAS INSTRUMENTS ASoC DRIVERS
Add the MAINTAINERS entries for TEXAS INSTRUMENTS ASoC DRIVERS.
Signed-off-by: Kevin-Lu <kevin-lu@ti.com>
Link: https://lore.kernel.org/r/20230815095631.1655-1-kevin-lu@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Tue, 15 Aug 2023 12:48:26 +0000 (13:48 +0100)]
ASoC: cs35l56: Don't overwrite a patched firmware
Only attempt to download wmfw/bin files to a non-secured part if
it reports FIRMWARE_MISSING. If FIRMWARE_MISSING is false the
firmware has already been patched and overwriting the patch could
corrupt the running firmware.
For a secured part the wmfw/bin can be downloaded even if
FIRMWARE_MISSING is false, because they will only patch tunings.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230815124826.5447-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Tue, 15 Aug 2023 12:48:25 +0000 (13:48 +0100)]
ASoC: wm_adsp: Support powering-up DSP without trying to load firmware
Add a flag to wm_adsp_power_up() that indicates whether it should attempt
to find and load firmware files.
This is to support DSPs that have built-in firmware that may already have
been patched (for example, by the BIOS). In that case the patch must not
be overwritten because that could corrupt the running firmware.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230815124826.5447-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chao Song [Mon, 14 Aug 2023 23:15:19 +0000 (18:15 -0500)]
ASoC: SOF: Intel: Refactor code for HDA stream creation
Existing HDA stream creation is split into two
for loops for capture and playback, but most of
the code in the two for loops are duplicated.
This patch refactors HDA stream creation with a
single for loop, thus remove code duplication.
No functional change in this patch.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814231519.79051-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 14 Aug 2023 23:42:35 +0000 (18:42 -0500)]
ASoC: SOF: remove duplicate code due to merge
Commit
81113108491e ("ASoC: Merge up fixes") added the same code
twice, remove the extra call.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230814234235.87268-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Balamurugan C [Mon, 14 Aug 2023 23:13:58 +0000 (18:13 -0500)]
ASoC: Intel: RPL: Add entry for HDMI-In capture support on non-I2S codec boards.
Adding HDMI-In capture support for the RPL products doesn't have onboard
I2S codec.but need to support HDMI-In capture via I2S and audio playback
through HDMI/DP monitor.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814231358.78971-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chao Song [Mon, 14 Aug 2023 23:13:57 +0000 (18:13 -0500)]
ASoC: Intel: soc-acpi: add support for Dell SKU0C87 devices
This patch adds the acpi match table for Dell SKU0C87
devices, the codec layout is:
SDW0: RT714 DMIC
SDW1: RT1318 Speaker
SDW2: RT1318 Speaker
Note that there is no jack codec on SKU0C87 devices.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814231358.78971-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Balamurugan C [Mon, 14 Aug 2023 23:13:56 +0000 (18:13 -0500)]
ASoC: Intel: soc-acpi: Add entry for HDMI_In capture support in RPL match table
Adding HDMI-In capture via I2S feature support in RPL platfroms.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814231358.78971-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Balamurugan C [Mon, 14 Aug 2023 23:13:55 +0000 (18:13 -0500)]
ASoC: Intel: soc-acpi: Add entry for sof_es8336 in RPL match table.
Adding support for ES83x6 codec in RPL match table.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814231358.78971-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jyri Sarha [Mon, 14 Aug 2023 23:23:25 +0000 (18:23 -0500)]
ASoC: SOF: topology: Add a token for dropping widget name in kcontrol name
Adds SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME token, and copies the
token's tuple value to the no_wname_in_kcontrol_name flag in struct
snd_soc_dapm_widget.
If the tuple value for the token in the topology is true, then the
widget name is not added to the mixer name. In practice "gain.2.1 Post
Mixer Analog Playback Volume" becomes just "Post Mixer Analog Playback
Volume".
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814232325.86397-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jyri Sarha [Mon, 14 Aug 2023 23:23:24 +0000 (18:23 -0500)]
ASoC: dapm: Add a flag for not having widget name in kcontrol name
The existing soc-dapm code may add a prefix to control names, which in
some cases is useful but in others leads to long and confusing kcontrol
names such as "gain 2.1 Main Playback Volume".
This patch suggests an added flag to prevent the widget name prefix
from being added. That flag will be set in the topology file on a
per-widget basis.
The flag no_wname_in_kcontrol_name is added to struct snd_soc_dapm_widget,
and the logic in dapm_create_or_share_kcontrol() is changed to not to
add widget name if the flag is set.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814232325.86397-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
mnlife [Fri, 11 Aug 2023 14:25:11 +0000 (22:25 +0800)]
ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
When snd_soc_card_jack_new is not called or the call fails,
calling this function causes a null pointer access
Signed-off-by: mnlife <mnlife@126.com>
Link: https://lore.kernel.org/r/20230811142511.6570-1-mnlife@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajye Huang [Fri, 4 Aug 2023 08:56:48 +0000 (16:56 +0800)]
ASoC: Intel: Add rpl_nau8318_8825 driver
Boards were using this in older kernels before adl and rpl ids were
split. Add this back to maintain support.
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230804085648.3721416-1-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 14 Aug 2023 21:09:34 +0000 (22:09 +0100)]
ASoC: merge DAI call back functions into ops
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
v1 -> v2
- add Reviewed-by on each patches.
- fixup git-log typo (thesse -> there)
- add missing patch for au1x
Link: https://lore.kernel.org/r/87a5vauuzg.wl-kuninori.morimoto.gx@renesas.com
Li Zetao [Thu, 10 Aug 2023 11:47:38 +0000 (19:47 +0800)]
ASoC: SOF: ipc3: Use devm_kmemdup to replace devm_kmalloc + memcpy
Use the helper function devm_kmemdup() rather than duplicating its
implementation, which helps to enhance code readability.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/r/20230810114738.2103792-3-lizetao1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Li Zetao [Thu, 10 Aug 2023 11:47:37 +0000 (19:47 +0800)]
ASoC: tas5805m: Use devm_kmemdup to replace devm_kmalloc + memcpy
Use the helper function devm_kmemdup() rather than duplicating its
implementation, which helps to enhance code readability.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20230810114738.2103792-2-lizetao1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Guiting Shen [Sun, 13 Aug 2023 12:55:20 +0000 (20:55 +0800)]
ASoC: tlv320aic32x4: Fix the divide by zero
The value of register(NDAC,MDAC,NADC,MADC,BCLKN) maybe zero lead to
divide by zero in clk_aic32x4_div_recalc_rate().And the rate should be
divide by 128 if the value was zero in this function according to the
datasheet.
Add the macro AIC32X4_DIV_MAX to present the 128 and return 0 if failing
to read the value of register.
Signed-off-by: Guiting Shen <aarongt.shen@gmail.com>
Link: https://lore.kernel.org/r/20230813125520.11067-1-aarongt.shen@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Biju Das [Sun, 13 Aug 2023 07:34:58 +0000 (08:34 +0100)]
ASoC: ak4613: Simplify probe()
Simpilfy probe() by replacing of_device_get_match_data() and id lookup for
retrieving match data by i2c_get_match_data().
While at it, drop unused local variable np from probe().
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230813073458.59606-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 8 Aug 2023 22:59:03 +0000 (22:59 +0000)]
ASoC: soc-dai.h: remove unused call back functions
Now, all drivers are using ops call backs.
Let's remove unused other call back functions.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87cyzx9m4o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 8 Aug 2023 22:58:58 +0000 (22:58 +0000)]
ASoC: codecs/hdmi-codec: merge DAI call back functions into ops
ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87edkd9m4t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>