Commit Graph

1215440 Commits

Author SHA1 Message Date
Mark Brown
85a6af284d
ASoC: SOF: ipc4: Take priority into cosideration when
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Add pipeline priority support for IPC4: Add support for parsing pipeline
priorities from the topology. This will be used to break the tie between
pipelines to set the trigger order when multiple pipelines are triggered
simultaneously.
2023-10-06 15:39:19 +01:00
Mark Brown
e22ece0f65
ASoC: cs35l56: Update hibernate/wake sequences and
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

Update the hibernate and wake command sequences to meet the latest
datasheet specification and enable hibernation for I2C and SPI control
interfaces.

Richard Fitzgerald (1):
  ASoC: cs35l56: Enable low-power hibernation mode on SPI

Simon Trimmer (3):
  ASoC: cs35l56: Change hibernate sequence to use allow auto hibernate
  ASoC: cs35l56: Wake transactions need to be issued twice
  ASoC: cs35l56: Enable low-power hibernation mode on i2c

 include/sound/cs35l56.h           |  1 +
 sound/soc/codecs/cs35l56-i2c.c    |  1 +
 sound/soc/codecs/cs35l56-shared.c | 66 +++++++++++++++++++------------
 sound/soc/codecs/cs35l56-spi.c    |  1 +
 4 files changed, 43 insertions(+), 26 deletions(-)

--
2.30.2
2023-10-06 15:32:31 +01:00
Kees Cook
4b226f1542
MAINTAINERS: Include sof headers under ASoC
Add missing sof header files for ASoC.

Suggested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/lkml/f258a7e6-0728-4f55-a71a-6e99113ce7e5@sirena.org.uk
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20231005025618.work.355-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06 12:32:00 +01:00
Richard Fitzgerald
634ed138d8
ASoC: cs35l56: Enable low-power hibernation mode on SPI
Hibernation can be enabled on SPI-connected devices now that
the hibernate and wake sequences have been updated to work
with wake-on-MOSI.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06 12:30:29 +01:00
Simon Trimmer
79b101947a
ASoC: cs35l56: Enable low-power hibernation mode on i2c
This can now be re-enabled as the sequence to reliably wake the device
has been implemented in the shared code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06 12:30:28 +01:00
Simon Trimmer
3df761bdbc
ASoC: cs35l56: Wake transactions need to be issued twice
As the dummy wake is a toggling signal (either I2C or SPI activity) it
is not guaranteed to meet the minimum asserted hold time for a wake
signal. In this case the wake must guarantee rising edges separated by
at least the minimum hold time.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06 12:30:27 +01:00
Simon Trimmer
a47cf4dac7
ASoC: cs35l56: Change hibernate sequence to use allow auto hibernate
If the hardware uses SPI_MOSI, I2C_SCL or I2C_SDA as the wake source
the bus activity of sending HIBERNATE_NOW will wake up the amps that
were already put into hibernate.

ALLOW_AUTO_HIBERNATE tells the firmware to hibernate itself after a
timeout of a few seconds, giving the driver instances time to send this
before any amps have gone into hibernate.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231006111039.101914-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06 12:30:26 +01:00
Rander Wang
4df7d6a61f
ASoC: SOF: IPC4: sort pipeline based on priority
The pipeline priority is set in topology and driver should sort pipeline
based on priority for trigger order.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-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/20231006084454.19170-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06 12:30:23 +01:00
Rander Wang
ae67b6371d
ASoC: SOF: IPC4: get pipeline priority from topology
Driver set pipeline priority according to priority setting in topology.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-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/20231006084454.19170-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06 12:30:22 +01:00
Kees Cook
2175362f59
MAINTAINERS: Include additional ASoC paths
Make sure a few other paths are correctly sent to the ASoC maintainers.

