Mark Brown
bcb3d07226
ASoC: topology: Cleanup patches
...
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com >:
Following patches contain minor changes, cleaning up code to be easier
to read. Clean up few loops, to be simpler or altogether remove them.
Rename some things to make code easier to understand.
2022-04-05 10:25:02 +01:00
Mark Brown
5c5c69e943
ASoC: wm8731: Overhaul of the driver
...
Merge series from Mark Brown <broonie@kernel.org >:
This series contains a bunch of fairly minor changes which overhaul and
modernise the WM8731 driver, there should be no impact on the driver's
functionality.
2022-04-05 10:25:00 +01:00
Mark Brown
5f6c3f9084
ASoC: SOF: Miscellaneous fixes for IPC and trace
...
Merge series from Ranjani Sridharan <ranjani.sridharan@linux.intel.com >:
This series includes some miscellaenous fixes pertaining to IPC, DMA
buffer and DMA trace.
2022-04-05 10:24:59 +01:00
Mark Brown
e0e1d166b5
ASoC: mediatek: Add support for MT8195 sound card with max98390 and rt5682
...
Merge series from Trevor Wu <trevor.wu@mediatek.com >:
This series of patches adds support for mt8195 board with mt6359, max98390
and rt5682. To prevent from copy-paste components, mt8195 machine
drivers and dt-bindings are merged in the patch.
2022-04-05 10:24:57 +01:00
Mark Brown
514ed489c6
ASoC: atmel: Fixes for AT91SAM9G20-EK audio driver
...
Merge series from Mark Brown <broonie@kernel.org >:
At some point the machine driver for the audio subsystem on the
AT91SAM9G20-EK appears to have bitrotted, no longer probing due to
effects of the transition to the common clock framework. The first patch
in this series fixes the initial probe problem, with the rest of the
series being random other fixes and cleanups I noticed while looking at
the driver.
2022-04-05 10:24:56 +01:00
Cezary Rojewski
b695f5c0a8
ASoC: Intel: catpt: Drop redundant enum constant
...
CATPT_SSP_IFACE_LAST is being used only to calculate CATPT_SSP_COUNT.
Make CATPT_SSP_COUNT part of the enum directly and remove the redundant
constant.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220403141647.1037173-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:22 +01:00
Derek Fang
bc0505bdfb
ASoC: rt5682s: Separate the regulator consumer controls
...
Control the regulators separately instead of using regulator_bulk to
accord to the timing request in the datasheet.
Signed-off-by: Derek Fang <derek.fang@realtek.com >
Link: https://lore.kernel.org/r/20220328053338.21441-1-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:21 +01:00
Peter Ujfalusi
a403993ce9
ASoC: SOF: ipc3-topology: Set scontrol->priv to NULL after freeing it
...
Since the scontrol->priv is freed up during load operation it should be set
to NULL to be safe against double freeing attempt.
Fixes: b5cee8feb1 ("ASoC: SOF: topology: Make control parsing IPC agnostic")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20220331114757.32551-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:20 +01:00
Stephen Kitt
4a4043456c
ASoC: cs*: use simple i2c probe function
...
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.
This avoids scanning the identifier tables during probes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Lucas Tanure <tanureal@opensource.cirrus.com >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325170734.1216018-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:19 +01:00
Stephen Kitt
6d8f318b94
ASoC: wm*: use i2c_match_id and simple i2c probe
...
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325162515.1204107-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:18 +01:00
Stephen Kitt
b79bd63a66
ASoC: ada*, ssm*: use simple i2c probe function
...
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.
This avoids scanning the identifier tables during probes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Link: https://lore.kernel.org/r/20220325164828.1209201-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:17 +01:00
Hui Wang
9f34290421
ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t
...
The CS35L41_NUM_OTP_ELEM is 100, but only 99 entries are defined in
the array otp_map_1/2[CS35L41_NUM_OTP_ELEM], this will trigger UBSAN
to report a shift-out-of-bounds warning in the cs35l41_otp_unpack()
since the last entry in the array will result in GENMASK(-1, 0).
UBSAN reports this problem:
UBSAN: shift-out-of-bounds in /home/hwang4/build/jammy/jammy/sound/soc/codecs/cs35l41-lib.c:836:8
shift exponent 64 is too large for 64-bit type 'long unsigned int'
CPU: 10 PID: 595 Comm: systemd-udevd Not tainted 5.15.0-23-generic #23
Hardware name: LENOVO \x02MFG_IN_GO/\x02MFG_IN_GO, BIOS N3GET19W (1.00 ) 03/11/2022
Call Trace:
<TASK>
show_stack+0x52/0x58
dump_stack_lvl+0x4a/0x5f
dump_stack+0x10/0x12
ubsan_epilogue+0x9/0x45
__ubsan_handle_shift_out_of_bounds.cold+0x61/0xef
? regmap_unlock_mutex+0xe/0x10
cs35l41_otp_unpack.cold+0x1c6/0x2b2 [snd_soc_cs35l41_lib]
cs35l41_hda_probe+0x24f/0x33a [snd_hda_scodec_cs35l41]
cs35l41_hda_i2c_probe+0x65/0x90 [snd_hda_scodec_cs35l41_i2c]
? cs35l41_hda_i2c_remove+0x20/0x20 [snd_hda_scodec_cs35l41_i2c]
i2c_device_probe+0x252/0x2b0
Fixes: 6450ef5590 ("ASoC: cs35l41: CS35L41 Boosted Smart Amplifier")
Reviewed-by: Lucas Tanure <tanureal@opensource.cirrus.com >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Signed-off-by: Hui Wang <hui.wang@canonical.com >
Link: https://lore.kernel.org/r/20220328123535.50000-2-hui.wang@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:16 +01:00
Hui Wang
0f91bc71fe
ASoC: cs35l41: Add one more variable in the debug log
...
otp_map[].size is a key variable to compute the value of otp_val and
to update the bit_offset, it is helpful to debug if could put it in
the debug log.
Reviewed-by: Lucas Tanure <tanureal@opensource.cirrus.com >
Signed-off-by: Hui Wang <hui.wang@canonical.com >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220328123535.50000-1-hui.wang@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:15 +01:00
Rikard Falkeborn
5449fd7bd0
ASoC: samsung: Constify snd_soc_dapm_{route,widget} structs
...
These structs only have their address assigned to the
dapm_{routes,widget} fields in the snd_soc_card struct,
both which are pointers to const data. Make them const to
allow the compiler to put them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20220330204227.25081-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:14 +01:00
Stephen Kitt
5e9058ea2b
ASoC: da7218: use i2c_match_id and simple i2c probe
...
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
This patch follows the model set by da7218_of_get_id().
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com >
Link: https://lore.kernel.org/r/20220325171904.1223539-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:13 +01:00
Stephen Kitt
89be5dc60d
ASoC: da[79]*: use simple i2c probe function
...
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.
This avoids scanning the identifier tables during probes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com >
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Link: https://lore.kernel.org/r/20220325171243.1218003-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:12 +01:00
Judy Hsiao
c5198db82d
ASoC: qcom: Add driver support for ALC5682I-VS
...
Add Machine driver support for ALC5682I-VS codec.
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org >
Link: https://lore.kernel.org/r/20220331084201.62815-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:11 +01:00
Takashi Iwai
290186e14c
ASoC: intel: atom: Remove superfluous flush_scheduled_work()
...
It seems that flush_scheduled_work() is called without any real
purpose at sst_context_cleanup() (the driver doesn't put works on the
global queue at all). As the flush_schedule_work() function is going
to be abolished in near future, let's drop it now.
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20220322154826.19400-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:10 +01:00
Stephen Kitt
e5cd0623d7
ASoC: ad1*, ada*, ssm*: use i2c_match_id and simple i2c probe
...
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220325165452.1212975-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:09 +01:00
Martin Povišer
900dedd7e4
ASoC: Introduce snd_soc_of_get_dai_link_cpus
...
This function is an analogue of snd_soc_of_get_dai_link_codecs to help
machine drivers read CPU DAI lists from devicetrees.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org >
Link: https://lore.kernel.org/r/20220331000449.41062-5-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:08 +01:00
Srinivasa Rao Mandadapu
1a8ee4cf84
ASoC: codecs: Fix error handling in power domain init and exit handlers
...
Update error handling in power domain init and exit handlers, as existing handling
may cause issues in device remove function.
Use appropriate pm core api for power domain get and sync to avoid redundant code.
Fixes: 9e3d83c528 ("ASoC: codecs: Add power domains support in digital macro codecs")
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com >
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com >
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com >
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/1647965937-32203-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:23:07 +01:00
Jaroslav Kysela
9b014266ef
ASoC: SOF: topology: use new sound control LED layer
...
Use the new sound control LED layer instead the direct ledtrig_audio_set()
call - see 22d8de62f1 ("ALSA: control - add generic LED trigger module
as the new control layer").
Signed-off-by: Jaroslav Kysela <perex@perex.cz >
Cc: Bard Liao <yung-chuan.liao@linux.intel.com >
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220329120039.2394138-1-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-05 10:22:55 +01:00
Mark Brown
01251dd004
ASoC: atmel: Don't squash error codes from atmel_ssc_set_audio()
...
The AT91SAM9G20-EK audio driver is replacing any error code returned by
atmel_ssc_set_audio() with -EINVAL which could be unhelpful for debugging.
Pass through the error code, and include it in the log message we print for
good measure.
Signed-off-by: Mark Brown <broonie@kernel.org >
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com >
Link: https://lore.kernel.org/r/20220325154241.1600757-4-broonie@kernel.org
2022-04-04 14:24:20 +01:00
Mark Brown
2810350924
ASoC: atmel: Fix error handling in at91samg20ek probe()
...
The error handling in the AT91SAM9G20-EK machine driver probe did not
consistently free the SSC in error paths, sometimes immediately returning
an error rather than doing cleanup. Fix this.
Signed-off-by: Mark Brown <broonie@kernel.org >
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com >
Link: https://lore.kernel.org/r/20220325154241.1600757-3-broonie@kernel.org
2022-04-04 14:24:10 +01:00
Mark Brown
c775cbf62e
ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek
...
The MCLK of the WM8731 on the AT91SAM9G20-EK board is connected to the
PCK0 output of the SoC, intended in the reference software to be supplied
using PLLB and programmed to 12MHz. As originally written for use with a
board file the audio driver was responsible for configuring the entire tree
but in the conversion to the common clock framework the registration of
the named pck0 and pllb clocks was removed so the driver has failed to
instantiate ever since.
Since the WM8731 driver has had support for managing a MCLK provided via
the common clock framework for some time we can simply drop all the clock
management code from the machine driver other than configuration of the
sysclk rate, the CODEC driver still respects that configuration from the
machine driver.
Fixes: ff78a189b0 ("ARM: at91: remove old at91-specific clock driver")
Signed-off-by: Mark Brown <broonie@kernel.org >
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com >
Link: https://lore.kernel.org/r/20220325154241.1600757-2-broonie@kernel.org
2022-04-04 14:24:03 +01:00
Trevor Wu
cae34da532
ASoC: dt-bindings: mediatek: mt8195: support mt8195-mt6359-max98390-rt5682
...
This patch adds compatible string "mediatek,mt8195-mt6359-max98390-rt5682"
to support mt8195 board with mt6359, max98390 and rt5682.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20220324053851.27350-7-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:42 +01:00
Trevor Wu
86a6b9c9df
ASoC: mediatek: mt8195: add machine support for max98390 and rt5682
...
This patch adds support for mt8195 board with mt6359, max98390 and
rt5682.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org >
Link: https://lore.kernel.org/r/20220324053851.27350-6-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:41 +01:00
Trevor Wu
3a0323c26c
ASoC: mediatek: mt8195: rename card controls
...
In order to be able to reuse the same configurations in user space,
rename the controls to generic names.
"Headphone Jack" -> "Headphone"
"Speakers" -> "Ext Spk"
"Left Speaker" -> "Left Spk"
"Right Speaker" -> "Right SPk"
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com >
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220324053851.27350-5-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:40 +01:00
Trevor Wu
dc16399078
ASoC: dt-bindings: mediatek: mt8195: merge mt8195 machine yaml
...
Because the same binding components can be shared by all codecs
combinations, we only reserve one binding file for mt8195 machine driver
and rename to a generic name.
We use compatible string to separate different codec combination instead
of creating a new binding file for new codec combination.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com >
Reviewed-by: Miles Chen <miles.chen@mediatek.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20220324053851.27350-4-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:39 +01:00
Trevor Wu
094e30efa4
ASoC: mediatek: mt8195: merge machine driver
...
Because most functions can be reused in different codec combinations,
mt8195 machine drivers are combined to one common file.
The model and compatible string are used to decide which codecs are
being used.
As a result, We can prevent from copy-paste functions when new codec
combination is introduced.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com >
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220324053851.27350-3-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:38 +01:00
Trevor Wu
4dbc714fe0
ASoC: mediatek: mt8195: revise mt8195-mt6359-rt1019-rt5682.c
...
Revise driver for the coming driver combination.
There are two major parts including in the patch.
1. Apply some suggested changes used in mt8195-mt6359-rt1011-rt5682.c.
2. Reorder the layout for centralizing the codec related code.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com >
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220324053851.27350-2-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:37 +01:00
Mark Brown
64a1a4e04e
ARM: configs: Update multi_v5_defconfig for WM8731 bus refactoring
...
The WM8731 driver has been refactored so the I2C and SPI bus code is
separate modules. Refresh multi_v5_defconfig to reflect this.
Signed-off-by: Mark Brown <broonie@kernel.org >
Cc: soc@kernel.org
Acked-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325153121.1598494-8-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:35 +01:00
Mark Brown
0e336eeaf4
ASoC: wm8731: Convert DT bindings to YAML format
...
Convert the WM8731 DT bindings to YAML format, including addition of
documentation for the regulator and clock bindings which the driver has
had for some time but which were not covered in the bindings document.
Signed-off-by: Mark Brown <broonie@kernel.org >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: devicetree@vger.kernel.org
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20220325153121.1598494-7-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:34 +01:00
Mark Brown
9dc15f81ba
ASoC: wm8731: Factor out the I2C and SPI bus code into separate modules
...
Placing both the I2C and SPI code in the same module causes problems with
mixes of modular and non-modular builds of the buses so it's generally bad
practice. As with other drivers split the bus code out of the WM8731 driver
into separate modules.
Signed-off-by: Mark Brown <broonie@kernel.org >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325153121.1598494-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:32 +01:00
Mark Brown
8875d104af
ASoC: wm8731: Factor our MCLK and mutex initialisation
...
The code for initialising the MCLK and mutex is identical in the I2C and SPI
probe functions so just move this out into wm8731_init().
Signed-off-by: Mark Brown <broonie@kernel.org >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325153121.1598494-5-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:31 +01:00
Mark Brown
5f1b9d1e42
ASoC: wm8731: Move regulator request into wm8731_init()
...
The supplies used by the wm8731 do not depend on the bus and there is no
need to do anything with the supplies prior to instantiating the regmap so
move the request into wm8731_init().
Signed-off-by: Mark Brown <broonie@kernel.org >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325153121.1598494-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:30 +01:00
Mark Brown
3f4fb90551
ASoC: wm8731: Factor component init out of bus code
...
Both the I2C and SPI bus code register the component immediately after they
call wm8731_hw_init(), factor the code out into the the common function and
rename it to just be plain wm8731_init() while we're at it since it's not
just for hardware init any more. This refactoring means we need to move the
function after the declaration of the component driver.
Signed-off-by: Mark Brown <broonie@kernel.org >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325153121.1598494-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:29 +01:00
Mark Brown
00b87e18f3
ASoC: wm8731: Update to modern DAI terminology
...
As part of retiring the old defines used to specify DAI formats update the
wm8731 driver to use the modern names.
Signed-off-by: Mark Brown <broonie@kernel.org >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220325153121.1598494-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:28 +01:00
Amadeusz Sławiński
430791dd92
ASoC: topology: Rename soc_tplg_init_kcontrol() function
...
Other functions used for callbacks are named after function they call,
however function calling control_load seems to be an exception. Rename
it to soc_tplg_control_load().
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220401120200.4047867-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:22 +01:00
Amadeusz Sławiński
34b310451c
ASoC: topology: Correct error message
...
Error message refers to mixer, but it is used for various other types of
controls, so change it to refer to generic "controls".
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220401120200.4047867-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:21 +01:00
Amadeusz Sławiński
5e2cd47a36
ASoC: topology: Rename SOC_TPLG_PASS_MIXER to _CONTROL
...
Name of SOC_TPLG_PASS_MIXER pass is bit confusing, suggesting that it
may only apply to mixers. As it is used for all control types, change
name to SOC_TPLG_PASS_CONTROL.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220401120200.4047867-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:20 +01:00
Amadeusz Sławiński
4fad3cc6eb
ASoC: topology: Return bool instead of int
...
In practice soc_tplg_is_eof() returns boolean value and caller uses the
return value in such way, so convert the function to really do it.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220401120200.4047867-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:19 +01:00
Amadeusz Sławiński
0db627c4f5
ASoC: topology: Remove unnecessary looping
...
Functions creating kcontrols as written allow for creation of multiple
kcontrols at the same time, but in practice they are called for each
kcontrol individually. Remove unnecessary loop as code always loops once
anyway. This reduces intendation level allowing for some code to be put
on one line instead of multiple lines.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220401120200.4047867-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:18 +01:00
Amadeusz Sławiński
395f8fd616
ASoC: topology: Use for loop instead of while
...
The 'while' loop can be replaced with a 'for' loop, making it more clear
about what possible values there are, by having all of it in one place,
instead of scattered around.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220401120200.4047867-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:17 +01:00
tangmeng
9e116f5a6e
ASoC: SOF: Remove redundant return statements
...
After the free PCM action is executed, no matter what
the return result is, it will return directly in sof_pcm_trigger.
So the return statement here is redundant.
Signed-off-by: tangmeng <tangmeng@uniontech.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220330201926.1330402-12-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:11 +01:00
Peter Ujfalusi
30b50b9734
ASoC: SOF: Remove header from struct snd_sof_ipc_msg
...
The header field is no longer used by the underlying code and
can be dropped from the snd_sof_ipc_msg struct.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220330201926.1330402-11-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:10 +01:00
Peter Ujfalusi
2a51c0f81a
ASoC: SOF: Drop 'header' parameter from tx_message() API
...
The header parameter is not used anymore and now it can be dropped from
the parameter list of tx_message().
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220330201926.1330402-10-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:09 +01:00
Peter Ujfalusi
5db8eb5b9e
ASoC: SOF: ipc: Use msg->reply_data directly in snd_sof_ipc_get_reply()
...
Instead of using a local reply to first read out the header from the
mailbox then memcpy it or read it again to msg->reply_data, read it
directly to it's final place from the start.
If we received an error we do not need to do a memcpy anymore.
If the reply is reporting a success then we don not need to read the reply
again from the mailbox if the reply_size equals to the already read header
size.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220330201926.1330402-9-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:08 +01:00
Libin Yang
249ee18087
ASoC: SOF: disable dma trace in s0ix
...
When system enters s0ix, the dma trace won't be used. Otherwise,
the DMA will access the host memory, which will prevent entering
S0ix. Driver has notified firmware not to send message through
dma trace. Let's also trigger stop dma trace in driver side.
Signed-off-by: Libin Yang <libin.yang@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@intel.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220330201926.1330402-8-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:07 +01:00
Libin Yang
758f24d49b
ASoC: SOF: extend the interface to stop DMA trace
...
Change the interface to stop the DMA trace for suspend. Replace the
snd_sof_init_trace_ipc() and snd_sof_release_trace() calls with more
explicit interface for PM (the sole user for this interface).
The new snd_sof_trace_suspend() call takes the target PM state as argument,
allowing the trace implementation to decide how to handle the transition.
Use this information to release DMA resources only if DSP is suspended and
will not remain in D0.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Signed-off-by: Libin Yang <libin.yang@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@intel.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220330201926.1330402-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-04-04 08:39:06 +01:00