Commit graph

30091 commits

Author SHA1 Message Date
Shenghao Ding
645994d212
ASoC: tas2562: move tas2563 from tas2562 driver to tas2781 driver
Move tas2563 from tas2562 driver to tas2781 driver to unbind tas2563 from
tas2562 driver code and bind it to tas2781 driver code, because tas2563
only work in bypass-DSP mode with tas2562 driver. In order to enable DSP
mode for tas2563, it has been moved to tas2781 driver. As to the hardware
part, such as register setting and DSP firmware, all these are stored in
the binary firmware. What tas2781 drivder does is to parse the firmware
and download it to the chip, then power on the chip. So, tas2781 driver
can be resued as tas2563 driver. Only attention will be paid to
downloading corresponding firmware.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://msgid.link/r/20240104145721.1398-2-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-05 13:27:16 +00:00
Duje Mihanović
67508b8748
ASoC: pxa: sspa: Don't select SND_ARM
On ARM64 platforms, SND_ARM shouldn't be selectable, but enabling
SND_SOC_MMP_SSPA will enable SND_ARM and cause build errors if
SND_ARMAACI is enabled (which it is by default). Since the SSPA driver
doesn't depend on AACI nor PXA2XX_LIB, remove this false dependency.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310230518.zs9Qpg3j-lkp@intel.com/
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Link: https://lore.kernel.org/r/20231226200025.30870-1-duje.mihanovic@skole.hr
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-29 17:41:15 +00:00
Shuming Fan
5fa3bbb8eb
ASoC: rt5663: cancel the work when system suspends
This patch makes sure that the workqueue is completed before the system suspends.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20231229092922.853-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-29 17:41:14 +00:00
Shengjiu Wang
b6190c452a
ASoC: SOF: imx: Add SNDRV_PCM_INFO_BATCH flag
The sof imx pcm device is a device which should support
double buffering.

Found this issue with pipewire. When there is no
SNDRV_PCM_INFO_BATCH flag in driver, the pipewire will
set headroom to be zero, and because sof pcm device
don't support residue report, when the latency setting
is small, the "delay" always larger than "target" in
alsa-pcm.c, that reading next period data is not
scheduled on time.

With SNDRV_PCM_INFO_BATCH flag in driver, the pipewire
will select a smaller period size for device, then
the task of reading next period data will be scheduled
on time.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1703669263-13832-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-29 02:09:02 +00:00
Hans de Goede
f87b440216
ASoC: Intel: cht_bsw_rt5645: Set card.components string
Set the card.components string using the new rt5645_components() helper
which returns a components string based on the DMI quirks inside the
rt5645 codec driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-8-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-21 21:00:47 +00:00
Hans de Goede
8184e1db69
ASoC: rt5645: Add mono speaker information to the components string
The GPD Win and Teclast X80 Pro both only have 1 speaker add information
about this to the components string.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-7-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-21 21:00:47 +00:00
Hans de Goede
4cd7654553
ASoC: rt5645: Add a rt5645_components() helper
The rt5645 codec driver uses DMI quirks to configure the DMIC data-pins,
which means that it knows which DMIC interface is used on a specific
device.

ATM we duplicate this DMI matching inside the UCM profiles to select
the right DMIC interface. Add a rt5645_components() helper which the
machine-driver can use to set the components string of the card so
that UCM can get the info from the components string.

This way we only need to add new DMI quirks in one place.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-6-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-21 21:00:46 +00:00
Hans de Goede
b4635b9cd9
ASoC: rt5645: Add rt5645_get_pdata() helper
Add a rt5645_get_pdata() helper function which retreives the platform-data
and overrides it with the quirks module parameter if that is set.

This is a preparation patch for adding the rt5645_components() function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-5-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-21 21:00:45 +00:00
Hans de Goede
f72a9c2b8f
ASoC: rt5645: Refactor rt5645_parse_dt()
Refactor rt5645_parse_dt(), make it take a pointer to
struct rt5645_platform_data as argument instead of passing in
the complete rt5645_priv struct.