Link: https://lore.kernel.org/lkml/63dd3676.170a0220.1f1b2.3244@mx.google.com/
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20231004193441.work.109-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-04 20:40:04 +01:00
Simon Trimmer
c98a0a83dc
ASoC: cs35l56: Initialise a variable to silence possible static analysis error
read_poll_timeout() is a macro and val will be populated before use,
however some static analysis tools treat it as a function and warn of
uninitialised variable usage.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231004144203.151775-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-04 16:09:15 +01:00
Kees Cook
80e698e2df
ASoC: soc-dapm: Annotate struct snd_soc_dapm_widget_list with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct snd_soc_dapm_widget_list.
Additionally, since the element count member must be set before accessing
the annotated flexible array member, move its initialization earlier.

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: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: alsa-devel@alsa-project.org
Cc: linux-hardening@vger.kernel.org
Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1]
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20231003232852.work.257-kees@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-04 12:56:21 +01:00
Bragatheswaran Manickavel
943bcc742e
ASoC: dt-bindings: rt5616: Convert to dtschema
Convert the rt5616 audio CODEC bindings to DT schema

Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230930165050.7793-1-bragathemanick0908@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-03 14:51:20 +01:00
Simon Trimmer
d4e1417bb9
ASoC: cs35l56: Remove unused hibernate wake constants
The two CS35L56_HIBERNATE_WAKE_* constants in cs35l56.h aren't used by
any of the driver code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231003093418.21600-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-03 14:51:19 +01:00
Mark Brown
4c9d0d6f63
Remove reset GPIO for AW88261
Merge series from Luca Weiss <luca.weiss@fairphone.com>:

The AW88261 chip doesn't have a reset gpio, so remove it from the
bindings and from the driver.
2023-10-03 14:21:12 +01:00
Joerg Schambacher
736b884a7b
ASoC: pcm512x: Adds bindings for TAS575x devices
The TAS5754/6 power amplifiers use the same pcm512x driver with
only minor restictions described in the bindings document.

Signed-off-by: Joerg Schambacher <joerg.hifiberry@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230929150555.405388-1-joerg.hifiberry@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 19:42:46 +01:00
Joerg Schambacher
1f81780526
ASoC: Adds support for TAS575x to the pcm512x driver
Enables the existing pcm512x driver to control the almost
compatible TAS5754 and -76 amplifers. Both amplifiers support
only an I2C interface and the internal PLL must be always
on to provide necessary clocks to the amplifier section.
Tested on TAS5756 with support from Andreas Arbesser-Krasser
from Texas Instruments <a-krasser@ti.com>

Signed-off-by: Joerg Schambacher <joerg.hifiberry@gmail.com>
Link: https://lore.kernel.org/r/20230929150722.405415-1-joerg.hifiberry@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 19:42:45 +01:00
Luca Weiss
4eed047b76
ASoC: codecs: aw88261: Remove non-existing reset gpio
According to the AW88261 datasheet (V1.1) and device schematics I have
access to, there is no reset gpio present on the AW88261. Remove it.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20231002-aw88261-reset-v2-2-837cb1e7b95c@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 19:39:51 +01:00
Luca Weiss
c7b94e8614
ASoC: dt-bindings: awinic,aw88395: Remove reset-gpios from AW88261
The AW88261 chip doesn't have a reset GPIO, so disallow providing
reset-gpios.

At the same time also don't keep reset-gpios required for AW88395. This
is both because the Linux driver has it optional, and it also simplifies
the bindings by not introducing another conditional.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20231002-aw88261-reset-v2-1-837cb1e7b95c@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 19:39:50 +01:00
Mark Brown
a9b696c851
GPIO descriptors for TI ASoC codecs
Merge series from Linus Walleij <linus.walleij@linaro.org>:

