Commit Graph

10444 Commits

Author SHA1 Message Date
Takashi Iwai
1a529af6f8 ASoC: Updates for v6.12
This is a very large set of changes, almost all in drivers rather than
 the core.  Even with the addition of several quite large drivers the
 overall diffstat is negative thanks to the removal of some old Intel
 board support which has been obsoleted by the AVS driver, helped a bit
 by some factoring out into helpers (especially around the Soundwire
 machine drivers for x86).
 
 Highlights include:
 
  - More simplifications and cleanups throughout the subsystem from
    Morimoto-san.
  - Extensive cleanups and refactoring of the Soundwire drivers to make
    better use of helpers.
  - Removal of Intel machine support obsoleted by the AVS driver.
  - Lots of DT schema conversions.
  - Machine support for many AMD and Intel x86 platforms.
  - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320
    SoundWire and rev C, and Texas Instruments TAS2563
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmbko34ACgkQJNaLcl1U
 h9CQiwf9HseC6VkNQ0ISVZ2UsSf8K/HsHsdBGl7/CRr0SEvS3pszYMkKPbhRggsF
 aQ4nfitXeN7Vo6S0tNXx63wzjpMPkjrHdV0XY+WJxfuCaeb3DHFEJ4uvlgv53aoh
 M+wz1aldvKWjDPwhkzcJEaneQ36U7OlUSBsbFHR82dBDguEm+h29tAxTuLlwL5Zb
 M8NuSfbh0cfY9Kk1cPGsqaHD8wjUeg6/Q5qnbDg2kAm0aF1fAxfyFKRX6Z5s9ekd
 LeU3EIdRbI8UlHv7Afl0UKDYtYqL1ubwmjDb45HnsE4FmNEmDEbf8c1adRumZAjm
 Js9yzswiaaHAvotCaEstFC6HYUL+oQ==
 =jugn
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v6.12

This is a very large set of changes, almost all in drivers rather than
the core.  Even with the addition of several quite large drivers the
overall diffstat is negative thanks to the removal of some old Intel
board support which has been obsoleted by the AVS driver, helped a bit
by some factoring out into helpers (especially around the Soundwire
machine drivers for x86).

Highlights include:

 - More simplifications and cleanups throughout the subsystem from
   Morimoto-san.
 - Extensive cleanups and refactoring of the Soundwire drivers to make
   better use of helpers.
 - Removal of Intel machine support obsoleted by the AVS driver.
 - Lots of DT schema conversions.
 - Machine support for many AMD and Intel x86 platforms.
 - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320
   SoundWire and rev C, and Texas Instruments TAS2563
2024-09-14 09:09:59 +02:00
Joshua Grisham
5740434e1e ALSA: hda/realtek: Add support for Galaxy Book2 Pro (NP950XEE)
Adds support for GB2Pro Arc variant (NP950XEE) based on successful
test and information provided by Github user drewdrew0 [1].

[1]: https://github.com/thesofproject/linux/issues/4055#issuecomment-2346890020

Signed-off-by: Joshua Grisham <josh@joshuagrisham.com>
Link: https://patch.msgid.link/20240913080055.10807-1-josh@joshuagrisham.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-13 12:33:05 +02:00
Leo Tsai
0ccbc99e05 ALSA: hda: Add a new CM9825 standard driver
The CM9825 is a High Definition Audio Codec.
There are 2 independent stereo outputs, one of the stereo
outputs is cap-less with HP AMP, and the other is line out to
connect the active speaker. The inputs can be Line-in and MIC-in.

Signed-off-by: Leo Tsai <antivirus621@gmail.com>
Link: https://patch.msgid.link/20240910065542.6534-1-antivirus621@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-11 08:29:03 +02:00
Joshua Grisham
7e4d4b32ab ALSA: hda/realtek: Refactor and simplify Samsung Galaxy Book init
I have done a lot of analysis for these type of devices and collaborated
quite a bit with Nick Weihs (author of the first patch submitted for this
including adding samsung_helper.c). More information can be found in the
issue on Github [1] including additional rationale and testing.

The existing implementation includes a large number of equalizer coef
values that are not necessary to actually init and enable the speaker
amps, as well as create a somewhat worse sound profile. Users have
reported "muffled" or "muddy" sound; more information about this including
my analysis of the differences can be found in the linked Github issue.

