aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
AgeCommit message (Collapse)Author
2014-06-07ALSA: hda - Fix onboard audio on Intel H97/Z97 chipsetsTakashi Iwai
commit 77f07800cb456bed6e5c345e6e4e83e8eda62437 upstream. The recent Intel H97/Z97 chipsets need the similar setups like other Intel chipsets for snooping, etc. Especially without snooping, the audio playback stutters or gets corrupted. This fix patch just adds the corresponding PCI ID entry with the proper flags. Reported-and-tested-by: Arthur Borsboom <arthurborsboom@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-09ALSA: hda - Add enable_msi=0 workaround for four HP machinesDavid Henningsson
commit 693e0cb052c607e2d41edf9e9f1fa99ff8c266c1 upstream. While enabling these machines, we found we would sometimes lose an interrupt if we change hardware volume during playback, and that disabling msi fixed this issue. (Losing the interrupt caused underruns and crackling audio, as the one second timeout is usually bigger than the period size.) The machines were all machines from HP, running AMD Hudson controller, and Realtek ALC282 codec. BugLink: https://bugs.launchpad.net/bugs/1260225 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26ALSA: hda - Add Toshiba Satellite C870 to MSI blacklistTakashi Iwai
commit 83f72151352791836a1b9c1542614cc9bf71ac61 upstream. Toshiba Satellite C870 shows interrupt problems occasionally when certain mixer controls like "Mic Switch" is toggled. This seems worked around by not using MSI. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=833585 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-03ALSA: hda - Fix system panic when DMA > 40 bits for Nvidia audio controllersMike Travis
The audio driver mistakenly allows 64 bit addresses to be created for the audio driver on Nvidia GPUs. Unfortunately, the hardware normally only supports up to 40 bits of DMA. This can cause system panics as well as misdirected data when the address is > 40 bits as the upper part the address is truncated. Signed-off-by: Mike Travis <travis@sgi.com> Reviewed-by: Mike Habeck <habeck@sgi.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-16ALSA: hda - Add codec delay to the capture time stamp.Dylan Reid
For capture, the delay through the codec contributes to the time stamp of the sample recorded at the A to D. Rename the codec time stamp function appropriately. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-15Merge tag 'asoc-v3.10' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.10 A bunch of changes here, the most interesting one subsystem wise being Morimoto-san's work to create snd_soc_component which doesn't do much for now but will be pretty important going forwards: - Add a new component object type which will form the basis of moving to a more generic handling of SoC and off-SoC components, contributed by Kuninori Morimoto. - A fairly large set of cleanups for the dmaengine integration from Lars-Peter Clausen, starting to move towards being able to have a generic driver based on the library. - Performance optimisations to DAPM from Ryo Tsutsui. - Support for mixer control sharing in DAPM from Stephen Warren. - Multiplatform ARM cleanups from Arnd Bergmann. - New CODEC drivers for AK5385 and TAS5086 from Daniel Mack.
2013-04-09ALSA: hda - Apply codec delay to wallclock.Dylan Reid
For playback add the codec-side delay to the timestamp, for capture subtract it. This brings the timestamps in line with the time that was recently added to the delay reporting. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-05ALSA: hda - Introduce get_delay codec PCM opsTakashi Iwai
Add a new codec PCM ops, get_delay(), to obtain the codec/stream- specific PCM delay count. When it's NULL, nothing changes. This new feature was requested for CA0132, which has significant delays in the path depending on the running DSP code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-04Revert "ALSA: hda - Allow power_save_controller option override DCAPS"Takashi Iwai
This reverts commit 6ab317419c62850a71e2adfd1573e5ee87d8774f. The commit [6ab317419c: ALSA: hda - Allow power_save_controller option override DCAPS] changed the behavior of power_save_controller so that it can override the driver capability. This assumed that this option is rarely changed dynamically unlike power_save option. Too naive. It turned out that the user-space power-management tool tries to set power_save_controller option to 1 together with power_save option without knowing what's actually doing. This enabled forcibly the runtime PM of the controller, which is known to be broken om many chips thus disabled as default. So, the only sane fix is to revert this commit again. It was intended to ease debugging/testing for runtime PM enablement, but obviously we need another way for it. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=56171 Reported-and-tested-by: Nikita Tsukanov <keks9n@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-20ALSA: hda - Fix abuse of snd_hda_lock_devices() for DSP loaderTakashi Iwai
The current DSP loader code abuses snd_hda_lock_devices() for ensuring the DSP loader not conflicting with the other normal operations. But this trick obviously doesn't work for the PM resume since the streams are kept opened there where snd_hda_lock_devices() returns -EBUSY. That means we need another lock mechanism instead of abuse. This patch provides the new lock state to azx_dev. Theoretically it's possible that the DSP loader conflicts with the stream that has been already assigned for another PCM. If it's running, the DSP loader should simply fail. If not -- it's the case for PM resume --, we should assign this stream temporarily to the DSP loader, and take it back to the PCM after finishing DSP loading. If the PCM is operated during the DSP loading, it should get an error, too. Reported-and-tested-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-14ALSA: hda - Disable runtime PM for Intel 5 Series/3400Takashi Iwai
We've got a regression report wrt the IRQ issue related with the power-save on a Dell machine, and disabling runtime PM works around. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=53441 Cc: <stable@vger.kernel.org> [v3.7+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10ALSA: hda - Fix memory leak and error handling in CA0132 DSP loaderTakashi Iwai
This patch fixes a few obvious bugs in DSP loader stuff: - Fix possible memory leaks in the error path - Avoid double-free calls in dma_reset() - Properly set/unset WC bits for DMA buffers - Add missing error status checks Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10ALSA: hda_intel: Add Device IDs for Intel Wellsburg PCHJames Ralston
This patch adds the HD Audio Device IDs for the Intel Wellsburg PCH Signed-off-by: James Ralston <james.d.ralston@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07ALSA: hda - Set non-snoop for Creative HD-audio controllersTakashi Iwai
... looks like we need this for stable operations. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07Merge branch 'topic/hda-ca0132-dsp' into for-nextTakashi Iwai
2013-02-05Merge branch 'for-linus' into for-nextTakashi Iwai
Merge pending fixes that haven't pulled into 3.8.
2013-02-01ALSA - HDA: New PCI ID for Haswell ULTWang Xingchao
Add new PCI ID 0x0a0c for Haswell ULT platform. Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29ALSA: hda - Fix non-snoop page handlingTakashi Iwai
For non-snoop mode, we fiddle with the page attributes of CORB/RIRB and the position buffer, but also the ring buffers. The problem is that the current code blindly assumes that the buffer is contiguous. However, the ring buffers may be SG-buffers, thus a wrong vmapped address is passed there, leading to Oops. This patch fixes the handling for SG-buffers. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=800701 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29ALSA: hda - Enable LPIB delay count for Poulsbo / OaktrailTakashi Iwai
Currently we use LPIB forcibly for both playback and capture for Poulsbo and Oaktrail devices, and this seems rather problematic. The recent fix for LPIB delay count seems working well with these devices, so let's enable it instead. Reported-by: Martin Weishart <martin.weishart@telosalliance.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23Merge branch 'topic/hda-gen-parser' into for-nextTakashi Iwai
This is a merge of really big changes: the generic parser is heavily enhanced for handling all cases, based on the former Realtek codec driver code. And all codec drivers except for a few ones (CA0132, HDMI and modem) have been converted to use the new generic driver. Conflicts: sound/pci/hda/patch_realtek.c
2013-01-23Merge branch 'for-linus' into for-nextTakashi Iwai
This is a preliminary merge before the upcoming merge of generic parser branch.
2013-01-12ALSA: hda - Check CORB overflowTakashi Iwai
Add an overflow check of CORB in HD-audio controller and codec drivers so that flood of sequential writes would work properly. In the controller side, add a check of CORB read-pointer to make returning -EAGAIN when it's full. Meanwhile in the codec side, when -EAGAIN error is received, it retries the write after flushing the pending verbs (calling get_response() essentially does it). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-09ALSA: hda - Allow power_save_controller option override DCAPSTakashi Iwai
Change the power_save_controller option to bint from bool so that user can override the runtime PM capability bit and force to enable or disable the runtime PM. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-09ALSA: hda - Disable runtime D3 for Intel CPT & coTakashi Iwai
We've got a few bug reports that the runtime D3 results in the dead HD-audio controller. It seems that the problem is in a deeper level than the sound driver itself, so as a temporal solution, disable the feature for these controllers again. Reported-and-tested-by: Vincent Blut <vincent.debian@free.fr> Reported-and-tested-by: Maurizio Avogadro <mavoga@gmail.com> Cc: <stable@vger.kernel.org> [v3.7] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-18ALSA: HDA: Fix sound resume hangDaniel J Blueman
Resuming a switcheroo'd HDA controller hangs since the completion is one-shot (thus works the first time). Fix by using completions that explictly need rearming, so remain fired before. Signed-off-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-12ALSA: hda - Move runtime PM check to runtime_idle callbackTakashi Iwai
The runtime_idle callback is the right place to check the suspend capability, but currently we do it wrongly in the runtime_suspend callback. This leads to a kernel error message like: pci_pm_runtime_suspend(): azx_runtime_suspend+0x0/0x50 [snd_hda_intel] returns -11 and the runtime PM core would even repeat the attempts. Reported-and-tested-by: Borislav Petkov <bp@alien8.de> Cc: <stable@vger.kernel.org> [v3.7] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-12ALSA: hda - Avoid doubly suspend after vga switcherooTakashi Iwai
The HD-audio driver artificially calls the suspend and the resume code path in the VGA switcheroo state changes. When a machine goes to suspend, it tries to suspend the device again, and it stalls at snd_power_wait(). This patch adds checks whether the devices were already in (forced) suspend in PM callbacks for avoiding the doubly suspend. Reported-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-12ALSA: hda - Check validity of CORB/RIRB WP readsTakashi Iwai
When the HD-audio controller is disabled (e.g. via vga switcheroo) but the driver is still accessing it, it spews floods of "spurious response" kernel messages. It's because CORB/RIRB WP reads 0xff, and the driver tries to fill up until this number. This patch changes the CORB/RIRB WP reads to word instead of byte, and add the check of the read value. If it's 0xffff, the controller is supposed to be disabled, so the further action will be skipped. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-12ALSA: hda - use usleep_range in link reset and change timeout checkMengdong Lin
Reducing the time on HDA link reset can help to reduce the driver loading time. So we replace msleep with usleep_range to get more accurate time control and change the value to a smaller one. And a 100ms timeout is set for both entering and exiting the link reset. Signed-off-by: Xingchao Wang <xingchao.wang@intel.com> Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: hda - Remove superfluous DELAYED_INIT*_MARKTakashi Iwai
Since __devinit* have been removed completely, DELAYED_INIT*_MARK in hda_intel.c became NOP. Let's rip them off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: pci: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-05ALSA: hda: Add PCI device prefix for clarityDaniel J Blueman
When printing, use a prefix of the PCI domain, bus, device and function as in other drivers, to differentiate multiple devices. Important for reporting and debugging. A future step is to tidy this up with dev_printk et al. v2: Move conversion specifier into call site, preventing build issues v3: Refactor for Takashi's for-next branch Signed-off-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-04ALSA: hda - Fix yet another race of vga_switcheroo registrationTakashi Iwai
The recent fix for vga switcheroo race in commit 128960a9 opened yet another race. At the time the audio driver starts probing, user may turn off D-GPU off. But at this moment, the audio driver still doesn't register the vga switcheroo client, thus the switching isn't notified. Then the hardware gets off out of sudden, resulting in invalid reads and lots of "spurious response" error messages. For solving this situation, the following changes have been done in this patch: - Move again vga switcheroo registration to the very early stage of the probing; this also requires to set pci drvdata properly before registration - Introduce the completion to synchronize the driver probe at vga switcheroo callbacks; this assures that the whole probing finished before executing the callbacks Reported-by: Daniel J Blueman <daniel@quora.org> Tested-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-28ALSA: hda - Add new DSP loader callback routinesTakashi Iwai
Pass DMA buffer pointers in calls to setup_bdle(). Add DSP loader callback routines to controller. Add new DSP loader switch to Kconfig to turn off DSP firmware. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-22ALSA: hda - Don't release firmware when CONFIG_PM is setTakashi Iwai
The new firmware code tries to re-read the formerly read firmware files before suspend. Thus it's wiser to keep the "patch" firmware in the driver for avoiding this unnecessary re-reading. Of course, this will consume a bit of memory for unused stuff, but the patch fw is supposed to be fairly small, so it's more benefit in the end. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-19Merge branch 'for-linus' into for-nextTakashi Iwai
Merge the recent HD-audio codec change for fixing recursive suspend calls. Conflicts: sound/pci/hda/hda_codec.c
2012-11-19ALSA: hda - Limit runtime PM support only to known Intel chipsTakashi Iwai
We've got a report that the runtime PM may make the codec the unresponsive on AMD platforms. Since the feature has been tested only on the recent Intel platforms, it's safer to limit the support to such devices for now. This patch adds a new DCAPS bit flag indicating the runtime PM support, and mark it for Intel controllers. Reported-and-tested-by: Julian Wollrath <jwollrath@web.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08Merge branch 'for-linus' into for-nextTakashi Iwai
2012-11-04ALSA: hda - support Teradici 2200 host card audioLars R. Damerow
The audio chipset used in Teradici's Tera2 host cards is the same as that in the 1200 host cards. This patch allows ALSA to recognize the Tera2 cards. Signed-off-by: Lars R. Damerow <lars@pixar.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30Merge branch 'for-linus' into for-nextTakashi Iwai
... for migrating the core changes for USB-audio disconnection fixes
2012-10-30ALSA: hda - Add tracepoints to HD-audio controller driverTakashi Iwai
Add a couple of tracepoints to snd-hda-intel for tracing the position and the trigger timings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-23ALSA: hda: support for wallclock timestampsPierre-Louis Bossart
Reuse code from clocksource to handle wall clock counter. Since wrapparound occurs, the audio timestamp is reinitialized to zero on a trigger. Synchronized linked devices will start counting from same reference to avoid any drift. Max buffer time is limited to 178 seconds to make sure wall clock counter does not overflow Wallclock timestamps are disabled on capture streams until we figure out how to handle digital inputs. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-22ALSA: hda - remove unused variable in azx_position_ok()Wei Yongjun
The variable stream is initialized but never used otherwise, so remove the unused variable. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: hda - Print PCI device name at "spurious message" warningsTakashi Iwai
... to make it clear to see from which device it comes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-16ALSA: hda - Stop LPIB delay counting on broken hardwareTakashi Iwai
If LPIB reports a pretty bad value, we can't trust such hardware for calculating the PCM delay. Automatically turn off the delay counting when such a problem is encountered. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48911 Cc: <stable@vger.kernel.org> [v3.6] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-15ALSA: hda - Implement a poll loop for jacks as a module parameterDavid Henningsson
Now that we have a generic unsol mechanism, we can implement a generic poll loop, which can be used for debugging, or if a codec's unsol mechanism is broken. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-15ALSA: hda - Fix registration race of VGA switcherooTakashi Iwai
Delay the registration of VGA switcheroo client to the end of the probing. Otherwise a too quick switching may result in Oops during probing. Also add the check of the return value from snd_hda_lock_devices(). Reported-and-tested-by: Daniel J Blueman <daniel@quora.org> Cc: <stable@vger.kernel.org> [v3.5+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-15ALSA: hda - Clean up superfluous position_fix list entriesTakashi Iwai
The white-list entries of position_fix for ASUS laptops have been added just as a workaround for broken COMBO mode. Now the combo mode itself is disabled, we can safely remove these entries. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-10ALSA: hda - Remove AZX_DCAPS_POSFIX_COMBOTakashi Iwai
It turned out that the COMBO position fix mode is rather more harmful, and it got reverted (with the replacement of runtime->delay calculation) recently. Hence we can get rid of AZX_DCAPS_POSFIX_COMBO as well. It's still possible to pass this mode via position_fix module option, in case where this really helps on weird machines (who knows). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-22Merge tag 'asoc-3.7' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.7 Lots and lots of driver specific cleanups and enhancements but the only substantial framework feature this time round is the compressed API binding: - Addition of ASoC bindings for the compressed API, used by the mid-x86 drivers. - Lots of cleanups and API refreshes for CODEC drivers and DaVinci. - Conversion of OMAP to dmaengine. - New machine driver for Wolfson Microelectronics Bells. - New CODEC driver for Wolfson Microelectronics WM0010.