summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
AgeCommit message (Collapse)Author
2012-03-07ALSA: hda - Set codec to D3 forcibly even if not usedTakashi Iwai
We've seen a problem with a pop-noise at suspend/resume on a HP machine with ALC269, and it turned out to be an issue that the controller going to D3 while the codec is unused. When the device is once suspended and resumed and kept unused, the driver doesn't initialize the codecs. Instead, the codec chips are set up dynamically at the first usage. Now, suppose the device going to suspend again before the codec is set up. The controller is turned off to D3 while the codec chips are untouched. This caused a pop noise because the codec chip might have been turned on implicitly by the hardware. As a workaround, the codec chip needs to be set to D3 when going to suspend no matter whether it was used or not. Also, for making it happening, the controller has to be always set up in the resume path. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-28ALSA: hda - Add position_fix=4 (COMBO) optionTakashi Iwai
This patch adds a new position_fix option value, 4, as a combo mode to use LPIB for playbacks and POSBUF for captures. It's the way recommended by Intel hardware guys. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-08ALSA: hda - Add Lynx Point HD Audio Controller DeviceIDsSeth Heasley
This patch adds the HD Audio DeviceIDs for the Intel Lynx Point PCH. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23ALSA: hda - explicitly set buffer-align flag for Nvidia controllersTakashi Iwai
It turned out that Nvidial (HDMI) controllers require the buffer alignment. Thus it's better to mark it requiring the alignment, so that we can switch to non-aligned behavior as default in future. Also, change the module paramter to be bint, in order to let user overriding the default value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23Merge branch 'fix/hda' into topic/hdaTakashi Iwai
The fix for buffer-alignment is required for further works.
2012-01-23ALSA: hda - Fix buffer-alignment regression with Nvidia HDMITakashi Iwai
The commit 2ae66c26550cd94b0e2606a9275eb0ab7070ad0e ALSA: hda: option to enable arbitrary buffer/period sizes introduced a regression on machines with Intel controller and Nvidia HDMI. The reason is that the driver modifies the global variable align_buffer_size when an Intel controller is found, and the Nvidia HDMI controller is probed after Intel although Nvidia chips require the aligned buffers. This patch fixes the problem by moving the flag into the local struct so that it's not affected by other controllers. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42567 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-20ALSA: hda - Use bint for enable_msi optionTakashi Iwai
The new bint module option type suits well with this one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-13ALSA: HDA: Use LPIB position fix for Macbook Pro 7,1David Henningsson
Several users have reported "choppy" audio under the 3.2 kernel, and that changing position_fix to 1 has resolved their problem. The chip is an nVidia Corporation MCP89 High Definition Audio, [10de:0d94] (rev a2). Cc: stable@kernel.org (v3.2+) BugLink: https://bugs.launchpad.net/bugs/909419 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-12Merge branch 'topic/hda' into for-linusTakashi Iwai
2012-01-08ALSA: HDA: Remove Poulsbo position fix quirksDavid Henningsson
Now that we have changed the poulsbo chip to use LPIB position fix, we can remove the individual machine quirks that do the same thing. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08ALSA: HDA: Use LPIB position fix for OaktrailDavid Henningsson
According to the thread on alsa-devel, the LPIB method is to prefer for Oaktrail controller chip. Reference: http://mailman.alsa-project.org/pipermail/alsa-devel/2012-January/047800.html Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-31ALSA: hda_intel: Add Oaktrail identifiersLi Peng
Oaktrail has 0x8086, 0x080a - AZX_DRIVER_SCH Taken from the Meego patches for Oaktrail Signed-off-by: Li Peng <peng.li@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-20Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-12-19ALSA: module_param: make bool parameters really boolRusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-15ALSA: HDA: Use LPIB Position fix for Intel SCH PoulsboDavid Henningsson
Several people with this chipset have reported inconsistent/sloppy values for position reporting when the DMA position buffer is used, and that setting position_fix=1 have fixed their problems. BugLink: https://bugs.launchpad.net/bugs/825709 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-14ALSA: hda - Check non-snoop in a single placeTakashi Iwai
Merge the checks for VIA and ATI-HDMI into a single place for better code-flow management. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-14ALSA: HDA: Add support for new AMD productsAndiry Xu
This patch adds HDMI audio support for new AMD products. As HW default disable snoop, force non-snoop mode in HD audio driver. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-12ALSA: HDA: Set position fix to LPIB for an Atom/Poulsbo based deviceDavid Henningsson
For the Asus 1101HA, reporting position by reading the DMA position buffer map seems unstable and often wrong. The reporter says that position_fix=LPIB works much better (although not 100%, but this is probably due to other issues). The controller chip is an Intel Poulsbo 8086:811b (rev 07) controller, and complete alsa-info is available here: https://launchpadlibrarian.net/86691768/alsa-info.txt.1TNwyE5Ea7 Cc: stable@kernel.org (3.0+) BugLink: http://bugs.launchpad.net/bugs/825709 Tested-by: Stefano Lodi Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-01Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-11-29ALSA: hda_intel - revert a quirk that affect VIA chipsetsMarc Vertes
This quirk sould be reverted. It has the following probems: 1) The quirk was intended to "ASUS MV2-MX SE" motherboards only, but the ID used matches a much broader range, potentially all boards containing a VIA chipset model in the family of vendor VIA 0x1106 and audio device ID 0x3288, which encompasses VIA-VT82xx, VIA-VT1xx and VIA-VT20xx chipsets. 2) VIA chipsets rely on azx_via_get_position() to handle correctly dma transfers during capture. Using POS_FIX_LPIB instead of POS_FIX_VIACOMBO leads to partially corrupted input buffers during capture. The effects of this bug are not immediately visible, it took strong DSP expertise, some expensive signal generator and a spectrum analyzer to identify it and verify correct behaviour using original default. 3) It's almost certain that the quirk did not fix the real problem, if there was one. Refer to original submission: http://mailman.alsa-project.org/pipermail/alsa-devel/2010-February/025109.html Signed-of-by: Marc Vertes <mvertes@sigfox.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-26ALSA: hda - Supports more audio streamsTakashi Iwai
So far, the driver supports up to 10 streams. This is a restriction in hda_intel.c and hda_codec.c: in the former, the fixed array size limits the amount, and in the latter, the fixed device-number assignment table (in get_empty_pcm_device()) limits the possibility. This patch reduces the restriction by - using linked list for managing PCM instances in hda_intel.c, and - assigning non-fixed device numbers for the extra devices Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06ALSA: hda - Fix a regression for DMA-position check with CA0110Takashi Iwai
The regression-fix in 3.1 for the check of DMA-position validity caused yet another regression for CA0110. As usual, this hardware seems working only with LPIB properly. Adding the appropriate driver-caps bit to force LPIB fixes the problem. Reported-and-tested-by: Andres Freund <andres@anarazel.de> Cc: <stable@kernel.org> [v3.1] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-19Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-10-18ALSA: hda - Add position_fix quirk for Dell Inspiron 1010Takashi Iwai
The previous fix for the position-buffer check gives yet another regression on a Dell laptop. The safest fix right now is to add a static quirk for this device (and better to apply it for stable kernels too). Reported-by: Éric Piel <Eric.Piel@tremplin-utc.net> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-06ALSA: hda - Distinguish each substream for better sticky assignmentTakashi Iwai
The commit ef18beded8ddbaafdf4914bab209f77e60ae3a18 introduced a mechanism to assign the previously used slot for the next reopen of a PCM stream. But the PCM device number isn't always unique (it may have multiple substreams), and also the code doesn't check the stream direction, thus both playback and capture streams share the same device number. For avoiding this conflict, make a unique key for each substream and store/check this value at reopening. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-06Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-09-30ALSA: hda - Fix a regression of the position-buffer checkTakashi Iwai
The commit a810364a0424c297242c6c66071a42f7675a5568 ALSA: hda - Handle -1 as invalid position, too caused a regression on some machines that require the position-buffer instead of LPIB, e.g. resulting in noises with mic recording with PulseAudio. This patch fixes the detection by delaying the test at the timing as same as 3.0, i.e. doing the position check only when requested in azx_position_ok(). Reported-and-tested-by: Rocko Requin <rockorequin@hotmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-28ALSA: hda - Add snoop optionTakashi Iwai
Added a new option "snoop" for the traffic control of the HD-audio controller chip. When set to 0, the non-snooping mode is used with the traffic control bit is set in each stream control register. This may allow better operations in the low power mode, but the actual implementation is depending pretty much on the chipset. As already implemented, more or less each chipset has own snoop-control register bit. Now this setup refers to the snoop option, too. Also, a new VIA chipset may require the non-snooping mode when set so in BIOS. In such a case, the option value is overridden. As default, it's still set to snoop=1 for keeping the same behavior as before. In near future, it'll be set to 0 as default after checking it works in every system well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04ALSA: hda: option to enable arbitrary buffer/period sizesPierre-Louis Bossart
Add new parameter to disable rounding of buffer/period sizes to multiples of 128 bytes. This is more efficient in terms of memory access but isn't required by the HDA spec and prevents users from specifying exact period/buffer sizes. For example for 44.1kHz, a period size set to 20ms will be rounded to 19.59ms. Tested and enabled on Intel HDA controllers. Option is disabled by default for other controllers. Tested-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22Merge branch 'topic/hda' into for-linusTakashi Iwai
2011-07-12ALSA: hda - Add Kconfig for the default buffer sizeTakashi Iwai
Add a Kconfig entry to specify the default buffer size. Distros using PulseAudio can choose a larger value here. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-17ALSA: HDA: Remove redundant LPIB quirks for ATI chipsetDavid Henningsson
Now that we have changed the position_fix default for ATI and AMD to be LPIB (see commit 50e3bbf989), we can remove the quirks that were added for ATI chipsets. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/*Takashi Iwai
The name argument of request_irq() appears in /proc/interrupts, and it's quite ugly when the name entry contains a space or special letters. In general, it's simpler and more readable when the module name appears there, so let's replace all entries with KBUILD_MODNAME. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: Use KBUILD_MODNAME for pci_driver.name entriesTakashi Iwai
The convention for pci_driver.name entry in kernel drivers seem to be the module name or equivalent ones. But, so far, almost all PCI sound drivers use more verbose name like "ABC Xyz (12)", and these are fairly confusing when appearing as a file name. This patch converts the all pci_driver.name entries in sound/pci/* to use KBUILD_MODNAME for more unified appearance. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: hda - Fix SSYNC register value for non-Intel controllersTakashi Iwai
SSYNC register was once defined as 0x34-37 in the old Intel datasheet, but corrected later to 0x38-3b. For fixing the register usage, a new bit-flag is introduced for indicating the old ICH SSYNC register, and ICH* PCI entries are added explicitly to enable this quirk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-07ALSA: hda - Judge playback stream from stream id in azx_via_get_position()Takashi Iwai
Instead of checking the azx_dev index with a fixed number (4), check the stream direction of the assigned substream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-07ALSA: hda - Handle -1 as invalid position, tooTakashi Iwai
When reading from the position-buffer results in -1, handle as it's invalid and falls back to LPIB mode as well as 0. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06ALSA: hda: Allow multple SPDIF controls per codecStephen Warren
Currently, the data that backs the kcontrols created by snd_hda_create_spdif_out_ctls is stored directly in struct hda_codec. When multiple sets of these controls are stored, they will all manipulate the same data, causing confusion. Instead, store an array of this data, one copy per converter, to isolate the controls. This patch would cause a behavioural change in the case where snd_hda_create_spdif_out_ctls was called multiple times for a single codec. As best I can tell, this is never the case for any codec. This will be relevant at least for some HDMI audio codecs, such as the NVIDIA GeForce 520 and Intel Ibex Peak. A future change will modify the driver's handling of those codecs to create multiple PCMs per codec. Note that this issue isn't affected by whether one creates a PCM-per-converter or PCM-per-pin; there are multiple of both within a single codec in both of those codecs. Note that those codecs don't currently create multiple PCMs for the codec due to the default HW mux state of all pins being to point at the same converter, hence there is only a single converter routed to any pin, and hence only a single PCM. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-28ALSA: fix hda AZX_DCAPS_NO_TCSEL quirk check in driver_capsLinus Torvalds
Commit 9477c58e3308 ("ALSA: hda - Reorganize controller quriks with bit flags") changed the driver type compares into various quirk bits. However, the check for AZX_DCAPS_NO_TCSEL got reverted: instead of clearing TCSEL for chipsets that have that standard capability, it cleared then when the NO_TCSEL bit was set. This can lead to noise and repeated sounds - a weird "echo" behavior. As the comment just above says: "Ensuring these bits are 0 clears playback static on some HD Audio codecs". Which is definitely true at least on my Core i5 Westmere system. Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-26ALSA: hda - Reorganize controller quriks with bit flagsTakashi Iwai
Introduce bit-flags indicating the necessary controller quirks, and set them in pci driver_data field. This simplifies the checks in the driver code and avoids the pci-id lookup in different places. Also, this patch adds the PCI ID entry for AMD Hudson. AMD Hudson requires a similar workaround like ATI SB while other generic ATI and AMD controllers don't need but some ATI-HDMI quirks. So, we need a different entry for Hudson. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20ALSA: hda - Use LPIB for ATI/AMD chipsets as defaultTakashi Iwai
ATI and AMD chipsets seem not providing the proper position-buffer information, and it also doesn't provide FIFO register required by VIACOMBO fix. It's better to use LPIB for these. Reported-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20Revert "ALSA: hda - Use position_fix=3 as default for AMD chipsets"Takashi Iwai
This reverts commit 447ee6a7cbbfb5ae7ab8f9b8b058b4a04fe398bf. The workaround introduced by this commit seems bogus. The AMD chipsets don't provide proper position-buffer nor FIFO value required by VIACOMBO fix. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17ALSA: hda - Enable snoop bit for AMD controllersTakashi Iwai
AMD Hudson controllers give noisy outputs when the buffer data is rewritten on the fly as PulseAudio does. This seems fixed by the snoop bit enabled just like ATI chipset. Also, disable 64bit DMA as now, to be sure. We can revisit this later. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04ALSA: hda - Use position_fix=3 as default for AMD chipsetsTakashi Iwai
AMD chipsets often behave pretty badly regarding the DMA position reporting. It results in the bad quality audio recording. Using position_fix=3 works well in general for them, so let's enable it as default for AMD. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26ALSA: hda - Enable sync_write workaround for AMD genericallyTakashi Iwai
The workaround for AMD chipset via sync_write flag seems needed for machines with Realtek codecs. So, it's better to activate it generically in hda_intel.c from the beginning. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20ALSA: hda - ALSA HD Audio patch for Intel Panther Point DeviceIDsSeth Heasley
This patch adds the HD Audio Controller DeviceIDs for the Intel Panther Point PCH. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: hda: Prevent writing ICH6_PCIREG_TCSEL on AMD systemsAdam Lackorzynski
azx_init_pci() always writes PCI config register ICH6_PCIREG_TCSEL although this looks to be only defined on Intel systems and has a different meaning on AMD systems. On AMD systems the PCI interrupt pin control register is modified instead. Since the meaning of offset 0x44 in device specific configuration space is unknown for devices by other vendors, we only exclude AMD systems to retain the current behaviour. Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14ALSA: HDA: Add position_fix quirk for an Asus deviceDavid Henningsson
The bug reporter claims that position_fix=1 is needed for his microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40). Reported-by: Kjell L. BugLink: http://bugs.launchpad.net/bugs/718402 Cc: stable@kernel.org Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10ALSA: hda - Don't handle empty patch filesTakashi Iwai
When an empty string is passed to patch option, the driver should ignore it. Otherwise it gets an error by trying to load it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18Merge branch 'fix/hda' into for-linusTakashi Iwai