This patch refactors the "v2" version of ALC298_FIXUP_SAMSUNG_AMP to a much
simpler implementation which removes the new samsung_helper.c, reuses more
of the existing patch_realtek.c, and sends significantly fewer unnecessary
coef values (including removing all of these EQ-specific coef values).

A pcm_playback_hook is used to dynamically enable and disable the speaker
amps only when there will be audio playback; this is to match the behavior
of how the driver for these devices is working in Windows, and is
suspected but not yet tested or confirmed to help with power consumption.

Support for models with 2 speaker amps vs 4 speaker amps is controlled by
a specific quirk name for both types. A new int num_speaker_amps has been
added to alc_spec so that the hooks can know how many speaker amps to
enable or disable. This design was chosen to limit the number of places
that subsystem ids will need to be maintained: like this, they can be
maintained only once in the quirk table and there will not be another
separate list of subsystem ids to maintain elsewhere in the code.

Also updated the quirk name from ALC298_FIXUP_SAMSUNG_AMP2 to
ALC298_FIXUP_SAMSUNG_AMP_V2_.. as this is not a quirk for "Amp #2" on
ALC298 but is instead a different version of how to handle it.

More devices have been added (see Github issue for testing confirmation),
as well as a small cleanup to existing names.

[1]: https://github.com/thesofproject/linux/issues/4055#issuecomment-2323411911

Signed-off-by: Joshua Grisham <josh@joshuagrisham.com>
Link: https://patch.msgid.link/20240909193000.838815-1-josh@joshuagrisham.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-10 10:28:55 +02:00
Edson Juliano Drosdeck
fc09ea51dd ALSA: hda/realtek: Enable mic on Vaio VJFH52
Vaio VJFH52 is equipped with ACL256, and needs a
fix to make the internal mic and headphone mic to work.
Also must to limits the internal microphone boost.

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Link: https://patch.msgid.link/20240909162751.4790-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-10 10:28:22 +02:00
Takashi Iwai
5516e3f476 Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-10 10:28:00 +02:00
Takashi Iwai
28fbfaf6bd ALSA: hda: Use non-SG allocation for the communication buffers
The azx_bus->dma_type is referred only for allocating the
communication buffers like CORB/RIRB, and the allocation size is
small.  Hence it doesn't have to be S/G buffer allocation, which is an
obvious overkill.  Use the standard SNDRV_DMA_TYPE_DEV_WC instead.

