summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
AgeCommit message (Collapse)Author
2014-07-25apalis/colibri t30: make hda 2nd sound card hackMarcel Ziswiler
Hack HDA driver to make it the 2nd rather than the first sound card as the first one should be the SGTL5000 which is always present on our T30 modules. Especially on Ixora where there is no HDA codec on the carrier board HDA being the first sound card does not make much sense even more though as there was no primary device (e.g. device=hw:0,0).
2012-03-09arm: tegra: hda: Improve resume timeScottPeterson
Improve the resume time of the HD Audio driver by replacing selected msleep() functions with mdelay(). msleep() return times are not deterministic. Signed-off-by: ScottPeterson <speterson@nvidia.com> Reviewed-on: http://git-master/r/86896 (cherry picked from commit eccbe7983d1b010cc60b49bfb13d041b3a0957d3) Change-Id: I261ba51e7f8414bca50076ae73473114a308645c Reviewed-on: http://git-master/r/88090 Reviewed-by: Scott Peterson <speterson@nvidia.com> Tested-by: Scott Peterson <speterson@nvidia.com>
2012-03-02ALSA: HDA: Don't power up hda codec from resumeSumit Bhattacharya
Remove snd_hda_power_up()/snd_hda_power_down() sequence from HDA codec resume since it add around 90ms delay. This code was not essential for HDA driver to work properly after suspend-resume cycle. Bug 932606 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/80040 (cherry picked from commit 2ed8667c2bdfd4c8cbe371530b066b537aa9ae62) Change-Id: I0ffb120eb0a54f6c4e20aaf96c5ac2d0f5ab6949 Reviewed-on: http://git-master/r/87188 Tested-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-01-20ALSA: HDA: Fix MODPOST errorsSumit Bhattacharya
Bug 923312 Change-Id: I7c68f261989d2ca1ef7b273b7d41a519bc91c868 Reviewed-on: http://git-master/r/75700 Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/76466 Reviewed-by: Automatic_Commit_Validation_User
2012-01-11ALSA: HDA: Set position fix to LPIB for an Atom/Poulsbo based deviceDavid Henningsson
commit 1c89fe3b51a2f8068f2f9faa9c48584151416583 upstream. 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 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Ib024489660295b8842215eb8a3cd25feec25e00d Reviewed-on: http://git-master/r/74605 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2011-12-21ALSA: HDA: Disable all references of clocks at end of suspendSumit Bhattacharya
HDA driver used to enable clocks during suspend only if there is no active clock. But this logic causes a race condition when hda codec power work thread disables the active instance of hda clocks in middle of suspend. To avoid this race condition always enable HDA clocks at start of suspend operation and disable all active references of HDA clocks at end of suspend. Since HDA driver suspend also suspends all active codecs there is no chance of getting HDA clock disable call after completion of suspend. Bug 915436 Change-Id: I4956ba28488d6d445ea2d53fb2592897a2ad83bb Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/70315 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-12-08ALSA: hda: Support disabling of clocks for TegraSumit Bhattacharya
This change is basically a WAR. Tegra T30 HDA controller does not support presence detect event generateion when all HDA clocks are off. This change forcefully enables power disabling of HDA chip and clocks while not in use. As a side effect Tegra HDA driver misses the unsolicited HDMI plug in event when in power off mode. To overcome this limitation whenever user space tries to open an HDMI pcm stream Tegra HDA controller requests HDMI driver to setup presence detect registers after enabling the chip and waits until it gets valid ELD data. Bug 904530 Change-Id: I8c8cb6fe7935ba8b16c421beca68cb1d7f576212 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/66972 Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-12-08ALSA: hda: Disable platform clocks when not requiredSumit Bhattacharya
Add support for disabling of platform driver clocks when HDA is idle to reduce HDA power consumption. Take care of enabling of HDA clocks before accessing any hardware register. Bug 904530 Change-Id: I51be7990e900cef3dac376d9635c48cd1ffbfa99 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/66886 Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-11-30ALSA: hda: Add support for Tegra HDA platform driver interfaceSumit Bhattacharya
Bug 872652 Change-Id: I10c18afb496a605d47a09c7c6dc924459b4728eb Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/64335 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Gerrit_Virtual_Submit Rebase-Id: Rbaf53a2382f50c1a552bafd9d54840779160b055
2011-11-30ALSA: hda: Add hda platform driver supportSumit Bhattacharya
It is possible that some chips have a HD-audio controller which is not installed on a PCI bus. Nvidia Tegra has Azalia HD-audio controller but it uses proprietery interface to communicate with the controller. This commit adds a platform driver interface support to HDA driver which can be used by non-PCI bus based HDA controller. Bug 872652 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: I73fb55858387f511738a09de3f52e7d326353ebf Reviewed-on: http://git-master/r/59504 Tested-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Rebase-Id: R51a3866f0cb9889d947d6c7045ad7e8976cb3e69
2011-11-11ALSA: hda - Fix a regression for DMA-position check with CA0110Takashi Iwai
commit 69f9ba9b0cad67bc03f0a096f7f274de795ca844 upstream. 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> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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-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-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-27ALSA: 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
2011-01-18ALSA: hda - Add support for VMware controllerBankim Bhavsar
Add the new PCI ID 0x15ad and device ID 0x1977 for VMware HDAudio Controller. [changed to use AZX_DRIVER_GENERIC by tiwai] Signed-off-by: Bankim Bhavsar <bbhavsar@vmware.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13Merge branch 'topic/misc' into for-linusTakashi Iwai
2010-12-30ALSA: hda: Use LPIB quirk for Dell Inspiron m101z/1120Daniel T Chen
Sjoerd Simons reports that, without using position_fix=1, recording experiences overruns. Work around that by applying the LPIB quirk for his hardware. Reported-and-tested-by: Sjoerd Simons <sjoerd@debian.org> Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06ALSA: hda: Use position_fix=1 for Acer Aspire 5538 to enable capture on ↵Daniel T Chen
internal mic BugLink: https://launchpad.net/bugs/685161 The reporter of the bug states that he must use position_fix=1 to enable capture for the internal microphone, so set it for his machine's PCI SSID. Verified using 2.6.35 and the 2010-12-04 alsa-driver build. Reported-and-tested-by: Ralph Wabel <rwabel@gmx.net> Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: hda-intel: support for period wakeup disablingClemens Ladisch
Allow disabling period wakeup interrupts for HDA PCM streams. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-22ALSA: hda - Add workarounds for CT-IBG controllersTakashi Iwai
Creative IBG controllers require the playback stream-tags to be started from 1, instead of capture+1. Otherwise the stream stalls. Reported-by: Wai Yew CHAY <wychay@ctl.creative.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-21ALSA: hda - Add some workarounds for Creative IBGTakashi Iwai
Creative HD-audio controller chips require some workarounds: - Additional delay before RIRB response - Set the initial RIRB counter to 0xc0 The latter seems to be done in general in Windows driver, so we may use this value later for all types if it's confirmed to work better. Reported-by: Wai Yew CHAY <wychay@ctl.creative.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-12ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllersDavid Henningsson
Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers. BugLink: http://launchpad.net/bugs/465942 BugLink: http://launchpad.net/bugs/580749 BugLink: http://launchpad.net/bugs/587546 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-30ALSA: HDA: Add position_fix=3 module option, and refactor related codeDavid Henningsson
What was previously known as via_dmapos_patch, and hard-coded to be used for VIA and ATI controllers, is now configurable through a module option. The background is that some VIA controllers seem to prefer via_dmapos_patch to be turned off. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-27ALSA: hda: add Vortex86MX PCI idsOtavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16ALSA: hda - Reduce pci id list for Intel with class idTakashi Iwai
Most of Intel controllers work as generic HD-audio without quirks, and it'll be hopefully so in future. Let's mark pci id with the PCI_CLASS_MULTIMEDIA_HD_AUDIO for Intel so that the driver will work with any new control chips in future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-13ALSA: hda_intel: ALSA HD Audio patch for Intel Patsburg DeviceIDsSeth Heasley
This patch adds the Intel Patsburg (PCH) HD Audio Controller DeviceIDs. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-06ALSA: hda - Make converter setups stickyTakashi Iwai
So far, we reset the converter setups like the stream-tag, the channel-id and format-id in prepare callbacks, and clear them in cleanup callbacks. This often causes a silence of the digital receiver for a couple of seconds. This patch tries to delay the converter setup changes as much as possible. The converter setups are cached and aren't reset as long as the same values are used. At suspend/resume, they are cleared to be recovered properly, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - More relax for pending period handlingTakashi Iwai
Since the pending periods are often bogus and take long time until actually processed, it often results in a high CPU usage of the hd-audio workq. Overall it's better to have low CPU consumption by avoiding a too tight loop rather than the wake-up timing accuracy. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Set Stream Type in Stream Format according to AES0Anssi Hannula
Set bit 15 (Stream Type) of HDA Stream Format to 1 (Non-PCM) when IEC958 channel status bit 1 (AES0 & 0x02) is set to 1 (non-audio). This is a prequisite for HDMI HBR passthrough. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-02Merge branch 'master' of git.alsa-project.org:alsa-kernel into fix/hdaTakashi Iwai