summaryrefslogtreecommitdiff
path: root/sound/pci
AgeCommit message (Collapse)Author
2014-01-31ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabledStephen Warren
Commit 384a48d71520 "ALSA: hda: HDMI: Support codecs with fewer cvts than pins" dynamically enabled each pin widget's PIN_OUT only when the pin was actively in use. This was required on certain NVIDIA CODECs for correct operation. Specifically, if multiple pin widgets each had their mux input select the same audio converter widget and each pin widget had PIN_OUT enabled, then only one of the pin widgets would actually receive the audio, and often not the one the user wanted! However, this apparently broke some Intel systems, and commit 6169b673618b "ALSA: hda - Always turn on pins for HDMI/DP" reverted the dynamic setting of PIN_OUT. This in turn broke the afore-mentioned NVIDIA CODECs. This change supports either dynamic or static handling of PIN_OUT, selected by a flag set up during CODEC initialization. This flag is enabled for all recent NVIDIA GPUs. Reported-by: Uosis <uosisl@gmail.com> Cc: <stable@vger.kernel.org> # v3.13 Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30ALSA: hda - add headset mic detect quirks for another Dell laptopHui Wang
When we plug a 3-ring headset on the Dell machine (Vendor ID: 0x10ec0255, Subsystem ID: 0x1028064d), the headset mic can't be detected, after apply this patch, the headset mic can work well. BugLink: https://bugs.launchpad.net/bugs/1260303 Cc: David Henningsson <david.henningsson@canonical.com> Tested-by: Doro Wu <fan-cheng.wu@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30Merge branch 'xonar-dg' of git://git.alsa-project.org/alsa-kprivate into ↵Takashi Iwai
for-next This completes the hardware support for the Asus Xonar DG/DGX cards, and makes them actually usable. This is v4 of Roman's patch set with some small formatting changes.
2014-01-29ALSA: oxygen: Xonar DG(X): cleanup and minor changesRoman Volkov
Remove old SPI control functions, change anti-pop init sequence, remove some garbage from structures. The 'Apply' functions must be called at the mixer initialization, otherwise mixer settings sometimes will not be applied at startup. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): modify high-pass filter controlRoman Volkov
Change the 'put' function of the high-pass filter control to use the new SPI functions. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): modify input select functionsRoman Volkov
First of all, we should not touch the GPIOs. They are not for selecting the capture source, but they seems just enable the whole audio input curcuit. The 'put' function calls the 'apply' functions to change register values. Change the order of capture sources. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): modify capture volume functionsRoman Volkov
Modify the input_vol_* functions to use the new SPI routines, There is a new applying function that will be called when the capture source changed. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): use headphone volume controlRoman Volkov
I tried both variants: volume control and impedance selector. In the first case one minus is that we can't change the volume of multichannel output without additional software volume control. However, I am using this variant for the last three months and this seems good. All multichannel speaker systems have internal amplifier with the volume control included, but not all headphones have this regulator. In the second case, my software volume control does not save the value after reboot. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): modify playback output selectRoman Volkov
Change the order of elements in the output select control. This will reduce the number of relay switches. Change 'put' function to call the oxygen_update_dac_routing() function. Otherwise multichannel playback does not work. Also there is a new function to apply settings, this prevents from duplicating the code. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): capture from I2S channel 1, not 2Roman Volkov
Actually CS4245 connected to the I2S channel 1 for capture, not channel 2. Otherwise capturing and playback does not work for CS4245. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): move the mixer code into another fileRoman Volkov
Moving the mixer code away makes things easier. The mixer will control the driver, so the functions of the driver need to be non-static. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: modify CS4245 register dumping functionRoman Volkov
Change the function to read the data from the new shadow buffer. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: modify adjust_dg_dac_routing functionRoman Volkov
When selecting the audio output destinations (headphones, FP headphones, multichannel output), the channel routing should be changed depending on what destination selected. Also unnecessary I2S channels are digitally muted. This function called when the user selects the destination in the ALSA mixer. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): modify DAC/ADC parameters functionRoman Volkov
When selecting the audio sample rate for CS4245, the MCLK divider should also be changed. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): modify initialization functionsRoman Volkov
Change CS4245 initialization: different sequence and GPIO values, according to datasheets and reverse-engineering information. Change cleanup/resume/suspend functions, since they use initialization. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: Xonar DG(X): add new CS4245 SPI functionsRoman Volkov
Add the new SPI write and read functions. The SPI read function is used for creating initial registers dump and may be used for debugging purposes. SPI operations are cached, so there is a new function to manage the cache (shadow). I have to remove the shift from the CS4245_SPI_* constants, since when we are performing the reading, we need to shift by 8 instead of 16. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: additional definitions for the Xonar DG/DGX cardRoman Volkov
Add additional constants to the xonar_dg.h file: capture and playback sources. Move GPIO_* constants and the dg struct to the header file from the xonar_dg.c file. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: change description of the xonar_dg.c fileRoman Volkov
Add some additional information in comments and my copyright. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: export oxygen_update_dac_routing symbolRoman Volkov
When the user switches the output from stereo to multichannel or vice versa, the driver needs to update the channel routing. Instead of creating additional subroutines, I better export existing oxygen_update_dac_routing symbol from the oxygen mixer and call this function. It calls model.adjust_dac_routing() and my function does the work. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: add mute mask for the OXYGEN_PLAY_ROUTING registerRoman Volkov
The Xonar DG/DGX driver needs this mask to mute unnecessary channels. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: modify the SPI writing functionRoman Volkov
Modify the oxygen_write_spi() function to use the newly introduced oxygen_wait_spi() function. Change return value from void to int, so it can return error codes. Older drivers just ignore that return value, new drivers can check this value. We need to wait AFTER initiating the SPI transaction, otherwise read operation will not work. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: oxygen: add the separate SPI waiting functionRoman Volkov
The oxygen_wait_spi() function now performs waiting when the SPI bus completes a transaction. Introduce the timeout error checking and increase timeout to 200 from 40. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29ALSA: hda - Add parameter for dumping processing coefficientsDavid Henningsson
Processing coefficients are often a vital part of the codec's configuration, so dumping them can be important. However, because they are undocumented and secret, we do not want to enable this for all codecs by default. Therefore instead add this as a debugging parameter. I have prepared for codecs that want to enable this by default by the extra dump_coef bitfield, but unsure if we want to do that as long as the (unlikely, but still) race remains. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-25ALSA: hda - Fix silent output on MacBook Air 1,1Adrien Vergé
Similarly to other Apple products, MBA 1,1 needs a specific quirk. Pin 0x18 must be set to VREF_50 to have sound output. This was no longer done since commit 1a97b7f, resulting in a mute built-in speaker. This patch corrects the regression by creating a fixup for the MBA 1,1. Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882") Cc: <stable@vger.kernel.org> [v3.4+] Tested-by: Adrien Vergé <adrienverge@gmail.com> Signed-off-by: Adrien Vergé <adrienverge@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-22ALSA: hda - Apply +5dB output amp on ASUS Zenbook UX31ATakashi Iwai
ASUS Zenbook UX31A has yet another problem -- softer output level than others. According to the measurement, the peak output difference between 31A and 31E is 5dB. As ALC269VB has a COEF for the class-D pre-amp, let's apply it for +5dB. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-22ALSA: cs46xx: Fix memory leak at destructorTakashi Iwai
The release of module object itself was forgotten. Spotted by COVERIY CID 1162828. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-16ALSA: hda - add headset mic detect quirks for some Dell machinesHui Wang
When we plug a 3-ring headset on some Dell machines, the headset mic can't be detected, after apply this patch, the headset mic can work well on all those machines. On the machine with the Subsytem ID 0x10280610, if we use ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, the headset mic can be detected and work well, but the sound can't be outputed via headphone anymore, use ALC269_FIXUP_DELL3_MIC_NO_PRESENCE can fix this problem. BugLink: https://bugs.launchpad.net/bugs/1260303 Cc: David Henningsson <david.henningsson@canonical.com> Tested-by: David Chen <david.chen@canonical.com> Tested-by: Cyrus Lien <cyrus.lien@canonical.com> Tested-by: Shawn Wang <shawn.wang@canonical.com> Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: hda - Fix endless vmaster hook call in thinkpad_helper.cTakashi Iwai
The new vmaster hook, update_tpacpi_mute_led(), calls the original vmaster hook, but I forgot to save the original hook function but keep calling the updated one, which of course results in a stupid endless loop. Fixed now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: hda - automute via amp instead of pinctl on some AIO modelsHui Wang
On some AIO (All In One) models with the codec alc668 (Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack, the system will switch the output to headphone and set the speaker to automute as well as change the speaker Pin-ctls from 0x40 to 0x00, this will bring loud noise to the headphone. I tried to disable the corresponding EAPD, but it did not help to eliminate the noise. According to Takashi's suggestion, we use amp operation to replace the pinctl modification for the automute, this really eliminate the noise. BugLink: https://bugs.launchpad.net/bugs/1268468 Cc: David Henningsson <david.henningsson@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13ALSA: hda - Apply codec power_filter to FG nodesTakashi Iwai
Apply the codec->power_filter to the FG nodes in general for reducing hackish set_power_state ops override in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13ALSA: hda - Don't set indep_hp flag for old AD codecsTakashi Iwai
Some old AD codecs don't like the independent HP handling, either it contains a single DAC (AD1981) or it mandates the mixer routing (AD1986A). This patch removes the indep_hp flag for such codecs. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68081 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-11ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masksTakashi Iwai
The PCI devices with DMA masks smaller than 32bit should enable CONFIG_ZONE_DMA. Since the recent change of page allocator, page allocations via dma_alloc_coherent() with the limited DMA mask bits may fail more frequently, ended up with no available buffers, when CONFIG_ZONE_DMA isn't enabled. With CONFIG_ZONE_DMA, the system has much more chance to obtain such pages. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-10ALSA: ctxfi - Work around emu20k1 glitch to prevent buffered sound data lossSarah Bessmer
Occasionally, on playback stream ringbuffer wraparound, the EMU20K1 hardware will momentarily return 0 instead of the proper current(loop) address. This patch handles that case, fixing the problem of playback position corruption and subsequent loss of buffered sound data, that occurs with some common buffering layout patterns(e.g. multiple simultaneous output streams with differently-sized or non-power-of-2-sized buffers). An alternate means of fixing the problem would be to read the ca register continuously, until two sequential reads return the same value; however, that would be a more invasive change, has performance implications, and isn't necessary unless there are also issues with the value not being updated atomically in regards to individual bits or something similar(which I have not encountered through light testing). I have no EMU20K2 hardware to confirm if the issue is present there, but even if it's not, this change shouldn't break anything that's not already broken. Signed-off-by: Sarah Bessmer <aotos@fastmail.fm> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: Remove memory reservation code from memalloc helperTakashi Iwai
Nowadays we have CMA for obtaining the contiguous memory pages efficiently. Let's kill the old kludge for reserving the memory pages for large buffers. It was rarely useful (only for preserving pages among module reloading or a little help by an early boot scripting), used only by a couple of drivers, and yet it gives too much ugliness than its benefit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codecMengdong Lin
Broadwell and Haswell have the same behavior on display audio. So this patch defines is_haswell_plus() to include codecs for both Haswell and its successor Broadwell, and apply all Haswell fix-ups to Broadwell. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: hda - add codec ID for Broadwell display audio codecMengdong Lin
This patch adds codec ID (0x80862808) and module alias for Broadwell display codec. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: hda - add device ID for Broadwell display audio controllerMengdong Lin
This patch adds the device ID for Intel Broadwell display HD-Audio controller, and applies Haswell properties to this device. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Split Thinkpad ACPI-related codeTakashi Iwai
Both patch_realtek.c and patch_conexant.c contain the fairy same code snippet for supporting Thinkpad ACPI LED controls. Split them into thinkpad_helper.c and include it from both places. Although this isn't the best approach from the code size POV, the probability for coexistence of both Realtek and Conexant codecs on a single machine is pretty low, thus it'll end up with less memory footprint than splitting to yet another module. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Don't create duplicated ctls for loopback pathsTakashi Iwai
AD1986A mic pins (0x1d and 0x1f) share the same widget for controlling the loopback volume/mute, but the generic parser didn't check it. This ended up with the duplicated controls for the same effect. This patch adds the check of the duplication for avoiding it. After this fix, there will be only one control although it affects both paths; this remaining issue should be fixed later in a different patch. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Correct AD1986A 3stack pin configsTakashi Iwai
The 3stack pin configs for AD1986A codec had incorrect values that resulted in broken mic and line-in. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Add consistent tag names for firmware patchTakashi Iwai
Some tags used in the firmware patch file are inconsistent with hwdep sysfs file names, such as, the firmware patch takes [hint] tag while sysfs file is */hints. This makes even me referring back to the document often. Let's provide the same tag names as sysfs for reducing confusions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - firmware patch code cleanupTakashi Iwai
Just a code refactoring: the need_codec flag in hda_patch_item struct can be removed by checking the current mode instead. No functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Increment default stream numbers for AMD HDMI controllersTakashi Iwai
It turned out that some AMD HDMI controllers still don't provide proper values in GCAP register (all zero), and the driver assigns only one stream in that case, although the connected codec chip supports more than one stream. In this patch, the default max number of streams for AMD HDMI controllers is increased to 8, which should suffice for most use cases. The overhead by this increase is more azx_dev struct and BDL allocations, so it's negligible. Of course, if the controller provides a proper GCAP register, the register value would be used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Minor code optimization for patch_realtek.cTakashi Iwai
No functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: rme9652: fix a missing comma in channel_map_9636_ds[]Takashi Iwai
The lack of comma leads to the wrong channel for an SPDIF channel. Unfortunately this wasn't caught by compiler because it's still a valid expression. Reported-by: Alexander Aristov <aristov.alexander@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: cs5535audio: use named constants for pci_power_t valuesJulia Lawall
The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev; @@ pci_set_power_state(pdev, - 3 + PCI_D3hot ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: hda - Disable Front HP jack detection on Gigabyte Z87X-UD3HDavid Henningsson
This motherboard seems to have a flaky jack detection - when the front HP is not present, the jack state quickly switches on and off. This has been reported by three people in the bug, so I doubt it's a user error this time. BugLink: https://bugs.launchpad.net/bugs/1248116 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05Merge branch 'for-linus' into for-nextTakashi Iwai
2013-12-20ALSA: hda - Enable subwoofer on Dell Vostro 5460/5470David Henningsson
In this case, there are two DACs, and DAC 0x03 is mono. In order to make headphones and front speaker use DAC 0x02, and subwoofer use DAC 0x03, we artificially cut the connection from nodes 0x14 and 0x15 to node 0x03, so they can only use DAC 0x02. In addition, the 5460 and 5470 differs in the sense that 5470 also needs a headset mic patch, whereas 5460 has individual detection for headphone and headset mic. BugLink: https://bugs.launchpad.net/bugs/1211920 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-20ALSA: hda - Fix wrong <acpi/acpi.h> inclusion in Thinkpad ACPI users.Lv Zheng
CONFIG_ACPI dependent code should include <linux/acpi.h> instead of directly including <acpi/acpi.h>. This patch cleans up such wrong inclusions for Thinkpad ACPI users. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>