summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda/hdmi: Fix the converter allocation for the silent streamJaroslav Kysela2022-09-201-8/+12
| | | | | | | | | | | | | Track the converters handling the silent stream using a new variable to avoid mixing of the open/close and silent stream use. This change ensures the proper allocation of the converters. Fixes: 5f80d6bd2b01 ("ALSA: hda/hdmi: Fix the converter reuse for the silent stream") Signed-off-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220919135444.3554982-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2022-09-202-7/+49
|\
| * ALSA: hda/realtek: Add a quirk for HP OMEN 16 (8902) mute LEDDaniel Houldsworth2022-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Similair to the HP OMEN 15, the HP OMEN 16 also needs ALC285_FIXUP_HP_MUTE_LED for the mute LED to work. [ Rearranged the entry in PCI SSID order by tiwai ] Signed-off-by: Daniel Houldsworth <dhould3@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220918171300.24693-1-dhould3@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/hdmi: Fix the converter reuse for the silent streamJaroslav Kysela2022-09-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user space pcm stream uses the silent stream converter, it is no longer allocated for the silent stream. Clear the appropriate flag in the hdmi_pcm_open() function. The silent stream setup may be applied in hdmi_pcm_close() (and the error path - open fcn) again. If the flag is not cleared, the reuse conditions for the silent stream converter in hdmi_choose_cvt() may improperly share this converter. Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20220913070216.3233974-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Add quirk for ASUS GA503R laptopLuke D. Jones2022-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The ASUS G15 2022 (GA503R) series laptop has the same node-to-DAC pairs as early models and the G14, this includes bass speakers which are by default mapped incorrectly to the 0x06 node. Add a quirk to use the same DAC pairs as the G14. Signed-off-by: Luke D. Jones <luke@ljones.dev> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220915080921.35563-4-luke@ljones.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Add pincfg for ASUS G533Z HP jackLuke D. Jones2022-09-151-0/+11
| | | | | | | | | | | | | | | | | | | | | | Fixes up the pincfg for ASUS ROG Strix G15 (G533Z) headphone combo jack [ Fixed the position in the quirk table by tiwai ] Signed-off-by: Luke D. Jones <luke@ljones.dev> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220915080921.35563-3-luke@ljones.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Add pincfg for ASUS G513 HP jackLuke D. Jones2022-09-151-0/+11
| | | | | | | | | | | | | | | | | | | | | | Fixes up the pincfg for ASUS ROG Strix G513 headphone and mic combo jack [ Fixed the position in the quirk table by tiwai ] Signed-off-by: Luke D. Jones <luke@ljones.dev> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220915080921.35563-2-luke@ljones.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Re-arrange quirk table entriesTakashi Iwai2022-09-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | A few entries have been mistakenly inserted in wrong positions without considering the SSID ordering. Place them at right positions. Fixes: b7557267c233 ("ALSA: hda/realtek: Add quirk for ASUS GA402") Fixes: 94db9cc8f8fa ("ALSA: hda/realtek: Add quirk for ASUS GU603") Fixes: 739d0959fbed ("ALSA: hda: Add quirk for ASUS Flow x13") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220915154724.31634-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptopCallum Osmotherly2022-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Just as with the 5570 (and the other Dell laptops), this enables the two subwoofer speakers on the Dell Precision 5530 together with the main ones, significantly increasing the audio quality. I've tested this myself on a 5530 and can confirm it's working as expected. Signed-off-by: Callum Osmotherly <callum.osmotherly@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/YyMjQO3mhyXlMbCf@piranha Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5570 laptopCallum Osmotherly2022-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Dell Precision 5570 uses the same 4-speakers-on-ALC289 just like the previous Precision 5560. I replicated that patch onto this one, and can confirm that the audio is much better (the woofers are now working); I've tested it on my Dell Precision 5570. Signed-off-by: Callum Osmotherly <callum.osmotherly@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/YyGbWM5wEoFMbW2v@piranha Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda: Fix Nvidia dp infoframeMohan Kumar2022-09-131-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | Nvidia HDA HW expects infoframe data bytes order same for both HDMI and DP i.e infoframe data starts from 5th bytes offset. As dp infoframe structure has 4th byte as valid infoframe data, use hdmi infoframe structure for nvidia dp infoframe to match HW behvaior. Signed-off-by: Mohan Kumar <mkumard@nvidia.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220913065818.13015-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ppc: Switch to use for_each_child_of_node() macroYang Yingliang2022-09-171-4/+2
| | | | | | | | | | | | | | | | | | Use for_each_child_of_node() macro instead of open coding it. No functional change. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220916141108.683080-1-yangyingliang@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Fix last interface check for registrationTakashi Iwai2022-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent fix in commit 6392dcd1d0c7 ("ALSA: usb-audio: Register card at the last interface") tried to delay the card registration until the last found interface is probed. It assumed that the probe callback gets called for those later interfaces, but it's not always true; as the driver loops over the descriptor and probes the matching ones, it's not separately called via multiple probe calls. This results in the missing card registration, i.e. no sound device. For addressing this problem, replace the check whether the last interface is processed with usb_interface_claimed() instead of the comparison with the probe interface number. Fixes: 6392dcd1d0c7 ("ALSA: usb-audio: Register card at the last interface") Link: https://lore.kernel.org/r/20220915085947.7922-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ASoC: Intel: fix unused-variable warning in probe_codecGaosheng Cui2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n, gcc warns about an unused variable: sound/soc/intel/skylake/skl.c: In function ‘probe_codec’: sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable] struct skl_dev *skl = bus_to_skl(bus); ^~~ cc1: all warnings being treated as errors Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation") Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220822035133.2147381-1-cuigaosheng1@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/hdmi: change type for the 'assigned' variableJaroslav Kysela2022-09-131-7/+7
| | | | | | | | | | | | | | | | | | | | This change converts the assigned value from int type to the bool type to retain consistency with other structure members like 'setup', 'non_pcm' etc. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20220913070307.3234038-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2022-09-1319-134/+192
|\|
| * ALSA: hda/realtek: Add quirk for Huawei WRT-WX9huangwenhui2022-09-131-0/+1
| | | | | | | | | | | | | | | | | | Fixes headphone and headset microphone detection on Huawei WRT-WX9. Signed-off-by: huangwenhui <huangwenhuia@uniontech.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220913054622.15979-1-huangwenhuia@uniontech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/tegra: set depop delay for tegraMohan Kumar2022-09-131-0/+1
| | | | | | | | | | | | | | | | | | | | Reduce the suspend time by setting depop delay to 10ms for tegra. Signed-off-by: Mohan Kumar <mkumard@nvidia.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220913053641.23299-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda: add Intel 5 Series / 3400 PCI DIDKai Vehmanen2022-09-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Handle 0x3b57 variant with same AZX_DCAPS_INTEL_PCH_NOPM capabilities as 0x3b56. In practise this allow use of HDMI/DP display audio via i915. BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/2751 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220912183716.2126312-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda: Fix hang at HD-audio codec unbinding due to refcount saturationTakashi Iwai2022-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fixed the potential deadlock at dynamic unbinding the HD-audio codec at the commit 7206998f578d ("ALSA: hda: Fix potential deadlock at codec unbinding"), but ironically, this caused another potential deadlock. The current code uses refcount_dec() and waits for the pending task with wait_event for dropping the refcount to 0. This works fine when PCMs are assigned and actually waiting for the refcount drop. Meanwhile, when there was no PCM assigned, the refcount_dec() call itself was supposed to drop to zero -- alas, it doesn't in reality; refcount_dec() complains, spews kernel warning and it saturates instead of dropping to 0, due to the nature of refcount_dec() implementation. This eventually blocks the wait_event() wakeup and the code get stuck there. For avoiding the problem, we call refcount_dec_and_test() and skips the sync-wait if it already reaches to zero. The patch does a slight code reshuffling to make sure to invoke other disconnect calls before the sync-wait, too. Fixes: 7206998f578d ("ALSA: hda: Fix potential deadlock at codec unbinding") Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/YxtflWQnslMHVlU7@intel.com Link: https://lore.kernel.org/r/20220910142550.28494-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge tag 'asoc-fix-v6.0-rc4' of ↵Takashi Iwai2022-09-0813-131/+183
| |\ | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.0 Quite a few fixes here, all driver specific and fairly small.
| | * ASoC: fsl_aud2htx: Add error handler for pm_runtime_enableShengjiu Wang2022-08-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Call pm_runtime_disable() when error happens in probe() Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661430460-5234-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_aud2htx: register platform component before registering cpu daiShengjiu Wang2022-08-251-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no defer probe when adding platform component to snd_soc_pcm_runtime(rtd), the code is in snd_soc_add_pcm_runtime() snd_soc_register_card() -> snd_soc_bind_card() -> snd_soc_add_pcm_runtime() -> adding cpu dai -> adding codec dai -> adding platform component. So if the platform component is not ready at that time, then the sound card still registered successfully, but platform component is empty, the sound card can't be used. As there is defer probe checking for cpu dai component, then register platform component before cpu dai to avoid such issue. And the behavior of imx_pcm_dma_init() is same as common devm_snd_dmaengine_pcm_register(), so use devm_snd_dmaengine_pcm_register() instead Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661430460-5234-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: nau8xxx: Implement hw constraint for ratesMark Brown2022-08-234-113/+156
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Takashi Iwai <tiwai@suse.de>: This is a series of patches to address the issues on nau8xxx codecs I've stumbled upon while dealing with a bug report for Steam Deck. Most of them are to implement the missing hw constraint for rate restrictions while one patch is to fix the semaphore unbalance in nau8824 driver.
| | | * ASoC: nau8540: Implement hw constraint for ratesTakashi Iwai2022-08-231-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nau8540 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220823081000.2965-6-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: nau8825: Implement hw constraint for ratesTakashi Iwai2022-08-231-38/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nau8825 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220823081000.2965-5-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: nau8824: Implement hw constraint for ratesTakashi Iwai2022-08-231-29/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nau8824 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220823081000.2965-4-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: nau8824: Fix semaphore unbalance at error pathsTakashi Iwai2022-08-231-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The semaphore of nau8824 wasn't properly unlocked at some error handling code paths, hence this may result in the unbalance (and potential lock-up). Fix them to handle the semaphore up properly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220823081000.2965-3-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: nau8821: Implement hw constraint for ratesTakashi Iwai2022-08-231-30/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nau8821 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220823081000.2965-2-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: SOF: Kconfig: Fix the dependency for client modulesMark Brown2022-08-231-0/+2
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: There is still a chance to end up with a client driver selected as built in while the core SOF is as module. Fix this by making the client drivers depend on SND_SOC_SOF.
| | | * | ASoC: SOF: Kconfig: Make IPC_MESSAGE_INJECTOR depend on SND_SOC_SOFPeter Ujfalusi2022-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that the IPC_MESSAGE_INJECTOR client can not be built in when SND_SOC_SOF is built as module. Fixes: cac0b0887e530 ("ASoC: SOF: Convert the generic IPC message injector into SOF client") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220823121554.4255-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: Kconfig: Make IPC_FLOOD_TEST depend on SND_SOC_SOFPeter Ujfalusi2022-08-231-0/+1
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that the IPC_FLOOD client can not be built in when SND_SOC_SOF is built as module. Fixes: 6e9548cdb30e5 ("ASoC: SOF: Convert the generic IPC flood test into SOF client") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220823121554.4255-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: SOF: ipc4-topology: fix alh_group_ida max valueBard Liao2022-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | group_id is from 0 ~ ALH_MULTI_GTW_COUNT - 1, not 0 ~ ALH_MULTI_GTW_COUNT. Fixes: a150345aa7584 ("ASoC: SOF: ipc4-topology: add SoundWire/ALH aggregation support") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Rander Wang <rander.wang@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/20220822190211.170537-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversionNathan Chancellor2022-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent change in clang strengthened its -Wbitfield-constant-conversion to warn when 1 is assigned to a 1-bit signed integer bitfield, as it can only be 0 or -1, not 1: sound/soc/atmel/mchp-spdiftx.c:505:20: error: implicit truncation from 'int' to bit-field changes value from 1 to -1 [-Werror,-Wbitfield-constant-conversion] dev->gclk_enabled = 1; ^ ~ 1 error generated. The actual value of the field is never checked, just that it is not zero, so there is not a real bug here. However, it is simple enough to silence the warning by making the bitfield unsigned, which matches the mchp-spdifrx driver. Fixes: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller") Link: https://github.com/ClangBuiltLinux/linux/issues/1686 Link: https://github.com/llvm/llvm-project/commit/82afc9b169a67e8b8a1862fb9c41a2cd974d6691 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20220810010809.2024482-1-nathan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: fsl_mqs: Fix supported clock DAI formatShengjiu Wang2022-08-231-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | The MQS works as codec DAI, not cpu DAI. It is clock consumer, not clock privider. Fixes: 3b14c15a333b ("ASoC: fsl: Update to use set_fmt_new callback") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661247308-2650-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: mediatek: mt8186: fix DMIC record noiseJiaxin Yu2022-08-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the first DMIC recording is power down, mtkaif_dmic will be reset. This will cause configuration error in the second DMIC recording. So do not reset mtkaif_dmic except in "MTKAIF_DMIC Switch" kcontrol. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/20220820071925.13557-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: SOF: ipc4-topology: fix wrong use of sizeof in ↵Yang Yingliang2022-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sof_ipc4_widget_setup_comp_src() It should be size of the struct sof_ipc4_src, not data pointer pass to sof_update_ipc_object(). Fixes: b85f4fc40d56 ("ASoC: SOF: add ipc4 SRC module support") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220818081751.2407066-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: qcom: sm8250: add missing module ownerSrinivas Kandagatla2022-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing module owner to able to build and load this driver as module. Fixes: aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220816165229.7971-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_sai: fix incorrect mclk number in error messagePieterjan Camerlynck2022-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit c3ecef21c3f26 ("ASoC: fsl_sai: add sai master mode support") the loop was changed to start iterating from 1 instead of 0. The error message however was not updated, reporting the wrong clock to the user. Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220813083353.8959-1-pieterjan.camerlynck@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: cs42l42: Only report button state if there was a button interruptRichard Fitzgerald2022-08-151-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only report a button state change if the interrupt status shows that there was a button event. Previously the code would always drop into the button reporting at the end of interrupt handling if the jack was present. If neither of the button report interrupts were pending it would report all buttons released. This could then lead to a button being reported as released while it is still pressed. Fixes: c5b8ee0879bc ("ASoC: cs42l42: Report jack and button detection") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220815123138.3810249-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * Merge remote-tracking branch 'asoc/for-5.20' into asoc-6.0Mark Brown2022-08-1512-76/+116
| | |\
| * | | ALSA: usb-audio: Clear fixed clock rate at closing EPTakashi Iwai2022-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent commit c11117b634f4 ("ALSA: usb-audio: Refcount multiple accesses on the single clock") tries to manage the clock rate shared by several endpoints. This was intended for avoiding the unmatched rate by a different endpoint, but unfortunately, it introduced a regression for PulseAudio and pipewire, too; those applications try to probe the multiple possible rates (44.1k and 48kHz) and setting up the normal rate fails but only the last rate is applied. The cause is that the last sample rate is still left to the clock reference even after closing the endpoint, and this value is still used at the next open. It happens only when applications set up via PCM prepare but don't start/stop the stream; the rate is reset when the stream is stopped, but it's not cleared at close. This patch addresses the issue above, simply by clearing the rate set in the clock reference at the last close of each endpoint. Fixes: c11117b634f4 ("ALSA: usb-audio: Refcount multiple accesses on the single clock") Reported-by: Jason A. Donenfeld <Jason@zx2c4.com> Tested-by: Jason A. Donenfeld <Jason@zx2c4.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/all/YxXIWv8dYmg1tnXP@zx2c4.com/ Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2620 Link: https://lore.kernel.org/r/20220907100421.6443-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc()Tasos Sahanidis2022-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The voice allocator sometimes begins allocating from near the end of the array and then wraps around, however snd_emu10k1_pcm_channel_alloc() accesses the newly allocated voices as if it never wrapped around. This results in out of bounds access if the first voice has a high enough index so that first_voice + requested_voice_count > NUM_G (64). The more voices are requested, the more likely it is for this to occur. This was initially discovered using PipeWire, however it can be reproduced by calling aplay multiple times with 16 channels: aplay -r 48000 -D plughw:CARD=Live,DEV=3 -c 16 /dev/zero UBSAN: array-index-out-of-bounds in sound/pci/emu10k1/emupcm.c:127:40 index 65 is out of range for type 'snd_emu10k1_voice [64]' CPU: 1 PID: 31977 Comm: aplay Tainted: G W IOE 6.0.0-rc2-emu10k1+ #7 Hardware name: ASUSTEK COMPUTER INC P5W DH Deluxe/P5W DH Deluxe, BIOS 3002 07/22/2010 Call Trace: <TASK> dump_stack_lvl+0x49/0x63 dump_stack+0x10/0x16 ubsan_epilogue+0x9/0x3f __ubsan_handle_out_of_bounds.cold+0x44/0x49 snd_emu10k1_playback_hw_params+0x3bc/0x420 [snd_emu10k1] snd_pcm_hw_params+0x29f/0x600 [snd_pcm] snd_pcm_common_ioctl+0x188/0x1410 [snd_pcm] ? exit_to_user_mode_prepare+0x35/0x170 ? do_syscall_64+0x69/0x90 ? syscall_exit_to_user_mode+0x26/0x50 ? do_syscall_64+0x69/0x90 ? exit_to_user_mode_prepare+0x35/0x170 snd_pcm_ioctl+0x27/0x40 [snd_pcm] __x64_sys_ioctl+0x95/0xd0 do_syscall_64+0x5c/0x90 ? do_syscall_64+0x69/0x90 ? do_syscall_64+0x69/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/3707dcab-320a-62ff-63c0-73fc201ef756@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | ALSA: dummy: Add customizable volume min/max.YJ Lee2022-09-121-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add module parameters to support customized min/max volume leveling, which will be useful to test devices with different volume granularity. Signed-off-by: YJ Lee <yunjunlee@chromium.org> Link: https://lore.kernel.org/r/20220912072945.760949-1-yunjunlee@chromium.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | ALSA: dummy: Fix trailing whitespaces.YJ Lee2022-09-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix checkpatch.pl ERROR: trailing whitespaces. Signed-off-by: YJ Lee <yunjunlee@chromium.org> Link: https://lore.kernel.org/r/20220912072854.760824-1-yunjunlee@chromium.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | sound: oss: dmasound: remove software_input_volume declarationGaosheng Cui2022-09-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expand_read_bal has been removed since commit fc37449f7959 ("The next round of scheduled OSS code removal"). software_input_volume has been removed since commit 0a1b42db4bf9 ("sound: sound/oss/dmasound/: cleanups"). so remove the declare for them from header file. Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20220909061126.1129585-1-cuigaosheng1@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | ALSA: memalloc: remove snd_dma_sg_ops declarationGaosheng Cui2022-09-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_dma_sg_ops has been removed since commit 2c95b92ecd92 ("ALSA: memalloc: Unify x86 SG-buffer handling (take#3)"), so remove it. Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20220909035443.1065737-3-cuigaosheng1@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | ALSA: line6: remove line6_set_raw declarationGaosheng Cui2022-09-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | line6_set_raw has been removed since commit 9f673d7a6022 ("staging: line6: drop CONFIG_LINE6_USB_RAW"), so remove it. Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20220909035443.1065737-2-cuigaosheng1@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | ALSA: hda: cs35l41: Utilize acpi_get_subsystem_id()Andy Shevchenko2022-09-061-37/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace open coded variant of recently introduced acpi_get_subsystem_id(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220905165826.35979-2-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | ALSA: hda: cs35l41: Call put_device() in the scope of get_device()Andy Shevchenko2022-09-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When put_device() is called in another function it's hard to realize that and easy to "fix" the code in a wrong way. Instead, move put_device() to be in the same scope as get_device(), so we prevent appearance of any attempts to "fix" the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220905165826.35979-1-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>