While at it also make it void since it always succeeds.

This is a preparation patch for factoring the code to get
the platform-data out into a separate helper function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-21 21:00:44 +00:00
Hans de Goede
8f28e1996a
ASoC: rt5645: Add platform-data for Acer Switch V 10
The Acer Switch V 10 uses the default jack-detect mode 3, but instead of
using an analog microphone it is using a DMIC on dmic-data-pin 1,
like other models following Intel's Braswell's reference design.

Add a DMI quirk pointing to the intel_braswell_platform_data for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-21 21:00:43 +00:00
Hans de Goede
51add1687f
ASoC: rt5645: Drop double EF20 entry from dmi_platform_data[]
dmi_platform_data[] first contains a DMI entry matching:

   DMI_MATCH(DMI_PRODUCT_NAME, "EF20"),

and then contains an identical entry except for the match being:

   DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),

Since these are partial (non exact) DMI matches the first match
will also match any board with "EF20EA" in their DMI product-name,
drop the second, redundant, entry.

Fixes: a4dae468cf ("ASoC: rt5645: Add ACPI-defined GPIO for ECS EF20 series")
Cc: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20231126214024.300505-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-21 21:00:42 +00:00
Mark Brown
2f2998895c
ASoC: qcom: add sound card support for SM8650
Merge series from Neil Armstrong <neil.armstrong@linaro.org>:

Document the SM8650 sound card using the SM8450 fallback
and add the SM8650 compatible to the sc8280xp sound card
driver to use the sm8650 card driver_name like SM8450 & SM8550.
2023-12-19 16:46:16 +00:00
Mark Brown
791667f7f0
add es8326 dt-bindings, commonize headset codec
Merge series from Rui Zhou <zhourui@huaqin.corp-partner.google.com>:

Add dt-bindings for es8326 and codec es8326 support.
Remove duplicate code, commonize headset codec init/exit API.
At the same time, Enable dual amp max98390 for rt5682s.
2023-12-19 16:46:07 +00:00
Mark Brown
f51daa7806
Improve AMD ACP Vangogh audio support for Steam Deck
Merge series from Cristian Ciocaltea <cristian.ciocaltea@collabora.com>:

This patch series provides several fixes and improvements to AMD ACP drivers
targeting the Vangogh platform, as found on the Valve's new Steam Deck OLED.

Although in theory the board should have been supported by both SOF and legacy
ACP drivers, as of next-20231208 the audio seems to be completely broken.

Please note this only restores the legacy support, while SOF will be handled in
a separate series.
2023-12-19 16:45:59 +00:00
Mark Brown
7a27dbf7b1
ASoC: don't use original dummy dlc
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

"Empty" dlc might be used on Platform, but "dummy" dlc is not needed
for it. [PATCH 1/5][PATCH 2/5] removes "dummy" dlc from Platform.

Now ASoC have common dummy dlc (= snd_soc_dummy_dlc).
[PATCH 3/5][PATCH 4/5] will use it instead of original dummy dlc.

Many drivers are using below macro

	SND_SOC_DAILINK_DEFS(link,
		     DAILINK_COMP_ARRAY(COMP_CPU(...)),
(X)		     DAILINK_COMP_ARRAY(COMP_DUMMY()),
		     DAILINK_COMP_ARRAY(COMP_EMPTY()));

But (X) part will create original dummy dlc.
[PATCH 5/5] will try not to create original dummy dlc, and replace
it to common dummy dlc.
2023-12-19 16:45:51 +00:00
Mark Brown
aefe7a8e26
GPIO inclusion fixes to misc sound drivers
Merge series from Linus Walleij <linus.walleij@linaro.org>:

Mostly dropping unused headers, and a single driver rewrite.
2023-12-19 16:45:42 +00:00
Christophe JAILLET
1b08e7697f
ASoC: sprd: Simplify memory allocation in sprd_platform_compr_dma_config()
'sg' is freed at the end sprd_platform_compr_dma_config() both in the
normal and in the error handling path.