This cleans up and rewrites the GPIO usage in the TI
ASoC components to use GPIO descriptors exclusively.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Linus Walleij (5):
      ASoC: ti: Convert N810 ASoC to GPIO descriptors
      ASoC: ti: Convert RX51 to use exclusively GPIO descriptors
      ASoC: ti: Convert TWL4030 to use GPIO descriptors
      ASoC: ti: Convert Pandora ASoC to GPIO descriptors
      ASoC: ti: osk5912: Drop unused include

 arch/arm/mach-omap2/board-n8x0.c           | 10 +++++
 arch/arm/mach-omap2/pdata-quirks.c         | 10 +++++
 include/linux/platform_data/omap-twl4030.h |  3 --
 sound/soc/ti/n810.c                        | 31 ++++++++-------
 sound/soc/ti/omap-twl4030.c                | 20 ++++------
 sound/soc/ti/omap3pandora.c                | 63 +++++++++++-------------------
 sound/soc/ti/osk5912.c                     |  1 -
 sound/soc/ti/rx51.c                        | 19 ++-------
 8 files changed, 72 insertions(+), 85 deletions(-)
---
base-commit: 0bb80ecc33
change-id: 20230922-descriptors-asoc-ti-a852eff479ed

Best regards,
--
Linus Walleij <linus.walleij@linaro.org>
2023-10-02 16:17:47 +01:00
Shenghao Ding
4c556d1ea5
ASoC: tas2781: fixed compiling issue in m68k
fixed m68k compiling issue: mapping table can save code field; storing the
dev_idx as a member of block can reduce unnecessary  time and system
resource comsumption of dev_idx mapping every time the block data writing
to the dsp.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20231002090434.1896-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:27 +01:00
Amadeusz Sławiński
045059e4d3
ASoC: Intel: avs: Remove unused variable
Recent commit removed the only user of bus variable in
avs_dai_fe_prepare(), also remove the variable itself.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309292121.5DdaNpLj-lkp@intel.com/
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231002084629.903103-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:26 +01:00
Gustavo A. R. Silva
3746284c23
ASoC: SOF: ipc4-topology: Use size_add() in call to struct_size()
If, for any reason, the open-coded arithmetic causes a wraparound,
the protection that `struct_size()` adds against potential integer
overflows is defeated. Fix this by hardening call to `struct_size()`
with `size_add()`.

Fixes: f9efae9549 ("ASoC: SOF: ipc4-topology: Add support for base config extension")
Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/ZQSr15AYJpDpipg6@work
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:25 +01:00
Linus Walleij
67ebde4203
ASoC: ti: osk5912: Drop unused include
This driver includes the legacy header <linux/gpio.h> but doesn't
use it. Drop the include.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Link: https://lore.kernel.org/r/20230926-descriptors-asoc-ti-v1-5-60cf4f8adbc5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:22 +01:00
Linus Walleij
319e6ac143
ASoC: ti: Convert Pandora ASoC to GPIO descriptors
The Pandora uses GPIO descriptors pretty much exclusively, but not
for ASoC, so let's fix it. Register the pins in a descriptor table
in the machine since the ASoC device is not using device tree.

Use static locals for the GPIO descriptors because I'm not able
to experient with better state storage on any real hardware. Others
using the Pandora can come afterwards and improve this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Link: https://lore.kernel.org/r/20230926-descriptors-asoc-ti-v1-4-60cf4f8adbc5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:21 +01:00
Linus Walleij
1b8a62937e
ASoC: ti: Convert TWL4030 to use GPIO descriptors
The TWL4030 is actually only ever populated from the device tree,
so we can just pass the right device and headphone jack GPIO name
to snd_soc_jack_add_gpios() and it will pick the right GPIO right
from the device tree.

The platform data patch is unused (no in-tree users of the pdata
method) but these can use GPIO descriptor tables rather than global
GPIO numbers if they need this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Link: https://lore.kernel.org/r/20230926-descriptors-asoc-ti-v1-3-60cf4f8adbc5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:20 +01:00
Linus Walleij
22041ed154
ASoC: ti: Convert N810 ASoC to GPIO descriptors
The N810 uses GPIO descriptors pretty much exclusively, but not
for ASoC, so let's fix it. Register the pins in a descriptor table
in the machine since the ASoC device is not using device tree.

