summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2023-06-19ASoC: rt1019: Use maple tree register cacheMark Brown1-1/+1
The rt1019 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-2-729c6553cdcf@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19ASoC: rt1011: Use maple tree register cacheMark Brown1-1/+1
The rt1011 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-1-729c6553cdcf@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-17ASoC: fsl-asoc-card: add nau8822 supportHui Wang1-0/+14
This is for an imx6sx EVB which has a nau8822 codec connects to the SSI2 interface, so add the nau8822 support in this machine driver. Because the codec driver nau8822.c doesn't handle mclk enabling, here adding a codec_priv->mclk for nau8822 and similar codecs which need to enable the mclk in the machine driver, and enable the mclk in the card_late_probe() conditionally. Signed-off-by: Hui Wang <hui.wang@canonical.com> Link: https://lore.kernel.org/r/Message-Id: <20220616040046.103524-1-hui.wang@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-17ASoC: max98388: set variable soc_codec_dev_max98388 storage-class-specifier ↵Tom Rix1-1/+1
to static smatch reports sound/soc/codecs/max98388.c:890:39: warning: symbol 'soc_codec_dev_max98388' was not declared. Should it be static? This variable is only used in its defining file, so it should be static. Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/Message-Id: <20230617122635.3225639-1-trix@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: misc updates for 6.5Mark Brown7-52/+116
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Couple of improvements on virtual_widget support, firmware trace free, IPC payload dump, duplicated code in suspend and MeteorLake primary code support.
2023-06-16ASoC: codecs: wm0010: Add MODULE_FIRMWARE macrosJuerg Haefliger1-0/+3
The module loads firmware so add MODULE_FIRMWARE macros to provide that information via modinfo. Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230616115432.1011707-1-juerg.haefliger@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: rt5677: Add MODULE_FIRMWARE macroJuerg Haefliger1-0/+2
The module loads firmware so add a MODULE_FIRMWARE macro to provide that information via modinfo. Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> Link: https://lore.kernel.org/r/20230616115549.1011903-1-juerg.haefliger@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: Merge fixes due to dependenciesMark Brown40-145/+195
So we can apply the tlv320aic3xxx DT conversion.
2023-06-16ASoC: loongson: fix compile testing on 32-bitArnd Bergmann1-1/+1
DIV_ROUND_CLOSEST() does not work on 64-bit variables when building for a 32-bit target: ld.lld: error: undefined symbol: __udivdi3 >>> referenced by loongson_i2s.c >>> sound/soc/loongson/loongson_i2s.o:(loongson_i2s_hw_params) in archive vmlinux.a Use DIV_ROUND_CLOSEST_ULL() instead. Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230616090156.2347850-4-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: loongson: add PCI dependencyArnd Bergmann1-0/+1
The new driver fails to build when PCI is disabled: WARNING: unmet direct dependencies detected for SND_SOC_LOONGSON_I2S_PCI Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (LOONGARCH || COMPILE_TEST [=y]) && PCI [=n] Selected by [y]: - SND_SOC_LOONGSON_CARD [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (LOONGARCH || COMPILE_TEST [=y]) sound/soc/loongson/loongson_i2s_pci.c:167:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] module_pci_driver(loongson_i2s_driver); Add the appropriate Kconfig dependency. Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230616090156.2347850-3-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: loongson: fix unused PM function warningArnd Bergmann1-1/+1
Build testing without CONFIG_PM_SLEEP causes a warning: sound/soc/loongson/loongson_i2s.c:246:12: error: unused function 'i2s_suspend' [-Werror,-Wunused-function] sound/soc/loongson/loongson_i2s.c:255:12: error: unused function 'i2s_resume' [-Werror,-Wunused-function] Use the modern SYSTEM_SLEEP_PM_OPS() instead of the old one to avoid this. Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230616090156.2347850-2-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: max98388: fix unused function warningsArnd Bergmann1-4/+4
The PM functions are never referenced when CONFIG_PM_SLEEP is disabled: sound/soc/codecs/max98388.c:854:12: error: unused function 'max98388_suspend' [-Werror,-Wunused-function] static int max98388_suspend(struct device *dev) ^ sound/soc/codecs/max98388.c:864:12: error: unused function 'max98388_resume' [-Werror,-Wunused-function] static int max98388_resume(struct device *dev) Fix this by using the modern SYSTEM_SLEEP_PM_OPS() macro in place of the deprecated SET_SYSTEM_SLEEP_PM_OPS() version, and use pm_sleep_ptr() to hide the entire structure as well. On a related note, the of_match_ptr() and ACPI_PTR() macros have the same problem and would cause the device id table to be unused when the driver is built-in and the respective subsystems are disabled. This does not cause warnings unless -Wunused-const-variable is passed to the compiler, but it's better to just not use the macros at all here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230616090156.2347850-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: Intel: mtl: setup primary core info on MeteorLake platformRander Wang1-4/+15
Set primary core mask and refcount. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> 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> Link: https://lore.kernel.org/r/20230616100039.378150-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: pm: Remove duplicated code in sof_suspendPeter Ujfalusi1-8/+4
Over time the function has changed and now there is no need to have the duplicated sof_fw_trace_suspend() and sof_suspend_clients() in the if (target_state == SOF_DSP_PM_D0) branch. Remove it and add a simple check with a single goto statement. Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Paul Olaru <olarupaulstelian97@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: ipc4: Switch to use the sof_debug:bit11 to dump message payloadPeter Ujfalusi1-23/+21
Use the SOF_DBG_DUMP_IPC_MESSAGE_PAYLOAD flag to print the message payload instead of the DEBUG_VERBOSE, which would need code modification and kernel re-compilation. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: ipc3: Dump IPC message payloadPeter Ujfalusi1-0/+39
Dump the IPC message payload if BIT(11) of sof_debug is set and the message contains more data than just a header. The header size differs between TX and RX and in case of set_get_data, the header is always the reply header for the message regardless if it is TX or RX. The use of printk(KERN_DEBUG "..."); is on purpose to keep the dmesg output tidy. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: Add new sof_debug flag to request message payload dumpPeter Ujfalusi1-0/+3
We only print out the header information of an IPC message in debug level, either in verbose or non verbose way (Kconfig option). On top of the header information the message itself can help reproducing and identifying issues. BIT(11) can be used to request a message payload dump if it is supported by the IPC implementation. Since IPC message payload printing is only implemented for IPC4, the flag will not have any effect to IPC3 for now. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: core: Free the firmware trace before calling snd_sof_shutdown()Peter Ujfalusi1-1/+3
The shutdown is called on reboot/shutdown of the machine. At this point the firmware tracing cannot be used anymore but in case of IPC3 it is using and keeping a DMA channel active (dtrace). For Tiger Lake platforms we have a quirk in place to fix rare reboot issues when a DMA was active before rebooting the system. If the tracing is enabled this quirk will be always used and a print appears on the kernel log which might be misleading or not even correct. Release the fw tracing before executing the shutdown to make sure that this known DMA user is cleared away. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: sof-audio: test virtual widget in sof_walk_widgets_in_orderBard Liao1-0/+15
Virtual widgets are added for the purpose of showing connections between aggregated DAIs in SDW topologies. However, we shouldn't touch them in SOF. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: SOF: sof-audio: add is_virtual_widget helperBard Liao1-16/+16
Testing virtual widget is required in many functions. No function changed in this commit. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-15ASoC: loongson: Add Loongson ASoC Sound Card SupportYingkun Meng3-0/+244
The Loongson ASoC Sound Card is a general ASoC DAI Link driver that can be used for Loongson CPU DAI drivers and external CODECs. The driver supports the use of ACPI table to describe device resources. On loongson 7axxx platforms, the audio device is an ACPI device. Signed-off-by: Yingkun Meng <mengyingkun@loongson.cn> Link: https://lore.kernel.org/r/20230614122240.3402762-1-mengyingkun@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-15ASoC: max98388: add amplifier driverRyan Lee4-0/+1259
Added Analog Devices MAX98388 amplifier driver. MAX98388 provides a PCM interface for audio data and a standard I2C interface for control data communication. Signed-off-by: Ryan Lee <ryans.lee@analog.com> Link: https://lore.kernel.org/r/20230613060945.183128-2-ryan.lee.analog@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-15ASoC: Add support for Loongson I2S controllerYingkun Meng9-0/+899
Loongson I2S controller is found on 7axxx/2kxxx chips from loongson, it is a PCI device with two private DMA controllers, one for playback, the other for capture. The driver supports the use of DTS or ACPI to describe device resources. Signed-off-by: Yingkun Meng <mengyingkun@loongson.cn> Link: https://lore.kernel.org/r/20230615122718.3412942-1-mengyingkun@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-15ASoC: Use the maple tree register cache for RealTekMark Brown10-15/+15
Merge series from Mark Brown <broonie@kernel.org>: The RealTek SoundWire CODECs don't support bulk register operations so they gain no advantage from using the rbtree cache, convert them to use the maple tree cache instead - it is more modern.
2023-06-15ASoC: simple_card_utils: remove unused cpus/codecs/platforms from propsKuninori Morimoto1-6/+0
simple_dai_props has cpus/codecs/platforms. These pointer were used for dai_link before, but are allocated today since commit 050c7950fd70 ("ASoC: simple-card-utils: alloc dai_link information for CPU/Codec/Platform"). We don't need to keep it anymore. This patch removes these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87bkhhxpc6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: simple-card-utils.c: share asoc_graph_parse_dai()Kuninori Morimoto3-212/+107
Current Audio Graph Card/Card2 implements asoc_simple_parse_dai() on each driver, but these are same function. This patch share it as asoc_graph_parse_dai(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87o7lihpvy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: SOF: amd: Add support for IPC with a reply_size set to zeroVenkata Prasad Potturu1-0/+7
Add support for IPC tx_message with a reply_size set to zero, return zero when message reply_size is zero at acp_dsp_ipc_get_reply(). Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20230614103707.2246296-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt1318: Use maple tree register cacheMark Brown1-1/+1
The rt1318 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-8-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt1316: Use maple tree register cacheMark Brown1-1/+1
The rt1316 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-7-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt1308: Use maple tree register cacheMark Brown1-1/+1
The rt1308 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-6-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt722: Use maple tree register cacheMark Brown1-2/+2
The rt722 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-5-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt715: Use maple tree register cacheMark Brown1-2/+2
The rt715 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-4-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt712: Use maple tree register cacheMark Brown2-4/+4
The rt712 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-3-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt711: Use maple tree register cacheMark Brown2-3/+3
The rt711 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-2-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14ASoC: rt700: Use maple tree register cacheMark Brown1-1/+1
The rt700 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-1-85ee50c93905@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: add new trigger ordering methodMark Brown5-63/+67
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: This patch-set adds new "trigger" starting/stopping method.
2023-06-13ASoC: add N cpus to M codecs dai link supportMark Brown5-5/+135
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: Currently, ASoC supports dailinks with the following mappings: 1 cpu DAI to N codec DAIs N cpu DAIs to N codec DAIs But the mapping between N cpu DAIs and M codec DAIs is not supported. The reason is that we didn't have a mechanism to map cpu and codec DAIs This series suggests a new snd_soc_dai_link_codec_ch_map struct in struct snd_soc_dai_link{} which provides codec DAI to cpu DAI mapping information used to implement N cpu DAIs to M codec DAIs support. And add the codec_ch_maps to SOF SoundWire machine driver.
2023-06-13ASoC: Use maple tree for Cirrus Logic devicesMark Brown10-10/+10
Merge series from Mark Brown <broonie@kernel.org>: A lot of the Cirrus Logic devices only support single register read/write operations so they get no benefit from using the rbtree cache over the more modern maple tree cache, convert them to use maple tree.
2023-06-13ASoC: siu: Add MODULE_FIRMWARE macroJuerg Haefliger1-0/+2
The module loads firmware so add a MODULE_FIRMWARE macro to provide that information via modinfo. Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> Link: https://lore.kernel.org/r/20230613095454.38696-1-juerg.haefliger@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: remove old trigger ordering methodKuninori Morimoto1-10/+0
All drivers switch to use generic trigger ordering method. Let's remove old method. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87legufnyy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: starfive: use use new trigger ordering methodKuninori Morimoto1-1/+1
ASoC is now supporting generic trigger ordering method. This patch switch to use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87mt1afnz5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: atmel: use use new trigger ordering methodKuninori Morimoto1-1/+1
ASoC is now supporting generic trigger ordering method. This patch switch to use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/87o7lqfnzb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: amd: use use new trigger ordering methodKuninori Morimoto2-11/+11
ASoC is now supporting generic trigger ordering method. This patch switch to use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pm66fnzi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: add new trigger ordering methodKuninori Morimoto1-50/+64
Current ASoC is assuming that trigger starting order is Link -> Component -> DAI as default, and its reverse order for stopping. But some Driver / Card want to reorder it for some reasons. We have such flags, but is unbalance like below. struct snd_soc_component_driver :: start_dma_last struct snd_soc_dai_link :: stop_dma_first We want to have more flexible, and more generic method. This patch adds new snd_soc_trigger_order for start/stop at component / DAI-link. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r0qmfnzx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: Intel: sof_sdw: add dai_link_codec_ch_mapBard Liao3-0/+72
The captured data will be combined from each cpu DAI if the dai link has more than one cpu DAIs. We can set channel number indirectly by adding sdw_codec_ch_maps. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter 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/20230607031242.1032060-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: add N cpus to M codecs dai link supportBard Liao2-5/+63
Currently, ASoC supports dailinks with the following mappings: 1 cpu DAI to N codec DAIs N cpu DAIs to N codec DAIs But the mapping between N cpu DAIs and M codec DAIs is not supported. The reason is that we didn't have a mechanism to map cpu and codec DAIs This patch suggests a new snd_soc_dai_link_codec_ch_map struct in struct snd_soc_dai_link{} which provides codec DAI to cpu DAI mapping information used to implement N cpu DAIs to M codec DAIs support. When a dailink contains two or more cpu DAIs, we should set channel number of cpus based on its channel mask. The new struct also provides channel mask information for each codec and we can construct the cpu channel mask by combining all codec channel masks which map to the cpu. The N:M mapping is however restricted to the N <= M case due to physical restrictions on a time-multiplexed bus such as I2S/TDM, AC97, SoundWire and HDaudio. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter 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/20230607031242.1032060-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: cs35l30: Use maple tree register cacheMark Brown1-1/+1
The cs35l30 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Acked-by: David Rhodes <david.rhodes@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-cirrus-maple-v1-10-b806c4cbd1d4@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: cs43130: Use maple tree register cacheMark Brown1-1/+1
The cs43130 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Acked-by: David Rhodes <david.rhodes@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-cirrus-maple-v1-9-b806c4cbd1d4@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: cs42l83: Use maple tree register cacheMark Brown1-1/+1
The cs42l83 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Acked-by: David Rhodes <david.rhodes@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-cirrus-maple-v1-8-b806c4cbd1d4@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13ASoC: cs42l73: Use maple tree register cacheMark Brown1-1/+1
The cs42l73 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern. Acked-by: David Rhodes <david.rhodes@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230609-asoc-cirrus-maple-v1-7-b806c4cbd1d4@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>