There is no need to use the devm_kcalloc()/devm_kfree(), kcalloc()/kfree()
is enough.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://msgid.link/r/d16f22ae0627249a9fc658927832590cd88c544e.1702960856.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 14:02:50 +00:00
Venkata Prasad Potturu
55d7bbe433
ASoC: SOF: amd: Add acp-psp mailbox interface for iram-dram fence register modification
Add acp-psp mailbox communication interface for iram-dram size
modification to notify psp.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://msgid.link/r/20231219112416.3334928-5-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 14:02:49 +00:00
Venkata Prasad Potturu
ced7151b9b
ASoC: SOF: Rename amd_bt sof_dai_type
Rename amd_bt sof_dai_type from ACP to ACP_BT.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://msgid.link/r/20231219112416.3334928-4-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 14:02:48 +00:00
Venkata Prasad Potturu
de111c9b52
ASoC: SOF: Add i2s bt dai configuration support for AMD platforms
Add support for i2s bt dai configuration from topology.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://msgid.link/r/20231219112416.3334928-3-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 14:02:47 +00:00
Venkata Prasad Potturu
3953de2dbd
ASoC: SOF: Refactor sof_i2s_tokens reading to update acpbt dai
Refactor sof_i2s_tokens reading to update config->acpbt.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://msgid.link/r/20231219112416.3334928-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 14:02:46 +00:00
Venkata Prasad Potturu
802134c8c2
ASoC: SOF: amd: Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler
Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler
to avoid race conditions for acquiring hw_semaphore.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://msgid.link/r/20231219112416.3334928-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 14:02:45 +00:00
Kuninori Morimoto
13f58267cd
ASoC: soc.h: don't create dummy Component via COMP_DUMMY()
Many ASoC drivers define CPU/Codec/Platform dai_link by below macro.

	SND_SOC_DAILINK_DEFS(link,
(A)		     DAILINK_COMP_ARRAY(COMP_CPU("cpu_dai")),
(B)		     DAILINK_COMP_ARRAY(COMP_CODEC("codec", "dai1"),
(B)					COMP_CODEC("codec", "dai2")),
(C)		     DAILINK_COMP_ARRAY(COMP_EMPTY()));

In this case, this macro will be converted to like below

	[o] = static struct snd_soc_dai_link_component

(A)	[o] link_cpus[]      = {{ .dai_name = "cpu_dai" }};
(B)	[o] link_codecs[]    = {{ .dai_name = "dai1", .name = "codec" },
				{ .dai_name = "dai2", .name = "codec" }}
(C)	[o] link_platforms[] = {{ }};

CPU and Codec info will be filled by COMP_CPU() / COMP_CODEC (= A,B),
and Platform will have empty data by COMP_EMPTY() (= C) in this case.

Platform empty info will be filled when driver probe()
(most of case, CPU info will be copied to use soc-generic-dmaengine-pcm).

For example in case of DPCM FE/BE, it will be like below.
Codec will be dummy Component / DAI in this case (X).

	SND_SOC_DAILINK_DEFS(link,
		     DAILINK_COMP_ARRAY(COMP_CPU(...)),
(X)		     DAILINK_COMP_ARRAY(COMP_DUMMY()),
		     DAILINK_COMP_ARRAY(COMP_EMPTY()));

(X) part will converted like below

	[o] link_codecs[]    = {{ .name = "snd-soc-dummy",
				  .dai_name = "snd-soc-dummy-dai", }}

Even though we already have common asoc_dummy_dlc for dummy
Component / DAI, this macro will re-create new dummy dlc.
Some drivers defines many dai_link info via SND_SOC_DAILINK_DEFS(),
this means many dummy dlc also will be re-created. This is waste of
memory.

If we can use existing common asoc_dummy_dlc at (X),
we can avoid to re-creating dummy dlc, then, we can save the memory.

At that time, we want to keep existing code as much as possible, because
too many drivers are using this macro. But because of its original style,
using common asoc_dummy_dlc from it is very difficult or impossible.