Use static locals for the GPIO descriptors because I'm not able
to experient with better state storage on any real hardware. Others
using the N810 can come afterwards and improve this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Link: https://lore.kernel.org/r/20230926-descriptors-asoc-ti-v1-1-60cf4f8adbc5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:19 +01:00
Linus Walleij
5b12dd8449
ASoC: ti: Convert RX51 to use exclusively GPIO descriptors
The RX51/Nokia n900 uses the legacy GPIO header to convert a GPIO
back to the global GPIO numberspace and then the jack using it
in the snd_soc_jack_add_gpios() call immediately looks up the
corresponding descriptor again.

The snd_soc_jack_add_gpios() handles GPIOs passed with devices
just fine: pass in the device instead, and rename the GPIO
to match the property in the device tree, and it should work
all the same but without all the trouble.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Link: https://lore.kernel.org/r/20230926-descriptors-asoc-ti-v1-2-60cf4f8adbc5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02 14:06:18 +01:00
Cezary Rojewski
b87b8f43af
ASoC: Intel: avs: Drop superfluous stream decoupling
HDAudio streams are decoupled on startup() and, decoupling them again on
prepare() is redundant.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230929112436.787058-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29 14:17:55 +02:00
Wu Zhou
a5e6ea0126
ASoC: Intel: avs: Disable DSP before loading basefw
When audio controller is passed-through to the guest machine in
virtualized environment, the basefw load will fail the next time guest
OS reboots. Disable the DSP main core before loading the base firmware
to sanitize the environment.

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230929112436.787058-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29 14:17:54 +02:00
Cezary Rojewski
0a5fb3cc28
ASoC: Intel: avs: Keep module refcount up when gathering traces
To prevent rmmod and similar behave unexpectedly when invoked on
snd_soc_avs module while the AudioDSP firmware tracing is ongoing,
increase the module refcount until the tracing is stopped.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230929112436.787058-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29 14:17:54 +02:00
Amadeusz Sławiński
28a21cb264
ASoC: Intel: avs: Preallocate memory for module configuration
In order to instantiate modules on the firmware side, the driver sends
payload with module configuration. In some case size of this information
is not known before hand, so driver allocates temporary memory during
module creation and frees it after use. Optimize the flow a bit, by
preallocating maximum buffer. This removes the time spend on allocating
memory, as well as potential OOM errors during module initialization.

Handlers for modules, where configuration data fits on stack, are left
as is.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230929112436.787058-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29 14:17:53 +02:00
Amadeusz Sławiński
7eb878e768
ASoC: Intel: avs: Use generic size defines
Instead of using PAGE_SIZE as base of definitions in headers, use
generic size defines. While x86 platforms use 4096 as page size, there
are platforms which use different page sizes. Two of changed defines are
for memory windows on DSP side, which have fixed size independent of
host side page size. Another one is for CLDMA buffer which also doesn't
need to change with page size.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230929112436.787058-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29 14:17:52 +02:00
Cezary Rojewski
26033ae6bd
ASoC: Intel: avs: Move IPC error messages one level down
Code size can be reduced if avs_dsp_send_xxx_msg()s take responsibility
for dumping logs in case of an IPC message failure. In consequence,
avs_ipc_err() helper is removed.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230929112436.787058-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29 14:17:51 +02:00
Rob Herring
967dad9775
ASoC: dt-bindings: Simplify referencing dai-params.yaml
There's generally no need to use definitions to reference from
individual properties. All the property names are the same, and all the
defined properties are used by all the users.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20230928194126.1146622-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29 09:53:40 +02:00
Amadeusz Sławiński
b5d5c87986
ASoC: doc: Update codec to codec examples
There are examples in documentation for codec to codec connection.
However they show method before recent series of patches which renamed
the fields. Update documentation accordingly.

Fixes: 7ddc7f91be ("ASoC: soc.h: clarify Codec2Codec params")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230928134706.662947-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 16:04:13 +02:00
Mark Brown
37b4346ed8
ASoC: codecs: Add aw87390 amplifier driver
Merge series from wangweidong.a@awinic.com:

The awinic aw87390 is a new high efficiency, low noise,
constant large volume, 6th Smart K audio amplifier.
2023-09-28 15:22:35 +02:00
Mark Brown
54ac512048
ASoC: codecs: rtq9128: Add TDM input source select
Merge series from cy_huang@richtek.com:

This patch series create a TDM source select property and use it to
decide which TDM data source is connected.

Following by the below patch disccuion
https://lore.kernel.org/lkml/1695780376-32301-1-git-send-email-cy_huang@richtek.com/#t
It may not be a good choice to add the user controlable mixer control
item. Since it follows the board design, make it as a device property.
2023-09-28 14:42:32 +02:00
Weidong Wang
4717636f3f
ASoC: codecs: Add aw87390 amplifier driver
Add i2c and amplifier registration for aw87390 and
their associated operation functions.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-11-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:37 +02:00
Weidong Wang
f83287a725
ASoC: codecs: Modify the transmission mode of function parameters
Change the transmission mode of the "aw88261_dev_get_prof_name"
function parameter

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-10-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:37 +02:00
Weidong Wang
c786770ed8
ASoC: codecs: Rename "sync-flag" to "awinic,sync-flag"
Rename "sync-flag" to "awinic,sync-flag", this is to be
consistent with the "awinic,aw88395.yaml" file

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-9-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:36 +02:00
Weidong Wang
b116c832c9
ASoC: codecs: Add code for bin parsing compatible with aw87390
Add aw87390 compatible code to the aw88395_lib.c file
so that it can parse aw87390's bin file

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-8-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:35 +02:00
Weidong Wang
6a4c3ce3f0
ASoC: codecs: Modify i2c driver name
Change the name of the i2c driver, this is to
be consistent with the "awinic,aw88395.yaml" file

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-7-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:34 +02:00
Weidong Wang
e83219c94a
ASoC: codecs: Modify the transmission method of parameters
Change the transmission mode of the "aw88395_dev_get_prof_name"
function parameter, Instead of using return values for data
transfer, parameters are used

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-6-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:33 +02:00
Weidong Wang
74ff4f22d8
ASoC: codecs: Rename "sound-channel" to "awinic,audio-channel"
Rename "sound-channel" to "awinic,audio-channel",
this is to be consistent with the "awinic,aw88395.yaml" file

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-5-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:33 +02:00
Weidong Wang
085370aa8c
ASoC: codecs: Remove the "fade-enable property"
Remove the "fade-enable" property because the "fade_step" property
already implement this functionality.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-4-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:32 +02:00
Weidong Wang
457b6587c1
ASoC: dt-bindings: Add schema for "awinic,aw87390"
Add a DT schema for describing awinic aw87390 audio amplifiers.
They are controlled using I2C.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230928105727.47273-3-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:31 +02:00
Weidong Wang
b99d8d8adf
ASoC: dt-bindings: awinic,aw88395: Add properties for multiple PA support
Add two properties, the "awinic,audio-channel" property and the
"awinic,sync-flag". The "awinic,audio-channel" is used to make
different PA load different configurations, the "awinic,sync-flag"
is used to synchronize the phases of multiple PA. These two properties
will be read by the corresponding driver, allowing multi-PA to
achieve better playback effect.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230928105727.47273-2-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 13:38:30 +02:00
Jiapeng Chong
67fcdbfd9e
ASoC: cs42l43: Remove useless else
The assignment of the else and if branches is the same, so the else
here is redundant, so we remove it.

./sound/soc/codecs/cs42l43-sdw.c:35:1-3: WARNING: possible condition with no effect (if == else).

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6712
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230928085200.48635-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 11:53:21 +02:00
ChiYuan Huang
d9ef56d94f
ASoC: codecs: rtq9128: Add TDM input source select
Pase the property to decide the TDM input source comes from 'DATA1' or
'DATA2 pin.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/1695872468-24433-3-git-send-email-cy_huang@richtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-28 10:39:01 +02:00