linux-2.6-microblaze.git
10 months agoALSA: hda/realtek: Enable Mute LED on HP 255 G8
Eymen Yigit [Fri, 10 Nov 2023 15:07:15 +0000 (18:07 +0300)]
ALSA: hda/realtek: Enable Mute LED on HP 255 G8

This HP Notebook uses ALC236 codec with COEF 0x07 idx 1 controlling
the mute LED. Enable already existing quirk for this device.

Signed-off-by: Eymen Yigit <eymenyg01@gmail.com>
Cc: Luka Guzenko <l.guzenko@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231110150715.5141-1-eymenyg01@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda/realtek - Add Dell ALC295 to pin fall back table
Kailang Yang [Fri, 10 Nov 2023 07:16:06 +0000 (15:16 +0800)]
ALSA: hda/realtek - Add Dell ALC295 to pin fall back table

Add ALC295 to pin fall back table.
Remove 5 pin quirks for Dell ALC295.
ALC295 was only support MIC2 for external MIC function.
ALC295 assigned model "ALC269_FIXUP_DELL1_MIC_NO_PRESENCE" for pin
fall back table.
It was assigned wrong model. So, let's remove it.

Fixes: fbc571290d9f ("ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/7c1998e873834df98d59bd7e0d08c72e@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoOSS: dmasound/paula: Convert to platform remove callback returning void
Uwe Kleine-König [Tue, 7 Nov 2023 15:12:24 +0000 (16:12 +0100)]
OSS: dmasound/paula: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231107151223.3971602-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: ASUS UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus
Vitalii Torshyn [Wed, 8 Nov 2023 23:13:54 +0000 (01:13 +0200)]
ALSA: hda: ASUS UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus

Proposed patch fixes initialization of CSC3551 on the UM5302LA laptop.
Patching DSDT table is not required since ASUS did added _DSD entry.
Nothing new introduced but reused work started by Stefan B.

Currently there is no official firmware available for 10431A83 on
cirrus git unfortunately.
For testing used 104317f3 (which is also seems on i2c bus):

$ cd /lib/firmware/cirrus/ && \
for fw in $(find ./ -name '*104317f3*'); do newfw=$(echo $fw | sed 's/104317f3/10431a83/g'); echo echo "$fw -> $newfw"; ln -s $f $newfw; done

With the patch applied to 6.6.0 and obviously symlinks to 104317F3 FW,
speakers works and to my susrprise they sound quite good and loud
without distortion.

Probably confirmation from cirrus team is needed on firmware.

Signed-off-by: Vitalii Torshyn <vitaly.torshyn@gmail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218119
Link: https://lore.kernel.org/r/CAHiQ-bCMPpCJ8eOYAaVVoqGkFixS1qTgSS4xfbZvL4oZV9LYew@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: info: Fix potential deadlock at disconnection
Takashi Iwai [Thu, 9 Nov 2023 14:19:54 +0000 (15:19 +0100)]
ALSA: info: Fix potential deadlock at disconnection

As reported recently, ALSA core info helper may cause a deadlock at
the forced device disconnection during the procfs operation.

The proc_remove() (that is called from the snd_card_disconnect()
helper) has a synchronization of the pending procfs accesses via
wait_for_completion().  Meanwhile, ALSA procfs helper takes the global
mutex_lock(&info_mutex) at both the proc_open callback and
snd_card_info_disconnect() helper.  Since the proc_open can't finish
due to the mutex lock, wait_for_completion() never returns, either,
hence it deadlocks.

TASK#1 TASK#2
proc_reg_open()
  takes use_pde()
snd_info_text_entry_open()
snd_card_disconnect()
snd_info_card_disconnect()
  takes mutex_lock(&info_mutex)
proc_remove()
wait_for_completion(unused_pde)
  ... waiting task#1 closes
mutex_lock(&info_mutex)
=> DEADLOCK

This patch is a workaround for avoiding the deadlock scenario above.

The basic strategy is to move proc_remove() call outside the mutex
lock.  proc_remove() can work gracefully without extra locking, and it
can delete the tree recursively alone.  So, we call proc_remove() at
snd_info_card_disconnection() at first, then delete the rest resources
recursively within the info_mutex lock.

After the change, the function snd_info_disconnect() doesn't do
disconnection by itself any longer, but it merely clears the procfs
pointer.  So rename the function to snd_info_clear_entries() for
avoiding confusion.

The similar change is applied to snd_info_free_entry(), too.  Since
the proc_remove() is called only conditionally with the non-NULL
entry->p, it's skipped after the snd_info_clear_entries() call.

Reported-by: Shinhyung Kang <s47.kang@samsung.com>
Closes: https://lore.kernel.org/r/664457955.21699345385931.JavaMail.epsvc@epcpadp4
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231109141954.4283-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoMerge tag 'asoc-fix-v6.7-merge-window-2' of https://git.kernel.org/pub/scm/linux...
Takashi Iwai [Thu, 9 Nov 2023 11:37:03 +0000 (12:37 +0100)]
Merge tag 'asoc-fix-v6.7-merge-window-2' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: One more fix for the merge window

One additional driver fix that came in during the merge window.

10 months agoMerge tag 'asoc-fix-v6.7-merge-window' of https://git.kernel.org/pub/scm/linux/kernel...
Takashi Iwai [Wed, 8 Nov 2023 16:44:06 +0000 (17:44 +0100)]
Merge tag 'asoc-fix-v6.7-merge-window' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.7

A collection of fixes that have come in during the merge window, the
majority of this is driver specific with one core fix for handling of
DAPM clock widgets when a name prefix is specified for the card - the
name should not be applied to the clock name we request from the clock
API.

10 months agoASoC: nau8540: Add self recovery to improve capture quility
David Lin [Wed, 8 Nov 2023 06:16:59 +0000 (14:16 +0800)]
ASoC: nau8540: Add self recovery to improve capture quility

Reading the peak data to detect abnormal data in the ADC channel.
If abnormal data occurs, the driver takes recovery actions to
refresh the ADC channel.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20231108061658.1265065-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: hda/realtek: Add support dual speaker for Dell
Kailang Yang [Wed, 8 Nov 2023 07:45:00 +0000 (15:45 +0800)]
ALSA: hda/realtek: Add support dual speaker for Dell

Dell new platform support dual speaker. But BIOS verb table only show one speaker.
It will fill verb table for second speaker. Then bind with CS AMP model.

Fixes: de90f5165b1c ("ALSA: hda/realtek: Add support for DELL Oasis 13/14/16 laptops")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/4dd390a77bf742b8a518ac2deee00b0f@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: Add ASRock X670E Taichi to denylist
Alexander Koskovich [Sun, 5 Nov 2023 15:29:29 +0000 (15:29 +0000)]
ALSA: hda: Add ASRock X670E Taichi to denylist

Recent AMD platforms expose an HD-audio bus but without any actual
codecs, which is internally tied with a USB-audio device, supposedly.
It results in "no codecs" error of HD-audio bus driver, and it's
nothing but a waste of resources.

snd_hda_intel 0000:59:00.6: no codecs found!

Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Link: https://lore.kernel.org/r/20231105152834.5620-1-akoskovich@pm.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda/realtek: Add quirk for ASUS UX7602ZM
Alex Spataru [Sat, 4 Nov 2023 21:01:52 +0000 (16:01 -0500)]
ALSA: hda/realtek: Add quirk for ASUS UX7602ZM

Enables the SPI-connected CSC35L41 audio amplifier for this
laptop model.

As of BIOS version 303 it's still necessary to
modify the ACPI table to add the related _DSD properties:
https://github.com/alex-spataru/asus_zenbook_ux7602zm_sound/

Signed-off-by: Alex Spataru <alex_spataru@outlook.com>
Link: https://lore.kernel.org/r/DS7PR07MB7621BB5BB14F5473D181624CE3A4A@DS7PR07MB7621.namprd07.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: SOF: sof-client: trivial: fix comment typo
Eugen Hristev [Tue, 31 Oct 2023 11:22:18 +0000 (13:22 +0200)]
ASoC: SOF: sof-client: trivial: fix comment typo

Fix typo s/depndent/dependent

Fixes: 6e9548cdb30e ("ASoC: SOF: Convert the generic IPC flood test into SOF client")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231031112218.79136-1-eugen.hristev@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dapm: fix clock get name
Jerome Brunet [Mon, 6 Nov 2023 10:37:09 +0000 (11:37 +0100)]
ASoC: dapm: fix clock get name

The name currently used to get the clock includes the dapm prefix.
It should use the name as provided to the widget, without the prefix.

Fixes: 3caac759681e ("ASoC: soc-dapm.c: fixup snd_soc_dapm_new_control_unlocked() error handling")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20231106103712.703962-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: hdmi-codec: register hpd callback on component probe
Jerome Brunet [Mon, 6 Nov 2023 10:40:11 +0000 (11:40 +0100)]
ASoC: hdmi-codec: register hpd callback on component probe

The HDMI hotplug callback to the hdmi-codec is currently registered when
jack is set.

The hotplug not only serves to report the ASoC jack state but also to get
the ELD. It should be registered when the component probes instead, so it
does not depend on the card driver registering a jack for the HDMI to
properly report the ELD.

Fixes: 25ce4f2b3593 ("ASoC: hdmi-codec: Get ELD in before reporting plugged event")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20231106104013.704356-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: trivial: fix error messages
Eugen Hristev [Tue, 31 Oct 2023 10:31:39 +0000 (12:31 +0200)]
ASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: trivial: fix error messages

Property 'playback-codecs' is referenced as 'speaker-codec' in the error
message, and this can lead to confusion.
Correct the error message such that the correct property name is
referenced.

Fixes: 0da16e370dd7 ("ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and rt5682s")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231031103139.77395-1-eugen.hristev@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: Modify some error codes
Mark Brown [Wed, 1 Nov 2023 17:02:32 +0000 (17:02 +0000)]
ASoC: codecs: Modify some error codes

Merge series from wangweidong.a@awinic.com:

The maximum value that calib can set should be
consistent with the maximum value of re.

An error code should be return when the re is greater
than the maximum value or less than the minimum value

The value of vsense_select should be either 32
or 0 in both cases, so modify the
AW88399_DEV_VDSEL_VSENSE macro to 32.

10 months agoASoC: da7219: Improve system suspend and resume handling
David Rau [Wed, 1 Nov 2023 02:25:07 +0000 (10:25 +0800)]
ASoC: da7219: Improve system suspend and resume handling

When DA7219 is suspended, prevent the AAD IRQ handler is unexpectedly
executed and cause the I2C driver "Transfer while suspended" failure.

Signed-off-by: David Rau <David.Rau.opensource@dm.renesas.com>
Link: https://lore.kernel.org/r/20231101022507.6226-1-David.Rau.opensource@dm.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: Modify macro value error
Weidong Wang [Wed, 1 Nov 2023 09:02:10 +0000 (17:02 +0800)]
ASoC: codecs: Modify macro value error

The value of vsense_select should be either 32
or 0 in both cases, so modify the
AW88399_DEV_VDSEL_VSENSE macro to 32.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231101090211.177125-4-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: Modify the wrong judgment of re value
Weidong Wang [Wed, 1 Nov 2023 09:02:09 +0000 (17:02 +0800)]
ASoC: codecs: Modify the wrong judgment of re value

An error code should be return when the re is greater
than the maximum value or less than the minimum value

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231101090211.177125-3-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: Modify the maximum value of calib
Weidong Wang [Wed, 1 Nov 2023 09:02:08 +0000 (17:02 +0800)]
ASoC: codecs: Modify the maximum value of calib

The maximum value that calib can set should be
consistent with the maximum value of re.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231101090211.177125-2-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: hda: cs35l41: Fix missing error code in cs35l41_smart_amp()
Harshit Mogalapalli [Mon, 30 Oct 2023 07:08:36 +0000 (00:08 -0700)]
ALSA: hda: cs35l41: Fix missing error code in cs35l41_smart_amp()

When firmware status is invalid, assign -EINVAL to ret as ret is '0' at
that point and returning success is incorrect when firmware status is
invalid.

Fixes: a51d8ba03a4f ("ALSA: hda: cs35l41: Check CSPL state after loading firmware")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20231030070836.3234385-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: amd: acp: fix for i2s mode register field update
Syed Saba Kareem [Tue, 31 Oct 2023 13:59:34 +0000 (19:29 +0530)]
ASoC: amd: acp: fix for i2s mode register field update

I2S mode register field will be set to 1 when tdm mode is enabled.
Update the I2S mode field based on tdm_mode flag check.

This will fix below smatch checker warning.

sound/soc/amd/acp/acp-i2s.c:59 acp_set_i2s_clk()
warn: odd binop '0x0 & 0x2'

Fixes: 40f74d5f09d7 ("ASoC: amd: acp: refactor acp i2s clock
generation code")

Reported-By: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231031135949.1064581-3-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoMerge tag 'asoc-v6.7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Tue, 31 Oct 2023 08:01:25 +0000 (09:01 +0100)]
Merge tag 'asoc-v6.7-2' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v6.7

More updates for v6,7 following the early merge request:

  - Fixes for handling of component name prefixing when name prefixes
    are used by the machine driver.
  - Fixes for noise when stopping some Sounwire CODECs.
  - Support for AMD ACP 6.3 and 7.0, Awinc AW88399, more Intel
    platforms and more Qualcomm SC7180 platforms.

10 months agoMerge branch 'for-next' into for-linus
Takashi Iwai [Tue, 31 Oct 2023 07:58:36 +0000 (08:58 +0100)]
Merge branch 'for-next' into for-linus

Pull 6.7 materials

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: codecs: aw88399: Fix -Wuninitialized in aw_dev_set_vcalb()
Nathan Chancellor [Fri, 27 Oct 2023 16:54:25 +0000 (09:54 -0700)]
ASoC: codecs: aw88399: Fix -Wuninitialized in aw_dev_set_vcalb()

Clang warns (or errors with CONFIG_WERROR=y):

  sound/soc/codecs/aw88399.c:441:18: error: variable 'vsense_select' is uninitialized when used here [-Werror,-Wuninitialized]
    441 |         vsense_select = vsense_select & (~AW88399_VDSEL_MASK);
        |                         ^~~~~~~~~~~~~
  sound/soc/codecs/aw88399.c:431:28: note: initialize the variable 'vsense_select' to silence this warning
    431 |         unsigned int vsense_select, vsense_value;
        |                                   ^
        |                                    = 0
  1 error generated.

This clearly should have been using the value received from
regmap_read(). Use the correct variable to resolve the warning.

Closes: https://github.com/ClangBuiltLinux/linux/issues/1952
Fixes: 8ade6cc7e261 ("ASoC: codecs: Add aw88399 amplifier driver")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231027-asoc-aw88399-fix-wuninitialized-v1-1-b1044493e4cd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rt712-sdca: fix speaker route missing issue
Shuming Fan [Mon, 30 Oct 2023 10:36:44 +0000 (18:36 +0800)]
ASoC: rt712-sdca: fix speaker route missing issue

Sometimes the codec probe would be called earlier than the hardware initialization.
Therefore, the speaker route should be added before the the first_hw_init check.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Fixes: f3da2ed110e2 ("ASoC: rt1712-sdca: enable pm_runtime in probe,  keep status as 'suspended'")?
Link: https://lore.kernel.org/r/20231030103644.1787948-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rockchip: Fix unused rockchip_i2s_tdm_match warning for !CONFIG_OF
Rob Herring [Mon, 30 Oct 2023 14:23:38 +0000 (09:23 -0500)]
ASoC: rockchip: Fix unused rockchip_i2s_tdm_match warning for !CONFIG_OF

Commit 9958d85968ed ("ASoC: Use device_get_match_data()") dropped the
unconditional use of rockchip_i2s_tdm_match resulting in this warning:

sound/soc/rockchip/rockchip_i2s_tdm.c:1315:34: warning: 'rockchip_i2s_tdm_match' defined but not used [-Wunused-const-variable=]

The fix is to drop of_match_ptr() which is not necessary because DT is
always used for this driver.

Fixes: 9958d85968ed ("ASoC: Use device_get_match_data()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310121802.CDAGVdF2-lkp@intel.com/
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231030142337.814907-2-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings
Tony Lindgren [Mon, 30 Oct 2023 05:23:38 +0000 (07:23 +0200)]
ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings

We need to check for an active device as otherwise we get warnings
for some mcbsp instances for "Runtime PM usage count underflow!".

Reported-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231030052340.13415-1-tony@atomide.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: hda: cs35l41: mark cs35l41_verify_id() static
Arnd Bergmann [Fri, 27 Oct 2023 15:25:09 +0000 (17:25 +0200)]
ALSA: hda: cs35l41: mark cs35l41_verify_id() static

The newly introduced function is global but only called in this one
file and has no extern prototype, so it should probably be static:

sound/pci/hda/cs35l41_hda.c:733:5: error: no previous prototype for 'cs35l41_verify_id' [-Werror=missing-prototypes]
  733 | int cs35l41_verify_id(struct cs35l41_hda *cs35l41, unsigned int *regid, unsigned int *reg_revid)

Fixes: 881b7bce0c25 ("ALSA: hda: cs35l41: Run boot process during resume callbacks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231027152515.482411-1-arnd@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: Merge up workaround for CODECs that play noise on stopped stream
Mark Brown [Fri, 27 Oct 2023 21:33:15 +0000 (22:33 +0100)]
ASoC: Merge up workaround for CODECs that play noise on stopped stream

This was sent too late to actually make it for v6.6 but was sent against
v6.6 so merge it up here.

10 months agoASoC: Intel: avs: Add support for rt5514 codec
Mark Brown [Fri, 27 Oct 2023 20:07:18 +0000 (21:07 +0100)]
ASoC: Intel: avs: Add support for rt5514 codec

Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

There are machines which use codec rt5514 as DMIC, add support for them.

10 months agoASoC: codecs: wsa883x: make use of new mute_unmute_on_trigger flag
Srinivas Kandagatla [Fri, 27 Oct 2023 10:57:47 +0000 (11:57 +0100)]
ASoC: codecs: wsa883x: make use of new mute_unmute_on_trigger flag

In the current setup the PA is left unmuted even when the
Soundwire ports are not started streaming. This can lead to click
and pop sounds during start.
There is a same issue in the reverse order where in the PA is
left unmute even after the data stream is stopped, the time
between data stream stopping and port closing is long enough
to accumulate DC on the line resulting in Click/Pop noise
during end of stream.

making use of new mute_unmute_on_trigger flag is helping a
lot with this Click/Pop issues reported on this Codec

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231027105747.32450-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-dai: add flag to mute and unmute stream during trigger
Srinivas Kandagatla [Fri, 27 Oct 2023 10:57:46 +0000 (11:57 +0100)]
ASoC: soc-dai: add flag to mute and unmute stream during trigger

In some setups like Speaker amps which are very sensitive, ex: keeping them
unmute without actual data stream for very short duration results in a
static charge and results in pop and clicks. To minimize this, provide a way
to mute and unmute such codecs during trigger callbacks.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231027105747.32450-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: ams-delta.c: use component after check
Kuninori Morimoto [Fri, 27 Oct 2023 00:09:56 +0000 (00:09 +0000)]
ASoC: ams-delta.c: use component after check

static void cx81801_close()
{
...
(A) struct snd_soc_dapm_context *dapm = &component->card->dapm;
...
(B) if (!component)
return;
}

(A) uses component before NULL check (B). This patch moves it after (B).

Fixes: d0fdfe34080c ("ASoC: cx20442: replace codec to component")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/3e608474-e99a-4866-ae98-3054a4221f09@moroto.mountain
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ttqdq623.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: select SND_SOC_AMD_ACP_LEGACY_COMMON for ACP63
Arnd Bergmann [Fri, 27 Oct 2023 15:23:54 +0000 (17:23 +0200)]
ASoC: amd: acp: select SND_SOC_AMD_ACP_LEGACY_COMMON for ACP63

Without this dependency, acp63 fails to link:

x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_audio_remove':
acp63.c:(.text+0x22): undefined reference to `acp_disable_interrupts'
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_i2s_master_clock_generate.isra.0':
acp63.c:(.text+0x6f): undefined reference to `smn_read'
x86_64-linux-ld: acp63.c:(.text+0x81): undefined reference to `smn_write'
x86_64-linux-ld: acp63.c:(.text+0x8e): undefined reference to `smn_read'
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_pcm_resume':
acp63.c:(.text+0x230): undefined reference to `restore_acp_i2s_params'
x86_64-linux-ld: acp63.c:(.text+0x23d): undefined reference to `restore_acp_pdm_params'
x86_64-linux-ld: sound/soc/amd/acp/acp63.o: in function `acp63_audio_probe':
acp63.c:(.text+0x474): undefined reference to `acp_enable_interrupts'

Fixes: d4c2d5391d7e ("ASoC: amd: acp: add Kconfig options for acp6.3 based platform driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231027152403.386257-3-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: aw88399: fix typo in Kconfig select
Arnd Bergmann [Fri, 27 Oct 2023 15:23:53 +0000 (17:23 +0200)]
ASoC: codecs: aw88399: fix typo in Kconfig select

The aw88395_lib module is shared by all the aw883* drivers that
need to select the corresponding Kconfig symbol. The newly added
aw88399 incorrectly selects SND_SOC_AW88399_LIB instead, which
is not defined anywhere in the kernel, causing a link failure when
the actual one is missing:

arm-linux-gnueabi-ld: sound/soc/codecs/aw88399.o: in function `aw88399_codec_probe':
aw88399.c:(.text+0xbc6): undefined reference to `aw88395_dev_load_acf_check'
arm-linux-gnueabi-ld: aw88399.c:(.text+0xbea): undefined reference to `aw88395_dev_cfg_load'

Fixes: 8ade6cc7e261 ("ASoC: codecs: Add aw88399 amplifier driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231027152403.386257-2-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add ACPI dependency
Arnd Bergmann [Fri, 27 Oct 2023 15:23:52 +0000 (17:23 +0200)]
ASoC: amd: acp: add ACPI dependency

A newly added function requires CONFIG_ACPI to avoid a build error:

sound/soc/amd/acp/acp-legacy-common.c: In function 'check_acp_pdm':
sound/soc/amd/acp/acp-legacy-common.c:401:19: error: implicit declaration of function 'acpi_find_child_device'; did you mean 'acpi_match_device'? [-Werror=implicit-function-declaration]
  401 |         pdm_dev = acpi_find_child_device(ACPI_COMPANION(&pci->dev), pdm_addr, 0);
      |                   ^~~~~~~~~~~~~~~~~~~~~~
      |                   acpi_match_device

The acp drivers really only work when ACPI is enabled already, so just
avoid the build failure with hard dependency in everything that
enables the acp-legacy-common portion.

Fixes: 3a94c8ad0aae ("ASoC: amd: acp: add code for scanning acp pdm controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231027152403.386257-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: avs: Add rt5514 machine board
Amadeusz Sławiński [Fri, 27 Oct 2023 11:05:37 +0000 (13:05 +0200)]
ASoC: Intel: avs: Add rt5514 machine board

In order to support Eve chromebooks add rt5514 configuration to board
lookup table. rt5514 is used for capture in DMIC configuration on SSP 0
and TDM 1.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231027110537.2103712-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: avs: Add rt5514 machine board
Amadeusz Sławiński [Fri, 27 Oct 2023 11:05:36 +0000 (13:05 +0200)]
ASoC: Intel: avs: Add rt5514 machine board

To support AVS-rt5514 configuration add machine board connecting AVS
platform component driver with rt5514 codec one.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231027110537.2103712-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: scarlett2: Add missing check with firmware version control
Geoffrey D. Bennett [Fri, 27 Oct 2023 10:01:21 +0000 (20:31 +1030)]
ALSA: scarlett2: Add missing check with firmware version control

scarlett2_add_firmware_version_ctl() may return an error, but the
return value was not being checked. Add the missing check.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Fixes: 701949cc0128 ("ALSA: scarlett2: Add support for reading firmware version")
Link: https://lore.kernel.org/r/ZTuKcXajVnuelBEb@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: virtio: use ack callback
Matias Ezequiel Vara Larsen [Wed, 25 Oct 2023 09:49:19 +0000 (11:49 +0200)]
ALSA: virtio: use ack callback

This commit uses the ack() callback to determine when a buffer has been
updated, then exposes it to guest.

The current mechanism splits a dma buffer into descriptors that are
exposed to the device. This dma buffer is shared with the user
application. When the device consumes a buffer, the driver moves the
request from the used ring to available ring.

The driver exposes the buffer to the device without knowing if the
content has been updated from the user. The section 2.8.21.1 of the
virtio spec states that: "The device MAY access the descriptor chains
the driver created and the memory they refer to immediately". If the
device picks up buffers from the available ring just after it is
notified, it happens that the content may be old.

When the ack() callback is invoked, the driver exposes only the buffers
that have already been updated, i.e., enqueued in the available ring.
Thus, the device always picks up a buffer that is updated.

For capturing, the driver starts by exposing all the available buffers
to device. After device updates the content of a buffer, it enqueues it
in the used ring. It is only after the ack() for capturing is issued
that the driver re-enqueues the buffer in the available ring.

Co-developed-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
Signed-off-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
Link: https://lore.kernel.org/r/ZTjkn1YAFz67yfqx@fedora
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: scarlett2: Remap Level Meter values
Geoffrey D. Bennett [Thu, 26 Oct 2023 18:08:26 +0000 (04:38 +1030)]
ALSA: scarlett2: Remap Level Meter values

The values previously returned by the Level Meter control were passed
through from the interface without interpretation, but it has been
discovered that the order of the values matches the mux assignment
order (which is not presented to userspace). In addition, the values
for disabled mux outputs, and mux outputs which share a source are
invalid.

This patch adds a per-device meter_map[], and a dynamic
meter_level_map[] which is updated on routing changes. The meter level
map gets used by scarlett2_meter_ctl_get() to both present the values
in a standard order, and to fix up the invalid values by zeroing them
(for disabled outputs) and copying them (for mux outputs which share a
source).

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/d437ace603eff685d2e0c3d0960589d7a09dd647.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: scarlett2: Allow passing any output to line_out_remap()
Geoffrey D. Bennett [Thu, 26 Oct 2023 18:06:16 +0000 (04:36 +1030)]
ALSA: scarlett2: Allow passing any output to line_out_remap()

Line outputs 3 & 4 on the Gen 3 18i8 are internally the analogue 7 and
8 outputs, and this renumbering is hidden from the user by
line_out_remap(). By allowing higher values (representing non-analogue
outputs) to be passed to line_out_remap(), repeated code from
scarlett2_mux_src_enum_ctl_get() and scarlett2_mux_src_enum_ctl_put()
can be removed.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/3b70267931f5994628ab27306c73cddd17b93c8f.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: scarlett2: Add support for reading firmware version
Geoffrey D. Bennett [Thu, 26 Oct 2023 18:05:46 +0000 (04:35 +1030)]
ALSA: scarlett2: Add support for reading firmware version

The 84 bytes read during initialisation step 2 were previously
ignored. This patch retrieves the firmware version from bytes 8-11,
stores it in the scarlett2_data struct, and makes it available
through a new control "Firmware Version".

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/e76cd80c3445769e60c95df12c4635fc8abfe5c7.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: scarlett2: Rename Gen 3 config sets
Geoffrey D. Bennett [Thu, 26 Oct 2023 18:02:39 +0000 (04:32 +1030)]
ALSA: scarlett2: Rename Gen 3 config sets

The config sets are named NO_MIXER, GEN_2, GEN_3, and CLARETT
currently. Rename NO_MIXER and GEN_3 to GEN_3A and GEN_3B respectively
as NO_MIXER is only for the smaller Gen 3 devices.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/19ae5eea7fc499945efa8eeda7fcd8afe73f62d9.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: scarlett2: Rename scarlett_gen2 to scarlett2
Geoffrey D. Bennett [Thu, 26 Oct 2023 18:01:28 +0000 (04:31 +1030)]
ALSA: scarlett2: Rename scarlett_gen2 to scarlett2

This driver was originally developed for the Focusrite Scarlett Gen 2
series. Since then Focusrite have used a similar protocol for their
Gen 3, Gen 4, Clarett USB, Clarett+, and Vocaster series.

Let's call this common protocol the "Scarlett 2 Protocol" and rename
the driver to scarlett2 to not imply that it is restricted to Gen 2
series devices.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/e1ad7f69a1e20cdb39094164504389160c1a0a0b.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: Intel: bytcr_wm5102: add various quirks
Mark Brown [Thu, 26 Oct 2023 16:03:01 +0000 (17:03 +0100)]
ASoC: Intel: bytcr_wm5102: add various quirks

Merge series from Hans de Goede <hdegoede@redhat.com>:

Hi Mark,

As requested here is a v2 of my series to add various quirks
to the bytcr_wm5102 Intel board driver to make it more flexible.

Changes in v2:
- Dropped 2 already merged patches
- Rebased on top of broonie/sound/for-6.7

Regards,

Hans

Hans de Goede (4):
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_SSP2 quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_MCLK_19_2MHZ quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_OUT_MAP quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_IN_MAP quirk

 sound/soc/intel/boards/bytcr_wm5102.c | 229 +++++++++++++++++++++++---
 1 file changed, 202 insertions(+), 27 deletions(-)

--
2.41.0

10 months agosc7180: Add qdsp based soundcard
Mark Brown [Thu, 26 Oct 2023 16:02:53 +0000 (17:02 +0100)]
sc7180: Add qdsp based soundcard

Merge series from Nikita Travkin <nikita@trvn.ru>:

Some devices, such as Acer Aspire 1, can't use lpass dirrectly, but
instead must use adsp core to play sound. Since otherwise the hardware
is, usually, very similar across the devices on the same platform, it
makes sense to reuse the same boardfile.

This series refactors the sc7180.c slightly and adds the functions to
control clocks via adsp instead of controlling the hardware directly.

10 months agoASoC: fix widget name comparisons (consider DAI name
Mark Brown [Thu, 26 Oct 2023 16:02:46 +0000 (17:02 +0100)]
ASoC: fix widget name comparisons (consider DAI name

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Some codec drivers compare widget names with strcmp, ignoring
the component name prefix.  If prefix is used, the comparisons start failing.

Except Qualcomm lpass-rx-macro, none of the patches were tested
on hardware.

10 months agoASoC: codecs: Add aw88399 amplifier driver
Mark Brown [Thu, 26 Oct 2023 16:02:39 +0000 (17:02 +0100)]
ASoC: codecs: Add aw88399 amplifier driver

Merge series from wangweidong.a@awinic.com:

Add the awinic,aw88399 property to the awinic,aw88395.yaml file.

Add i2c and amplifier registration for
aw88399 and their associated operation functions.

10 months agoASoC: cs35l41: Detect CSPL errors when sending CSPL commands
Stefan Binding [Thu, 26 Oct 2023 15:05:58 +0000 (16:05 +0100)]
ASoC: cs35l41: Detect CSPL errors when sending CSPL commands

The existing code checks for the correct state transition after sending
a command. However, it is possible for the message box to return -1,
which indicates an error, if an error has occurred in the firmware.
We can detect if the error has occurred, and return a different error.
In addition, there is no recovering from a CSPL error, so the retry
mechanism is not needed in this case, and we can return immediately.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231026150558.2105827-9-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: cs35l41: Check CSPL state after loading firmware
Stefan Binding [Thu, 26 Oct 2023 15:05:57 +0000 (16:05 +0100)]
ALSA: hda: cs35l41: Check CSPL state after loading firmware

CSPL firmware should be in RUNNING or PAUSED state after loading.
If not, the firmware has not been loaded correctly, and we can unload
it and pass the error up.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-8-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: cs35l41: Do not unload firmware before reset in system suspend
Stefan Binding [Thu, 26 Oct 2023 15:05:56 +0000 (16:05 +0100)]
ALSA: hda: cs35l41: Do not unload firmware before reset in system suspend

Given the part is about to reset due to system suspend, and we are
already in hibernate, there is no need to wake up the amp, just to get
it ready to be reset. We just need to ensure cs_dsp is ready for reset
by resetting the states.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-7-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: cs35l41: Force a software reset after hardware reset
Stefan Binding [Thu, 26 Oct 2023 15:05:55 +0000 (16:05 +0100)]
ALSA: hda: cs35l41: Force a software reset after hardware reset

To ensure the chip has correctly reset during probe and system suspend,
we need to force a software reset, in case of systems where the
hardware reset is not available.

The software reset register was labelled as volatile but not readable,
however, it is readable, (just returns 0x0). Adding it to readable
registers means it will be correctly treated as volatile, and thus
will not be cached.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-6-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: cs35l41: Run boot process during resume callbacks
Stefan Binding [Thu, 26 Oct 2023 15:05:54 +0000 (16:05 +0100)]
ALSA: hda: cs35l41: Run boot process during resume callbacks

During initial probe, after reset is asserted for the first time, the
driver goes through a boot process to ensure the amp is ready to be
used. This involves verifying a boot flag, as well as verifying the
chip ids.

This is necessary since it is possible for the amp to have been fully
reset by the system suspend calls.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-5-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: cs35l41: Assert Reset prior to de-asserting in probe and system resume
Stefan Binding [Thu, 26 Oct 2023 15:05:53 +0000 (16:05 +0100)]
ALSA: hda: cs35l41: Assert Reset prior to de-asserting in probe and system resume

To ensure we are in a known state, exiting from reset at the point of
probe or in system resume, assert reset before we de-assert it.

Since the BIOS may enter into a pre-boot environment to control the
amps (for example for boot beep), we need to ensure we start from a
known, reset state prior to probe or system resume.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: cs35l41: Assert reset before system suspend
Stefan Binding [Thu, 26 Oct 2023 15:05:52 +0000 (16:05 +0100)]
ALSA: hda: cs35l41: Assert reset before system suspend

Some system suspend modes may remove power supplies.
To ensure we are not running during this time, we should assert reset.

Note: since the amps use a shared reset, asserting reset prior to
system suspend only works if the amps are suspended in the reverse
order to probe.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: cs35l41: Use reset label to get GPIO for HP Zbook Fury 17 G9
Stefan Binding [Thu, 26 Oct 2023 15:05:51 +0000 (16:05 +0100)]
ALSA: hda: cs35l41: Use reset label to get GPIO for HP Zbook Fury 17 G9

This laptop has an incorrect setting in its _DSD for boost type, but
the rest of the _DSD is correct, and we can still use the reset label
to obtain the reset gpio.

Also fix channel map so that amp 0 is right, and amp 1 is left.

Fixes: 581523ee3652 ("ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct boost type")

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
Cezary Rojewski [Thu, 26 Oct 2023 08:25:58 +0000 (10:25 +0200)]
ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails

Error path in snd_skl_parse_uuids() shall free last allocated module if
its instance_id allocation fails.

Fixes: f8e066521192 ("ASoC: Intel: Skylake: Fix uuid_module memory leak in failure case")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231026082558.1864910-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tegra: machine: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:28 +0000 (11:54 +0200)]
ASoC: tegra: machine: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-18-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: samsung: speyside: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:27 +0000 (11:54 +0200)]
ASoC: samsung: speyside: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-17-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mediatek: mt8192: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:26 +0000 (11:54 +0200)]
ASoC: mediatek: mt8192: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-16-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mediatek: mt8188: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:25 +0000 (11:54 +0200)]
ASoC: mediatek: mt8188: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20231023095428.166563-15-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mediatek: mt8186: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:24 +0000 (11:54 +0200)]
ASoC: mediatek: mt8186: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-14-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mediatek: mt8183: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:23 +0000 (11:54 +0200)]
ASoC: mediatek: mt8183: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-13-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wm8995: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:22 +0000 (11:54 +0200)]
ASoC: codecs: wm8995: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-12-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wm8994: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:21 +0000 (11:54 +0200)]
ASoC: codecs: wm8994: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wm8962: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:20 +0000 (11:54 +0200)]
ASoC: codecs: wm8962: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd9335: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:19 +0000 (11:54 +0200)]
ASoC: codecs: wcd9335: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: rtq9128: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:18 +0000 (11:54 +0200)]
ASoC: codecs: rtq9128: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: rt5682s: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:17 +0000 (11:54 +0200)]
ASoC: codecs: rt5682s: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: max9867: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:16 +0000 (11:54 +0200)]
ASoC: codecs: max9867: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-rx-macro: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:15 +0000 (11:54 +0200)]
ASoC: codecs: lpass-rx-macro: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: adav80x: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:14 +0000 (11:54 +0200)]
ASoC: codecs: adav80x: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: adau1373: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:13 +0000 (11:54 +0200)]
ASoC: codecs: adau1373: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: 88pm860x: Handle component name prefix
Krzysztof Kozlowski [Mon, 23 Oct 2023 09:54:12 +0000 (11:54 +0200)]
ASoC: codecs: 88pm860x: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: seq: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:14 +0000 (15:23 +0200)]
ALSA: seq: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: wavefront: Drop obsoleted comments and definitions
Takashi Iwai [Wed, 25 Oct 2023 13:23:13 +0000 (15:23 +0200)]
ALSA: wavefront: Drop obsoleted comments and definitions

The header file contains lots of outdated comments and definitions.
Drop those as cleanup.

Link: https://lore.kernel.org/r/20231025132314.5878-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: wavefront: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:12 +0000 (15:23 +0200)]
ALSA: wavefront: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: opl3: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:11 +0000 (15:23 +0200)]
ALSA: opl3: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: aoa: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:10 +0000 (15:23 +0200)]
ALSA: aoa: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: caiaq: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:09 +0000 (15:23 +0200)]
ALSA: caiaq: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: mixart: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:08 +0000 (15:23 +0200)]
ALSA: mixart: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: azt3328: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:07 +0000 (15:23 +0200)]
ALSA: azt3328: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: rawmidi: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:06 +0000 (15:23 +0200)]
ALSA: rawmidi: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: pcm: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:05 +0000 (15:23 +0200)]
ALSA: pcm: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: control: Replace with __packed attribute
Takashi Iwai [Wed, 25 Oct 2023 13:23:04 +0000 (15:23 +0200)]
ALSA: control: Replace with __packed attribute

Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: amd: acp: add machine driver support for acp7.0
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:54 +0000 (20:20 +0530)]
ASoC: amd: acp: add machine driver support for acp7.0

add machine driver support for ACP7.0 on legacy stack.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-13-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: Add pci legacy driver support for acp7.0 platform
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:53 +0000 (20:20 +0530)]
ASoC: amd: acp: Add pci legacy driver support for acp7.0 platform

Add pci legacy driver support and create platform driver for
acp7.0 platform.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-12-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: change acp power on mask macro value
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:52 +0000 (20:20 +0530)]
ASoC: amd: acp: change acp power on mask macro value

change acp power on mask macro value so that same macro can be used
for all amd platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-11-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: change acp-deinit function arguments
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:51 +0000 (20:20 +0530)]
ASoC: amd: acp: change acp-deinit function arguments

acp-deinit function will not be same for all platforms.
To make platform specific changes in acp-deinit
function, instead of passing base address pass chip
structure which contains acp_rev feild.
chip->acp_rev will be used to add platform specific code
in acp-deinit().

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-10-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add machine driver support for pdm use case
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:50 +0000 (20:20 +0530)]
ASoC: amd: acp: add machine driver support for pdm use case

add pdm use case machine driver support

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-9-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add condition check for i2s clock generation
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:49 +0000 (20:20 +0530)]
ASoC: amd: acp: add condition check for i2s clock generation

for only PDM endpoint i2s master clock is not required.
Add a condition check for the same based on chip flag value.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-8-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add platform and flag data to acp data structure
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:48 +0000 (20:20 +0530)]
ASoC: amd: acp: add platform and flag data to acp data structure

add name of the platform and flag data in private data structure.
name of the platform will be used to differentiate platforms where as
flag will be used to know what kind of endpoint configuration is selected
where its legacy(I2S + PDM) or only ACP PDM.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-7-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add code for scanning acp pdm controller
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:47 +0000 (20:20 +0530)]
ASoC: amd: acp: add code for scanning acp pdm controller

Add common code for scanning acp pdm controller and create
platform device for the same.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-6-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add Kconfig options for acp6.3 based platform driver
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:46 +0000 (20:20 +0530)]
ASoC: amd: acp: add Kconfig options for acp6.3 based platform driver

ACP6.3 based platform legacy drivers can be built by selecting
necessary kernel config option. This patch enables build support
of the same.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-5-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add machine driver support for acp6.3 platform
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:45 +0000 (20:20 +0530)]
ASoC: amd: acp: add machine driver support for acp6.3 platform

add legacy machine driver support for acp6.3 based platform.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-4-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add i2s clock generation support for acp6.3 based platforms
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:44 +0000 (20:20 +0530)]
ASoC: amd: acp: add i2s clock generation support for acp6.3 based platforms

Add I2S LRCLK & BCLK generation code for ACP6.3 based platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-3-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: refactor acp i2s clock generation code
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:43 +0000 (20:20 +0530)]
ASoC: amd: acp: refactor acp i2s clock generation code

Refactor acp i2s LRCLK,BCLK generation code and move to commnon file.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-2-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: Add acp6.3 pci legacy driver support
Syed Saba Kareem [Sat, 21 Oct 2023 14:50:42 +0000 (20:20 +0530)]
ASoC: amd: acp: Add acp6.3 pci legacy driver support

Add pci legacy driver support and create platform driver for
acp6.3 based platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>