summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
AgeCommit message (Collapse)AuthorFilesLines
2018-10-12ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)Jeremy Cline1-0/+1
The Lenovo G50-30, like other G50 models, has a Conexant codec that requires a quirk for its inverted stereo dmic. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1249364 Reported-by: Alexander Ploumistos <alex.ploumistos@gmail.com> Tested-by: Alexander Ploumistos <alex.ploumistos@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-10ALSA: hda/realtek - Fix the problem of the front MIC on the Lenovo M715Hui Wang1-0/+6
The front MIC on the Lenovo M715 can't record sound, after applying the ALC294_FIXUP_LENOVO_MIC_LOCATION, the problem is fixed. So add the pin configuration of this machine to the pin quirk table. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-09ALSA: hda - Fix headphone pin config for ASUS G751Takashi Iwai1-1/+11
BIOS on ASUS G751 doesn't seem to map the headphone pin (NID 0x16) correctly. Add a quirk to address it, as well as chaining to the previous fix for the microphone. Reported-by: Håvard <hovardslill@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-09ALSA: hda/ca0132 - Fix input effect controls for desktop cardsConnor McAdams1-4/+4
This patch removes the echo cancellation control for desktop cards, and makes use of the special 0x47 SCP command for noise reduction. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-09ALSA: hda/ca0132 - Add error checking in ca0132_build_controls()Connor McAdams1-12/+35
This patch adds error checking to functions creating controls inside of ca0132_build_controls(). Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-09ALSA: hda/ca0132 - Clean up patch_ca0132()Connor McAdams1-5/+9
This patch cleans up the patch_ca0132() function with suggestions from Takashi Sakamoto. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-09ALSA: hda/ca0132 - Fix microphone inconsistency issuesConnor McAdams1-0/+6
This patch fixes microphone inconsistency issues by adding a delay to each setup_defaults function. Without this, the microphone only works intermittently. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-07ALSA: hda - Add ASUS G751 quirk model entryTakashi Iwai1-0/+1
Add a corresponding model list entry for ASUS G751 so that user can test the quirk for another compatible machines more easily. Reported-and-tested-by: Håvard <hovardslill@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-07ALSA: hda - Add quirk for ASUS G751 laptopTakashi Iwai1-0/+10
ASUS G751 requires the extra COEF initialization to make it microphone working properly. Reported-and-tested-by: Håvard <hovardslill@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-04ALSA: hda/sigmatel - Disable automute for Elo VuPointMichael Pobega1-0/+20
The Elo VuPoint 15MX has two headphone jacks of which neither work by default. Disabling automute allows ALSA to work normally with the speakers & left headphone jack. Future pin configuration changes may be required in the future to get the right headphone jack working in tandem. Signed-off-by: Michael Pobega <mpobega@neverware.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-04Merge branch 'for-linus' into for-nextTakashi Iwai3-23/+65
Back-merge 4.19-devel branch into 4.20 for applying FireWire patches cleanly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-04ALSA: hda/realtek - Cannot adjust speaker's volume on Dell XPS 27 7760Kai-Heng Feng1-0/+1
The issue is the same as commit dd9aa335c880 ("ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO"), the output requires to connect to a node with Amp-out capability. Applying the same fixup ALC298_FIXUP_SPK_VOLUME can fix the issue. BugLink: https://bugs.launchpad.net/bugs/1775068 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add ZxR exit commandsConnor McAdams1-0/+33
This patch adds exit operations for the Sound Blaster ZxR. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add ZxR 600 ohm gain controlConnor McAdams1-2/+42
This patch adds a control for 600 ohm gain on the Sound Blaster ZxR. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Remove input select enum for ZxRConnor McAdams1-1/+14
This patch removes the input select control for the ZxR, as it only has one input option, rear microphone. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add ZxR input/output select commandsConnor McAdams1-0/+25
This patch adds commands for selecting input and output on the Sound Blaster ZxR. The ZxR has no front panel header, and has line-in on the separate daughter board, so it only does rear-mic. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add ZxR DSP post-download commandsConnor McAdams1-13/+24
This patch adds commands for setting up the ZxR after the DSP is downloaded. The ZxR already shares most of the post-download commands from the regular Sound Blaster Z. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add ZxR init commandsConnor McAdams1-1/+13
This patch adds init commands for the main Sound Blaster ZxR card. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add DBpro hda_codec_opsConnor McAdams1-0/+100
This patch adds separate hda_codec_ops for the DBPro daughter board, as it behaves more like a generic HDA codec than the other ca0132 cards, despite having a ca0132 on board. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add ZxR pincfgConnor McAdams1-0/+50
This patch adds a pincfg for the ZxR, and defines which pins are used for both. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Add ZxR quirks + new quirk check functionConnor McAdams1-0/+28
This patch adds quirk ID's for the ZxR and it's daughter board, the DBPro. It also adds a function for determining the quirk for each board through HDA subsytem ID's instead of PCI subsystem ID's. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Fix surround sound with output effectsConnor McAdams1-5/+14
This patch fixes an issue where if surround sound was the selected output and output effects were enabled, the sound wasn't sent to all channels correctly. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02ALSA: hda/ca0132 - Fix AE-5 control typeConnor McAdams1-2/+2
This patch corrects the control type of the additional AE-5 controls added in a previous patch from HDA_INPUT to HDA_OUTPUT. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add AE-5 exit functionConnor McAdams1-0/+28
This patch adds exit commands for the AE-5. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add AE-5 specific controlsConnor McAdams1-1/+238
This patch adds controls for the AE-5's headphone gain setting, and the DAC's interpolation filter setting. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add input selection commands for AE-5Connor McAdams1-6/+29
This patch adds the input selection commands for the Sound BlasterX AE-5. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add output set commands for AE-5Connor McAdams1-10/+70
This patch adds output selection commands for the AE-5. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Clean up ca0132_alt_out_selectConnor McAdams1-51/+69
This patch cleans up ca0132_alt_out_select by moving the card specific output commands into a separate function. As more cards are added, the function ca0132_alt_out_select is going to get more bloated with these, so moving into a separate function tries to keep that from happening. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add DSP setup functions for AE-5Connor McAdams1-0/+215
This patch adds DSP setup functions for the AE-5. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Merge post-dsp functions + cleanupConnor McAdams1-96/+75
This patch cleans up some of the formatting of the post-dsp load setup functions, and also merges some of the sub functions into individual ones. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Change firmware name and usageConnor McAdams1-5/+7
The Recon3D, AE-5, Z and ZxR all share the same firmware file. Rename this from the specific "ctefx-sbz.bin" to "ctefx-desktop.bin" and set the AE-5 and Recon3D to use it as well. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add AE-5 regular init setupConnor McAdams1-0/+12
This patch adds AE-5 specific stuff to the ca0132_alt_init function. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add AE-5 pre-init and ca0113 functionsConnor McAdams1-23/+134
This patch adds AE-5 pre-init functions that happen before the main ca0132_alt_init, and gives functions related to the ca0113 a ca0113 prefix instead of ca0132. It also adds functions to write to the 8051's SFRs, and to write the special ca0113 commands for the AE-5. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Change ca0132_mmio_init for AE-5Connor McAdams1-6/+55
This patch adds the unique writes for the AE-5 on startup to ca0132_mmio_init. The other cards share some addresses written to, but use different values. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Set AE-5 bools and select mixerConnor McAdams1-1/+10
This patch sets the bool values for the AE-5, as well as selects the mixer it will use. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add pincfg for AE-5Connor McAdams1-13/+60
This patch adds the pincfg for the Sound BlasterX AE-5, and cleans up the function it's assigned in. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Add quirk for Sound BlasterX AE-5Connor McAdams1-0/+2
This patch adds the PCI subsys ID quirk for the Sound BlasterX AE-5. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-20ALSA: hda/ca0132 - Define new verbs and control paramsConnor McAdams1-11/+12
This patch defines some new verbs found from reverse engineering of the onboard 8051 CPU, and a control param found there as well. This clears up usage of these verbs in other parts of the driver, and removes their usage where they're now known to be unnecessary. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-13ALSA: hda - Enable runtime PM only for discrete GPUTakashi Iwai2-23/+64
The recent change of vga_switcheroo allowed the runtime PM for HD-audio on AMD GPUs, but this also resulted in a regression. When the HD-audio controller driver gets runtime-suspended, HD-audio link is turned off, and the hotplug notification is ignored. This leads to the inconsistent audio state (the connection isn't notified and ELD is ignored). The best fix would be to implement the proper ELD notification via the audio component, but it's still not ready. As a quick workaround, this patch adds the check of runtime_idle and allows the runtime suspend only when the vga_switcheroo is bound with discrete GPU. That is, a system with a single GPU and APU would be again without runtime PM to keep the HD-audio link for the hotplug notification and ELD read out. Also, the codec->auto_runtime_pm flag is set only for the discrete GPU at the time GPU gets bound via vga_switcheroo (i.e. only dGPU is forcibly runtime-PM enabled), so that APU can still get the ELD notification. For identifying which GPU is bound, a new vga_switcheroo client callback, gpu_bound, is implemented. The vga_switcheroo simply calls this when GPU is bound, and tells whether it's dGPU or APU. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200945 Fixes: 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller") Reported-by: Jian-Hong Pan <jian-hong@endlessm.com> Tested-by: Jian-Hong Pan <jian-hong@endlessm.com> Acked-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-11ALSA: hda: fix unused variable warningAnders Roxell1-5/+4
When CONFIG_X86=n function azx_snoop doesn't use the variable chip it only returns true. sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’: sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable] struct azx *chip = bus_to_azx(bus); ^~~~ Create a inline function of azx_snoop. Fixes: a41d122449be ("ALSA: hda - Embed bus into controller object") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-09-04Merge branch 'topic/pcm-indirect-fixes' into for-nextTakashi Iwai1-1/+2
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-30Merge tag 'hda-codec-h-move' of ↵Takashi Iwai25-558/+24
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ALSA: Move hda_codec.h to include/sound For easier sharing with ASoC.
2018-08-30ALSA: hda: move hda_codec.h to include/soundPierre-Louis Bossart25-558/+24
As suggested by Takashi, move this header file to make it easier to include from e.g. the Intel Skylake driver in follow-up patches Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-30ALSA: hda - Fix cancel_work_sync() stall from jackpoll workTakashi Iwai1-1/+2
On AMD/ATI controllers, the HD-audio controller driver allows a bus reset upon the error recovery, and its procedure includes the cancellation of pending jack polling work as found in snd_hda_bus_codec_reset(). This works usually fine, but it becomes a problem when the reset happens from the jack poll work itself; then calling cancel_work_sync() from the work being processed tries to wait the finish endlessly. As a workaround, this patch adds the check of current_work() and applies the cancel_work_sync() only when it's not from the jackpoll_work. This doesn't fix the root cause of the reported error below, but at least, it eases the unexpected stall of the whole system. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200937 Cc: <stable@vger.kernel.org> Cc: Lukas Wunner <lukas@wunner.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-30ALSA: hda - Clean up jackpoll_ms option handlingTakashi Iwai3-24/+4
Currently the jackpoll_ms option value is passed indirectly by referring to an array in chip->jackpoll_ms although each card needs to see only the assigned value. Also, the sanity check is done at each time in get_jackpoll_interval() although basically jackpoll_ms option is a read-only, hence we need to evaluate only once at probe time. This patch is the code simplification about the above points: the jack polling interval is directly set to chip->jackpoll_interval so that it can be simply copied to each codec. No functional change but only code reduction. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-28ALSA: hda: Remove substream allocation/free opsTakashi Iwai4-41/+5
Since we dropped the memory page fiddling in the own allocators in hda_intel.c, the substream allocation and free ops in both hda_intel.c and hda_tegra.c became nothing but the simple calls of the standard snd_pcm_lib helpers. As both are identical, there is no longer need for indirect calls via ops; it's a good opportunity for removing ops and simplifying the codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-28ALSA: hda: Use new non-cached allocation for non-snoop modeTakashi Iwai3-79/+8
Now the ALSA memory allocator helper supports the new non-cached pages, let's use the new type, SNDRV_DMA_TYPE_DEV_UC_SG, for HD-audio driver. This allows us to reduce lots of codes. As another positive side-effect by this patch, the long-standing issue with non-snoop mode playing in the non-mmap mode is fixed. The core memalloc helper does the proper pgprot setup for non-cached pages for vmap(), which was missing in the past. Reported-and-tested-by: Hans Hu <HansHu@zhaoxin.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-28ALSA: hda: Check the non-cached stream buffers more explicitlyTakashi Iwai2-3/+9
Introduce a new flag, uc_buffer, to indicate that the controller requires the non-cached pages for stream buffers, either as a chip-specific requirement or specified via snoop=0 option. This improves the code-readability. Also, this patch fixes the incorrect behavior for C-Media chip where the stream buffers were never handled as non-cached due to the check of driver_type even if you pass snoop=0 option. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-23Merge tag 'sound-fix-4.19-rc1' of ↵Linus Torvalds1-1/+17
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "No surprises here: a regression fix for virmidi code refactoring, three fixes for the new AC97 bus compat and runtime PM, and a usual HD-audio quirk" * tag 'sound-fix-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fix HP Headset Mic can't record ALSA: ac97: fix unbalanced pm_runtime_enable ALSA: ac97: fix check of pm_runtime_get_sync failure ALSA: ac97: fix device initialization in the compat layer ALSA: seq: virmidi: Fix discarding the unsubscribed output
2018-08-21ALSA: hda/realtek - Fix HP Headset Mic can't recordKailang Yang1-1/+17
This patch will fix HP workstation Headset Mic not recording. Signed-off-by: Kailang Yang <kailang@realtek.com> Tested-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>