Commit graph

49403 commits

Author SHA1 Message Date
Takashi Iwai d001e978c1 ASoC: Fixes for v6.10
A bunch of fixes that came in during the merge window, all driver
 specific and none of them especially remarkable.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZPJ10ACgkQJNaLcl1U
 h9AN7wf/bR1oUfxqVRkkeWDJrKevWsXNN5LlWXar8D/yBzGp9ZzlliGKdm58O+7j
 G0iPkMGT0tD5oSxEXVWoYSRLwq8c+jvW5nNiNXPAITeSzXnW4LwSnfUNs52dAmAN
 MnNqzhSJbsXYH8JH5/JEco5seKC5/ijOOqIxcAhwrrdYnpjPkFXtlU4TQvSZeY7w
 i7BeEO1NmvYrgxT1oT+Nm8PFYANsyf9hCgANuZQv5p9iHvjsPzIC2LuW0exy7oiC
 k6X8uWiy+ETK3a9p288QZfO9AFrYm9KX3L18ha/C21ljw7DMv5xbgWm5xWnJQGsV
 n59T+C5kM0V5luSjXZxQ2/hE1Ueu1Q==
 =lhUd
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.10-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.10

A bunch of fixes that came in during the merge window, all driver
specific and none of them especially remarkable.
2024-05-23 13:29:27 +02:00
Andy Chi b3b6f125da ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 440/460 G11.
HP ProBook 440/460 G11 needs ALC236_FIXUP_HP_GPIO_LED quirk to
make mic-mute/audio-mute working.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240523061832.607500-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-23 09:18:12 +02:00
Takashi Iwai c1a8d5f31b ALSA: core: Enable proc module when CONFIG_MODULES=y
We used '#ifdef MODULE' for judging whether the system supports the
sound module or not, and /proc/asound/modules is created only when
'#ifdef MODULE' is true.  The check is not really appropriate, though,
because the flag means only for the sound core and the drivers are
still allowed to be built as modules even if 'MODULE' is not set in
sound/core/init.c.

For fixing the inconsistency, replace those ifdefs with 'ifdef
CONFIG_MODULES'.  One place for a NULL module check is rewritten with
IS_MODULE(CONFIG_SND) to be more intuitive.  It can't be changed to
CONFIG_MODULES; otherwise it would hit a WARN_ON() incorrectly.

This is a slight behavior change; the modules proc entry appears now
no matter whether the sound core is built-in or not as long as modules
are enabled on the kernel in general.  This can't be avoided due to
the nature of kernel builds.

Link: https://lore.kernel.org/r/20240520170349.2417900-1-xu.yang_2@nxp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240522070442.17786-2-tiwai@suse.de
2024-05-22 10:10:42 +02:00
Takashi Iwai 39381fe739 ALSA: core: Fix NULL module pointer assignment at card init
The commit 81033c6b58 ("ALSA: core: Warn on empty module")
introduced a WARN_ON() for a NULL module pointer passed at snd_card
object creation, and it also wraps the code around it with '#ifdef
MODULE'.  This works in most cases, but the devils are always in
details.  "MODULE" is defined when the target code (i.e. the sound
core) is built as a module; but this doesn't mean that the caller is
also built-in or not.  Namely, when only the sound core is built-in
(CONFIG_SND=y) while the driver is a module (CONFIG_SND_USB_AUDIO=m),
the passed module pointer is ignored even if it's non-NULL, and
card->module remains as NULL.  This would result in the missing module
reference up/down at the device open/close, leading to a race with the
code execution after the module removal.

For addressing the bug, move the assignment of card->module again out
of ifdef.  The WARN_ON() is still wrapped with ifdef because the
module can be really NULL when all sound drivers are built-in.

Note that we keep 'ifdef MODULE' for WARN_ON(), otherwise it would
lead to a false-positive NULL module check.  Admittedly it won't catch
perfectly, i.e. no check is performed when CONFIG_SND=y.  But, it's no
real problem as it's only for debugging, and the condition is pretty
rare.

Fixes: 81033c6b58 ("ALSA: core: Warn on empty module")
Reported-by: Xu Yang <xu.yang_2@nxp.com>
Closes: https://lore.kernel.org/r/20240520170349.2417900-1-xu.yang_2@nxp.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240522070442.17786-1-tiwai@suse.de
2024-05-22 10:10:39 +02:00
Jian-Hong Pan 45e37f9ce2 ALSA: hda/realtek: Enable headset mic of JP-IK LEAP W502 with ALC897
JP-IK LEAP W502 laptop's headset mic is not enabled until
ALC897_FIXUP_HEADSET_MIC_PIN3 quirk is applied.

