OSDN Git Service
Mark Brown [Tue, 31 Jan 2023 14:12:02 +0000 (14:12 +0000)]
ASoC: codecs: Add Awinic AW88395 audio amplifier
Merge series from wangweidong.a@awinic.com:
The Awinic AW88395 is an I2S/TDM input, high efficiency
digital Smart K audio amplifier with an integrated 10.25V
smart boost converter.
Add a DT schema for describing Awinic AW88395 audio amplifiers. They are
controlled using I2C
Mark Brown [Tue, 31 Jan 2023 14:11:55 +0000 (14:11 +0000)]
Add the Renesas IDT821034 codec support
Merge series from Herve Codina <herve.codina@bootlin.com>:
The Renesas IDT821034 codec is four channel PCM codec with on-chip
filters and programmable gain setting. It also provides SLIC
(Subscriber Line Interface Circuit) signals as GPIOs.
Kiseok Jo [Tue, 31 Jan 2023 05:09:47 +0000 (05:09 +0000)]
ASoC: dt-bindings: irondevice,sma1303.yaml: Fix about breaking the checks
Fix the bindings checks like syntax error.
Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
Reported-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230131050946.14385-1-kiseok.jo@irondevice.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Uwe Kleine-König [Tue, 31 Jan 2023 08:21:07 +0000 (09:21 +0100)]
ASoC: sma1303: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230131082107.174739-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Kiseok Jo [Tue, 31 Jan 2023 05:45:27 +0000 (05:45 +0000)]
MAINTAINERS: add IRON DEVICE AUDIO CODEC DRIVERS
Add Kiseok Jo as maintainer for Iron Device audio codec drivers.
Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
Link: https://lore.kernel.org/r/20230131054526.14653-1-kiseok.jo@irondevice.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 30 Jan 2023 20:59:22 +0000 (20:59 +0000)]
ASoC: topology: Fixes and cleanups
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:
Following is series of fixes and cleanups for core topology code. Few
patches fixing various problems all around and few fixing function
names.
Mark Brown [Mon, 30 Jan 2023 20:46:25 +0000 (20:46 +0000)]
ASoC: dt-bindings: audio-graph-port related update
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Audio-Graph-Card and Simple-Audio-Card are similar Card
and are sharing same utils. Thus we can also sharing same schema.
This patch-set fixup some Renesas's "make dtbs_check".
Weidong Wang [Fri, 13 Jan 2023 05:53:01 +0000 (13:53 +0800)]
ASoC: dt-bindings: Add schema for "awinic,aw88395"
Add a DT schema for describing Awinic AW88395 audio amplifiers. They are
controlled using I2C.
Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230113055301.189541-6-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Weidong Wang [Fri, 13 Jan 2023 05:53:00 +0000 (13:53 +0800)]
ASoC: codecs: Aw88395 chip register file, data type file and Kconfig Makefile
The Awinic AW88395 is an I2S/TDM input, high efficiency
digital Smart K audio amplifier with an integrated 10.25V
smart boost convert
Signed-off-by: Nick Li <liweilei@awinic.com>
Signed-off-by: Bruce zhao <zhaolei@awinic.com>
Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230113055301.189541-5-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Weidong Wang [Fri, 13 Jan 2023 05:52:59 +0000 (13:52 +0800)]
ASoC: codecs: Aw88395 function for ALSA Audio Driver
The Awinic AW88395 is an I2S/TDM input, high efficiency
digital Smart K audio amplifier with an integrated 10.25V
smart boost convert
Signed-off-by: Nick Li <liweilei@awinic.com>
Signed-off-by: Bruce zhao <zhaolei@awinic.com>
Signed-off-by: Ben Yi <yijiangtao@awinic.com>
Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230113055301.189541-4-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Weidong Wang [Fri, 13 Jan 2023 05:52:58 +0000 (13:52 +0800)]
ASoC: codecs: ACF bin parsing and check library file for aw88395
The Awinic AW88395 is an I2S/TDM input, high efficiency
digital Smart K audio amplifier with an integrated 10.25V
smart boost convert
Signed-off-by: Nick Li <liweilei@awinic.com>
Signed-off-by: Bruce zhao <zhaolei@awinic.com>
Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230113055301.189541-3-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Weidong Wang [Fri, 13 Jan 2023 05:52:57 +0000 (13:52 +0800)]
ASoC: codecs: Add i2c and codec registration for aw88395 and their associated operation functions
The Awinic AW88395 is an I2S/TDM input, high efficiency
digital Smart K audio amplifier with an integrated 10.25V
smart boost convert
Signed-off-by: Nick Li <liweilei@awinic.com>
Signed-off-by: Bruce zhao <zhaolei@awinic.com>
Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230113055301.189541-2-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Herve Codina [Thu, 26 Jan 2023 08:51:37 +0000 (09:51 +0100)]
MAINTAINERS: add the Renesas IDT821034 codec entry
After contributing the driver, add myself as the maintainer for the
Renesas IDT821034 codec.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20230126085137.375814-4-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Herve Codina [Thu, 26 Jan 2023 08:51:36 +0000 (09:51 +0100)]
ASoC: codecs: Add support for the Renesas IDT821034 codec
The Renesas IDT821034 codec is four channel PCM codec with on-chip
filters and programmable gain setting.
It also provides SLIC (Subscriber Line Interface Circuit) signals as
GPIOs.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20230126085137.375814-3-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Herve Codina [Thu, 26 Jan 2023 08:51:35 +0000 (09:51 +0100)]
ASoC: Add Renesas IDT821034 codec bindings
The Renesas IDT821034 codec is a quad PCM codec with programmable
gain.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230126085137.375814-2-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:11 +0000 (00:11 +0100)]
ASoC: topology: Use unload() op directly
struct snd_soc_dobj only needs pointer to the unload function, instead
however, there is pointer to all topology operations. Change code to use
the function pointer instead of pointer to structure containing all
operations.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-12-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:10 +0000 (00:11 +0100)]
ASoC: topology: Unify kcontrol removal code
Functions removing bytes, enum and mixer kcontrols are identical. Unify
them under one function and use it to free associated kcontrols.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-11-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:09 +0000 (00:11 +0100)]
ASoC: topology: Remove unnecessary check for EOF
Caller already checks if hdr_pos is behind EOF, before calling
soc_tplg_valid_header(), so there is no need to recheck it again. This
also allows to remove behaviour of return 0 - forcing the caller to
break out of while loop.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-10-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:08 +0000 (00:11 +0100)]
ASoC: topology: Return an error on complete() failure
Function soc_tplg_dapm_complete() detects an error and logs it, but
doesn't return failure to the caller, fix it by returning the error.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-9-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:07 +0000 (00:11 +0100)]
ASoC: topology: Pass correct pointer instead of casting
Instead of passing address of structure, the containing structure is
cast to target structure. While it works - the expected structure is the
first field of containing one - it is bad practice, fix this by passing
pointer to structure field.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-8-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:06 +0000 (00:11 +0100)]
ASoC: topology: Remove unnecessary forward declarations
There is no need to forward declare functions if their use is after
their definition.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:05 +0000 (00:11 +0100)]
ASoC: topology: Rename remove_ handlers
Those are the only functions missing soc_tplg_ prefix, add it for
consistency.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:04 +0000 (00:11 +0100)]
ASoC: topology: Fix function name
Functions other than soc_valid_header have soc_tplg_ prefix. Rename
function to follow convention in file.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:03 +0000 (00:11 +0100)]
ASoC: topology: Fix typo in functions name
Topology is being abbreviated to "tplg", not "tplc", however, few
functions have typo in name, fix it.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:02 +0000 (00:11 +0100)]
ASoC: topology: Remove unused SOC_TPLG_PASS_PINS constant
The constant is unused, so it can be safely removed.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 27 Jan 2023 23:11:01 +0000 (00:11 +0100)]
ASoC: topology: Properly access value coming from topology file
When accessing values coming from topology, le32_to_cpu should be used.
One of recent commits missed that.
Fixes:
86e2d14b6d1a ("ASoC: topology: Add header payload_size verification")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Steffen Aschbacher [Sat, 28 Jan 2023 08:27:44 +0000 (10:27 +0200)]
ASoC: dt-bindings: add entry for TAS5720A-Q1 driver
Add entry for the TAS5720A-Q1 driver in the dt-bindings doc.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Steffen Aschbacher <steffen.aschbacher@stihl.de>
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Link: https://lore.kernel.org/r/20230128082744.41849-4-alex@shruggie.ro
Signed-off-by: Mark Brown <broonie@kernel.org>
Steffen Aschbacher [Sat, 28 Jan 2023 08:27:43 +0000 (10:27 +0200)]
ASoC: tas5720: set bit 7 in ANALOG_CTRL_REG for TAS5720A-Q1 during probe
Set the reserved bit 7 in the ANALOG_CTRL_REG for the TAS5720A-Q1 device,
when probing.
The datasheet mentions that the bit should be 1 during reset/powerup.
The device did not initialize before setting this value to 1. So, this
could be a quirk of this device. Or it could be a quirk with the board on
which it was tested.
That is why this patch is separate from the patch that adds support for the
TAS5720A-Q1 device.
Signed-off-by: Steffen Aschbacher <steffen.aschbacher@stihl.de>
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Link: https://lore.kernel.org/r/20230128082744.41849-3-alex@shruggie.ro
Signed-off-by: Mark Brown <broonie@kernel.org>
Steffen Aschbacher [Sat, 28 Jan 2023 08:27:42 +0000 (10:27 +0200)]
ASoC: codecs: tas5720: add support for TAS5720A-Q1 (automotive) variant
This change adds support the TAS5720A-Q1 audio codec, in the same driver as
tas5720.
Functionally, this driver is pretty similar to it's TAS5720x variant.
The first 3 registers are the same, so the main control and device
identification can happen with these registers.
The next registers differ.
This variant offers control (in the registers) for 2 speakers, which is
implemented here (in a basic manner).
Signed-off-by: Steffen Aschbacher <steffen.aschbacher@stihl.de>
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Link: https://lore.kernel.org/r/20230128082744.41849-2-alex@shruggie.ro
Signed-off-by: Mark Brown <broonie@kernel.org>
Alexandru Ardelean [Sat, 28 Jan 2023 08:27:41 +0000 (10:27 +0200)]
ASoC: codecs: tas5720: split a tas5720_mute_soc_component() function
This is to be re-used in tas5720_mute() (which is part of the dai_ops) and
also in the tas5720_fault_check_work() hook.
The benefit here isn't too great (now).
It's only when we add support for a new device with a slightly different
regmap that this becomes more useful.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Link: https://lore.kernel.org/r/20230128082744.41849-1-alex@shruggie.ro
Signed-off-by: Mark Brown <broonie@kernel.org>
Marek Vasut [Thu, 5 Jan 2023 14:41:44 +0000 (15:41 +0100)]
ASoC: dt-bindings: fsl-sai: Simplify the VFxxx dmas binding
Get rid of the vf610 sai special case, instead update the vfxxx.dtsi
DT to use the same DMA channel ordering as all the other devices. The
sai DMA channel ordering has not been aligned with other IP DMA channel
ordering in the vfxxx.dtsi anyway.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230105144145.165010-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Mon, 30 Jan 2023 09:21:57 +0000 (09:21 +0000)]
ASoC: SMA1303: Fix spelling mistake "Invald" -> "Invalid"
There are spelling mistakes in dev_err messages. Fix them.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20230130092157.36446-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Mon, 30 Jan 2023 10:01:00 +0000 (15:31 +0530)]
ASoC: amd: acp: Refactor bit width calculation
Refactor bit width calculation using params_physical_width()
instead hard-code values.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230130100104.4076640-1-venkataprasad.potturu@amd.com
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:27:06 +0000 (05:27 +0000)]
ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells
In case of using MIXer with Simple Audio Card, it needs below DT.
simple-audio-card,dai-link@1 {
cpu@0 {
...
};
cpu@1 {
...
};
...
};
This case, it requires "reg = <xxx>" which needs #address-cells/#size-cells,
but simple-audio-card.yaml is missing these. This patch adds it.
Without this patch, we will get below warning.
${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb.dtb: sound: simple-audio-card,dai-link@0: '#address-cells', '#size-cells' do not match any of the regexes: '^codec(@[0-9a-f]+)?', '^cpu(@[0-9a-f]+)?', 'pinctrl-[0-9]+'
From schema: ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml
Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87cz757rdi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:26:07 +0000 (05:26 +0000)]
ASoC: dt-bindings: renesas,rsnd: #sound-dai-cells is not mandatory
Current renesas,rsnd is requesting #sound-dai-cells, but it is
needed in case of it is using "simple-card", but not needed in case of
"audio-graph". We will get below warning without this patch.
This patch fiup it.
${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@
ec500000: '#sound-dai-cells' is a required property
From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87edrl7rf4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:26:01 +0000 (05:26 +0000)]
ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src
Some SRC is not implemented on some SoC, thus
interrupts/dmas/dma-names are not mandatory.
This patch solve it. Without this patch we will get below error
when 'make DT_CHECKER_FLAGS=-m dt_binding_check'.
dtschema/dtc warnings/errors:
${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \
sound@
ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fsc17rfa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:25:52 +0000 (05:25 +0000)]
ASoC: dt-bindings: renesas,rsnd: add missing playback/capture
renesas,rsnd.yaml is possible to use ports/port/endpoint if it is using
Audio Graph Card/Card2 for sound. The schema is defined under
audio-graph-port.yaml.
rsnd driver needs "playback/capture" property under endpoint, but it is not
defined in audio-graph-port.yaml. This patch adds missing "playback/capture"
properties under endpoint.
Without this patch, we will get below warning
${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@
ec500000: ports:port@0:endpoint: Unevaluated properties are not allowed ('playback', 'capture' were unexpected)
From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h6wh7rfj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:25:46 +0000 (05:25 +0000)]
ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style
ak4613 is possible to use Of-graph (Audio-Graph-Card) style,
but we need to indicate it. Otherwise we will get below warning.
This patch add it.
${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: codec@10: 'port' does not match any of the regexes: '^asahi-kasei,in[1-2]-single-end$', '^asahi-kasei,out[1-6]-single-end$', 'pinctrl-[0-9]+'
From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ak4613.yaml
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ilgx7rfp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Geert Uytterhoeven [Mon, 23 Jan 2023 05:25:41 +0000 (05:25 +0000)]
ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema
Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding
documentation to json-schema.
Add missing properties.
Drop unneeded pinctrl properties from example.
Link: https://lore.kernel.org/r/cover.1669980383.git.geert+renesas@glider.be
Link: https://lore.kernel.org/r/87mt7qpylw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87k01d7rfv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:25:29 +0000 (05:25 +0000)]
ASoC: dt-bindings: audio-graph-port: remove prefix
Audio Graph port doesn't use prefix.
This patch removes it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87lelt7rg6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:25:19 +0000 (05:25 +0000)]
ASoC: dt-bindings: audio-graph-port: add clocks on endpoint
Audio Graph endpoint is possible to have clocks, and system-clock-xxx,
but these are missing on audio-graph-port.yaml.
These have been already defined on simple-card.yaml.
This patch re-use these. We will get below warning without this patch.
${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dtb: audio-codec@44: ports:port@0:endpoint: Unevaluated properties are not allowed ('clocks' was unexpected)
From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
Link: https://lore.kernel.org/r/87pmcmpyml.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mt697rgg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:25:11 +0000 (05:25 +0000)]
ASoC: dt-bindings: audio-graph-port: add missing mclk-fs
audio-graph-port is missing "mclk-fs" on ports/port,
it is used not only endpoint. It is already defined on simple-card.
This patch fixup it.
Without this patch, we will get below warning.
${LINUX}/arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: audio-codec@44: ports: 'mclk-fs' does not match any of the regexes: '^port@[0-9a-f]+$', 'pinctrl-[0-9]+'
From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7qp7rgp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:24:58 +0000 (05:24 +0000)]
ASoC: dt-bindings: audio-graph-port: add definitions/ports
Audio Graph user needs "ports" not only "port".
This patch adds standard "ports" as definitions to use it easily.
If user needs standard "ports", it can use
ports:
$ref: audio-graph-port.yaml#/definitions/ports
If user want to use custom ports, it can re-use
audio-graph-port.yaml#/definitions/port-base"
audio-graph-port.yaml#/definitions/endpoint-base"
Link: https://lore.kernel.org/r/87sfhipynv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmb57rh2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 05:23:43 +0000 (05:23 +0000)]
ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint
Audio Graph base driver might need to add its own properties.
In such case, having definitions for port/endpoint is easy to handle it.
This patch adds definitions for port/endpoint.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r0vl7rj4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 23 Jan 2023 23:17:20 +0000 (23:17 +0000)]
ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress()
commit
d3268a40d4b19f ("ASoC: soc-compress.c: fix NULL dereference")
enables DPCM capture, but it should independent from playback.
This patch fixup it.
Fixes:
d3268a40d4b1 ("ASoC: soc-compress.c: fix NULL dereference")
Link: https://lore.kernel.org/r/87tu0i6j7j.wl-kuninori.morimoto.gx@renesas.com
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871qnkvo1s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kees Cook [Fri, 27 Jan 2023 22:41:29 +0000 (14:41 -0800)]
ASoC: kirkwood: Iterate over array indexes instead of using pointer math
Walking the dram->cs array was seen as accesses beyond the first array
item by the compiler. Instead, use the array index directly. This allows
for run-time bounds checking under CONFIG_UBSAN_BOUNDS as well. Seen
with GCC 13 with -fstrict-flex-arrays:
../sound/soc/kirkwood/kirkwood-dma.c: In function
'kirkwood_dma_conf_mbus_windows.constprop':
../sound/soc/kirkwood/kirkwood-dma.c:90:24: warning: array subscript 0 is outside array bounds of 'const struct mbus_dram_window[0]' [-Warray-bounds=]
90 | if ((cs->base & 0xffff0000) < (dma & 0xffff0000)) {
| ~~^~~~~~
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230127224128.never.410-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Alexander Stein [Thu, 19 Jan 2023 07:34:16 +0000 (08:34 +0100)]
ASoC: imx-hdmi: Use dev_err_probe
This silences -517 errors and helps figuring out why the device probe
is deferred.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20230119073416.3064918-1-alexander.stein@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kiseok Jo [Thu, 26 Jan 2023 02:01:56 +0000 (02:01 +0000)]
ASoC: Modified the schema binding and added the vendor prefixes.
Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
Link: https://lore.kernel.org/r/20230126020156.3252-4-kiseok.jo@irondevice.com
Signed-off-by: Mark Brown <broonie@kernel.org>
KiseokJo [Thu, 26 Jan 2023 02:01:55 +0000 (02:01 +0000)]
ASoC: The Iron Device SMA1303 is a boosted Class-D audio amplifier.
Signed-off-by: KiseokJo <kiseok.jo@irondevice.com>
Reported-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230126020156.3252-3-kiseok.jo@irondevice.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Luca Ceresoli [Thu, 26 Jan 2023 15:24:12 +0000 (16:24 +0100)]
ASoC: fsl-asoc-card: constify fsl_asoc_card_dai
This is never modified and can be made const.
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/r/20230126152412.959574-1-luca.ceresoli@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 28 Jan 2023 10:46:16 +0000 (10:46 +0000)]
ASoC: SOF: ipc4: Multi-stream playback and capture support
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
The following series will enable multi-stream support for playback and capture
streams.
Currently only a single PCM can be connected to a DAI, with the multi-stream
support it is possible to connect multiple PCMs to a single DAI.
To achieve this we need to make sure that DAIs/AIF are only set up once since
other stream could be connected to it later.
We also need to introduce reference or use counting for widgets to make sure
that they are not going to be destroyed while other streams are still using
them.
With the multi-stream support we also need to extend our current locking scheme
which worked well for simple paths.
Mark Brown [Sat, 28 Jan 2023 10:46:10 +0000 (10:46 +0000)]
ASoC: simple-card-utils: create jack inputs for
Merge series from Astrid Rost <astrid.rost@axis.com>:
Add a generic way to create jack inputs for auxiliary jack detection
drivers (e.g. via i2c, spi), which are not part of any real codec.
The simple-card can be used as combining card driver to add the jacks,
no new one is required.
Create a jack (for input-events) for jack devices in the auxiliary
device list (aux_devs). A device which returns a valid value on
get_jack_type counts as jack device; set_jack is required
to add the jack to the device.
Astrid Rost [Mon, 23 Jan 2023 13:59:13 +0000 (14:59 +0100)]
ASoC: ts3a227e: add set_jack and get_jack_type
Add set_jack and get_jack_type to allow simple-card-utils to add
a jack for it.
Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Link: https://lore.kernel.org/r/20230123135913.2720991-4-astrid.rost@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Astrid Rost [Mon, 23 Jan 2023 13:59:12 +0000 (14:59 +0100)]
ASoC: simple-card-utils: create jack inputs for aux_devs
Add a generic way to create jack inputs for auxiliary jack detection
drivers (e.g. via i2c, spi), which are not part of any real codec.
The simple-card can be used as combining card driver to add the jacks,
no new one is required.
Create a jack (for input-events) for jack devices in the auxiliary
device list (aux_devs). A device which returns a valid value on
get_jack_type counts as jack device; set_jack is required
to add the jack to the device.
Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Link: https://lore.kernel.org/r/20230123135913.2720991-3-astrid.rost@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Astrid Rost [Mon, 23 Jan 2023 13:59:11 +0000 (14:59 +0100)]
ASoC: soc-component: add get_jack_type
Add function to return the jack type of snd_jack_types.
This allows a generic card driver to add a jack with the specified
type.
Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Link: https://lore.kernel.org/r/20230123135913.2720991-2-astrid.rost@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 27 Jan 2023 12:00:31 +0000 (14:00 +0200)]
ASoC: SOF: ipc4-pcm: Do not run the trigger pipelines if no spipe is stored
If the pipeline setup fails at the first widget/pipeline then we will have
no spipe stored under the pipeline_list->pipelines, the
pipeline_list->count is 0.
If this is the case we would have a NULL pointer dereference if the
execution is allowed to proceed.
Check for this condition along with the pipeline_list->pipelines check
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>
Link: https://lore.kernel.org/r/20230127120031.10709-19-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 27 Jan 2023 12:00:30 +0000 (14:00 +0200)]
ASoC: SOF: Protect swidget->use_count with mutex for kcontrol access race
The use_count of the swidget is protect by ALSA core PCM locking with the
exception when an associated kcontrol is changed.
It has been observed that a rightly timed kcontrol access during stream
stop can result of an attempt to send a control update to a widget which
has been freed up between the check of the use_count and the message
sending.
We need to protect the entire sof_widget_setup() and sof_widget_free()
execution to make it safe to rely on the use_count.
Move the code under an _unlocked() function and use a mutex to protect
the execution of the functions for concurrency.
On the control path we need to use the lock only for the kcontrol access,
the widget_kcontrol_setup() op is called with the lock already held.
Reported-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
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>
Link: https://lore.kernel.org/r/20230127120031.10709-18-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 27 Jan 2023 12:00:29 +0000 (14:00 +0200)]
ASoC: SOF: Avoid double decrementing use_count in sof_widget_setup on error
The sof_widget_free() on the error path will decrement the use count and if
we jump to widget_free: then the use_count will be decremented by two,
which is not correct as we only incremented once with 1.
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>
Link: https://lore.kernel.org/r/20230127120031.10709-17-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:28 +0000 (14:00 +0200)]
ASoC: SOF: ipc4-topology: Protect pipeline free with mutex
When starting/stopping multiple streams in parallel, pipeline triggers
and pipeline frees can get interleaved. So use the same mutex used for
pipeline trigger to protect the pipeline frees as well. Rename the
trigger_mutex to pipeline_state_mutex for more clarity.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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/20230127120031.10709-16-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:27 +0000 (14:00 +0200)]
ASoC: SOF: ipc4-pcm: Implement pipeline trigger reference counting
Use the started_count and paused_count to implement reference counting
when making decisions to start/stop/pause pipelines during the FE DAI
trigger. This is necessary to trigger the shared pipelines in the FE DAI
trigger properly.
With IPC4, the FE trigger will issue multiple pipeline state changes,
and the triggers are propagated downstream to connected pipelines by
the SOF driver - not the firmware. This creates a window for race
conditions where an FE trigger preempts another one, which results
in inconsistent pipeline states and refcounts.
This patch introduces a mutex lock for the pcm trigger that guarantees
that IPC4 state and resources are accessed in a serialized manner.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-15-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:26 +0000 (14:00 +0200)]
ASoC: SOF: ipc4-pcm: Rename 'data' variable to trigger_list
For more clarity, rename the struct ipc4_pipeline_set_state_data
variable to trigger_list instead of data. No functionality change.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-14-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:25 +0000 (14:00 +0200)]
ASoC: SOF: Introduce struct snd_sof_pipeline
Introduce struct snd_sof_pipeline to save the information about
pipelines including the pipeline widget, their status wrt how many PCM's
are using them and whether they are complete or not.
In struct snd_sof_widget, replace pipe_widget with spipe and remove
complete. In struct snd_sof_pcm_stream_pipeline_list, replace
pipe_widgets with pipelines.
Update all users accordingly.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-13-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:24 +0000 (14:00 +0200)]
ASoC: SOF: ipc4-pcm: Use the PCM stream's pipeline_info during trigger
Use the list of pipelines in the PCM stream's pipeline info to trigger
the pipelines in the right order. Add a helper for triggering pipelines
in batch mode that will be used to trigger multiple pipelines at the
same time.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-12-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:23 +0000 (14:00 +0200)]
ASoC: SOF: sof-audio: Populate the PCM stream pipeline_info
Populate the pipeline_info for the PCM stream with the list of pipeline
widgets that need to be handled during the PCM trigger. This will be
used in the IPC-specific PCM trigger op to trigger the pipelines.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-11-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:22 +0000 (14:00 +0200)]
ASoC: SOF: ipc4: Add flag to skip triggering pipelines during FE DAI trigger
Add a new flag, skip_during_fe_trigger, to struct sof_ipc4_pipeline to
skip triggering pipelines in the FE DAI trigger. Set this flag for the
HDA DAI BE pipelines so that their BE pipeline will not be triggered in
the FE DAI trigger. Also, move the trigger handling for all commands
include START/PAUSE_RELEASE for the HDA DAI's to the backend DAI trigger
ops.
For the SSP/DMIC/SDW cases, remove the BE DAI trigger as they involve no
DMA operations and can be triggered in the FE DAI trigger. This is in
preparation to perform batch triggering of all pipelines for the non-HDA
case.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:21 +0000 (14:00 +0200)]
ASoC: SOF: ipc4-pcm: Define pcm_setup/free ops
Define the pcm_setup/pcm_free ops for IPC4. Define a new struct
snd_sof_pcm_stream_trigger_info and add a new field trigger_info of this
type to struct snd_sof_pcm_stream. This will be used to save the list of
pipelines that need to be triggered.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:20 +0000 (14:00 +0200)]
ASoC: SOF: Introduce PCM setup/free PCM IPC ops
These will be used to perform IPC-specific PCM setup/free.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:19 +0000 (14:00 +0200)]
ASoC: SOF: topology: Set IPC-specific trigger order for DAI links
Add a new topology IPC op to set up DAI links and set the link trigger
order to match the expectation based on the IPC type. Note that the
link_setup op implementations for IPC3 and IPC4 are not identical and
have contrasting trigger orders for playback and capture.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:18 +0000 (14:00 +0200)]
ASoC: SOF: pcm: do not free widgets during suspend trigger
IPC3 and IPC4 have different requirements for the order in which the FE
CPU and BE CPU DAI trigger callbacks must be invoked. With a regular PCM
start/stop, pipeline widgets are set up during hw_params and freed
during hw_free.
But when the system is suspended when a PCM is running,
pipeline widgets are freed during the SUSPEND trigger callback for the
FE CPU DAI. In order to avoid freeing the pipeline widgets before the BE
CPU DAI trigger is executed, the trigger order was modified in previous
contributions in the PCM dai_link_fixup callback to make sure that the BE
CPU DAI trigger stop/suspend is always invoked before the FE CPU DAI
trigger. But this contradicts the firmware requirement for IPC4 w.r.t.
ordering of pipeline triggers.
So, remove the freeing of pipeline widgets during FE CPU DAI suspend
trigger and handle it during system suspend when the
tear_down_all_pipelines() IPC op is invoked. This will be followed up
with a patch to fix the trigger order for IPC4.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:17 +0000 (14:00 +0200)]
ASoC: SOF: sof-audio: Only process widgets in the connected widget list
When walking the list of the widgets from the source to the sink, we
accidentally also end up preparing/setting up the widgets that are not
in the list of connected DAPM widgets associated with the PCM. Avoid
this by checking if a widget is part of the connected DAPM widget list
during widget prepare, unprepare, setup or free.
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: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:16 +0000 (14:00 +0200)]
ASoC: SOF: sof-audio: Set up/free DAI/AIF widgets only once
Calling the sof_widget_setup/free() for the DAI/AIF widgets inside the
snd_soc_dapm_widget_for_each_sink_path() loop will end up setting up or
freeing the widget multiple times if there are multiple paths leaving
the widget. Fix this by moving the widget setup/free for the starting
widget in each path outside the loop.
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: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:15 +0000 (14:00 +0200)]
ASoC: soc-pcm: Export widget_in_list()
Export the widget_in_list() function to be used by other modules.
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: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Fri, 27 Jan 2023 12:00:14 +0000 (14:00 +0200)]
ASoC: SOF: ipc4-topology: No need to unbind routes within a pipeline
The FW currently ignores unbinding routes if the source and sink widgets
belong to the same pipeline. So no need to send the IPC at all in the
first place.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
강신형 [Thu, 8 Dec 2022 05:18:18 +0000 (14:18 +0900)]
ASoC: soc-compress: Reposition and add pcm_mutex
If panic_on_warn is set and compress stream(DPCM) is started,
then kernel panic occurred because card->pcm_mutex isn't held appropriately.
In the following functions, warning were issued at this line
"snd_soc_dpcm_mutex_assert_held".
static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe,
struct snd_soc_pcm_runtime *be, int stream)
{
...
snd_soc_dpcm_mutex_assert_held(fe);
...
}
void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream)
{
...
snd_soc_dpcm_mutex_assert_held(fe);
...
}
void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
int stream, int action)
{
...
snd_soc_dpcm_mutex_assert_held(rtd);
...
}
int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
int event)
{
...
snd_soc_dpcm_mutex_assert_held(fe);
...
}
These functions are called by soc_compr_set_params_fe, soc_compr_open_fe
and soc_compr_free_fe
without pcm_mutex locking. And this is call stack.
[ 414.527841][ T2179] pc : dpcm_process_paths+0x5a4/0x750
[ 414.527848][ T2179] lr : dpcm_process_paths+0x37c/0x750
[ 414.527945][ T2179] Call trace:
[ 414.527949][ T2179] dpcm_process_paths+0x5a4/0x750
[ 414.527955][ T2179] soc_compr_open_fe+0xb0/0x2cc
[ 414.527972][ T2179] snd_compr_open+0x180/0x248
[ 414.527981][ T2179] snd_open+0x15c/0x194
[ 414.528003][ T2179] chrdev_open+0x1b0/0x220
[ 414.528023][ T2179] do_dentry_open+0x30c/0x594
[ 414.528045][ T2179] vfs_open+0x34/0x44
[ 414.528053][ T2179] path_openat+0x914/0xb08
[ 414.528062][ T2179] do_filp_open+0xc0/0x170
[ 414.528068][ T2179] do_sys_openat2+0x94/0x18c
[ 414.528076][ T2179] __arm64_sys_openat+0x78/0xa4
[ 414.528084][ T2179] invoke_syscall+0x48/0x10c
[ 414.528094][ T2179] el0_svc_common+0xbc/0x104
[ 414.528099][ T2179] do_el0_svc+0x34/0xd8
[ 414.528103][ T2179] el0_svc+0x34/0xc4
[ 414.528125][ T2179] el0t_64_sync_handler+0x8c/0xfc
[ 414.528133][ T2179] el0t_64_sync+0x1a0/0x1a4
[ 414.528142][ T2179] Kernel panic - not syncing: panic_on_warn set ...
So, I reposition and add pcm_mutex to resolve lockdep error.
Signed-off-by: Shinhyung Kang <s47.kang@samsung.com>
Link: https://lore.kernel.org/r/016401d90ac4$7b6848c0$7238da40$@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Dan Carpenter [Thu, 26 Jan 2023 09:26:35 +0000 (12:26 +0300)]
ASoC: mediatek: mt8188: remove some dead code
We know that "irq < 0", so delete the unnecessary check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/Y9JHSwcfdNcfMjjt@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 26 Jan 2023 17:04:48 +0000 (17:04 +0000)]
Update lpass dt-bindings
Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:
Update va-macro driver dt-bindings and add missing properties in sc7280
machine driver dt-bindings.
Changes since v2:
-- Update commit message and example in "Add platform property" patch.
-- Update commit message in "Update clock name" patch.
Changes since v1:
-- Remove sound-dai cells property patch.
-- Update example in clock name change patch.
-- Update commit message and add maxItems in platform proerty patch.
Srinivasa Rao Mandadapu (2):
ASoC: qcom: dt-bindings: lpass-va-macro: Update clock name
ASoC: dt-bindings: google,sc7280-herobrine: Add platform property
.../devicetree/bindings/sound/google,sc7280-herobrine.yaml | 12 ++++++++++++
.../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
--
2.7.4
Bard Liao [Wed, 25 Jan 2023 14:13:17 +0000 (16:13 +0200)]
ASoC: SOF: ipc4-topology: use different channel mask for each sdw amp feedback
Currently, we use the same channel mask for aggregated speakers.
It works fine for playback because we duplicate the audio data for all
aggregated speakers. But we need to get audio data from each aggregated
speaker and combine them to the captured audio. So we need to set
non-overlapping channel mask for aggregated ALH DAIs.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230125141317.30302-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Thu, 26 Jan 2023 10:07:22 +0000 (11:07 +0100)]
ASoC: dt-bindings: renesas,rsnd: simplify list of compatibles
The fallback compatible in a list (the last one) cannot be enum, because
it is always fixed. Also if such fallback is used alone ("Generic"
case), it's not a list anymore.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230126100722.9473-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Bard Liao [Thu, 26 Jan 2023 11:06:37 +0000 (13:06 +0200)]
ASoC: SOF: ipc4-topology: add buffer type support
The corresponding IPC4 module of snd_soc_dapm_buffer widget is module
-to-module copier.
The module-to-module copier is a buffer-like component with demuxing
capabilities.
Rename the host_token_list to common_copier_token_list since it will
be used by host copier and module-to-module copier.
The setup callback is almost the same as sof_ipc4_widget_setup_pcm except
the gtw_cfg data, and the free callback is exactly the same as
sof_ipc4_widget_free_comp_pcm. To reduce the duplication, the commit
reuses the setup and free callbacks.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230126110637.25542-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivasa Rao Mandadapu [Mon, 23 Jan 2023 10:13:22 +0000 (15:43 +0530)]
ASoC: dt-bindings: google,sc7280-herobrine: Add platform property
Add platform property in sc7280 machine driver bindings for including
platform subnode in dai-links.
This is required for binding the frontend dai driver to do dynamic pcm
routing in ADSP based platforms.
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1674468802-14834-3-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivasa Rao Mandadapu [Mon, 23 Jan 2023 10:13:21 +0000 (15:43 +0530)]
ASoC: qcom: dt-bindings: lpass-va-macro: Update clock name
Update clock name from core to macro in lpass-va-macro node
to make it compatible with existing driver and existing DTS files.
Fixes:
67d99b23c881 ("ASoC: qcom: dt-bindings: add bindings for lpass va macro codec")
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Reported-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/1674468802-14834-2-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Randy Dunlap [Tue, 24 Jan 2023 18:17:46 +0000 (10:17 -0800)]
ASoC: Kconfig: fix spelling of "up to"
Fix spelling in sound/soc/ Kconfig files:
s/upto/up to/
(reported by codespell)
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de> #rockchip
Link: https://lore.kernel.org/r/20230124181746.19028-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Judy Hsiao [Thu, 8 Dec 2022 08:42:00 +0000 (08:42 +0000)]
ASoC: qcom: lpass-platform: Use SNDRV_DMA_TYPE_NONCOHERENT page allocation
Replace SNDRV_DMA_TYPE_DEV by SNDRV_DMA_TYPE_NONCOHERENT for pcm
buffer allocation. We measured about 18x performance improvement
when accessing the snd_pcm_mmap() buffer from userspace.
Eg: aarch64 with internal speaker
==
SNDRV_DMA_TYPE_DEV
frames_per_second=66.4557M/s
max_time_per_4096_frames=106.094u
time_per_4096_frames=61.6351us
SNDRV_DMA_TYPE_NONCOHERENT
frames_per_second=1028.58M/s
max_time_per_4096_frames=20.312u
time_per_4096_frames=3.98221us
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20221208084200.2136311-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Wed, 18 Jan 2023 10:15:42 +0000 (11:15 +0100)]
ASoC: qcom: sdm845: add remark about unneeded compatibles
If all devices are the same or compatible, there is no single need to
keep growing of_device_id list with new entries.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230118101542.96705-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Wed, 18 Jan 2023 10:15:41 +0000 (11:15 +0100)]
ASoC: dt-bindings: qcom,sm8250: use fallback for SDM845 sound cards
All SDM845 sound cards are compatible with each other, so use one
generic fallback compatible for them.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230118101542.96705-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Fri, 20 Jan 2023 15:30:20 +0000 (16:30 +0100)]
ASoC: dt-bindings: samsung-i2s: drop unneeded assigned-clock*
assigned-clock-parents and assigned-clocks are coming from dtschema, so
there is no need anymore to keep them in bindings. Their presence were
also causing false positives:
exynos5422-odroidxu3.dtb: i2s@
3830000: Unevaluated properties are not allowed ('assigned-clock-rates' was unexpected)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230120153020.320270-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Fri, 20 Jan 2023 15:30:19 +0000 (16:30 +0100)]
ASoC: dt-bindings: samsung,odroid: correct codec DAI phandles
The order of codec DAI phandles is reversed - first comes HDMI (always
present) and then codec (physically not present on Odroid XU4).
Fixes:
97709d365bbd ("ASoC: dt-bindings: Centralize the 'sound-dai' definition")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230120153020.320270-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Tue, 24 Jan 2023 16:39:53 +0000 (17:39 +0100)]
ASoC: codecs: wsa88xx: remove unneeded includes
Remove unneeded includes from wsa881x and wsa883x drivers. The drivers
do not reference anything from the headers.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230124163953.345949-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Tue, 24 Jan 2023 16:39:52 +0000 (17:39 +0100)]
ASoC: codecs: constify static sdw_port_config struct
The struct sdw_port_config is not modified, so make it a const for code
safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230124163953.345949-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Tue, 24 Jan 2023 16:39:51 +0000 (17:39 +0100)]
ASoC: codecs: constify static sdw_slave_ops struct
The struct sdw_slave_ops is not modified and sdw_driver takes pointer to
const, so make it a const for code safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230124163953.345949-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Mon, 23 Jan 2023 12:21:44 +0000 (13:21 +0100)]
ASoC: Intel: avs: Simplify probe-component implementation
There is no need for the probe-component to be part of the PCM component
list as it does not make use of ASoC-topology and does not participate
in creating any PCM streams.
To achieve that, remove probe() and remove() functions.
Fixes:
ed914a2a45a4 ("ASoC: Intel: avs: Data probing soc-component")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20230123122144.1356890-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivasa Rao Mandadapu [Thu, 12 Jan 2023 07:30:17 +0000 (13:00 +0530)]
ASoC: qdsp6: audioreach: Add ADSP ready check
Check for SPF readiness in prm driver probe to avoid race conditions
during ADSP pil loading.
This patch is to avoid, sending requests to ADSP before it's
power domains are up and ready.
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Tested-by: Ratna Deepthi Kudaravalli <rkudarav@qti.qualcomm.com>
Link: https://lore.kernel.org/r/1673508617-27410-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chunxu Li [Tue, 10 Jan 2023 09:26:23 +0000 (17:26 +0800)]
ASoC: mediatek: mt8186: add AFE_DAC_CON0 to volatile register list
Mark AFE_DAC_CON0 as volatile since DSP firmware will access this
register too.
Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20230110092623.13035-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Wed, 18 Jan 2023 16:10:48 +0000 (17:10 +0100)]
ASoC: ux500: remove stedma40 references
ux500_pcm_request_chan() is never called because the dma channels
are already set up from DT. Remove this, along with the
ux500_msp_dma_params structure.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230118161110.521504-4-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Wed, 18 Jan 2023 16:10:47 +0000 (17:10 +0100)]
ASoC: ux500: remove platform_data support
The platform data definition for ux500 sound devices was removed
six years ago after the DT conversion was completed, see commit
4b483ed0be8b ("ARM: ux500: cut some platform data").
Remove some leftover bits in the ASoC driver and just assume that
it always gets probed using DT.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230118161110.521504-3-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 19 Jan 2023 15:31:47 +0000 (15:31 +0000)]
ASoC: mediatek: Add support for MT8188 SoC
Merge series from Trevor Wu <trevor.wu@mediatek.com>:
This series of patches adds support for Mediatek AFE of MT8188 SoC.
Patches are based on broonie tree "for-next" branch.
Changes since v4:
- refine etdm dai driver based on reviewer's suggestions
- refine dt-binding files based on reviewer's suggestions
Changes since v3:
- replace apll_ck with apll to sync with the relationship in CCF
- add mtk-soundcard-driver.c to support codec parsing
- drop mclk-always-on-rates support in mt8188-dai-etdm.c
- refine dt-binding files based on reviewer's suggestions
Changes since v2:
- drop CLK_IGNORE_UNUSED flag
- include bitfield.h to reslove the issue reported by kernel test robot
- rename mt8188-afe-pcm.yaml to mt8188-afe.yaml
- refine dt-binding files based on reviewer's suggestions
Changes since v1:
- remove bus protection functions in case of unmerged dependency problem
- replace some bit operation macro with FIELD_PREP
- simplify register control by regmap_set_bits and regmap_clear_bits
- fix dt-binding errors
- rename compatible string for recognition
Trevor Wu (13):
ASoC: mediatek: common: add SMC ops and SMC CMD
ASoC: mediatek: mt8188: add common header
ASoC: mediatek: mt8188: support audsys clock
ASoC: mediatek: mt8188: support adda in platform driver
ASoC: mediatek: mt8188: support etdm in platform driver
ASoC: mediatek: mt8188: support pcmif in platform driver
ASoC: mediatek: mt8188: support audio clock control
ASoC: mediatek: mt8188: add platform driver
ASoC: mediatek: mt8188: add control for timing select
ASoC: dt-bindings: mediatek,mt8188-afe: add audio afe document
ASoC: mediatek: common: add soundcard driver common code
ASoC: mediatek: mt8188: add machine driver with mt6359
ASoC: dt-bindings: mediatek,mt8188-mt6359: add mt8188-mt6359 document
.../bindings/sound/mediatek,mt8188-afe.yaml | 208 +
.../sound/mediatek,mt8188-mt6359.yaml | 97 +
sound/soc/mediatek/Kconfig | 23 +
sound/soc/mediatek/Makefile | 1 +
sound/soc/mediatek/common/Makefile | 2 +-
sound/soc/mediatek/common/mtk-base-afe.h | 19 +
.../mediatek/common/mtk-soundcard-driver.c | 79 +
.../mediatek/common/mtk-soundcard-driver.h | 14 +
sound/soc/mediatek/mt8188/Makefile | 15 +
sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 658 ++++
sound/soc/mediatek/mt8188/mt8188-afe-clk.h | 115 +
sound/soc/mediatek/mt8188/mt8188-afe-common.h | 151 +
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 3359 +++++++++++++++++
sound/soc/mediatek/mt8188/mt8188-audsys-clk.c | 205 +
sound/soc/mediatek/mt8188/mt8188-audsys-clk.h | 15 +
.../soc/mediatek/mt8188/mt8188-audsys-clkid.h | 83 +
sound/soc/mediatek/mt8188/mt8188-dai-adda.c | 632 ++++
sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 2588 +++++++++++++
sound/soc/mediatek/mt8188/mt8188-dai-pcm.c | 367 ++
sound/soc/mediatek/mt8188/mt8188-mt6359.c | 785 ++++
sound/soc/mediatek/mt8188/mt8188-reg.h | 3180 ++++++++++++++++
21 files changed, 12595 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8188-afe.yaml
create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml
create mode 100644 sound/soc/mediatek/common/mtk-soundcard-driver.c
create mode 100644 sound/soc/mediatek/common/mtk-soundcard-driver.h
create mode 100644 sound/soc/mediatek/mt8188/Makefile
create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.c
create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.h
create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-common.h
create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.c
create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.h
create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clkid.h
create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-adda.c
create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-pcm.c
create mode 100644 sound/soc/mediatek/mt8188/mt8188-mt6359.c
create mode 100644 sound/soc/mediatek/mt8188/mt8188-reg.h
--
2.18.0
Mark Brown [Wed, 18 Jan 2023 15:45:21 +0000 (15:45 +0000)]
Add support to compress API to ipc_msg_data /
Merge series from Daniel Baluta <daniel.baluta@oss.nxp.com>:
This patch series adds compress API support to ipc_msg_data /
set_stream_data_offset callbacks.
Changes since v1:
- fixed reviewed-by list (+Peter, -Pierre). Since github had
some glitches I added the reviews received manually in the
commits.
link: https://github.com/thesofproject/linux/pull/4133
Daniel Baluta (4):
ASoC: SOF: Prepare ipc_msg_data to be used with compress API
ASoC: SOF: Prepare set_stream_data_offset for compress API
ASoC: SOF: Add support for compress API for stream data/offset
ASoC: SOF: compress: Set compress data offset
sound/soc/sof/amd/acp-ipc.c | 8 ++--
sound/soc/sof/amd/acp.h | 5 ++-
sound/soc/sof/compress.c | 9 +++++
sound/soc/sof/intel/hda-ipc.c | 8 ++--
sound/soc/sof/intel/hda.h | 4 +-
sound/soc/sof/ipc3-pcm.c | 3 +-
sound/soc/sof/ipc3.c | 4 +-
sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +-
sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +-
sound/soc/sof/ops.h | 8 ++--
sound/soc/sof/sof-priv.h | 11 ++++--
sound/soc/sof/stream-ipc.c | 53 +++++++++++++++++++-------
12 files changed, 81 insertions(+), 36 deletions(-)
--
2.25.1
Mark Brown [Wed, 18 Jan 2023 15:33:51 +0000 (15:33 +0000)]
ASoC: Merge up 6.2 fixes
To resolve a conflict and support further development.
Mark Brown [Wed, 18 Jan 2023 15:28:17 +0000 (15:28 +0000)]
ASoC: SOF: sof-audio: Fixes for widget prepare and
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
This series contains one fix (first patch) followed by a nice to have safety
belts in case we get a widget from topology which is not handled by SOF and will
not have corresponding swidget associated with.
Mark Brown [Wed, 18 Jan 2023 13:41:51 +0000 (13:41 +0000)]
ASoC: samsung: fsd: audio support for FSD SoC
Merge series from Padmanabhan Rajanbabu <p.rajanbabu@samsung.com>:
This patch series enables audio support on FSD SoC.
Changes in v4:
1. Rebased and addressed review comments provided for v3.
Changes in v3:
1. Addressed all the review comments provided for v2 patch.
2. Fixed compilation warnings reported by kernel test robot.
Changes in v2:
1. New compatible added in Exynos I2S driver for FSD platform.
2. Added Fixup support for Exynos I2S CPU DAI.
3. Migration of manual PSR, OPCLK configuration to Exynos CPU DAI driver as
fixup.
4. Migrated from dedicated sound card to simple audio card.
5. Support added for tlv320aic3x-i2c codec on FSD platform.
Changes in v1:
1. Add TDM support on samsung I2S interface.
2. Allow sound card to directly configure I2S prescaler divider instead of
calculating it from frame clock.
3. The sound card support for FSD SoC which utilizes samsung I2S interface
as CPU DAI.
Padmanabhan Rajanbabu (5):
ASoC: dt-bindings: Add FSD I2S controller bindings
ASoC: samsung: i2s: add support for FSD I2S
arm64: dts: fsd: Add I2S DAI node for Tesla FSD
arm64: dts: fsd: Add codec node for Tesla FSD
arm64: dts: fsd: Add sound card node for Tesla FSD
.../bindings/sound/samsung-i2s.yaml | 8 +++
arch/arm64/boot/dts/tesla/fsd-evb.dts | 53 +++++++++++++++++++
arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 14 +++++
arch/arm64/boot/dts/tesla/fsd.dtsi | 34 ++++++++++++
sound/soc/samsung/i2s-regs.h | 1 +
sound/soc/samsung/i2s.c | 53 +++++++++++++++++++
6 files changed, 163 insertions(+)
--
2.17.1