summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
AgeCommit message (Collapse)Author
2008-04-24[ALSA] Fix synchronize_irq() bugs, redundanciesJeff Garzik
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>
2008-04-24[ALSA] hda-intel - Add sync supportTakashi Iwai
Addded the support of sync streams to hda-intel driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-intel - Add barrierTakashi Iwai
Add proper barriers in the RIRB communication code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-intel - Fix power-off hang on ASUS P5AD2Takashi Iwai
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>
2008-04-24[ALSA] hda_intel: Add the DIDs of nvidia MCP79 HD audio controller to ↵Peer Chen
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>
2008-04-24[ALSA] hda_intel needs dma-mapping.hAndrew Morton
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>
2008-04-24[ALSA] hda-intel - Use PCI_DEVICE() macroTakashi Iwai
Clean up the pci id table using PCI_DEVICE() macro. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-intel - Clean up stream definitionsTakashi Iwai
Clean up the code to define playback/capture streams. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] HDA-Intel - Patch to support RV7xx HDMI AudioLibin Yang
This patch is to add R7xx HDMI audio support. Signed-off-by: Libin Yang <Libin.yang@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-intel - Fix a compile error with CONFIG_SND_DEBUG_DETECT=yTakashi Iwai
Forgot to get rid of the obsolete fragsize field from a debug print. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-intel - Support 64bit buffer allocationTakashi Iwai
The HD-audio hardware usually supports 64bit address for DMA and other buffers. The patch enables the feature if supported. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-intel - Use SG bufferTakashi Iwai
Use SG buffers for the HD-audio instead of linear buffers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] hda-intel - Fix PCM device number assignmentTakashi Iwai
In the current scheme, PCM device numbers are assigned incrementally in the order of codecs. This causes problems when the codec number is irregular, e.g. codec #0 for HDMI and codec #1 for analog. Then the HDMI becomes the first PCM, which is picked up as the default output device. Unfortuantely this doesn't work well with normal setups. This patch introduced the fixed device numbers for the PCM types, namely, analog, SPDIF, HDMI and modem. The PCM devices are assigned according to the corresponding PCM type. After this patch, HDMI will be always assigned to PCM #3, SPDIF to PCM #1, and the first analog to PCM #0, etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-22[ALSA] hda-intel - Fix Oops with ATI HDMI devicesTakashi Iwai
The driver gets Oops with ATI HDMI devices due to the wrong calculation of index for playback streams. This patch fixes it. Reference: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3746 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22[ALSA] HDA - enable snoop on SCHTakashi Iwai
This patch enables snoop on Intel SCH chipset, eliminating static during playback. Signed-off-by: Tobin Davis <tdavis@dsl-only.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-31[ALSA] HDA-Intel - Add support for Intel SCHTobin Davis
This patch adds support for Intel's SCH mobile chipset. Signed-off-by: Tobin Davis <tdavis@dsl-only.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] hda_intel: ALSA HD Audio patch for Intel ICH10 DeviceID'sJason Gaston
This patch adds the Intel ICH10 HD Audio Controller DeviceID's. Signed-off-by: Jason Gaston <jason.d.gaston@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] hda-intel - Add ratelimit to timeout messagesMarc Boucher
Signed-off-by: Marc Boucher <marc@linuxant.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] hda-intel - Make azx_get_response() a bit more robustTakashi Iwai
In azx_[rirb_]get_response(), the timeout is checked at the end of the loop. It's better to be checked just after the check of the RIRB index to avoid a bogus error with a too long msleep(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] hda-intel - Add workarounds for STAC codecsTakashi Iwai
Some machines with STAC codecs seem to have problems (e.g. no audible playback) when the delay in codec-read routine is too short. I still don't figure out which command sequence causes this problem (due to lack of test hardware), but it's known that increasing the delay fixes. So, added a stupid workaround here temporarily... Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] HDA: Enable chipset gcap usageTobin Davis
This patch removes hardcoded values for the number of streams supported by the southbridge in most chipsets, and reads these values from the chipset directly. Most systems are hardwired for 4 streams in each direction, but newer chipsets change that capability. Signed-off-by: Tobin Davis <tdavis@dsl-only.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] hda_intel: Fix multiple device support by incrementing device countAndrew Paprocki
Fixes multiple device support by incrementing the static device counter at the end of the azx_probe() call. Without this, subsequent probes would always use the index specified for the first card. Signed-off-by: Andrew Paprocki <andrew@ishiboo.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] hda-intel - Support multiple devicesTakashi Iwai
It turned out that there can be multiple HD-audio devices on a single machine (e.g. on-board audio and HDMI on graphic cards), so we need to support multiple devices with snd-hda-intel driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] snd hda suspend latency: shorten codec readIngo Molnar
not sleeping for every codec read/write but doing a short udelay and a conditional reschedule has cut suspend+resume latency by about 1 second on my T60. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] HDA-Intel - Add support for RV6xx HDMI audioWolke Liu
This patch is to add R6xx HDMI audio support. Meanwhile, the device ID in the previous patch is changed. I have checked the patch from Herton Ronaldo Krzesinski, it's right as our spec said. :) Signed-off-by: Wolke Liu <Wolke.Liu@amd.com> Signed-off-by: Andrea Zhang <Andrea.Zhang@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] HDA-Intel - Add support for RV610/RV630 HDMI audioHerton Ronaldo Krzesinski
The Audio interface on HD2400/HD2600 cards isn't currently detected by snd-hda-intel. I added missing pci device ids for RV610 and RV630, but I only had a HD2400 pro card to test, where now the audio interface is detected (and no need to change patch_atihdmi.c, as the codec vendor id remains 0x1002aa01 for which we already have an entry there). I also couldn't test if sound pass-trough is ok (and I don't know how to), but at least now the device is detected. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-08Revert "hda_intel suspend latency: shorten codec read"Linus Torvalds
This reverts commit 57a04513cb35086d54bcb2cb92e6627fc8fa0fae. Harald Dunkel reports that it broke sound for him: "Alsa stopped working for me. I still can access /dev/dsp, change the volume and so on, but the speakers are quiet." Reverting it fixed things for him. Reported-and-tested-by: Harald Dunkel <harald.dunkel@t-online.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-06hda_intel suspend latency: shorten codec readIngo Molnar
not sleeping for every codec read/write but doing a short udelay and a conditional reschedule has cut suspend+resume latency by about 1 second on my T60. The patch also fixes the unexpected codec-connection errors that happen more often in the new power-save mode: http://lkml.org/lkml/2007/11/8/255 http://bugzilla.kernel.org/show_bug.cgi?id=9332 Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16[ALSA] alsa: Add the MCP79 support to hda_intel driverPeer Chen
Add the MCP79 support to hda driver. The patch base on kernel 2.6.23-rc7 Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] alsa-kernel: schedule_timeout() fixesRene Herman
Fix schedule_timeout() use in alsa-kernel. Mostly just schedule_timeout(1) --> schedule_timeout_uninterruptible(1) The wavefront_synth one fixes the surrounding loop as well. In ymfpci_main, delete a superfluous set_current_state() and in soc/soc-dapm.c replace an _interruptible with _uninterruptible in some debug code; it's not waiting for signals. Signed-off-by: Rene Herman <rene.herman> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] Intel HD Audio: Use list_for_each_entry(_safe)Matthias Kaehlcke
Intel HD Audio: Use list_for_each_entry(_safe) instead of list_for_each(_safe) Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Improve HD-audio codec probing robustnessDanny Tholen
When modem is disabled in the BIOS, detection of the number of codecs always fails after booting if STATESTS is not cleared first. This patch fixes this problem and also adds an error check in a place where a read error would lead to a very large number of pointless loops. Signed-off-by: Danny Tholen <obiwan@mailmij.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Fix resume logic, when dynamic power managment is onMaxim Levitsky
Comment in hda_intel.c states that 'the explicit resume is needed only when POWER_SAVE isn't set', but this is not true. There is no code that will automaticly power up the codec on resume, but only code that powers it up when user accesses it. So if user leaves a sound playing, codec will not be powered To fix that I check if there are any codecs that should be powered codec->power_count, and if so I power them up together with main controller. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Add probe_mask blacklistTakashi Iwai
Added the black-list of probe_mask option to set the default value for known non-working devices. Currently, Thinkpad *60 and *61 series are set. I'm afraid more will be added to the list in near future... Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Add position_fix quirk for Dell Precision 390Takashi Iwai
Dell Precision 390 needs position_fix=1 as default (ALSA bug#3295). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Don't do suspend if already powered downTakashi Iwai
In the power-saving mode, the suspend is done dynamically at power-down. So we don't have to call suspend stuff explicitly if it's already powered down. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Add power_save_controller module optionTakashi Iwai
Add power_save_controller module option instead of define flag. Also, added descriptions of new module options in ALSA-Configuration.txt. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Fix resume with power saveTakashi Iwai
The controller power wasn't turned on properly at resume due to the power-saving patch. Now fixed. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Add POWER_SAVE optionTakashi Iwai
Added CONFIG_SND_HDA_POWER_SAVE kconfig. It's an experimental option to achieve an aggressive power-saving. With this option, the driver will turn on/off the power of each codec and controller chip dynamically on demand. The patch introduces a new module option 'power_save'. It specifies the second of time-out for automatic power-down. As default, it's 10 seconds. Setting 0 means to suppress the power-saving feature. The codec may have analog-input loopbacks, which are usually represented by mixer elements such as 'Mic Playback Switch' or 'CD Playback Switch'. When these are on, we cannot turn off the mixer and the codec chip has to be kept on. For bookkeeping these states, a new codec-callback is introduced. For the bus-controller side, a new callback pm_notify is introduced, which can be used to turn on/off the contoller appropriately. Note that this power-saving might cause slight click-noise at power-on/off. Also, it might take some time to wake up the codec, and might even drop some tones at the very beginning. This seems to be the side-effect of turning off the controller chip. This turn-off of the controller can be disabled by undefining HDA_POWER_SAVE_RESET_CONTOLLER in hda_intel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] hda-intel - Coding style fixesTakashi Iwai
Fix codes to follow more to the standard kernel coding style. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20[ALSA] hda-intel - Show the last command in warning messagesTakashi Iwai
Show the last issued command in warning messages when any communication error with CORB/RIRB occurs. Also, a bit code clean-up for composing the command value in *_send_cmd(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20[ALSA] Fix invalid schedule_timeout_interruptible()Takashi Iwai
Fixed the invalid use of schedule_timeout_interruptible() without checking pending signals. Simply replaced with schedule_timeout(). Suggestions thanks to Jeff Garzik. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20[ALSA] Add the MCP73/77 support to hda_intel driverPeer Chen
Add the MCP73/MCP77 support to hda driver. The patch base on kernel 2.6.22-rc4 Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] hda-intel - Add ATI RS780,R600 HDMI audio supportWolke Liu
This patch is for ATI RS780 and R600 HDMI support. Signed-off-by: Wolke Liu <wolke.liu@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] hda-intel - Fix detection of audio codec on Toshiba A100Takashi Iwai
Some boards have the audio codec on slot #3 while the modem codec on slot #0. The driver should continue to probe the slots when no audio codec is found. This fixes the problem of no device on Toshiba A100 (and some other ATI SB450 devices). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] hda-intel - Probe additional slots only if necessaryTakashi Iwai
Probing the codec slots on ATI controller causes problems on some devices like Acer laptops. On these devices, reading from codec slot 3 results in the communication failure with the codec chip. Meanwhile, some laptops (e.g. Gateway) have the codec connection only on slot 3, and probing this slot is mandatory for them. The patch improves the probing robustness. The additional slots are now checked only when no codecs are found in the primary three slots. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] hda_intel: build fixRalf Baechle
CC [M] sound/pci/hda/hda_intel.o sound/pci/hda/hda_intel.c:1508: error: position_fix_list causes a section type conflict Gcc like its __devinitdata readable not const, it seems. An alternative fix would be to remove the __devinitdata attribute but that would result in slight runtime bloat. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-16[ALSA] hda-intel - Fix HDA buffer alignmentJoachim Deguara
From the HDA spec it appears that the buffers written to the BDL and sent to a codec must be 128 byte aligned (section 4.5.1). The alignment was not happening especially when playing 6 channels. This patch set the alignment of buffers and periods to 128 bytes. Signed-off-by: Joachim Deguara <joachim.deguara@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-14[ALSA] hda-intel - Fix codec probe with ATI contorllersTakashi Iwai
ATI controllers may have up to 4 codecs while ICH up to 3. Thus the earlier fix to change AZX_MAX_CODECS to 3 cause a regression on some devices that have the audio codec at bit#3. Now max codecs is defined according to the driver type, either 3 or 4. Currently 4 is set only to ATI chips. Other might need the same change, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>