Mark Brown
1ee4eb8024
ASoC: meson: g12a-tohdmitx: Fix event generation for S/PDIF mux
...
[ Upstream commit b036d8ef31 ]
When a control changes value the return value from _put() should be 1 so
we get events generated to userspace notifying applications of the change.
While the I2S mux gets this right the S/PDIF mux does not, fix the return
value.
Fixes: c8609f3870 ("ASoC: meson: add g12a tohdmitx control")
Signed-off-by: Mark Brown <broonie@kernel.org >
Link: https://lore.kernel.org/r/20240103-meson-enum-val-v1-4-424af7a8fb91@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-10 17:16:51 +01:00
Mark Brown
3d5a6ed6aa
ASoC: meson: g12a-toacodec: Fix event generation
...
[ Upstream commit 172c88244b ]
When a control changes value the return value from _put() should be 1 so
we get events generated to userspace notifying applications of the change.
We are checking if there has been a change and exiting early if not but we
are not providing the correct return value in the latter case, fix this.
Fixes: af2618a2ee ("ASoC: meson: g12a: add internal DAC glue driver")
Signed-off-by: Mark Brown <broonie@kernel.org >
Link: https://lore.kernel.org/r/20240103-meson-enum-val-v1-3-424af7a8fb91@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-10 17:16:51 +01:00
Mark Brown
28fdf45be3
ASoC: meson: g12a-tohdmitx: Validate written enum values
...
[ Upstream commit 1e00120680 ]
When writing to an enum we need to verify that the value written is valid
for the enumeration, the helper function snd_soc_item_enum_to_val() doesn't
do it since it needs to return an unsigned (and in any case we'd need to
check the return value).
Fixes: c8609f3870 ("ASoC: meson: add g12a tohdmitx control")
Signed-off-by: Mark Brown <broonie@kernel.org >
Link: https://lore.kernel.org/r/20240103-meson-enum-val-v1-2-424af7a8fb91@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-10 17:16:51 +01:00
Mark Brown
97ee19ff49
ASoC: meson: g12a-toacodec: Validate written enum values
...
[ Upstream commit 3150b70e94 ]
When writing to an enum we need to verify that the value written is valid
for the enumeration, the helper function snd_soc_item_enum_to_val() doesn't
do it since it needs to return an unsigned (and in any case we'd need to
check the return value).
Fixes: af2618a2ee ("ASoC: meson: g12a: add internal DAC glue driver")
Signed-off-by: Mark Brown <broonie@kernel.org >
Link: https://lore.kernel.org/r/20240103-meson-enum-val-v1-1-424af7a8fb91@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-10 17:16:51 +01:00
Eugen Hristev
ad0ea7a290
ASoC: mediatek: mt8186: fix AUD_PAD_TOP register and offset
...
[ Upstream commit 38744c3fa0 ]
AUD_PAD_TOP widget's correct register is AFE_AUD_PAD_TOP , and not zero.
Having a zero as register, it would mean that the `snd_soc_dapm_new_widgets`
would try to read the register at offset zero when trying to get the power
status of this widget, which is incorrect.
Fixes: b65c466220 ("ASoC: mediatek: mt8186: support adda in platform driver")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com >
Link: https://lore.kernel.org/r/20231229114342.195867-1-eugen.hristev@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-10 17:16:49 +01:00
Chancel Liu
4deed2c602
ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
...
[ Upstream commit f9d378fc68 ]
There is error message when defer probe happens:
fsl_rpmsg rpmsg_audio: Unbalanced pm_runtime_enable!
Fix the error handler with pm_runtime_enable.
Fixes: b73d9e6225 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg")
Signed-off-by: Chancel Liu <chancel.liu@nxp.com >
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com >
Link: https://lore.kernel.org/r/20231225080608.967953-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-10 17:16:49 +01:00
Siddhesh Dharme
0c01923217
ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP ProBook 440 G6
...
commit b6ce6e6c79 upstream.
LEDs in 'HP ProBook 440 G6' laptop are controlled by ALC236 codec.
Enable already existing quirk 'ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF'
to fix mute and mic-mute LEDs.
Signed-off-by: Siddhesh Dharme <siddheshdharme18@gmail.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20240104060736.5149-1-siddheshdharme18@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-10 17:16:45 +01:00
Andy Chi
855c75f350
ALSA: hda/realtek: fix mute/micmute LEDs for a HP ZBook
...
commit 18a434f32f upstream.
There is a HP ZBook which using ALC236 codec and need the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED
and micmute LED work.
[ confirmed that the new entries are for new models that have no
proper name, so the strings are left as "HP" which will be updated
eventually later -- tiwai ]
Signed-off-by: Andy Chi <andy.chi@canonical.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20240102024916.19093-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-10 17:16:45 +01:00
Aabish Malik
0fc0d040f4
ALSA: hda/realtek: enable SND_PCI_QUIRK for hp pavilion 14-ec1xxx series
...
commit 13a5b21197 upstream.
The HP Pavilion 14 ec1xxx series uses the HP mainboard 8A0F with the
ALC287 codec.
The mute led can be enabled using the already existing
ALC287_FIXUP_HP_GPIO_LED quirk.
Tested on an HP Pavilion ec1003AU
Signed-off-by: Aabish Malik <aabishmalik3337@gmail.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231229170352.742261-3-aabishmalik3337@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-10 17:16:45 +01:00
Gergo Koteles
0ccbd44d7d
ALSA: hda/tas2781: remove sound controls in unbind
...
commit 4e7914eb1d upstream.
Remove sound controls in hda_unbind to make
module loadable after module unload.
Add a driver specific struct (tas2781_hda) to store
the controls.
This patch depends on patch:
ALSA: hda/tas2781: do not use regcache
Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/362aa3e2f81b9259a3e5222f576bec5debfc5e88.1703204848.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-10 17:16:45 +01:00
Gergo Koteles
cb7a397dbb
ALSA: hda/tas2781: move set_drv_data outside tasdevice_init
...
commit e7aa105657 upstream.
allow driver specific driver data in tas2781-hda-i2c and tas2781-i2c
Fixes: ef3bcde75d ("ASoC: tas2781: Add tas2781 driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/1398bd8bf3e935b1595a99128320e4a1913e210a.1703204848.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-10 17:16:45 +01:00
Gergo Koteles
aee67bbe96
ALSA: hda/tas2781: do not use regcache
...
commit 6dad45f4d2 upstream.
There are two problems with using regcache in this module.
The amplifier has 3 addressing levels (BOOK, PAGE, REG). The firmware
contains blocks that must be written to BOOK 0x8C. The regcache doesn't
know anything about BOOK, so regcache_sync writes invalid values to the
actual BOOK.
The module handles 2 or more separate amplifiers. The amplifiers have
different register values, and the module uses only one regmap/regcache
for all the amplifiers. The regcache_sync only writes the last amplifier
used.
The module successfully restores all the written register values (RC
profile, program, configuration, calibration) without regcache.
Remove regcache functions and set regmap cache_type to REGCACHE_NONE.
Link: https://lore.kernel.org/r/21a183b5a08cb23b193af78d4b1114cc59419272.1701906455.git.soyer@irl.hu/
Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Acked-by: Mark Brown <broonie@kernel.org >
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/491aeed0e2eecc3b704ec856f815db21bad3ba0e.1703202126.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-10 17:16:45 +01:00
Gergo Koteles
9c75601926
ASoC: tas2781: check the validity of prm_no/cfg_no
...
commit f32c80d342 upstream.
Add additional checks for program/config numbers to avoid loading from
invalid addresses.
If prm_no/cfg_no is negative, skip uploading program/config.
The tas2781-hda driver caused a NULL pointer dereference after loading
module, and before first runtime_suspend.
the state was:
tas_priv->cur_conf = -1;
tas_priv->tasdevice[i].cur_conf = 0;
program = &(tas_fmw->programs[-1]);
BUG: kernel NULL pointer dereference, address: 0000000000000010
Call Trace:
<TASK>
? __die+0x23/0x70
? page_fault_oops+0x171/0x4e0
? vprintk_emit+0x175/0x2b0
? exc_page_fault+0x7f/0x180
? asm_exc_page_fault+0x26/0x30
? tasdevice_load_block_kernel+0x21/0x310 [snd_soc_tas2781_fmwlib]
tasdevice_select_tuningprm_cfg+0x268/0x3a0 [snd_soc_tas2781_fmwlib]
tasdevice_tuning_switch+0x69/0x710 [snd_soc_tas2781_fmwlib]
tas2781_hda_playback_hook+0xd4/0x110 [snd_hda_scodec_tas2781_i2c]
Fixes: 915f5eadeb ("ASoC: tas2781: firmware lib")
CC: <stable@vger.kernel.org >
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://msgid.link/r/523780155bfdca9bc0acd39efc79ed039454818d.1702591356.git.soyer@irl.hu
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-01 12:42:40 +00:00
Clément Villeret
23c2e6c093
ALSA: hda/realtek: Add quirk for ASUS ROG GV302XA
...
commit 02a460adfc upstream.
Asus ROG Flowx13 (GV302XA) seems require same patch as others asus products
Signed-off-by: Clément Villeret <clement.villeret@gmail.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/0a27bf4b-3056-49ac-9651-ebd7f3e36328@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-01 12:42:40 +00:00
Gergo Koteles
ff02d91704
ALSA: hda/tas2781: select program 0, conf 0 by default
...
commit ec1de5c214 upstream.
Currently, cur_prog/cur_conf remains at the default value (-1), while
program 0 has been loaded into the amplifiers.
In the playback hook, tasdevice_tuning_switch tries to restore the
cur_prog/cur_conf. In the runtime_resume/system_resume,
tasdevice_prmg_load tries to load the cur_prog as well.
Set cur_prog and cur_conf to 0 if available in the firmware.
Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/038add0bdca1f979cc7abcce8f24cbcd3544084b.1702596646.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-01 12:42:39 +00:00
Jeremie Knuesel
e8e214d0bf
ALSA: usb-audio: Increase delay in MOTU M quirk
...
commit 48d6b91798 upstream.
Increase the quirk delay from 2 seconds to 4 seconds. This reflects a
change in the Windows driver in which the delay was increased to about
3.7 seconds. The larger delay fixes an issue where the device fails to
work unless it was powered up early during boot.
Also clarify in the quirk comment that the quirk is only applied to
older devices (USB ID 07fd:0008).
Signed-off-by: Jeremie Knuesel <knuesel@gmail.com >
Suggested-by: Alexander Tsoy <alexander@tsoy.me >
Cc: <stable@vger.kernel.org >
Link: https://bugzilla.kernel.org/show_bug.cgi?id=211975
Link: https://lore.kernel.org/r/20231217112243.33409-1-knuesel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-01 12:42:38 +00:00
Shengjiu Wang
fb0f25c8fe
ASoC: fsl_sai: Fix channel swap issue on i.MX8MP
...
[ Upstream commit 8f0f016475 ]
When flag mclk_with_tere and mclk_direction_output enabled,
The SAI transmitter or receiver will be enabled in very early
stage, that if FSL_SAI_xMR is set by previous case,
for example previous case is one channel, current case is
two channels, then current case started with wrong xMR in
the beginning, then channel swap happen.
The patch is to clear xMR in hw_free() to avoid such
channel swap issue.
Fixes: 3e4a826129 ("ASoC: fsl_sai: MCLK bind with TX/RX enable bit")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://msgid.link/r/1702953057-4499-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-01 12:42:34 +00:00
Jerome Brunet
b965c22e1a
ASoC: hdmi-codec: fix missing report for jack initial status
...
[ Upstream commit 025222a9d6 ]
This fixes a problem introduced while fixing ELD reporting with no jack
set.
Most driver using the hdmi-codec will call the 'plugged_cb' callback
directly when registered to report the initial state of the HDMI connector.
With the commit mentionned, this occurs before jack is ready and the
initial report is lost for platforms actually providing a jack for HDMI.
Fix this by storing the hdmi connector status regardless of jack being set
or not and report the last status when jack gets set.
With this, the initial state is reported correctly even if it is
disconnected. This was not done initially and is also a fix.
Fixes: 15be353d55 ("ASoC: hdmi-codec: register hpd callback on component probe")
Reported-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com >
Closes: https://lore.kernel.org/alsa-devel/CADYyEwTNyY+fR9SgfDa-g6iiDwkU3MUdPVCYexs2_3wbcM8_vg@mail.gmail.com/
Cc: Hsin-Yi Wang <hsinyi@google.com >
Tested-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com >
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com >
Link: https://msgid.link/r/20231218145655.134929-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-01 12:42:34 +00:00
Gergo Koteles
56e2212344
ALSA: hda/tas2781: reset the amp before component_add
...
commit 315deab289 upstream.
Calling component_add starts loading the firmware, the callback function
writes the program to the amplifiers. If the module resets the
amplifiers after component_add, it happens that one of the amplifiers
does not work because the reset and program writing are interleaving.
Call tas2781_reset before component_add to ensure reliable
initialization.
Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/4d23bf58558e23ee8097de01f70f1eb8d9de2d15.1702511246.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-20 17:01:53 +01:00
Gergo Koteles
d94fad04a6
ALSA: hda/tas2781: call cleanup functions only once
...
commit 6c6fa26414 upstream.
If the module can load the RCA but not the firmware binary, it will call
the cleanup functions. Then unloading the module causes general
protection fault due to double free.
Do not call the cleanup functions in tasdev_fw_ready.
general protection fault, probably for non-canonical address
0x6f2b8a2bff4c8fec: 0000 [#1 ] PREEMPT SMP NOPTI
Call Trace:
<TASK>
? die_addr+0x36/0x90
? exc_general_protection+0x1c5/0x430
? asm_exc_general_protection+0x26/0x30
? tasdevice_config_info_remove+0x6d/0xd0 [snd_soc_tas2781_fmwlib]
tas2781_hda_unbind+0xaa/0x100 [snd_hda_scodec_tas2781_i2c]
component_unbind+0x2e/0x50
component_unbind_all+0x92/0xa0
component_del+0xa8/0x140
tas2781_hda_remove.isra.0+0x32/0x60 [snd_hda_scodec_tas2781_i2c]
i2c_device_remove+0x26/0xb0
Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/1a0885c424bb21172702d254655882b59ef6477a.1702510018.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-20 17:01:53 +01:00
Gergo Koteles
795e91c599
ALSA: hda/tas2781: handle missing EFI calibration data
...
commit 3307142271 upstream.
The code does not properly check whether the calibration variable is
available in the EFI. If it is not available, it causes a NULL pointer
dereference.
Check the return value of the first get_variable call also.
BUG: kernel NULL pointer dereference, address: 0000000000000000
Call Trace:
<TASK>
? __die+0x23/0x70
? page_fault_oops+0x171/0x4e0
? srso_alias_return_thunk+0x5/0x7f
? schedule+0x5e/0xd0
? exc_page_fault+0x7f/0x180
? asm_exc_page_fault+0x26/0x30
? crc32_body+0x2c/0x120
? tas2781_save_calibration+0xe4/0x220 [snd_hda_scodec_tas2781_i2c]
tasdev_fw_ready+0x1af/0x280 [snd_hda_scodec_tas2781_i2c]
request_firmware_work_func+0x59/0xa0
Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/f1f6583bda918f78556f67d522ca7b3b91cebbd5.1702251102.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-20 17:01:53 +01:00
Gergo Koteles
7fc8bfdb70
ALSA: hda/tas2781: leave hda_component in usable state
...
commit 75a25d31b8 upstream.
Unloading then loading the module causes a NULL ponter dereference.
The hda_unbind zeroes the hda_component, later the hda_bind tries
to dereference the codec field.
The hda_component is only initialized once by tas2781_generic_fixup.
Set only previously modified fields to NULL.
BUG: kernel NULL pointer dereference, address: 0000000000000322
Call Trace:
<TASK>
? __die+0x23/0x70
? page_fault_oops+0x171/0x4e0
? exc_page_fault+0x7f/0x180
? asm_exc_page_fault+0x26/0x30
? tas2781_hda_bind+0x59/0x140 [snd_hda_scodec_tas2781_i2c]
component_bind_all+0xf3/0x240
try_to_bring_up_aggregate_device+0x1c3/0x270
__component_add+0xbc/0x1a0
tas2781_hda_i2c_probe+0x289/0x3a0 [snd_hda_scodec_tas2781_i2c]
i2c_device_probe+0x136/0x2e0
Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Cc: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu >
Link: https://lore.kernel.org/r/8b8ed2bd5f75fbb32e354a3226c2f966fa85b46b.1702156522.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-20 17:01:52 +01:00
Hartmut Knaack
ffd1fe12d4
ALSA: hda/realtek: Apply mute LED quirk for HP15-db
...
commit 9b726bf6ae upstream.
The HP laptop 15-db0403ng uses the ALC236 codec and controls the mute
LED using COEF 0x07 index 1.
Sound card subsystem: Hewlett-Packard Company Device [103c:84ae]
Use the existing quirk for this model.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/e61815d0-f1c7-b164-e49d-6ca84771476a@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-20 17:01:52 +01:00
Kai Vehmanen
7ec57c10b0
ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants
...
commit 924f5ca297 upstream.
On ASUSTeK Z170M PLUS and Z170 PRO GAMING systems, the display codec
pins are not registered properly without the force-connect quirk. The
codec will report only one pin as having external connectivity, but i915
finds all three connectors on the system, so the two drivers are not
in sync.
Issue found with DRM igt-gpu-tools test kms_hdmi_inject@inject-audio.
Link: https://gitlab.freedesktop.org/drm/intel/-/issues/9801
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Jani Saarinen <jani.saarinen@intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231208132127.2438067-3-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-20 17:01:52 +01:00
Kai Vehmanen
c52ebaf742
ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB
...
commit 3b1ff57e24 upstream.
Add one more older NUC model that requires quirk to force all pins to be
connected. The display codec pins are not registered properly without
the force-connect quirk. The codec will report only one pin as having
external connectivity, but i915 finds all three connectors on the
system, so the two drivers are not in sync.
Issue found with DRM igt-gpu-tools test kms_hdmi_inject@inject-audio.
Link: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/3
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Jani Saarinen <jani.saarinen@intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231208132127.2438067-2-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-20 17:01:52 +01:00
Srinivas Kandagatla
ba6e4b9971
ASoC: qcom: sc8280xp: Limit speaker digital volumes
...
commit 716d4e5373 upstream.
Limit the speaker digital gains to 0dB so that the users will not damage them.
Currently there is a limit in UCM, but this does not stop the user form
changing the digital gains from command line. So limit this in driver
which makes the speakers more safer without active speaker protection in
place.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Reviewed-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20231204124736.132185-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
[ johan: backport to 6.6; rename snd_soc_rtd_to_cpu() ]
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:35 +01:00
Srinivas Kandagatla
395e52b7a1
ASoC: ops: add correct range check for limiting volume
...
commit fb9ad24485 upstream.
Volume can have ranges that start with negative values, ex: -84dB to
+40dB. Apply correct range check in snd_soc_limit_volume before setting
the platform_max. Without this patch, for example setting a 0dB limit on
a volume range of -84dB to +40dB would fail.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Tested-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20231204124736.132185-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:31 +01:00
Takashi Iwai
73249ef76c
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7
...
commit 634e5e1e06 upstream.
Lenovo Yoga Pro 7 14APH8 (PCI SSID 17aa:3882) seems requiring the
similar workaround like Yoga 9 model for the bass speaker.
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/CAGGk=CRRQ1L9p771HsXTN_ebZP41Qj+3gw35Gezurn+nokRewg@mail.gmail.com
Link: https://lore.kernel.org/r/20231207182035.30248-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:21 +01:00
Mario Limonciello
5f1c1e8de5
ALSA: hda/realtek: Add Framework laptop 16 to quirks
...
commit 8804fa04a4 upstream.
The Framework 16" laptop has the same controller as other Framework
models. Apply the presence detection quirk.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231206193927.2996-1-mario.limonciello@amd.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:21 +01:00
Tim Bosse
70a6885542
ALSA: hda/realtek: add new Framework laptop to quirks
...
commit 33038efb64 upstream.
The Framework Laptop 13 (AMD Ryzen 7040Series) has an ALC295 with
a disconnected or faulty headset mic presence detect similar to the
previous models. It works with the same quirk chain as
309d7363ca . This model has a VID:PID
of f111:0006.
Signed-off-by: Tim Bosse <flinn@timbos.se >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231206142629.388615-1-flinn@timbos.se
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:21 +01:00
Bin Li
65a7a5b2d5
ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
...
commit 6f7e4664e5 upstream.
Lenovo M90 Gen5 is equipped with ALC897, and it needs
ALC897_FIXUP_HEADSET_MIC_PIN quirk to make its headset mic work.
Signed-off-by: Bin Li <bin.li@canonical.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231204100450.642783-1-bin.li@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:21 +01:00
Aleksandrs Vinarskis
b3f1d92304
ALSA: hda/realtek: fix speakers on XPS 9530 (2023)
...
commit cd14dedf15 upstream.
XPS 9530 has 2 tweeters and 2 subwoofers powered by CS35L41 amplifier, SPI
connected. For subwoofers to work, it requires both to enable amplifier
support, and to enable output to subwoofers via 0x17 quirk (similalry to
XPS 9510/9520).
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231203233006.100558-1-alex.vinarskis@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:20 +01:00
Pascal Noël
6e25980d04
ALSA: hda/realtek: Apply quirk for ASUS UM3504DA
...
commit c5c325bb58 upstream.
The ASUS UM3504DA uses a Realtek HDA codec and two CS35L41 amplifiers via I2C.
Apply existing quirk to model.
Signed-off-by: Pascal Noël <pascal@pascalcompiles.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231202013744.12369-1-pascal@pascalcompiles.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:20 +01:00
Jason Zhang
8e6ac8c6ba
ALSA: pcm: fix out-of-bounds in snd_pcm_state_names
...
commit 2b3a7a302c upstream.
The pcm state can be SNDRV_PCM_STATE_DISCONNECTED at disconnect
callback, and there is not an entry of SNDRV_PCM_STATE_DISCONNECTED
in snd_pcm_state_names.
This patch adds the missing entry to resolve this issue.
cat /proc/asound/card2/pcm0p/sub0/status
That results in stack traces like the following:
[ 99.702732][ T5171] Unexpected kernel BRK exception at EL1
[ 99.702774][ T5171] Internal error: BRK handler: f2005512 [#1 ] PREEMPT SMP
[ 99.703858][ T5171] Modules linked in: bcmdhd(E) (...)
[ 99.747425][ T5171] CPU: 3 PID: 5171 Comm: cat Tainted: G C OE 5.10.189-android13-4-00003-g4a17384380d8-ab11086999 #1
[ 99.748447][ T5171] Hardware name: Rockchip RK3588 CVTE V10 Board (DT)
[ 99.749024][ T5171] pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[ 99.749616][ T5171] pc : snd_pcm_substream_proc_status_read+0x264/0x2bc
[ 99.750204][ T5171] lr : snd_pcm_substream_proc_status_read+0xa4/0x2bc
[ 99.750778][ T5171] sp : ffffffc0175abae0
[ 99.751132][ T5171] x29: ffffffc0175abb80 x28: ffffffc009a2c498
[ 99.751665][ T5171] x27: 0000000000000001 x26: ffffff810cbae6e8
[ 99.752199][ T5171] x25: 0000000000400cc0 x24: ffffffc0175abc60
[ 99.752729][ T5171] x23: 0000000000000000 x22: ffffff802f558400
[ 99.753263][ T5171] x21: ffffff81d8d8ff00 x20: ffffff81020cdc00
[ 99.753795][ T5171] x19: ffffff802d110000 x18: ffffffc014fbd058
[ 99.754326][ T5171] x17: 0000000000000000 x16: 0000000000000000
[ 99.754861][ T5171] x15: 000000000000c276 x14: ffffffff9a976fda
[ 99.755392][ T5171] x13: 0000000065689089 x12: 000000000000d72e
[ 99.755923][ T5171] x11: ffffff802d110000 x10: 00000000000000e0
[ 99.756457][ T5171] x9 : 9c431600c8385d00 x8 : 0000000000000008
[ 99.756990][ T5171] x7 : 0000000000000000 x6 : 000000000000003f
[ 99.757522][ T5171] x5 : 0000000000000040 x4 : ffffffc0175abb70
[ 99.758056][ T5171] x3 : 0000000000000001 x2 : 0000000000000001
[ 99.758588][ T5171] x1 : 0000000000000000 x0 : 0000000000000000
[ 99.759123][ T5171] Call trace:
[ 99.759404][ T5171] snd_pcm_substream_proc_status_read+0x264/0x2bc
[ 99.759958][ T5171] snd_info_seq_show+0x54/0xa4
[ 99.760370][ T5171] seq_read_iter+0x19c/0x7d4
[ 99.760770][ T5171] seq_read+0xf0/0x128
[ 99.761117][ T5171] proc_reg_read+0x100/0x1f8
[ 99.761515][ T5171] vfs_read+0xf4/0x354
[ 99.761869][ T5171] ksys_read+0x7c/0x148
[ 99.762226][ T5171] __arm64_sys_read+0x20/0x30
[ 99.762625][ T5171] el0_svc_common+0xd0/0x1e4
[ 99.763023][ T5171] el0_svc+0x28/0x98
[ 99.763358][ T5171] el0_sync_handler+0x8c/0xf0
[ 99.763759][ T5171] el0_sync+0x1b8/0x1c0
[ 99.764118][ T5171] Code: d65f03c0 b9406102 17ffffae 94191565 (d42aa240)
[ 99.764715][ T5171] ---[ end trace 1eeffa3e17c58e10 ]---
[ 99.780720][ T5171] Kernel panic - not syncing: BRK handler: Fatal exception
Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231206013139.20506-1-jason.zhang@rock-chips.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:20 +01:00
Sarah Grant
5ae225bbf3
ALSA: usb-audio: Add Pioneer DJM-450 mixer controls
...
commit bbb8e71965 upstream.
These values mirror those of the Pioneer DJM-250MK2 as the channel layout
appears identical based on my observations. This duplication could be removed in
later contributions if desired.
Signed-off-by: Sarah Grant <s@srd.tw >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231201181654.5058-1-s@srd.tw
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:20 +01:00
Malcolm Hart
127fcf7966
ASoC: amd: yc: Fix non-functional mic on ASUS E1504FA
...
commit b24e3590c9 upstream.
This patch adds ASUSTeK COMPUTER INC "E1504FA" to the quirks file acp6x-mach.c
to enable microphone array on ASUS Vivobook GO 15.
I have this laptop and can confirm that the patch succeeds in enabling the
microphone array.
Signed-off-by: Malcolm Hart <malcolm@5harts.com >
Cc: stable@vger.kernel.org
Rule: add
Link: https://lore.kernel.org/stable/875y1nt1bx.fsf%405harts.com
Link: https://lore.kernel.org/r/871qcbszh0.fsf@5harts.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-13 18:45:19 +01:00
Dinghao Liu
b8668fe7a5
ASoC: wm_adsp: fix memleak in wm_adsp_buffer_populate
...
[ Upstream commit 29046a78a3 ]
When wm_adsp_buffer_read() fails, we should free buf->regions.
Otherwise, the callers of wm_adsp_buffer_populate() will
directly free buf on failure, which makes buf->regions a leaked
memory.
Fixes: a792af69b0 ("ASoC: wm_adsp: Refactor compress stream initialisation")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn >
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20231204074158.12026-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-12-13 18:45:16 +01:00
Neil Armstrong
8d73500fcf
ASoC: codecs: lpass-tx-macro: set active_decimator correct default value
...
[ Upstream commit a2f35ed1d2 ]
The -1 value for active_decimator[dai_id] is considered as "not set",
but at probe the table is initialized a 0, this prevents enabling the
DEC0 Mixer since it will be considered as already set.
Initialize the table entries as -1 to fix tx_macro_tx_mixer_put().
Fixes: 1c6a7f5250 ("ASoC: codecs: tx-macro: fix active_decimator array")
Fixes: c1057a08af ("ASoC: codecs: tx-macro: fix kcontrol put")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20231116-topic-sm8x50-upstream-tx-macro-fix-active-decimator-set-v1-1-6edf402f4b6f@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-12-13 18:45:15 +01:00
Shengjiu Wang
e1e4a5cbb0
ASoC: fsl_sai: Fix no frame sync clock issue on i.MX8MP
...
[ Upstream commit 14e8442e07 ]
On i.MX8MP, when the TERE and FSD_MSTR enabled before configuring
the word width, there will be no frame sync clock issue, because
old word width impact the generation of frame sync.
TERE enabled earlier only for i.MX8MP case for the hardware limitation,
So need to disable FSD_MSTR before configuring word width, then enable
FSD_MSTR bit for this specific case.
Fixes: 3e4a826129 ("ASoC: fsl_sai: MCLK bind with TX/RX enable bit")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com >
Link: https://lore.kernel.org/r/1700474735-3863-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-12-13 18:45:12 +01:00
Kailang Yang
2d5eb4e5af
ALSA: hda/realtek: Add supported ALC257 for ChromeOS
...
commit cae2bdb579 upstream.
ChromeOS want to support ALC257.
Add codec ID to some relation function.
Signed-off-by: Kailang Yang <kailang@realtek.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/99a88a7dbdb045fd9d934abeb6cec15f@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-08 08:52:16 +01:00
Kailang Yang
f18a35aaed
ALSA: hda/realtek: Headset Mic VREF to 100%
...
commit baaacbff64 upstream.
This platform need to set Mic VREF to 100%.
Signed-off-by: Kailang Yang <kailang@realtek.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/0916af40f08a4348a3298a9a59e6967e@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-08 08:52:16 +01:00
Takashi Iwai
95c06d0d9e
ALSA: hda: Disable power-save on KONTRON SinglePC
...
commit a337c35571 upstream.
It's been reported that the runtime PM on KONTRON SinglePC (PCI SSID
1734:1232) caused a stall of playback after a bunch of invocations.
(FWIW, this looks like an timing issue, and the stall happens rather
on the controller side.)
As a workaround, disable the default power-save on this platform.
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231130151321.9813-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-08 08:52:16 +01:00
Stefan Binding
432aa136c8
ALSA: hda/realtek: Add quirks for ASUS 2024 Zenbooks
...
[ Upstream commit 61cbc08fdb ]
These ASUS Zenbook laptops use Realtek HDA codec combined with
2xCS35L41 Amplifiers using SPI or I2C with External Boost or
Internal Boost.
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231115162116.494968-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-12-03 07:33:09 +01:00
Vitalii Torshyn
97189072f1
ALSA: hda: ASUS UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus
...
[ Upstream commit 6ae90e906a ]
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 >
Stable-dep-of: 61cbc08fdb ("ALSA: hda/realtek: Add quirks for ASUS 2024 Zenbooks")
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-12-03 07:33:09 +01:00
Stefan Binding
6f47efb241
ALSA: hda/realtek: Add quirks for HP Laptops
...
commit 5d639b6097 upstream.
These HP laptops use Realtek HDA codec combined with 2 or 4 CS35L41
Amplifiers using SPI with Internal Boost.
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231115162116.494968-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-28 17:20:10 +00:00
Matus Malych
661cd04d59
ALSA: hda/realtek: Enable Mute LED on HP 255 G10
...
commit b944aa9d86 upstream.
HP 255 G10 has a mute LED that can be made to work using quirk
ALC236_FIXUP_HP_MUTE_LED_COEFBIT2.
Enable already existing quirk - at correct line to keep order
Signed-off-by: Matus Malych <matus@malych.org >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20231114133524.11340-1-matus@malych.org
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-28 17:20:10 +00:00
Chandradeep Dey
d4176c66f7
ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
...
commit 713f040cd2 upstream.
Apply the already existing quirk chain ALC294_FIXUP_ASUS_SPK to enable
the internal speaker of ASUS K6500ZC.
Signed-off-by: Chandradeep Dey <codesigning@chandradeepdey.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/NizcVHQ--3-9@chandradeepdey.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-28 17:20:10 +00:00
Kailang Yang
c226916138
ALSA: hda/realtek - Add Dell ALC295 to pin fall back table
...
commit 4b21a669ca upstream.
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: fbc571290d ("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 >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-28 17:20:10 +00:00
Eymen Yigit
a2650aec82
ALSA: hda/realtek: Enable Mute LED on HP 255 G8
...
commit 8384c0baf2 upstream.
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 >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-28 17:20:10 +00:00
Takashi Iwai
2dac108b9d
ALSA: info: Fix potential deadlock at disconnection
...
commit c7a6065195 upstream.
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 >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-28 17:20:10 +00:00