- 28 Aug, 2024 4 commits
-
-
Bard Liao authored
Move I2S mach's topology name fixup code to the end of machine driver enumeration flow so HDA mach could also use same code to fixup its topology file name as well. No functional change in this commit. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20240827123215.258859-5-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The code seems mostly copy-pasted, with some machine drivers forgetting to test if the 'adev' result is NULL. Add this check when missing, and use -ENOENT consistently as an error code. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/alsa-devel/918944d2-3d00-465e-a9d1-5d57fc966113@stanley.mountain/T/#uSigned-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20240827123215.258859-4-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
Add Realtek rt1320 amp support. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240827123215.258859-3-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
There's no need to make this variable visible at a higher level. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20240827123215.258859-2-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 26 Aug, 2024 3 commits
-
-
Shen Lichuan authored
Let the kmemdup_array() take care about multiplication and possible overflows. Using kmemdup_array() is more appropriate and makes the code easier to audit. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Link: https://patch.msgid.link/20240826054402.58396-1-shenlichuan@vivo.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
tlv320aic31xx.txt was converted to DT schema (YAML) and new file is already matched by wildcard. This fixes get_maintainers.pl self-test warning: ./MAINTAINERS:22739: warning: no file matches F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt Fixes: e486feb7 ("ASoC: dt-bindings: convert tlv320aic31xx.txt to yaml") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240825085745.21668-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shenghao Ding authored
Replace devm_kzalloc and scnprintf with devm_kstrdup. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240824060503.1259-1-shenghao-ding@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 24 Aug, 2024 2 commits
-
-
Mark Brown authored
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>: This patch series adds SOF support for ACP7.0 based platform. Link: https://github.com/thesofproject/linux/pull/5139
-
Mark Brown authored
Merge series from Luca Ceresoli <luca.ceresoli@bootlin.com>: This small series adds some improvements to dapm-graph in order to produce a more correct and informative graph.
-
- 23 Aug, 2024 8 commits
-
-
Mark Brown authored
Some of the fixes for the Intel bards overlap with development work that removed old boards.
-
Vijendar Mukunda authored
Add SOF support for ACP7.0 version based platform. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240823053739.465187-3-Vijendar.Mukunda@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Vijendar Mukunda authored
Add acpi machine id for ACP7.0 version based platform and configure driver data to enable SOF sound card support on newer boards. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240823053739.465187-2-Vijendar.Mukunda@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Luca Ceresoli authored
Many routes are just static, not modifiable at runtime. Show the route name for all the other routes as an edge label in the generated graph. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20240823-dapm-graph-v1-3-989a47308c4c@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Luca Ceresoli authored
Read the bias_level debugfs files (ignored so far) and visualize the On/Off state of each component using different graphic attributes in the generated graph. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20240823-dapm-graph-v1-2-989a47308c4c@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Luca Ceresoli authored
Widgets not belonging to any component are currently represented inside a cluster labeled "ROOT". This is not a correct representation of the actual structure, as these widgets are not necessarily related to each other as the ones inside actual components are. Improve the graphical representation by not adding a cluster around these widgets. Now a dot cluster represents a card component faithfully. This will be particularly important with the upcoming improvements which will visualize the component bias_level. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20240823-dapm-graph-v1-1-989a47308c4c@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Hans de Goede authored
There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it turns out that the 2G version has a DMI product name of "CHERRYVIEW D1 PLATFORM" where as the 4G version has "CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are unique enough that the product-name check is not necessary. Drop the product-name check so that the existing DMI match for the 4G RAM version also matches the 2G RAM version. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240823074305.16873-1-hdegoede@redhat.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Hans de Goede authored
Since commit 13f58267 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") dummy codecs declared like this: SND_SOC_DAILINK_DEF(dummy, DAILINK_COMP_ARRAY(COMP_DUMMY())); expand to: static struct snd_soc_dai_link_component dummy[] = { }; Which means that dummy is a zero sized array and thus dais[i].codecs should not be dereferenced *at all* since it points to the address of the next variable stored in the data section as the "dummy" variable has an address but no size, so even dereferencing dais[0] is already an out of bounds array reference. Which means that the if (dais[i].codecs->name) check added in commit 7d99a70b ("ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards") relies on that the part of the next variable which the name member maps to just happens to be NULL. Which apparently so far it usually is, except when it isn't and then it results in crashes like this one: [ 28.795659] BUG: unable to handle page fault for address: 0000000000030011 ... [ 28.795780] Call Trace: [ 28.795787] <TASK> ... [ 28.795862] ? strcmp+0x18/0x40 [ 28.795872] 0xffffffffc150c605 [ 28.795887] platform_probe+0x40/0xa0 ... [ 28.795979] ? __pfx_init_module+0x10/0x10 [snd_soc_sst_bytcr_wm5102] Really fix things this time around by checking dais.num_codecs != 0. Fixes: 7d99a70b ("ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240823074217.14653-1-hdegoede@redhat.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 22 Aug, 2024 10 commits
-
-
Mark Brown authored
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: As we discussed in [1], we don't need to use dpcm_playback/capture flag, so we remove it. But we have been using it for 10 years, some driver might get damage. The most likely case is that the device/driver can use both playback/capture, but have only one flag, and not using xxx_only flag. [1/3] patch indicates warning in such case. These adds grace time for DPCM cleanup. I'm not sure when dpcm_xxx will be removed, and Codec check bypass will be error, but maybe v6.12 or v6.13 ? Please check each driver by that time. Previous patch-set try to check both CPU and Codec in DPCM, but we noticed that there are some special DAI which we can't handle today [2]. So I will escape it in this patch-set. [1] https://lore.kernel.org/r/87edaym2cg.wl-kuninori.morimoto.gx@renesas.com [2] https://lore.kernel.org/all/3e67d62d-fe08-4f55-ab5b-ece8a57154f9@linux.intel.com/ Link: https://lore.kernel.org/r/87edaym2cg.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87wmo6dyxg.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87msole5wc.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871q5tnuok.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/8734pctmte.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87cymvlmki.wl-kuninori.morimoto.gx@renesas.com
-
Richard Fitzgerald authored
If the timestamp of a calibration entry is 0 it is an unused entry and must be ignored. Some end-products reserve EFI space for calibration entries by shipping with a zero-filled EFI file. When searching the file for calibration data the driver must skip the empty entries. The timestamp of a valid entry is always non-zero. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 1cad8725 ("ASoC: cs-amp-lib: Add helpers for factory calibration data") Link: https://patch.msgid.link/20240822133544.304421-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
It's now possible to declare instances of struct regmap_config as const data. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20240822145535.336407-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
For a normal calibration blob the calTarget values must be non-zero and unique, and the calTime values must be non-zero. Don't rely on get_random_bytes() to be random enough to guarantee this. Force the calTarget and calTime values to be valid while retaining randomness in the values. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 17786231 ("ASoC: cs-amp-lib: Add KUnit test for calibration helpers") Link: https://patch.msgid.link/20240822115725.259568-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Prepare for removal of dpcm_playback and dpcm_capture flags in dailinks. [Kuninori adjusted Pierre-Louis's patch] Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87o75maah5.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
dpcm_playback/capture flags are being deprecated in ASoC. Use playback/capture_only flags instead Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://patch.msgid.link/87plq2aahb.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
dpcm_xxx flags are no longer needed. We need to use xxx_only flags instead if needed, but snd_soc_dai_link_set_capabilities() user adds dpcm_xxx if playback/capture were available. Thus converting dpcm_xxx to xxx_only is not needed. Just remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://patch.msgid.link/87r0aiaahh.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
I have been wondering why DPCM needs special flag (= dpcm_playback/capture) to use it. Below is the history why it was added to ASoC. (A) In beginning, there was no dpcm_xxx flag on ASoC. It checks channels_min for DPCM, same as current non-DPCM. Let's name it as "validation check" here. if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { if (cpu_dai->driver->playback.channels_min) playback = 1; if (cpu_dai->driver->capture.channels_min) capture = 1; (B) commit 1e9de42f ("ASoC: dpcm: Explicitly set BE DAI link supported stream directions") force to use dpcm_xxx flag on DPCM. According to this commit log, this is because "Some BE dummy DAI doesn't set channels_min for playback/capture". But we don't know which DAI is it, and not know why it can't/don't have channels_min. Let's name it as "no_chan_DAI" here. According to the code and git-log, it is used as DCPM-BE and is CPU DAI. I think the correct solution was set channels_min on "no_chan_DAI" side, not update ASoC framework side. But everything is under smoke today. if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { playback = rtd->dai_link->dpcm_playback; capture = rtd->dai_link->dpcm_capture; (C) commit 9b5db059 ("ASoC: soc-pcm: dpcm: Only allow playback/capture if supported") checks channels_min (= validation check) again. Because DPCM availability was handled by dpcm_xxx flag at that time, but some Sound Card set it even though it wasn't available. Clearly there's a contradiction here. I think correct solution was update Sound Card side instead of ASoC framework. Sound Card side will be updated to handle this issue later (commit 25612477 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")) if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { ... playback = rtd->dai_link->dpcm_playback && snd_soc_dai_stream_valid(cpu_dai, ...); capture = rtd->dai_link->dpcm_capture && snd_soc_dai_stream_valid(cpu_dai, ...); This (C) patch should have broken "no_chan_DAI" which doesn't have channels_min, but there was no such report during this 4 years. Possibilities case are as follows - No one is using "no_chan_DAI" - "no_chan_DAI" is no longer exist : was removed ? - "no_chan_DAI" is no longer exist : has channels_min ? Because of these history, this dpcm_xxx is unneeded flag today. But because we have been used it for 10 years since (B), it may have been used differently. For example some DAI available both playback/capture, but it set dpcm_playback flag only, in this case dpcm_xxx flag is used as availability limitation. We can use playback_only flag instead in this case, but it is very difficult to find such DAI today. Let's add grace time to remove dpcm_playback/capture flag. This patch don't use dpcm_xxx flag anymore, and indicates warning to use xxx_only flag if both playback/capture were available but using only one of dpcm_xxx flag, and not using xxx_only flag. Link: https://lore.kernel.org/r/87edaym2cg.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://patch.msgid.link/87seuyaahn.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shenghao Ding authored
In case of tas2781, tas2563_dvc_table will be unused, so mark it as __maybe_unused. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240822063205.662-1-shenghao-ding@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Wu Bo authored
Make the code cleaner and avoid call clk_disable_unprepare() Signed-off-by: Wu Bo <bo.wu@vivo.com> Link: https://patch.msgid.link/20240822095249.1642713-1-bo.wu@vivo.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 21 Aug, 2024 6 commits
-
-
Hongbo Li authored
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from platform_device_id table. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Link: https://patch.msgid.link/20240821061955.2273782-3-lihongbo22@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Hongbo Li authored
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from platform_device_id table. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Link: https://patch.msgid.link/20240821061955.2273782-2-lihongbo22@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Vijendar Mukunda authored
Remove unused structure member 'rev' from sof_amd_acp_desc structure. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240821064650.2850310-1-Vijendar.Mukunda@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
soc-pcm.c has snd_soc_dpcm_stream_lock_irqsave_nested() / snd_soc_dpcm_stream_unlock_irqrestore() helper function, but it is almost nothing help. It just makes a code complex. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87msl6aa2c.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Baojun Xu authored
Remove unnecessary line feed for tasdevice_codec_remove. Add comma at the end the last member of the array. Signed-off-by: Baojun Xu <baojun.xu@ti.com> Link: https://patch.msgid.link/20240821072527.1294-1-baojun.xu@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Colin Ian King authored
Don't populate the read-only array minCode_param on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20240821114927.520193-1-colin.i.king@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 20 Aug, 2024 5 commits
-
-
Frank Li authored
Convert binding doc tpa6130a2.txt to yaml format. Additional change: - add ref to dai-common.yaml - add i2c node in example Fix below warning: arch/arm64/boot/dts/freescale/imx8mq-zii-ultra-rmb3.dtb: /soc@0/bus@30800000/i2c@30a20000/amp@60: failed to match any schema with compatible: ['ti,tpa6130a2'] Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20240820184604.499017-1-Frank.Li@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Vijendar Mukunda authored
Replace acp descriptor structure member 'rev' check with acp pci revision id. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240819061329.1025189-1-Vijendar.Mukunda@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge branch 'for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-6.12 for some AMD work.
-
Dmitry Torokhov authored
The driver does not access reset GPIO in atomic contexts so it is usable with GPIOs that may sleep during access. Switch to using gpiod_set_value_cansleep(). Also the reset GPIO is configured as output at the time it is acquired, there is no need to use gpiod_direction_output() when executing reset sequence. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/ZsPty8oNMQk4YTl1@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Clocks property was present only to allow usage of assigned-clocks in the sound card node, however in upstream DTS the assigned-clocks were moved in commit 4afb06af ("ARM: dts: exynos: move assigned-clock* properties to i2s0 node in Odroid XU4") to respective I2S nodes. Linux drivers never parsed "clocks" so it can be safely dropped. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240818173037.122152-1-krzysztof.kozlowski@linaro.orgAcked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-
- 19 Aug, 2024 2 commits
-
-
Mark Brown authored
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: Intel new platforms can have up to 5 SoundWire links. This series does not apply to SoundWire tree due to recent changes in machine driver. Can we go via ASoC tree with Vinod's Acked-by tag?
-
Mark Brown authored
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: A spiritual successor to haswell/baytrail removal series [1]. The avs-driver found in sound/soc/intel/avs is a direct replacement to the existing skylake-driver. It covers all features supported by it and more and aligns with the recommended flows and requirements based on Windows driver equivalent. The skylake-driver related UAPI has been removed with "ASoC: Drop soc-topology ABI v4 support" [2]. For the official kernel tree the deprecation begun with v6.0. Most skylake-drivers users moved to avs- or SOF-driver when AudioDSP capabilities are available on the platform or to snd-hda-intel (sound/pci/hda) when such capabilities are not. For the supported trees the deprecation begun with v5.4 with v5.15 being the first where the skylake-driver is disabled entirely. All machine board drivers that consume this DSP driver have their replacements present within sound/soc/intel/avs/boards/ directory. [1]: https://lore.kernel.org/alsa-devel/20201006064907.16277-1-cezary.rojewski@intel.com/ [2]: https://lore.kernel.org/alsa-devel/20240403091629.647267-1-cezary.rojewski@intel.com/
-