aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
Commit message (Collapse)AuthorAge
* Revert "Sound: hda - Restore PCI configuration space with interrupts off"Takashi Iwai2009-02-16
| | | | | | | | | | | | | This reverts commit 32e176c14d7a425b681ef003c9061001ddb7fc7b. That commit caused a regression with suspend on Thinkpad SL300. Reference: kernel bug#12711 http://bugzilla.kernel.org/show_bug.cgi?id=12711 Tested-by: Alexandre Rostovtsev <tetromino@gmail.com> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use own workqueueTakashi Iwai2009-01-12
| | | | | | | | | | | | | | snd-hda-intel driver used schedule_work() fot the delayed DMA pointer updates, but this has several potential problems: - it may block other eventsd works longer - it may deadlock when probing fails and flush_scheduled_work() is called during probe callback (as probe callback itself could be invoked from eventd) This patch adds an own workq for each driver instance to solve these problems. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/hda-resume-fix' into topic/hdaTakashi Iwai2008-12-20
|\
| * Sound: hda - Restore PCI configuration space with interrupts offRafael J. Wysocki2008-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Move the restoration of the standard PCI configuration registers in the snd_hda_intel driver to a ->resume_early() callback executed with interrupts disabled, since doing that with interrupts enabled may lead to problems in some cases. This patch addresses the regression from 2.6.26 tracked as http://bugzilla.kernel.org/show_bug.cgi?id=12121 . Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add probe_only optionTakashi Iwai2008-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | Added probe_only module option to hd-audio driver. This option specifies whether the driver creates and initializes the codec-parser after probing. When this option is set, the driver skips the codec parsing and initialization but gives you proc and other accesses. It's useful to see the initial codec state for debugging. The default of this value is off, so the default behavior is as same as before. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2008-12-19
|\|
| *-. Merge branches 'topic/fix/hda' and 'topic/fix/misc' into for-linusTakashi Iwai2008-10-29
| |\ \
| * | | pci: use pci_ioremap_bar() in sound/Arjan van de Ven2008-10-21
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Use the newly introduced pci_ioremap_bar() function in sound/. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix a compile warning when CONFIG_PM=nTakashi Iwai2008-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the compile warning regarding the unused function when built with CONFIG_PM=n: sound/pci/hda/hda_intel.c:1905: warning: ‘snd_hda_codecs_inuse’ defined but not used snd_hda_codecs_inuse() is used only in the resume callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix build error with CONFIG_SND_HDA_POWER_SAVETakashi Iwai2008-11-28
| | | | | | | | | | | | | | | | | | | | | Moved power_save field initialization inside a proper ifdef to fix a build error without CONFIG_SND_HDA_POWER_SAVE. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Move power_save option to hda_intel.cTakashi Iwai2008-11-27
| | | | | | | | | | | | | | | | | | | | | Move power_save option into hda_intel.c, and make a field in hda_bus, instead of keeping module parameters in separate files. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - make some functions staticTakashi Iwai2008-11-27
| | | | | | | | | | | | | | | | | | | | | | | | Minor clean ups: move snd_hda_codecs_inuse() into hda_intel.c and make static. Also, make snd_hda_query_supported_pcm() static as it's used only in hda_codec.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add probe_mask quirk for Medion MD96630Takashi Iwai2008-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Medion MD96630 has ALC268 codec on slot#2 although it's not used for any purpose. This codec conflicts with the primiary codec ALC888 on slot#0, and gives mixer errors. This patch adds a corresponding entry to probe_mask blacklist. Reference: Novell bnc#412528 https://bugzilla.novell.com/show_bug.cgi?id=412528 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: azx_probe() cleanupWu Fengguang2008-11-20
| | | | | | | | | | | | | | | | | | | | | | | | Replace 5 free-and-return-err blocks with goto-out-free ones. This makes the main logic more outstanding. Signed-off-by: Wu Fengguang <wfg@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - support detecting HD Audio devices with PCI class codeYang, Libin2008-11-13
| | | | | | | | | | | | | | | | | | | | | The patch uses HD Audio PCI class code to detect AMD HD Audio cards. Signed-off-by: Libin Yang <libin.yang@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix probe errors on Dell Studio DesktopTakashi Iwai2008-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | BIOS on Dell Studio Desktop tells wrong codec probe masks. This patch gives the preset mask value to avoid invalid access. Reference: Novell bug#440907 https://bugzilla.novell.com/show_bug.cgi?id=440907 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Make codec-probing more robustTakashi Iwai2008-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an error occurs during the codec probing, typically accessing to an non-existing codec slot, the controller chip gets often screwed up and can no longer communicate with the codecs. This patch adds a preparation phase just to probe codec addresses before actually creating codec instances. If any error occurs during this probing phase, the driver resets the controller to recover. This will (hopefully) fix the famous "single_cmd" errors. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - simplify hda_bus ops callbacksTakashi Iwai2008-11-06
| | | | | | | | | | | | | | | | | | | | | | | | The hda_bus ops callback take struct hda_bus pointer. Also, the command callback takes the composed command word, instead of each small bits in arguments. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'topic/fix/hda' into topic/hdaTakashi Iwai2008-10-31
|\ \ \ | | |/ | |/|
| * | ALSA: hda - Add reboot notifierTakashi Iwai2008-10-29
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The current snd-hda-intel driver seems blocking the power-off on some devices like eeepc. Although this is likely a BIOS problem, we can add a workaround by disabling IRQ lines before power-off operation. This patch adds the reboot notifier to achieve it. The detailed problem description is found in bug#11889: http://bugme.linux-foundation.org/show_bug.cgi?id=11889 Tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove old codec-probe limitationTakashi Iwai2008-10-28
| | | | | | | | | | | | | | | | Removed the old workaround to avoid the non-existing codec slot. The current code should work without that workaround. If any, we can add a quirk table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add infrastructure for dynamic stream allocationTakashi Iwai2008-10-12
|/ | | | | | Added the infrastructure for dynamic stream allocation on HD-audio. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Fix for reading RIRB buffer on NVIDIA aza controller with AMD Phenom cpuWei Ni2008-10-10
| | | | | | | | | | | When read RIRB buffer immediately after RIRB interrupt received, sometimes the data will be "0x0". If we wait for some time, the data in buffer will be correct. This issue only occurred with AMD Phenom cpu. So we set this "needs_damn_long_delay" flag. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - allow probing of 4 codecsTakashi Iwai2008-09-09
| | | | | | | | Allow probing of 4 codecs on known good situations. On some known bad situations, it should be avoided. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - Fix VIA recording problemJoseph Chan2008-08-29
| | | | | | | | | Add a workaround for bad DMA-position reporting on VIA chipset. Signed-off-by: Joseph Chan <josephchan@via.com.tw> [modified and cleaned up by tiwai] Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - check page continuityTakashi Iwai2008-08-25
| | | | | | | | Check the continuity of allocated pages to reduce the BDL size as much as possible so that it can use more than 1MB buffers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Clean up SG-buffer helper functions and macrosTakashi Iwai2008-08-25
| | | | | | | | Clean up SG-buffer helper functions and macros. Helpers take substream as arguments now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - disable delayed period-ack with bdl_pos_adj=0Takashi Iwai2008-08-25
| | | | | | | | | | When bdl_pos_adj=0 is given, disable the position-check and the delayed period update mechanism. Usually bdl_pos_adj=0 is set only for the debugging purpose on really broken hardwares. It's better to disable the extra complexity in such a case. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Kill snd_assert() in sound/pci/*Takashi Iwai2008-08-13
| | | | | | | | Kill snd_assert() in sound/pci/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda_intel: enable snoop for nvidia HDA controllerPeer Chen2008-08-21
| | | | | | | | Enable the snoop for nvidia hda controller to avoid data coherence issue. Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - support new AMD HDMI Audio (1002:970f)Libin Yang2008-08-12
| | | | | Signed-off-by: Libin Yang <libin.yang@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda_intel: ALSA HD Audio patch for Intel Ibex Peak DeviceIDsSeth Heasley2008-08-12
| | | | | | | This patch adds the Intel Ibex Peak (PCH) HD Audio Controller DeviceIDs. Signed-off by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Align BDL position adjustment parameterTakashi Iwai2008-07-16
| | | | | | | | It seems NVidia and other hardwares require the alignment for period update timing. For satisfying this condition, align the position adjustment for delayed wake-up to the initial bdl_pos_adj value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - use upper_32_bits()Takashi Iwai2008-06-16
| | | | | | | Use the standard upper_32_bits() instead of own macro. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - bdl_pos_adj=32 as defaultTakashi Iwai2008-06-16
| | | | | | | | | Use bdl_pos_adj=32 as default except for Intel hardwares confirmed to work with bdl_pos_adj=1. Looks like ATI and NVidia require this higher value. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - Add a warning if pending IRQ is foundTakashi Iwai2008-06-13
| | | | | | | | | | The pending IRQ handling is a very hackish workaround and should be avoided as much as possible via a larger bdl_pos_adj option value. Put a warning message if this situation occurs so that the user may have a chance to notice that something is wrong. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - Fix bdl_pos_adj value for ATI SB chipsetsTakashi Iwai2008-06-13
| | | | | | | | | | | ATI SB controllers seem to report the DMA ahead in the amount of FIFO. Thus bdl_pos_adj should be 32 for them as default. Also, the default value is set to -1, which means to make the driver to choose the appropriate value. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - bdl_pos_adj option to each instanceTakashi Iwai2008-06-13
| | | | | | | | The option bdl_pos_adj should be provided for each card instance instead of a global one because the value depends rather on each controller-chip. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - remove position_fix=3Takashi Iwai2008-06-13
| | | | | | | | | | | | position_fix=3 is the option to correct the DMA position with the FIFO size. But, it never worked correctly, and we have now more other workarounds for the DMA position fixes. Thus better to remove it. Also, change POS_FIX_NONE to POS_FIX_LPIB to represent its real role better. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - Add bdl_pos_adj optionTakashi Iwai2008-06-13
| | | | | | | | | | | | | | | | | | | | Added a new option, bdl_pos_adj, to adjust the delay of IRQ-wakeup timing. Most HD-audio hardwares have a problem that a BDL IRQ is issued before actually the data and the DMA pointer are updated. We have already a mechanism to force to delay snd_pcm_period_elapsed() calls via workq, but this costs much CPU, and typically the delay is within one sample. Thus, it's more clever to adjust the BDL entries instead. The new option adds the size of the delay in frames. As default, it's set to 1 -- that is, one sample delay. Even the hardware is really correct, one sample delay is relatively harmless in comparison with reporting wrong positions. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] hda - increase max_codecs of ICH to 4Takashi Iwai2008-06-06
| | | | | | | | It turned out that some ICH9-based boards use SD3 for the audio codec where the current driver code doesn't probe. Since we have a better codec slot check now, it must be safe to increase this to 4. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda - Add ICH9 controller support (8086:2911)Kailang Yang2008-05-27
| | | | | | | Added the missing PCI ID for ICH9 controller (8086:2911) Signed-off-by: Kailang Yang <kailang@realtek.com.tw> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda - Add support of Teradici controllerKailang Yang2008-05-27
| | | | | | | Add the new PCI ID 0x6549 0x1200 Teradici controller. Signed-off-by: Kailang Yang <kailang@realtek.com.tw> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda - Fix DMA position inaccuracyTakashi Iwai2008-05-19
| | | | | | | | | | | | | Many HD-audio controllers seem inaccurate about the IRQ timing of PCM period updates. This has caused problems on audio quality; e.g. JACK doesn't work with two periods. This patch fixes the problem by checking the current DMA position at IRQ handler and delays the period-update via a workq if it's inaccurate. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] Fix synchronize_irq() bugs, redundanciesJeff Garzik2008-04-24
| | | | | | | | | | | | | | | | free_irq() calls synchronize_irq() for you, so there is no need for drivers to manually do the same thing (again). Thus, calls where sync-irq immediately precedes free-irq can be simplified. However, during this audit several bugs were noticed, where free-irq is preceded by a "irq >= 0" check... but the sync-irq call is not covered by the same check. So, where sync-irq could not be eliminated completely, the missing check was added. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda-intel - Add sync supportTakashi Iwai2008-04-24
| | | | | | Addded the support of sync streams to hda-intel driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda-intel - Add barrierTakashi Iwai2008-04-24
| | | | | | Add proper barriers in the RIRB communication code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda-intel - Fix power-off hang on ASUS P5AD2Takashi Iwai2008-04-24
| | | | | | | | | | | The hda-intel driver has a problem at power-off on ASUS P5AD2. It's caused when the position-buffer is enabled -- most likely a hardware-specific problem. This patch adds a quirk to avoid the unnecessary enablement of position-buffer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda_intel: Add the DIDs of nvidia MCP79 HD audio controller to ↵Peer Chen2008-04-24
| | | | | | | | | hda_intel.c Add the Device IDs of nvidia MCP79 HD audio controller to hda_intel.c Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] hda_intel needs dma-mapping.hAndrew Morton2008-04-24
| | | | | | | | | | | | sparc32: sound/pci/hda/hda_intel.c: In function 'azx_create': sound/pci/hda/hda_intel.c:1838: error: 'DMA_64BIT_MASK' undeclared (first use in this function) sound/pci/hda/hda_intel.c:1838: error: (Each undeclared identifier is reported only once sound/pci/hda/hda_intel.c:1838: error: for each function it appears in.) Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>