Here is the original pin node values:

0x11 0x40000000
0x12 0xb7a60130
0x14 0x90170110
0x15 0x411111f0
0x16 0x411111f0
0x17 0x411111f0
0x18 0x411111f0
0x19 0x411111f0
0x1a 0x411111f0
0x1b 0x03211020
0x1c 0x411111f0
0x1d 0x4026892d
0x1e 0x411111f0
0x1f 0x411111f0

Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Link: https://lore.kernel.org/r/20240520055008.7083-2-jhp@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-21 15:02:56 +02:00
Shenghao Ding b195acf526
ASoC: tas2781: Fix wrong loading calibrated data sequence
Calibrated data will be set to default after loading DSP config params,
which will cause speaker protection work abnormally. Reload calibrated
data after loading DSP config params. Remove declaration of unused API
which load calibrated data in wrong sequence, changed the copyright year
and correct file name in license
header.

Fixes: ef3bcde75d ("ASoC: tas2781: Add tas2781 driver")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://msgid.link/r/20240518141546.1742-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-20 16:01:24 +01:00
Shenghao Ding 7078ac4fd1
ASoC: tas2552: Add TX path for capturing AUDIO-OUT data
TAS2552 is a Smartamp with I/V sense data, add TX path
to support capturing I/V data.

Fixes: 38803ce7b5 ("ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://msgid.link/r/20240518033515.866-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-20 16:01:23 +01:00
Manuel Barrio Linares 5005ccd91b ALSA: usb-audio: Fix for sampling rates support for Mbox3
Fixed wrong use of usb_sndctrlpipe to usb_rcvctrlpipe

Fixes: 44f69ddccb ("ALSA: usb-audio: Add sampling rates support for Mbox3")
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
Link: https://lore.kernel.org/r/20240516134003.39104-1-mbarriolinares@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-16 16:01:55 +02:00
Takashi Iwai 4a63bd179f ALSA: timer: Set lower bound of start tick time
Currently ALSA timer doesn't have the lower limit of the start tick
time, and it allows a very small size, e.g. 1 tick with 1ns resolution
for hrtimer.  Such a situation may lead to an unexpected RCU stall,
where  the callback repeatedly queuing the expire update, as reported
by fuzzer.

This patch introduces a sanity check of the timer start tick time, so
that the system returns an error when a too small start size is set.
As of this patch, the lower limit is hard-coded to 100us, which is
small enough but can still work somehow.

Reported-by: syzbot+43120c2af6ca2938cc38@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/000000000000fa00a1061740ab6d@google.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240514182745.4015-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-16 16:00:08 +02:00
Zhang Yi 714f5df027
ASoC: codecs: ES8326: solve hp and button detect issue
We got an error report about headphone type detection and button detection.
We fixed the headphone type detection error by adjusting the condition
of setting es8326->hp to 0.And we fixed the button detection error by
adjusting micbias and vref.

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://msgid.link/r/20240515062517.23661-1-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-15 16:38:16 +01:00
Jack Yu 1f90047531
ASoC: rt5645: mic-in detection threshold modification
Modify mic-in detection threshold for better performance.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://msgid.link/r/b7614d9e38054aa6ad8efa620edb4162@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-14 12:08:52 +01:00
Peter Ujfalusi 04b5e2f9a7
ASoC: Intel: sof_sdw_rt_sdca_jack_common: Use name_prefix for -sdca detection
Match against the correct string to decide to add the '-sdca' postfix:
instead of codec_dai->name the correct one is component->name_prefix.

The component->name_prefix is added previously to the card->components as
hs.

Fixes: 9a9d31b149 ("ASoC: Intel: sof_sdw_rt_sdca_jack_common: remove -sdca for new codecs")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240513140730.27048-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-14 12:08:51 +01:00
Takashi Iwai d731b1ed15 ALSA: hda/realtek: Drop doubly quirk entry for 103c:8a2e
There are two quirk entries for SSID 103c:8a2e.  Drop the latter one
that isn't applied in anyway.

As both point to the same quirk action, there is no actual behavior
change.

Fixes: aa8e3ef4fe ("ALSA: hda/realtek: Add quirks for various HP ENVY models")
Link: https://lore.kernel.org/r/20240513064010.17546-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-13 12:54:46 +02:00
Kailang Yang 0df2b9ed48 ALSA: hda/realtek - fixed headset Mic not show
ALC256 run on SOF mode. Boot with plugged headset, the Headset Mic will be gone.
Plugged headset after boot. It had partial fail with Headset Mic detect.
Add spec->en_3kpull_low = false will solve all issues.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/c8b638590c5f45a6a5c6aeb20c31fd5b@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-13 11:42:05 +02:00
Takashi Iwai 9b4843e877 ASoC: SOF: amd: Fix build error with built-in config
Makefile in AMD ACP driver has a line substitution with "=" instead of
"+="; this overrides the preexisting item, hence it broke the build
after the recent change to replace *-objs with *-y.

This patch corrects the line.

Fixes: 1a74b21ce5 ("ASoC: SOF: amd: Add Probe functionality support for amd platforms.")
Fixes: 9c2f5b6eb8 ("ASoC: SOF: Use *-y instead of *-objs in Makefile")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/r/20240510170305.03b67d9f@canb.auug.org.au
Link: https://lore.kernel.org/r/20240510073656.23491-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-13 11:41:23 +02:00
Takashi Iwai 3a07362fab ASoC: Updates for v6.10
This is a very big update, in large part due to extensive work the Intel
 people have been doing in their drivers though it's also been busy
 elsewhere.  There's also a big overhaul of the DAPM documentation from
 Luca Ceresoli arising from the work he did putting together his recent
 ELC talk, and he also contributed a new tool for visualising the DAPM
 state.
 
  - A new tool dapm-graph for visualising the DAPM state.
  - Substantial fixes and clarifications for the DAPM documentation.
  - Very large updates throughout the Intel audio drivers.
  - Cleanups of accessors for driver data, module labelling, and for
    constification.
  - Modernsation and cleanup work in the Mediatek drivers.
  - Several fixes and features for the DaVinci I2S driver.
  - New drivers for several AMD and Intel platforms, Nuvoton NAU8325,
    Rockchip RK3308 and Texas Instruments PCM6240.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZB2aoACgkQJNaLcl1U
 h9D9YQf+K66pFTAMro/X4KWXfg3EeHnqgwbdb1pN/3zKqFgnxPfxJvhvpeM+bFSj
 yZGssZZzd9jMkm6rLOZRPCycqSZtimy9DjSnNyPhQgU0jA2ZS1NRMnpN77ubMkPW
 IBeWO8j5TBYaqttlmM0YBscErng9GsNqOD5a+HW9AJz5+TYbIIWt/2TVnyBRU0LV
 NGkKj1x7AvJY239kitJ4cfFGZpPaGU7bxUk1HCpSPWM+asIpNSxBhKD73zZlWHZ/
 kwJSbFslXdCm/TZZQtox/Z8GClxQ2dasWEfXWZK9kBJbHD3UH7VJ4Em50pBWnKis
 piarddgSvu5zhVmZkhJhkmOe8jiswA==
 =N5Dj
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v6.10

This is a very big update, in large part due to extensive work the Intel
people have been doing in their drivers though it's also been busy
elsewhere.  There's also a big overhaul of the DAPM documentation from
Luca Ceresoli arising from the work he did putting together his recent
ELC talk, and he also contributed a new tool for visualising the DAPM
state.

 - A new tool dapm-graph for visualising the DAPM state.
 - Substantial fixes and clarifications for the DAPM documentation.
 - Very large updates throughout the Intel audio drivers.
 - Cleanups of accessors for driver data, module labelling, and for
   constification.
 - Modernsation and cleanup work in the Mediatek drivers.
 - Several fixes and features for the DaVinci I2S driver.
 - New drivers for several AMD and Intel platforms, Nuvoton NAU8325,
   Rockchip RK3308 and Texas Instruments PCM6240.
2024-05-13 11:39:49 +02:00
Geoffrey D. Bennett 762e6af398 ALSA: scarlett2: Increase mixer range to +12dB
The values loaded into the mixer are 16-bit values, with 8192
representing 0dB, going up to a current maximum of 16345 (+6dB). All
supported interfaces have no problem going up to 32612 (+12dB), so
update SCARLETT2_MIXER_MAX_DB and scarlett2_mixer_values[] to allow
for this.

Tested with:
- Scarlett 2nd Gen 6i6, 18i8, 18i20
- Scarlett 3rd Gen 4i4, 8i6, 18i8, 18i20
- Scarlett 4th Gen Solo, 2i2, 4i4
- Clarett+ 2Pre, 4Pre, 8Pre
- Vocaster One and Two

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/Zj+gYT4F2XeKTD93@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-12 11:43:11 +02:00
Geoffrey D. Bennett d5ca9ad58e ALSA: scarlett2: Add S/PDIF source selection controls
Add S/PDIF Source/Digital I/O Mode selection controls for the Scarlett
3rd Gen 18i8/18i20 and Clarett 4Pre/8Pre interfaces. These models have
both coax S/PDIF and optical inputs, and the optical inputs are
switchable between being used as S/PDIF and ADAT inputs. The Scarlett
3rd Gen 18i20 also has a "Dual ADAT" mode for 8-channel audio at
88.2/96kHz.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/Zj8zCTjzPsTDENN+@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-12 11:41:07 +02:00
Takashi Iwai da0713fff5 ALSA: core: Remove superfluous CONFIG_PM
Since the recent code change, the conditional build with CONFIG_PM is
calling only snd_power_sync_ref().  As a dummy function is provided
for this function, we can get rid of CONFIG_PM gracefully now.

Link: https://lore.kernel.org/r/20240510125128.6058-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-10 15:30:45 +02:00
Takashi Iwai 73a6bbeca7 Merge branch 'for-linus' into for-next
Pull 6.9-rc devel branch for further updates.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-10 15:29:58 +02:00
Takashi Iwai 31469e8b28 ASoC: Fixes for v6.9
A couple more minor fixes for ASoC, one incremental fix for earlier
 issues and a minor formatting issue in the Makefile.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmY+HwAACgkQJNaLcl1U
 h9B89wf+LKAOBRH456iDCdAHIw24dlRf+0/J7nygCpwrV7VlCLjC5Of5+JgjlRCq
 J9duPWvyMfVCoC3kiNie0nAP2vcrTrO0TviX9lnq7BgDle8XYPGcXmhGWFASQfwi
 s8qjb0Ya53JkV1mbnsbqu1xBBnY932lvDJeQhlSuQ7uIZlfFGhYe8ULR2tGnk8Lx
 vrzIYOSj1YKanT94nOUpphnAwVip+R+uT7sunZusT4WEBIR+ya5HdfiS5yq8fzA3
 yBPdNfPrS8esw/8G/nPGeWSvskgc/2yBNLyk2K4dm9gWxhmrcTAYJbT8sVtnkIWV
 46KzGGWGleZ4Y/t98469PGzqpK7oTg==
 =YHkD
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.9-rc7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.9

A couple more minor fixes for ASoC, one incremental fix for earlier
issues and a minor formatting issue in the Makefile.
2024-05-10 15:28:54 +02:00
Takashi Iwai 87988a534d ALSA: Fix deadlocks with kctl removals at disconnection
In snd_card_disconnect(), we set card->shutdown flag at the beginning,
call callbacks and do sync for card->power_ref_sleep waiters at the
end.  The callback may delete a kctl element, and this can lead to a
deadlock when the device was in the suspended state.  Namely:

* A process waits for the power up at snd_power_ref_and_wait() in
  snd_ctl_info() or read/write() inside card->controls_rwsem.

* The system gets disconnected meanwhile, and the driver tries to
  delete a kctl via snd_ctl_remove*(); it tries to take
  card->controls_rwsem again, but this is already locked by the
  above.  Since the sleeper isn't woken up, this deadlocks.

An easy fix is to wake up sleepers before processing the driver
disconnect callbacks but right after setting the card->shutdown flag.
Then all sleepers will abort immediately, and the code flows again.

So, basically this patch moves the wait_event() call at the right
timing.  While we're at it, just to be sure, call wait_event_all()
instead of wait_event(), although we don't use exclusive events on
this queue for now.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=218816
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20240510101424.6279-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-10 14:49:32 +02:00
Takashi Iwai 8bd06b892a ASoC: Fixes for v6.9
A few final fixes for v6.9, none of them super major but all real.
 -----BEGIN PGP SIGNATURE-----
 
 iQEyBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmY+Cn8ACgkQJNaLcl1U
 h9B9OAf4kqVWm/KGem80omwe9ILJsw9dmm3JXBDtqal2N1d0mvzHm1gtIeQy064p
 n2VfvDNjEsGxWIfMTOQNPO0hYj87ewQESpxqh0KZeCVab57gWOH96JDU4KwDAPNl
 tM9u8LNJJqD5B278wACS5jHK2r/Kb9mUYrNvEusSCqZwwecF/OsY1mTu4MTeaELH
 MVbhW2wSVX8m9iUfBMFekegqQBTYpPH5k55PGUwkPTu+Bs1lUspvO7Xhs5P94R71
 9TWBJp3aMzz1a2HqXl/yQ+Pg1zykGq2dYprQVfSM/MZ5Tw4TlUw8RURl1rabmpry
 t7lOkM55QehAEAHJpKhYjvBOURHq
 =A+EA
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.9-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.9

A few final fixes for v6.9, none of them super major but all real.
2024-05-10 14:48:29 +02:00
Mark Brown c3c5ac4bd7
ASoC: Intel: updates for 6.10 - part7
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

This patchset should be the last batch for this kernel cycle!

Brent Lu continued his cleanups to refactor and use fewer machine
drivers on Chrmebooks.

Bard Liao updated the sof-sdw machine driver to deal with UCM support
of the RT712 configuration. Note that this sof-sdw driver will be
refactored in the next kernel cycle to allow AMD and others to reuse
common SoundWire parts that are not Intel-specific. Initial changes
are described here: https://github.com/thesofproject/linux/pull/4967
2024-05-10 12:30:12 +01:00
Kuninori Morimoto e54f128b0c
ASoC: audio-graph-card2: call of_node_get() before of_get_next_child()
commit c6f597bc59 ("ASoC: audio-graph-card2: remove unneeded
of_node_get()") removed of_node_get(), but it need to keep original
reference, so of_node_get() itself is needed.

Because of_get_next_child() will call of_node_put() inside, if the
reference count dropped to zero, then of_node_get() after that will be
use afer free. Need to call of_node_get() *before* that.

Fixes: c6f597bc59 ("ASoC: audio-graph-card2: remove unneeded of_node_get()")
Link: https://lore.kernel.org/r/f930862e-9d30-4ea3-b3e7-b4b4f411f6d1@moroto.mountain
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875xvmqzs8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 10:08:08 +01:00
Takashi Iwai acfff66ee4
ASoC: SOF: amd: Correct spaces in Makefile
A space should be put around "+=" in each line.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240510073739.23541-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 10:08:07 +01:00
Bard Liao c8bdf9e727
ASoC: rt715-sdca-sdw: Fix wrong complete waiting in rt715_dev_resume()
enumeration_complete will be completed when a peripheral is attached.
And initialization_complete will be completed when a peripheral is
initialized. rt715_dev_resume() should wait for initialization_complete
instead of enumeration_complete.

the issue exists since commit 20d17057f0 ("ASoC: rt715-sdca: Add RT715
sdca vendor-specific driver"), but the commit can only apply to
commit f892e66fca ("ASoC: rt-sdw*: add __func__ to all error logs").

Fixes: f892e66fca ("ASoC: rt-sdw*: add __func__ to all error logs")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163658.68062-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:54 +01:00
Bard Liao 4c11132a88
ASoC: Intel: sof_sdw_rt_amp: use dai parameter
get_codec_name_and_route() get dai name from the first codec dai in a dai
link. However, the dai may not always be the first codec dai. Use the
dai parameter to make sure get_codec_name_and_route() refers to the
correct dai.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:50 +01:00
Bard Liao 84e0a19adb
ASoC: Intel: sof_sdw: add dai parameter to rtd_init callback
A generic .rtd_init() callback could be used by different dais. It is
useful to pass dai parameter to the callback. The dai parameter will be
used in the follow up commit. No functional change here.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:50 +01:00
Bard Liao 2e3bc94796
ASoC: Intel: sof_sdw: use .controls/.widgets to add controls/widgets
sof_sdw_rtd_init() will add the controls and widgets if we set them in
the codec_info. Move the additions from .rtd_init callback to
sof_sdw_rtd_init().

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:49 +01:00
Bard Liao 70d470f05f
ASoC: Intel: sof_sdw: add controls and dapm widgets in codec_info
Currently, we add card controls and dapm widgets one by one in the
codec_info->dais->rtd_init callback. Duplicated controls and dapm
widgets will be added if there are more than one types of amps in the
dai link. Moving it to sof_sdw_rtd_init() and only add the
controls/widgets of the first codec dai can avoid the duplications.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:48 +01:00
Bard Liao 01c266af92
ASoC: Intel: sof_sdw: use generic name for controls/widgets
Some controls and widgets have exactly the same items. Rename them to be
generic. This is a preparation for further cleanup. No function change.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:47 +01:00
Bard Liao 1628e1c8f6
ASoC: Intel: sof_sdw_cs_amp: rename Speakers to Speaker
To be consistent to other amps that used in the machine driver.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:46 +01:00
Brent Lu 2bb765f053
ASoC: Intel: maxim-common: change max98373 data to static
Since there is dai link helper max_98373_dai_link, we could change all
functions and data of max98373 to static.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:45 +01:00
Brent Lu 15ce635f39
ASoC: Intel: sof_sdw: add max98373 dapm routes
Add dapm routes of max98373 to sdw driver and remove dependency of
maxim-common module.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:45 +01:00
Brent Lu 834c4f9567
ASoC: Intel: sof_rt5682: use max_98373_dai_link function
Use max_98373_dai_link() function to initialize dai link of maxim
max98373 speaker amplifier. No functional change.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:44 +01:00
Brent Lu d304ab5ecb
ASoC: Intel: sof_nau8825: use max_98373_dai_link function
Use max_98373_dai_link() function to initialize dai link of maxim
max98373 speaker amplifier. No functional change.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:43 +01:00
Brent Lu b533ed0d85
ASoC: Intel: sof_da7219: use max_98373_dai_link function
Use max_98373_dai_link() function to initialize dai link of maxim
max98373 speaker amplifier. No functional change.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:42 +01:00
Brent Lu 3895aa82b6
ASoC: Intel: maxim-common: add max_98373_dai_link function
Add a helper function, max_98373_dai_link(), for machine driver to
initialize dai link of maxim max98373 speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:41 +01:00
Bard Liao dd3bd9dc47
ASoC: Intel: soc-acpi-intel-lnl-match: add cs42l43 only support
cs42l43 is on link 0. No amp in this configuration, will use cs42l43
speaker or bridge.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:40 +01:00
Bard Liao f77ae7fcdc
ASoC: Intel: soc-acpi-intel-mtl-match: add cs42l43 only support
cs42l43 is on link 0. No amp in this configuration, will use cs42l43
speaker or bridge.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:40 +01:00
Brent Lu eed867325e
ASoC: Intel: realtek-common: remove 2-spk rt1015p config
The original code for rt1015p could support 1 or 2 rt1015p device
instances in ACPI. However, all designs implement only 1 instance in
ACPI table so we remove the code segment which is for 2 instances.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:39 +01:00
Brent Lu f1a5cb6a3b
ASoC: Intel: sof_rt5682: board id cleanup for mtl boards
Since mtl chromebook is using DMI quirk for board config, changing the
SSP port config of mtl_rt5682_def to RVP to simplify mtl board id and
enumeration table.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:38 +01:00
Brent Lu 426c43ae95
ASoC: Intel: sof-rt5682: remove DMI quirk for hatch
The quirk for cml chromebook hatch could be removed since we have
cml_rt5682_def board id now.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:37 +01:00
Bard Liao 9a9d31b149
ASoC: Intel: sof_sdw_rt_sdca_jack_common: remove -sdca for new codecs
Realtek new SoundWire codecs are all -sdca version. No need to add
-sdca to distinguish the non-sdca version. To be consistent with "spk:"
and "mic:" components string, remove "-sdca" suffix from "hs:"
components string.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-10 07:11:36 +01:00
Pierre-Louis Bossart e09f9f529c ALSA: hda: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-09 20:26:02 +02:00
Takashi Iwai 8ace17364c Merge branch 'topic/hda-nhlt' into for-next
Pull HD-audio NHLT fix

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-09 20:23:32 +02:00
Amadeusz Sławiński 51bebf3460 ALSA: hda: intel-dsp-config: Switch to ACPI NHLT
Now that NHLT support in ACPI framework was introduced, migrate
intel-dsp-config driver to new API.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084307.2718881-2-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-09 20:23:22 +02:00
Hsin-Te Yuan a85ed162f0
ASoC: mediatek: mt8192: fix register configuration for tdm
For DSP_A, data is a BCK cycle behind LRCK trigger edge. For DSP_B, this
delay doesn't exist. Fix the delay configuration to match the standard.

Fixes: 52fcd65414 ("ASoC: mediatek: mt8192: support tdm in platform driver")
Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20240509-8192-tdm-v1-1-530b54645763@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-09 17:43:54 +02:00
Takashi Iwai 914728fbf2 sound: oss: dmasound: Add missing module descriptions
Now that make W=1 starts complaining the lack of MODULE_DESCRIPTION(),
let's add the missing information.

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Closes: https://lore.kernel.org/r/ZjpQm-hxLQtpgkUx@smile.fi.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/20240508091128.25274-8-tiwai@suse.de
2024-05-09 10:13:07 +02:00