So let's change the mind. The macro is used like below

	SND_SOC_DAILINK_DEFS(link,
		     DAILINK_COMP_ARRAY(COMP_CPU(...)),
(x)		     DAILINK_COMP_ARRAY(COMP_DUMMY()),
		     DAILINK_COMP_ARRAY(COMP_EMPTY()));

	static struct snd_soc_dai_link dai_links[] = {
	{
		.name = ...,
		.stream_name = ...,
(y)		SND_SOC_DAILINK_REG(link),
	},

(y) part will be like below

        static struct snd_soc_dai_link dai_links[] = {
        {
                .name = ...,
                .stream_name = ...,
 ^		...
 |		.codecs		= link_codecs,
(y)		.num_codecs	= ARRAY_SIZE(link_codecs),
 v		...
	}

This patch try to use trick on COMP_DUMMY()

-	#define COMP_DUMMY()	{ .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }
+	#define COMP_DUMMY()

By this tric, (x) part will be like below.

before
	[o] link_codecs[] = {{ .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }}
after
	[o] link_codecs[] = { };

This is same as below

	[o] link_codecs[0];

This means it has pointer (link_codecs), but the array size is 0.
(y) part will be like below.

	static struct snd_soc_dai_link dai_links[] = {
	{
		...
		.codecs		= link_codecs,
		.num_codecs	= 0,
		...
	},

This is very special settings that normal use usually not do,
but new macro do.
We can find this special settings on soc-core.c and fill it as
"dummy DAI" (= asoc_dummy_dlc). By this tric, we can avoid to re-create
dummy dlc and save the memory.

This patch add tric at COMP_DUMMY() and add snd_soc_fill_dummy_dai()
to fill dummy DAI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/871qbi93qu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 13:23:46 +00:00
Kuninori Morimoto
e8776ff9ce
ASoC: sof: use snd_soc_dummy_dlc
We already have snd_soc_dummy_dlc.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/8734vy93r8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 13:23:45 +00:00
Kuninori Morimoto
c2dfe29f30
ASoC: intel: hdaudio.c: use snd_soc_dummy_dlc
We already have snd_soc_dummy_dlc.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/874jge93ri.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 13:23:44 +00:00
Kuninori Morimoto
56558d6ab8
ASoC: samsung: odroid: don't need DUMMY Platform
We can use SND_SOC_DAILINK_REG() with 2 parameter.
DUMMY Platform is not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/875y0u93rq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 13:23:43 +00:00
Kuninori Morimoto
7465582e0b
ASoC: fsl: fsl-asoc-card: don't need DUMMY Platform
We can use SND_SOC_DAILINK_REG() with 2 parameter.
DUMMY Platform is not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/877cla93ry.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19 13:23:42 +00:00
Himanshu Bhavani
8b69dba103
ASoC: amd: acp: Remove redundant ret variable
Removed Unneeded variable: "ret"

Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>

Link: https://msgid.link/r/20231218143214.939885-1-himanshu.bhavani@siliconsignals.io
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 17:24:14 +00:00
Gergo Koteles
ee00330a5b
ASoC: tas2781: add support for FW version 0x0503
Layout of FW version 0x0503 is compatible with 0x0502.
Already supported by TI's tas2781-linux-driver tree.
https://git.ti.com/cgit/tas2781-linux-drivers/tas2781-linux-driver/

Fixes: 915f5eadeb ("ASoC: tas2781: firmware lib")
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://msgid.link/r/98d4ee4e01e834af72a1a0bea6736facf43582e0.1702513517.git.soyer@irl.hu
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:04:30 +00:00
Krzysztof Kozlowski
bb3392453d
ASoC: qcom: Fix trivial code style issues
Fix few trivial code style issues, pointed out by checkpatch, so they do
not get copied to new code (when old code is used as template):

  WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6 ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
  WARNING: function definition argument 'struct platform_device *' should also have an identifier name
  ERROR: code indent should use tabs where possible
  WARNING: please, no spaces at the start of a line
  WARNING: Missing a blank line after declarations
  WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231204100048.211800-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:04:25 +00:00
Chancel Liu
8f03936089
ASoC: soc-pcm.c: Complete the active count for components without DAIs
Some components like platforms don't have DAIs. If the active count of
these components is ignored pinctrl may be wrongly selected between
default and sleep state. So need to increment or decrement the active
count for components without DAIs to avoid it.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://msgid.link/r/20231204111532.3165-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:04:24 +00:00
Krzysztof Kozlowski
6b9dc2da66
ASoC: qcom: Add x1e80100 sound machine driver
Add sound machine driver for the soundcards on Qualcomm X1E80100 SoC,
supporting up to four channel audio playback over Soundwire bus.  The
driver is based on existing sc8280xp.c driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231204100116.211898-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:04:22 +00:00
Rui Zhou
3423c3db22
ASoC: mediatek: mt8188-mt6359: Enable dual amp for mt8188-rt5682s
Enable support for dual MAX98390 amplifiers on the mt8188-rt5682s board.

Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Link: https://msgid.link/r/20231212123050.4080083-5-zhourui@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:04:15 +00:00
Rui Zhou
e794a89442
ASoC: mediatek: mt8188-mt6359: add es8326 support
To use ES8326 as the codec, add a new sound card
named mt8186_es8326.

Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://msgid.link/r/20231212123050.4080083-4-zhourui@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:04:14 +00:00
Rui Zhou
1a268000b0
ASoC: mediatek: mt8188-mt6359: commonize headset codec init/exit api
Reduce code duplication, unify the headset codec init/exit api.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Link: https://msgid.link/r/20231212123050.4080083-3-zhourui@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:04:13 +00:00
Cristian Ciocaltea
576f3aef47
ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-common
Add a MODULE_DESCRIPTION() in the generic ACP machine driver to avoid
the following warning when building with W=1:

WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-mach.o

Fixes: d4c750f2c7 ("ASoC: amd: acp: Add generic machine driver support for ACP cards")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://msgid.link/r/20231209203229.878730-6-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:53 +00:00
Cristian Ciocaltea
6e202e758b
ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION
Add the missing MODULE_DESCRIPTION() to avoid the following warning when
building with W=1:

WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/snd-acp-config.o

Fixes: f1bdd8d385 ("ASoC: amd: Add module to determine ACP configuration")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://msgid.link/r/20231209203229.878730-5-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:52 +00:00
Cristian Ciocaltea
78d3924675
ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS
Replace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with their
modern alternatives and drop the now unnecessary __maybe_unused
qualifier in the suspend and resume functions.

Additionally, make use of pm_ptr() to ensure the PM ops are dropped when
building with CONFIG_PM disabled.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://msgid.link/r/20231209203229.878730-4-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:51 +00:00
Cristian Ciocaltea
2cef11ec3d
ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled
Since commit e89f45edb7 ("ASoC: amd: vangogh: Add check for acp config
flags in vangogh platform"), the Vangogh ACP PCI driver could not be used
anymore for boards which happen to have a matching entry in acp-config
list.

Commit f18818eb0d ("ASoC: amd: vangogh: Add condition check for acp
config flag") slightly changed the behaviour to permit loading the
driver if AMD_LEGACY flag is set.  However, for AMD_SOF flag the probing
is still denied, even if SOF support is disabled in kernel
configuration.

While this helps preventing conflicts between SOF and generic ACP
drivers, there are cases where a fallback to the generic non-SOF support
would still be needed or useful, e.g. SOF firmware is not available or
doesn't work properly, SOF driver is broken or doesn't provide full
support for a particular hardware, or simply for testing/debugging the
alternative solution.  A real-life example is Steam Deck OLED, which
works with both drivers.

Prevent returning from probe() when ACP config indicates SOF support for
the current board *and* the Vangogh SOF driver is not enabled in kernel
configuration.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://msgid.link/r/20231209203229.878730-3-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:50 +00:00
Cristian Ciocaltea
ddd1ee12a8
ASoC: amd: vangogh: Drop conflicting ACPI-based probing
The Vangogh machine driver variant based on the MAX98388 amplifier, as
found on Valve's Steam Deck OLED, relies on probing via an ACPI match
table.  This worked fine until commit 197b1f7f0d ("ASoC: amd: Add new
dmi entries to config entry") enabled SOF support for the target machine
(i.e. Galileo product), causing the sound card to enter the deferred
probe state indefinitely:

$ cat /sys/kernel/debug/devices_deferred
AMDI8821:00	acp5x_mach: Register card (acp5x-max98388) failed

The issue is related to commit e89f45edb7 ("ASoC: amd: vangogh: Add
check for acp config flags in vangogh platform"), which tries to
mitigate potential conflicts between SOF and generic ACP Vangogh
drivers, due to sharing the PCI device IDs.

However, the solution is effective only if the machine driver is
directly probed by pci-acp5x through platform_device_register_full().

Hence, remove the conflicting ACPI based probing and rely exclusively on
DMI quirks for sound card setup.

Fixes: dba22efd0d ("ASoC: amd: vangogh: Add support for NAU8821/MAX98388 variant")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://msgid.link/r/20231209203229.878730-2-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:49 +00:00
Neil Armstrong
7211094dd0
ASoC: qcom: sc8280xp: Add support for SM8650
Add compatibles for sound card on Qualcomm SM8650 boards.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231212-topic-sm8650-upstream-snd-card-v1-2-fbfc38471204@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:41 +00:00
Linus Walleij
26e91f61d6
ASoC: tegra: tegra20_ac97: Convert to use GPIO descriptors
The Tegra20 AC97 driver is using the legacy GPIO APIs in
<linux/of_gpio.h> and <linux/gpio.h> to obtain GPIOs for reset
and sync.

Convert it over and fix the polarity error on the RESET line
in the process: this reset line is clearly active low. Just
fix the one in-tree device tree site using it at the same
time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-4-e3004176bd8b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:32 +00:00
Linus Walleij
4504f63321
ASoC: simple-card-utils: Drop GPIO include
The generic card utilities are including the legacy GPIO header
<linux/gpio.h> but not using any symbols from it. Drop the
include from all files.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-3-e3004176bd8b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:31 +00:00
Linus Walleij
809fc84b37
ASoC: qcom: sc7180: Drop GPIO include
This driver is including the legacy GPIO header <linux/gpio.h>
but not using any symbols from it. Drop the include.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-2-e3004176bd8b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:30 +00:00
Linus Walleij
487b467206
ASoC: hisilicon: Drop GPIO include
This driver is including the legacy GPIO header <linux/gpio.h>
but not using any symbols from it. Drop the include.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-1-e3004176bd8b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18 14:03:29 +00:00
Syed Saba Kareem
c95a2a0be0
ASoC: amd: acp: add pm ops support for renoir platform.
Add pm ops for renoir platform.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://msgid.link/r/20231215130300.1247475-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-15 20:52:26 +00:00
Mark Brown
c27032b402
ASoC: SOF: query FW config to reload library
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

We should query FW config if context save is supported, and no need
to reload FW if hda->booted_from_imr and ipc4_data->fw_context_save
are true.
2023-12-15 17:56:07 +00:00
Wang Jinchao
e7a4a2fd9a
ASoC: fsl_mqs: remove duplicated including
rm the second \#include <linux/of.h>

Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
Link: https://msgid.link/r/202312151713+0800-wangjinchao@xfusion.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-15 12:58:08 +00:00
Wang Jinchao
02842209fc
ASoC: SOF: amd: remove duplicated including
remove the second \#include "../sof-audio.h"

Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
Link: https://msgid.link/r/202312151719+0800-wangjinchao@xfusion.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-15 12:58:07 +00:00
Rander Wang
3a0e7bb86f
ASoC: SOF: Intel: check fw_context_save for library reload
If fw_context_save is defined by fw, driver can skip library reload on
d3 exit or reload library.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20231215083102.3064200-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-15 12:57:57 +00:00