summaryrefslogtreecommitdiffstats
path: root/sound/pci
AgeCommit message (Collapse)AuthorFilesLines
2019-12-11ALSA: pci: Drop superfluous ioctl PCM opsTakashi Iwai38-119/+0
PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-16-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: trident: Drop superfluous ioctl PCM opsTakashi Iwai1-31/+0
snd_trident_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops(*), so let's drop altogether. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-15-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: asihpi: Drop superfluous ioctl PCM opsTakashi Iwai1-17/+0
snd_card_asihpi_playback_ioctl() and snd_card_asihpi_capture_ioctl() do nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops(*), so let's drop altogether. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-14-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: atiixp: Drop superfluous ioctl PCM opsTakashi Iwai2-5/+0
PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-13-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: via82xx: Drop superfluous ioctl PCM opsTakashi Iwai2-7/+0
PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-12-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: intel8x0: Drop superfluous ioctl PCM opsTakashi Iwai2-14/+0
PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-11-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: pcxhr: Use managed buffer allocationTakashi Iwai1-24/+7
Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-50-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ymfpci: Use managed buffer allocationTakashi Iwai1-24/+9
Clean up the driver with the new managed buffer allocation API. The hw_params callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-57-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: via82xx: Use managed buffer allocationTakashi Iwai2-34/+20
Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-56-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: trident: Use managed buffer allocationTakashi Iwai1-30/+19
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-55-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: sonicvibes: Use managed buffer allocationTakashi Iwai1-18/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-54-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: sis7019: Use managed buffer allocationTakashi Iwai1-23/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-53-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: rme32: Use managed buffer allocationTakashi Iwai1-28/+7
Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-52-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: riptide: Use managed buffer allocationTakashi Iwai1-6/+4
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-51-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: oxygen: Use managed buffer allocationTakashi Iwai1-29/+23
Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-49-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: mixart: Use managed buffer allocationTakashi Iwai1-9/+5
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-48-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: maestro3: Use managed buffer allocationTakashi Iwai1-7/+2
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-47-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: lx6464es: Use managed buffer allocationTakashi Iwai1-11/+3
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-46-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: lola: Use managed buffer allocationTakashi Iwai1-6/+5
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-45-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: intel8x0: Use managed buffer allocationTakashi Iwai2-26/+8
Clean up the drivers with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-44-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ice1724: Use managed buffer allocationTakashi Iwai1-16/+9
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-43-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ice1712: Use managed buffer allocationTakashi Iwai1-34/+8
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-42-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: hda: Use managed buffer allocationTakashi Iwai1-9/+4
Clean up the common driver module with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-41-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: fm801: Use managed buffer allocationTakashi Iwai1-18/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-40-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: es1938: Use managed buffer allocationTakashi Iwai1-26/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-39-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ens137x: Use managed buffer allocationTakashi Iwai1-23/+4
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-38-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: emu10k1: Use managed buffer allocationTakashi Iwai2-75/+14
Clean up the driver with the new managed buffer allocation API. The normal playback streams need a workaround for the aligned buffer, and cannot apply the straight snd_pcm_lib_malloc() stuff, so they remain untouched, while other streams are converted to the new managed mode. Most of hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-37-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: emu10k1x: Use managed buffer allocationTakashi Iwai1-9/+6
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-36-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: echoaudio: Use managed buffer allocationTakashi Iwai1-15/+4
Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-35-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ctxfi: Use managed buffer allocationTakashi Iwai1-11/+4
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-34-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: cs5535: Use managed buffer allocationTakashi Iwai1-8/+4
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-33-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: cs4281: Use managed buffer allocationTakashi Iwai1-18/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-32-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: cmipci: Use managed buffer allocationTakashi Iwai1-26/+10
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-31-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ca0106: Use managed buffer allocationTakashi Iwai1-50/+6
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-30-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: bt87x: Use managed buffer allocationTakashi Iwai1-10/+4
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-29-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: azt3328: Use managed buffer allocationTakashi Iwai1-26/+4
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-28-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: aw2: Use managed buffer allocationTakashi Iwai1-33/+12
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-27-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: au88x0: Use managed buffer allocationTakashi Iwai1-12/+3
Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-26-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: atiixp: Use managed buffer allocationTakashi Iwai2-17/+6
Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-25-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: asihpi: Use managed buffer allocationTakashi Iwai1-7/+3
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-24-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: als4000: Use managed buffer allocationTakashi Iwai1-21/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-23-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: als300: Use managed buffer allocationTakashi Iwai1-21/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-22-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ali5451: Use managed buffer allocationTakashi Iwai1-27/+3
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-21-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ad1889: Use managed buffer allocationTakashi Iwai1-22/+2
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-20-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-10ALSA: hda: Use standard waitqueue for RIRB wakeupTakashi Iwai1-15/+14
The HD-audio CORB/RIRB communication was programmed in a way that was documented in the reference in decades ago, which is essentially a polling in the waiter side. It's working fine but costs CPU cycles on some platforms that support only slow communications. Also, for some platforms that had unreliable communications, we put longer wait time (2 ms), which accumulate quite long time if you execute many verbs in a shot (e.g. at the initialization or resume phase). This patch attempts to improve the situation by introducing the standard waitqueue in the RIRB waiter side instead of polling. The test results on my machine show significant improvements. The time spent for "cat /proc/asound/card*/codec#*" were changed like: * Intel SKL + Realtek codec before the patch: 0.00user 0.04system 0:00.10elapsed 40.0%CPU after the patch: 0.00user 0.01system 0:00.10elapsed 10.0%CPU * Nvidia GP107GL + Nvidia HDMI codec before the patch: 0.00user 0.00system 0:02.76elapsed 0.0%CPU after the patch: 0.00user 0.00system 0:00.01elapsed 17.0%CPU So, for Intel chips, the total time is same, while the total time is greatly reduced (from 2.76 to 0.01s) for Nvidia chips. The only negative data here is the increase of CPU time for Nvidia, but this is the unavoidable cost for faster wakeups, supposedly. Link: https://lore.kernel.org/r/20191210145727.22054-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-10ALSA: hda/hdmi - Fix duplicate unref of pci_devLukas Wunner1-1/+0
Nicholas Johnson reports a null pointer deref as well as a refcount underflow upon hot-removal of a Thunderbolt-attached AMD eGPU. He's bisected the issue down to commit 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD"). The commit iterates over PCI devices using pci_get_class() and unreferences each device found, even though pci_get_class() subsequently unreferences the device as well. Fix it. Fixes: 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") Link: https://lore.kernel.org/r/PSXP216MB0438BFEAA0617283A834E11580580@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM/ Reported-and-tested-by: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au> Signed-off-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Alexander Deucher <alexander.deucher@amd.com> Cc: Bjorn Helgaas <helgaas@kernel.org> Link: https://lore.kernel.org/r/77aa6c01aefe1ebc4004e87b0bc714f2759f15c4.1575985006.git.lukas@wunner.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-08ALSA: echoaudio: simplify get_audio_levelsOlof Johansson1-13/+7
The loop optimizer seems to go astray here, and produces some warnings that don't seem valid. Still, the code can be simplified -- just clear the whole array at the beginning, and fill in whatever values are valid on the platform. Warnings before this change (GCC 8.2.0 ARM allmodconfig): In file included from ../sound/pci/echoaudio/gina24.c:115: ../sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vumeters_get': ../sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations] In file included from ../sound/pci/echoaudio/layla24.c:112: ../sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vumeters_get': ../sound/pci/echoaudio/echoaudio_dsp.c:658:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations] ../sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations] Signed-off-by: Olof Johansson <olof@lixom.net> Link: https://lore.kernel.org/r/20191207224953.25944-1-olof@lixom.net Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-03ALSA: hda: hdmi - Keep old slot assignment behavior for Intel platformsTakashi Iwai1-6/+3
The commit 609f5485344b ("ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms") tried to restore the old behavior wrt assignment of the PCM slot for Intel platforms, but this didn't do it right. As found in the later discussion, a positive pipe id on Intel platforms can be passed for single monitor attachment case. This patch reverts the previous attempt and applies a simpler workaround instead. Actually, for Intel platforms, we can handle as if per_pin->dev_id=0, assign the primary slot at the first try. This assures the compatible behavior with the previous versions regarding the slot assignment. Fixes: 609f5485344b ("ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms") Link: https://lore.kernel.org/r/20191203154105.30414-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-03ALSA: hda: Modify stream stripe mask only when neededTakashi Iwai1-0/+5
The recent commit in HD-audio stream management for changing the stripe control seems causing a regression on some platforms. The stripe control is currently used only by HDMI codec, and applying the stripe mask unconditionally may lead to scratchy and static noises as seen on some MacBooks. For addressing the regression, this patch changes the stream management code to apply the stripe mask conditionally only when the codec driver requested. Fixes: 9b6f7e7a296e ("ALSA: hda: program stripe bits for controller") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204477 Tested-by: Michael Pobega <mpobega@neverware.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191202074947.1617-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-11-29ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th genJaroslav Kysela1-0/+17
The auto-parser assigns the bass speaker to DAC3 (NID 0x06) which is without the volume control. I do not see a reason to use DAC2, because the shared output to all speakers produces the sufficient and well balanced sound. The stereo support is enough for this purpose (laptop). Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20191129144027.14765-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>