linux-stable/sound
Alper Nebi Yasak 919a4a9418
ASoC: amd: acp: Add kcontrols and widgets per-codec in common code
Commit 7ac3404c2e ("ASoC: amd: acp: Map missing jack kcontrols") adds
card kcontrols and DAPM widgets corresponding to jacks for Headphone and
Headset Mic. But these were already being added in acp-legacy-mach.c and
acp-sof-mach.c, so this causes a probe error:

  sof_mach rt5682s-hs-rt1019: control 2:0:0:Headphone Jack Switch:0 is already present
  sof_mach rt5682s-hs-rt1019: ASoC: Failed to add Headphone Jack Switch: -16
  sof_mach rt5682s-hs-rt1019: devm_snd_soc_register_card(sof-rt5682s-hs-rt1019) failed: -16
  sof_mach: probe of rt5682s-hs-rt1019 failed with error -16

Removing the new duplicates from the common code might be enough to fix
the issue. But some of the codecs use different kcontrols and widgets.
NAU8821 alone has an "Int Mic". MAX98360A has a single "Spk", while
RT1019 has "Left Spk" and "Right Spk" (and two codec instances with name
prefixes).

Since there are per-codec differences, add the kcontrols and widgets
in the common code as each dai-link is being initialized, instead of in
the two machine drivers' probe().

Also, MAX98388 has Left and Right instances, but uses a single "SPK"
widget. That seems weird, so normalize it to use two widgets (one per
each instance like RT1019) while we're adding controls.

Fixes: 7ac3404c2e ("ASoC: amd: acp: Map missing jack kcontrols")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20230818080314.32991-1-alpernebiyasak@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-18 13:55:06 +01:00
..
ac97
aoa ALSA: Switch i2c drivers back to use .probe() 2023-06-05 09:22:45 +02:00
arm ARM: pxa: fix missing-prototypes warnings 2023-05-26 13:33:05 +02:00
atmel
core ALSA: seq: remove redundant unsigned comparison to zero 2023-07-21 13:02:16 +02:00
drivers ALSA: Remove redundant of_match_ptr() 2023-08-13 19:37:47 +01:00
firewire ALSA: fireface: make read-only const array for model names static 2023-06-28 11:42:55 +02:00
hda ALSA: hda/i915: extend connectivity check to cover Intel ARL 2023-08-04 12:53:53 +02:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-06 08:09:36 +02:00
isa Merge branch 'for-next' into for-linus 2023-06-26 15:23:23 +02:00
mips ALSA: mips/sgio2audio: Convert to platform remove callback returning void 2023-03-20 13:07:05 +00:00
oss
parisc
pci ASoC: SOF: Intel: add LunarLake support 2023-08-08 13:28:53 +01:00
pcmcia ALSA: add HAS_IOPORT dependencies 2023-05-22 16:43:47 +02:00
ppc ALSA: Switch i2c drivers back to use .probe() 2023-06-05 09:22:45 +02:00
sh ALSA: sh_dac_audio: Convert to platform remove callback returning void 2023-03-20 13:07:08 +00:00
soc ASoC: amd: acp: Add kcontrols and widgets per-codec in common code 2023-08-18 13:55:06 +01:00
sparc ALSA: sparc/dbri: Convert to platform remove callback returning void 2023-03-20 13:09:37 +00:00
spi
synth ALSA: emu10k1: fix synthesizer pitch for E-MU cards at 44.1 kHz 2023-06-13 07:42:08 +02:00
usb ALSA: usb-audio: Update for native DSD support quirks 2023-07-26 20:04:34 +02:00
virtio
x86
xen
ac97_bus.c
Kconfig ALSA: Enable build with UML 2023-07-18 15:19:01 +01:00
last.c
Makefile
sound_core.c sound: make all 'class' structures const 2023-06-21 07:29:10 +02:00