This was changed to SNDRV_DMA_TYPE_DEV_WC_SG in the commit
37137ec26c ("ALSA: hda: Once again fix regression of page
allocations with IOMMU") as a workaround for IOMMU-backed
allocations.  But this is no longer needed since the allocation with
SNDRV_DMA_TYPE_DEV_WC itself was fixed in the commit 9c27301342
("ALSA: memalloc: Use DMA API for x86 WC page allocations, too").

So this patch reverts the previous workaround in this piece of code.

Link: https://patch.msgid.link/20240909134744.25426-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-09 15:48:27 +02:00
He Lugang
0a131eb855 ALSA: rme9652: remove unused parameter in macro
Parameter xindex is not used in macro HDSPM_TCO_LTC_FRAMES and
HDSPM_TCO_VIDEO_INPUT_FORMAT,so just remove it to simplify the code.

Signed-off-by: He Lugang <helugang@uniontech.com>
Link: https://patch.msgid.link/F53E9F10DA24705D+20240907142854.17627-1-helugang@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-08 09:40:54 +02:00
Jerome Brunet
151d82f914 ALSA: hdspm: drop SNDRV_PCM_RATE_KNOT
The custom rate constraint list was necessary to support 128kHz.
This rate is now available through SNDRV_PCM_RATE_128000.

Use it and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-5-8371948d3921@baylibre.com
2024-09-06 09:23:55 +02:00
Jerome Brunet
3cc1e94dbc ALSA: hdsp: drop SNDRV_PCM_RATE_KNOT
The custom rate constraint list was necessary to support 128kHz.
This rate is now available through SNDRV_PCM_RATE_128000.

Use it and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-4-8371948d3921@baylibre.com
2024-09-06 09:23:55 +02:00
Jerome Brunet
1f40410623 ALSA: emu10k1: drop SNDRV_PCM_RATE_KNOT
The custom rate constraint lists were necessary to support 12kHz and 24kHz.
These rates are now available through SNDRV_PCM_RATE_12000 and
SNDRV_PCM_RATE_24000.

Use them and drop the custom rate constraint rules.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-3-8371948d3921@baylibre.com
2024-09-06 09:23:54 +02:00
Jerome Brunet
91dd20d855 ALSA: cmipci: drop SNDRV_PCM_RATE_KNOT
The custom rate constraint list was necessary to support 128kHz.
This rate is now available through SNDRV_PCM_RATE_128000.

Use it and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-2-8371948d3921@baylibre.com
2024-09-06 09:23:54 +02:00
Vasiliy Kovalev
a83e4c97dd ALSA: hda/realtek - Fix inactive headset mic jack for ASUS Vivobook 15 X1504VAP
When the headset is connected, there is no automatic switching of the
capture source - you can only manually select the headset microphone
in pavucontrol.

This patch fixes/activates the inactive microphone of the headset.

Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240905140211.937385-1-kovalev@altlinux.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-05 16:28:34 +02:00
Maximilien Perreault
47a9e8dbb8 ALSA: hda/realtek: Support mute LED on HP Laptop 14-dq2xxx
The mute LED on this HP laptop uses ALC236 and requires a quirk to function. This patch enables the existing quirk for the device.

Signed-off-by: Maximilien Perreault <maximilienperreault@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240904031013.21220-1-maximilienperreault@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-04 13:01:27 +02:00
Adam Queler
b474f60f6a ALSA: hda/realtek: Enable Mute Led for HP Victus 15-fb1xxx
The mute led is controlled by ALC245. This patch enables the already
existing quirk for this device.

Signed-off-by: Adam Queler <queler+k@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240903202419.31433-1-queler+k@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-04 13:00:51 +02:00
Takashi Iwai
2994586e2c Merge branch 'for-linus' into for-next
Pull 6.11 devel branch.  The conflicts in HD-audio Realtek codec driver
got resolved.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-03 18:07:46 +02:00
Marek Marczykowski-Górecki
562755501d ALSA: hda/realtek: extend quirks for Clevo V5[46]0
The mic in those laptops suffers too high gain resulting in mostly (fan
or else) noise being recorded. In addition to the existing fixup about
mic detection, apply also limiting its boost. While at it, extend the
quirk to also V5[46]0TNE models, which have the same issue.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240903124939.6213-1-marmarek@invisiblethingslab.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-03 18:04:26 +02:00
Colin Ian King
2657539a27 ALSA: ali5451: Remove trailing space after \n newline
There is a extraneous space after a newline in a dev_dbg message.
Remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20240901162125.144069-1-colin.i.king@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-02 08:03:10 +02:00
Kai Vehmanen
e9481d9b83 ALSA: hda: add HDMI codec ID for Intel PTL
Add HDMI codec ID for Intel Panther Lake platform.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240830072458.110831-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-30 09:35:16 +02:00
Terry Cheong
ef27e89e7f ALSA: hda/realtek: add patch for internal mic in Lenovo V145
Lenovo V145 is having phase inverted dmic but simply applying inverted
dmic fixups does not work. Chaining up verb fixes for ALC283 enables
inverting dmic fixup to work properly.

Signed-off-by: Terry Cheong <htcheong@chromium.org>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240830-lenovo-v145-fixes-v3-1-f7b7265068fa@chromium.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-30 09:24:46 +02:00
Simon Trimmer
2186fe21e5 ALSA: hda/realtek: Autodetect Cirrus Logic companion amplifier bindings
We do not need model specific HDA quirks to construct the component
binding details of Cirrus Logic companion amplifiers as this information
is already present in the ACPI.

Quirks are then only required for special workarounds not described in
the ACPI such as internal configuration of the Realtek codecs.

The codec pointer is now initialized in hda_component_manager_init() so
that we can detect when companion amplifiers are found in the ACPI but
the SSID invokes a quirk that also attempts to create the component
binding.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20240829161114.140938-1-simont@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-29 18:17:08 +02:00
Takashi Iwai
dfe5b1fe04 Merge branch 'for-linus' into for-next
Pull 6.11 devel branch for applying further updates for Cirrus codecs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-29 18:16:24 +02:00
Christoffer Sandberg
4178d78cd7 ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices
The Sirius notebooks have two sets of speakers 0x17 (sides) and
0x1d (top center). The side speakers are active by default but
the top speakers aren't.

This patch provides a pincfg quirk to activate the top speakers.

Signed-off-by: Christoffer Sandberg <cs@tuxedo.de>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20240827102540.9480-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-28 08:27:06 +02:00
Richard Fitzgerald
28b329f431 ALSA: hda: hda_component: Fix mutex crash if nothing ever binds
Move the initialization of parent->mutex into
hda_component_manager_init() so that it is always valid.

In hda_component_manager_bind() do not clear the parent information.
Only zero-fill the per-component data ready for it to be filled in
by the components as they bind.

Previously parent->mutex was being initialized only in
hda_component_manager_bind(). This meant that it was only
initialized if all components appeared and there was a bind callback.
If there wasn't a bind the mutex object was not valid when the
Realtek driver called any of the other functions.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 047b9cbbaa ("ALSA: hda: hda_component: Protect shared data with a mutex")
Link: https://patch.msgid.link/20240826094940.45563-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-26 12:03:57 +02:00
Hendrik Borghorst
2dc43c5e21 ALSA: hda/realtek: support HP Pavilion Aero 13-bg0xxx Mute LED
This patch adds the HP Pavilion Aero 13 (13-bg0xxx) (year 2024) to list of
quirks for keyboard LED mute indication.

The laptop has two LEDs (one for speaker and one for mic mute). The
pre-existing quirk ALC245_FIXUP_HP_X360_MUTE_LEDS chains both the quirk for
mic and speaker mute.

Tested on 6.11.0-rc4 with the aforementioned laptop.

Signed-off-by: Hendrik Borghorst <hendrikborghorst@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240825174351.5687-1-hendrikborghorst@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-26 10:30:53 +02:00
YOUNGJIN JOO
44ceabdec1 ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book3 Ultra
144d:c1cc requires the same workaround to enable the speaker amp
as other Samsung models with the ALC298 codec.

Signed-off-by: YOUNGJIN JOO <neoelec@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240825092515.28728-1-neoelec@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-25 16:18:31 +02:00
Kailang Yang
1fa7b099d6 ALSA: hda/realtek - FIxed ALC285 headphone no sound
Dell platform with ALC215 ALC285 ALC289 ALC225 ALC295 ALC299, plug
headphone or headset.
It had a chance to get no sound from headphone.
Replace depop procedure will solve this issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/d0de1b03fd174520945dde216d765223@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-22 12:21:50 +02:00
Kailang Yang
9b82ff1362 ALSA: hda/realtek - Fixed ALC256 headphone no sound
Dell platform, plug headphone or headset, it had a chance to get no
sound from headphone.
Replace depop procedure will solve this issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/bb8e2de30d294dc287944efa0667685a@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-22 09:30:47 +02:00
Simon Trimmer
91191a6e50 ALSA: hda: cs35l56: Don't use the device index as a calibration index
The HDA driver cannot assume that the order that the devices are
specified in the cirrus,dev-index matches the order of calibration
entries.

Only a calibration entry with a matching silicon id will be used.

Fixes: cfa43aaa79 ("ALSA: hda: cs35l56: Apply amp calibration from EFI data")
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20240821124711.44325-1-simont@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-21 15:23:33 +02:00
Mark Brown
46e2114111
ASoC: Intel: Remove skylake driver
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

A spiritual successor to haswell/baytrail removal series [1].

The avs-driver found in sound/soc/intel/avs is a direct replacement to
the existing skylake-driver. It covers all features supported by it and
more and aligns with the recommended flows and requirements based on
Windows driver equivalent.

The skylake-driver related UAPI has been removed with "ASoC: Drop
soc-topology ABI v4 support" [2].

For the official kernel tree the deprecation begun with v6.0. Most
skylake-drivers users moved to avs- or SOF-driver when AudioDSP
capabilities are available on the platform or to snd-hda-intel
(sound/pci/hda) when such capabilities are not.

For the supported trees the deprecation begun with v5.4 with v5.15 being
the first where the skylake-driver is disabled entirely.

All machine board drivers that consume this DSP driver have their
replacements present within sound/soc/intel/avs/boards/ directory.

[1]: https://lore.kernel.org/alsa-devel/20201006064907.16277-1-cezary.rojewski@intel.com/
[2]: https://lore.kernel.org/alsa-devel/20240403091629.647267-1-cezary.rojewski@intel.com/
2024-08-19 19:57:56 +01:00
Simon Trimmer
b29ba8f1f9 ALSA: hda/realtek: Convert existing CS35L56 products to use autodetect fixup function
The existing CS35L56 products can make use of the fixup function that
works out the component binding details so we can remove the fixed
configuration fixup functions.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20240819123736.111946-1-simont@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-19 16:05:18 +02:00
Takashi Iwai
41776e4008 Merge branch 'topic/seq-filter-cleanup' into for-next
Pull ALSA sequencer cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-19 10:48:46 +02:00
John Sweeney
56314c0d78 ALSA: hda/realtek: Enable mute/micmute LEDs on HP Laptop 14-ey0xxx
HP Pavilion Plus 14-ey0xxx needs existing quirk
ALC245_FIXUP_HP_X360_MUTE_LEDS to enable its mute/micmute LEDs.

Signed-off-by: John Sweeney <john.sweeney@runbox.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/E1sfhrD-0007TA-HC@rmmprod05.runbox
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-19 10:37:20 +02:00
Yuntao Liu
48f1434a46 ALSA: hda: cs35l41: fix module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from spi_device_id table.

Fixes: 7b2f3eb492 ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems")
Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
Link: https://patch.msgid.link/20240815091312.757139-1-liuyuntao12@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-18 09:47:30 +02:00
Yue Haibing
ff6615efa8 ALSA: trident: Remove unused declarations
Commit 8bb8b453cb ("[ALSA] trident - clean up obsolete synth codes")
remove synth functions but leave declarations.
And Commit e5723b41ab ("[ALSA] Remove sequencer instrument layer")
left snd_trident_attach_synthesizer().

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://patch.msgid.link/20240817093527.1120240-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-17 16:32:40 +02:00
Takashi Iwai
829e2a2312 ALSA: hda/tas2781: Use correct endian conversion
The data conversion is done rather by a wrong function.  We convert to
BE32, not from BE32.  Although the end result must be same, this was
complained by the compiler.

Fix the code again and align with another similar function
tas2563_apply_calib() that does already right.

Fixes: 3beddef84d ("ALSA: hda/tas2781: fix wrong calibrated data order")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408141630.DiDUB8Z4-lkp@intel.com/
Link: https://patch.msgid.link/20240814100500.1944-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-14 16:58:26 +02:00
Richard Fitzgerald
8475a1d9bb ALSA: hda: cs35l41: Remove redundant call to hda_cs_dsp_control_remove()
The driver doesn't create any ALSA controls for firmware controls, so it
shouldn't be calling hda_cs_dsp_control_remove().

commit 312c04cee4 ("ALSA: hda: cs35l41: Stop creating ALSA Controls for
firmware coefficients") removed the call to hda_cs_dsp_add_controls() but
didn't remove the call for destroying those controls.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 312c04cee4 ("ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients")
Link: https://patch.msgid.link/20240813113209.648-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-13 13:43:00 +02:00
Richard Fitzgerald
12d82c7b0a ALSA: hda: cs35l56: Remove redundant call to hda_cs_dsp_control_remove()
The driver doesn't create any ALSA controls for firmware controls, so it
shouldn't be calling hda_cs_dsp_control_remove().

commit 34e1b1bb73 ("ALSA: hda: cs35l56: Stop creating ALSA controls for
firmware coefficients") removed the call to hda_cs_dsp_add_controls() but
didn't remove the call for destroying those controls.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 34e1b1bb73 ("ALSA: hda: cs35l56: Stop creating ALSA controls for firmware coefficients")
Link: https://patch.msgid.link/20240813110750.2814-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-13 13:18:49 +02:00
Baojun Xu
3beddef84d ALSA: hda/tas2781: fix wrong calibrated data order
Wrong calibration data order cause sound too low in some device.
Fix wrong calibrated data order, add calibration data converssion
by get_unaligned_be32() after reading from UEFI.

Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20240813043749.108-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-13 08:58:42 +02:00
Jonathan LoBue
ebfb5a57ca ALSA: hda/realtek: tas2781: Fix ROG ALLY X audio
This patch enables the TI TAS2781 amplifier SoC for the ASUS ROG ALLY X.
This is a design change from the original ASUS ROG ALLY, creating the need
for this patch. All other Realtek Codec settings seem to be re-used from
the original ROG ALLY design (on the ROG ALLY X). This patch maintains the
previous settings for the Realtek codec portion, but enables the I2C
binding for the TI TAS2781 amplifier (instead of the Cirrus CS35L41 amp
used on the original ASUS ROG ALLY).

One other requirement must be met for audio to work on the ASUS ROG ALLY X.
A proper firmware file in the correct location with a proper symlink. We
had reached out to TI engineers and confirmed that the firmware found in
the Windows' driver package has a GPL license. Bazzite Github is hosting
this firmware file for now until proper linux-firmware upstreaming can
occur. https://github.com/ublue-os/bazzite

This firmware file should be placed in
/usr/lib/firmware/ti/tas2781/TAS2XXX1EB3.bin with a symlink to it from
/usr/lib/firmware/TAS2XXX1EB3.bin

Co-developed by: Kyle Gospodnetich <me@kylegospodneti.ch>
Signed-off-by: Kyle Gospodnetich <me@kylegospodneti.ch>
Co-developed by: Jan Drogehoff <sentrycraft123@gmail.com>
Signed-off-by: Jan Drogehoff <sentrycraft123@gmail.com>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Tested-by: Richard Alvarez <alvarez.richard@gmail.com>
Tested-by: Miles Montierth <cyber_dopamine@intheblackmedia.com>
Signed-off-by: Jonathan LoBue <jlobue10@gmail.com>
Link: https://patch.msgid.link/20240812045325.47736-1-jlobue10@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-12 09:25:40 +02:00
Takashi Iwai
ddf1a21290 Merge branch 'for-linus' into for-next
Pull 6.11 devel branch for further development

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-12 09:25:07 +02:00
Takashi Iwai
eb75d05d96 Merge branch 'topic/cirrus-hp-g12' into for-linus
Pull Cirrus HD-audio quirks for HP G12 laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-12 09:17:57 +02:00
Simon Trimmer
03c5c350e3 ALSA: hda/realtek: Add support for new HP G12 laptops
Some of these laptop models have quirk IDs that are identical but have
different amplifier parts fitted, this difference is described in the
ACPI information.

The solution introduced for this product family can derive the required
component binding information from ACPI instead of hardcoding it,
supports the new variants of the CS35L56 being used and has generalized
naming that makes it applicable to other ALC+amp combinations.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240802152215.20831-4-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-12 09:17:17 +02:00
Parsa Poorshikhian
ef9718b3d5 ALSA: hda/realtek: Fix noise from speakers on Lenovo IdeaPad 3 15IAU7
Fix noise from speakers connected to AUX port when no sound is playing.
The problem occurs because the `alc_shutup_pins` function includes
a 0x10ec0257 vendor ID, which causes noise on Lenovo IdeaPad 3 15IAU7 with
Realtek ALC257 codec when no sound is playing.
Removing this vendor ID from the function fixes the bug.

Fixes: 70794b9563 ("ALSA: hda/realtek: Add more codec ID to no shutup pins list")
Signed-off-by: Parsa Poorshikhian <parsa.poorsh@gmail.com>
Link: https://patch.msgid.link/20240810150939.330693-1-parsa.poorsh@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-11 10:17:44 +02:00
Takashi Iwai
4004f3029e Merge branch 'topic/control-lookup-rwlock' into for-next
Pull control lookup optimization changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-09 14:25:24 +02:00
Takashi Iwai
c01f381545 ALSA: hdsp: Break infinite MIDI input flush loop
The current MIDI input flush on HDSP and HDSPM drivers relies on the
hardware reporting the right value.  If the hardware doesn't give the
proper value but returns -1, it may be stuck at an infinite loop.

Add a counter and break if the loop is unexpectedly too long.

Link: https://patch.msgid.link/20240808091513.31380-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-08 11:16:06 +02:00
Takashi Iwai
7b986c7430 ALSA: asihpi: Fix potential OOB array access
ASIHPI driver stores some values in the static array upon a response
from the driver, and its index depends on the firmware.  We shouldn't
trust it blindly.

This patch adds a sanity check of the array index to fit in the array
size.

Link: https://patch.msgid.link/20240808091454.30846-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-08 11:15:55 +02:00
Takashi Iwai
7f5485c4d3 ALSA: asihpi: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one.  It gives better information and allows dynamically control of
debug prints.

The debug prints with a special macro snd_printddd() are replaced with
the conditional pr_debug().  Unfortunately dev_dbg() can't be applied
well due to the lack of the reference to the device pointer.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240807133452.9424-53-tiwai@suse.de
2024-08-08 07:49:47 +02:00
Takashi Iwai
c7e58049a2 ALSA: intel8x0: Drop unused snd_printd() calls
There are commented out debug prints, which are utterly superfluous.
Let's drop them.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240807133452.9424-47-tiwai@suse.de
2024-08-08 07:49:47 +02:00
Takashi Iwai
def358f9ba ALSA: trident: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one.  It gives better information and allows dynamically control of
debug prints.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240807133452.9424-43-tiwai@suse.de
2024-08-08 07:49:46 +02:00