aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-05-20ALSA: hda - Disable widget power-saving for ALC292 & coTakashi Iwai1-1/+2
We've got reports that ALC3226 (a Dell variant of ALC292) gives click noises at transition from D3 to D0 when the widget power-saving is enabled. Further debugging session showed that avoiding it isn't trivial, unfortunately, since paths are basically activated dynamically while the pins have been already enabled. This patch disables the widget power-saving for such codecs. Reported-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-20ALSA: hda - Reduce verbs by node power-savesTakashi Iwai1-0/+8
The widget (node) power-saves restore the widget states at each transition from D3 to D0 on each node. This was added in the commit [d545a57c5f84:ALSA: hda - Sync node attributes at resume from widget power saving]. However, the test was rater false-positive; this wasn't needed for any codecs. Since the resync may take significant number of additional verbs to be executed, it's better to reduce it. Let's disable it for now again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-18ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450Ansgar Hegerfeld1-0/+1
The Lenovo ThinkPad L450 requires the ALC292_FIXUP_TPT440_DOCK fix in order to get sound output on the docking stations audio port. This patch was tested using a ThinkPad L450 (20DSS00B00) using kernel 4.0.3 and a ThinkPad Pro Dock. Signed-off-by: Ansgar Hegerfeld <linux@hegerfeld.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-18ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724David Henningsson1-0/+12
This patch adds support for Conexant HD Audio codecs CX20721, CX20722, CX20723 and CX20724. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1454656 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-18ALSA: hda - Fix headset mic and mic-in for a Dell desktopDavid Henningsson1-1/+45
ALC662 does not need any special verbs to change the jack functionality, and enables mic in through the headphone jack mode by changing the direction of the headphone pin node. BugLink: https://bugs.launchpad.net/bugs/1454235 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-11ALSA: hda - Add headset mic quirk for Dell Inspiron 5548David Henningsson1-0/+7
This enables the headset microphone on Dell Inspiron 5548, or at least some variants of it. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1452175 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-05ALSA: hda/realtek - Add ALC298 alias name for DellKailang Yang1-0/+1
Add ALC3266 for Dell platform. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-04ALSA: hda/realtek - Fix typo for ALC286/ALC288Kailang Yang1-1/+0
Delete more one break for ALC286/ALC288. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-01ALSA: hda - Add headphone quirk for Lifebook E752Takashi Iwai1-0/+1
Fujitsu Lifebook E752 laptop needs a similar quirk done for Lifebook T731. Otherwise the headphone is always muted. Reported-and-tested-by: Christian Weber <we_chris@hotmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-29ALSA: emu10k1: Emu10k2 32 bit DMA modePeter Zubaj4-13/+21
Looks like audigy emu10k2 (probably emu10k1 - sb live too) support two modes for DMA. Second mode is useful for 64 bit os with more then 2 GB of ram (fixes problems with big soundfont loading) 1) 32MB from 2 GB address space using 8192 pages (used now as default) 2) 16MB from 4 GB address space using 4096 pages Mode is set using HCFG_EXPANDED_MEM flag in HCFG register. Also format of emu10k2 page table is then different. Signed-off-by: Peter Zubaj <pzubaj@marticonet.sk> Tested-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: hda - Fix missing va_end() call in snd_hda_codec_pcm_new()Takashi Iwai1-1/+2
Reported by coverity CID 1296024. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: emu10k1: Fix card shortname string buffer overflowTakashi Iwai2-4/+6
Some models provide too long string for the shortname that has 32bytes including the terminator, and it results in a non-terminated string exposed to the user-space. This isn't too critical, though, as the string is stopped at the succeeding longname string. This patch fixes such entries by dropping "SB" prefix (it's enough to fit within 32 bytes, so far). Meanwhile, it also changes strcpy() with strlcpy() to make sure that this kind of problem won't happen in future, too. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: hda - Add mute-LED mode control to ThinkpadTakashi Iwai1-0/+1
This patch adds the missing flag to enable "Mute-LED Mode" mixer enum ctl for Thinkpads that have also the software mute-LED control. Reported-and-tested-by: Pali Rohár <pali.rohar@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: hda - Fix mute-LED fixed modeTakashi Iwai1-9/+12
The mute-LED mode control has the fixed on/off states that are supposed to remain on/off regardless of the master switch. However, this doesn't work actually because the vmaster hook is called in the vmaster code itself. This patch fixes it by calling the hook indirectly after checking the mute LED mode. Reported-and-tested-by: Pali Rohár <pali.rohar@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: hda - Fix click noise at start on Dell XPS13Takashi Iwai2-5/+14
Dell XPS13 produces a click noise at boot up, and Gabriele spotted out that it's triggered by the initial pin control of the mic (NID 0x19). This has to be set to Hi-Z Vref while the driver initializes to Vref 80% as a normal mic. This patch fixes the generic parser code not to override the target vref if it has been already set by the driver, and adds a proper initialization of the target vref for this pin in the Realtek driver side. Reported-and-tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-24ALSA: hda - fix headset mic detection problem for one more machineHui Wang1-9/+15
We have two machines with alc256 codec in the pin quirk table, so moving the common pins to ALC256_STANDARD_PINS. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1447909 Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-23ALSA: hda/realtek - Fix Headphone Mic doesn't recording for ALC256Kailang Yang1-0/+1
Switch default pcbeep path to Line in path. Signed-off-by: Kailang Yang <kailang@realtek.com> Tested-by: Hui Wang <hui.wang@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-21ALSA: hda - fix "num_steps = 0" error on ALC256David Henningsson1-2/+3
The ALC256 does not have a mixer nid at 0x0b, and there's no loopback path (the output pins are directly connected to the DACs). This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)" error (and as a result, problems with amixer/alsamixer). If there's pcbeep functionality, it certainly isn't controlled by setting an amp on 0x0b, so disable beep functionality (at least for now). Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-21ALSA: hda - add AZX_DCAPS_I915_POWERWELL to BaytrailMengdong Lin1-1/+4
This patch addes AZX_DCAPS_I915_POWERWELL to BYT (Baytrail). Like Braswell and Skylake, the HDMI codec on Bytrail is also in the shared power well with GPU. This power well must be turned on before we reset link to probe the codec, to avoid communication failure with the codec. The side effect is that this power is always ON in S0 because the BYT HDMI codec does not support EPSS or D3ClkStop and so the controller doesn't enter D3 at runtime, and the HDMI codec and analog codec share a single physical HD-A link and so we cannot reset the HD-A link freely when we re-enable the power to use the HDMI codec. Next step is to test if an AGP reset or double AGP reset on BYT HDMI codec is okay to bring the HDMI codec back to a functional state after restoring the power. If okay, we can bind the power on/off with the HDMI codec PM without interrupting the analog audio. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-20ALSA: hda - only sync BCLK to the display clock for Haswell & BroadwellMengdong Lin1-0/+6
Only Intel Haswell and Broadwell have a separate HD-A controller (PCI device 3) for display audio, which needs to get 24MHz HD-A link BCLK from the variable display core clock through vendor specific registers EM4 & EM5. Other platforms (Baytrail, Braswell and Skylake) don't have this feature. So this patch checks the PCI device ID of the controller in haswell_set_bclk() and only sync BCLK for HSW and BDW. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-20ALSA: hda - Mute headphone pin on suspend on XPS13 9333Gabriele Mazzotta1-10/+7
Muting the headphone output pin right before the codec suspension prevents pop noises when headphones are plugged in (except for a barely audible click noise). This solution allows to truly save some power when headphones are plugged in unlike the previous solution (033b0a7ca9c: "ALSA: hda - Pop noises fix for XPS13 9333") Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-17ALSA: hda - potential (but unlikely) uninitialized variableDan Carpenter1-2/+2
This function is a bit unusual because it accepts negative values as "conn_len". It's theoretically possible for both "cache_len" and "conn_len" to be -ENOSPC and in that case we would oops trying to run memcmp() on the uninitialized "list" pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: hda - Fix regression for slave SPDIF setupsTakashi Iwai1-1/+1
The commit [a551d91473e5: ALSA: hda - Use regmap for command verb caches, too] introduced a regression due to a typo in the conversion; the IEC958 status bits of slave digital devices aren't updated correctly. This patch corrects it. Fixes: a551d91473e5 ('ALSA: hda - Use regmap for command verb caches, too') Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALIScott Wood1-2/+2
DEVICE_ALI previously would jump to port_inited after calling pci_iomap(), bypassing the check for bmaddr being NULL. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: hda - simplify azx_has_pm_runtimeDavid Henningsson1-1/+1
Because AZX_DCAPS_PM_RUNTIME is always defined as non-zero, the initial part of the expression can be skipped. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-13ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T450Jo-Philipp Wich1-0/+1
The Lenovo Thinkpad T450 requires the ALC292_FIXUP_TPT440_DOCK as well in order to get working sound output on the docking stations headphone jack. Patch tested on a Thinkpad T450 (20BVCTO1WW) using kernel 4.0-rc7 in conjunction with a ThinkPad Ultradock. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-13Merge branch 'for-next' into for-linusTakashi Iwai52-4424/+2887
2015-04-11ALSA: emu10k1: add toggles for E-mu 1010 optical portsMichael Gernoth1-0/+118
The optical ports on the E-mu 1010 (and dock) can be configured for ADAT- or S/PDIF-mode, which is currently hardcoded to ADAT. Add two mixer elements to expose this setting. Tested on an E-mu 1010 PCIe with connected Micro Dock. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11ALSA: emu10k1: handle dock disconnectsMichael Gernoth1-0/+9
When the dock on an E-mu 1010 card is disconnected, all outputs get muted by the hardware. Add logic to detect a disconnect and unmute. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11ALSA: hda - Add dock support for ThinkPad X250 (17aa:2226)Yves-Alexis Perez1-0/+1
This model uses the same dock port as the previous generation. Signed-off-by: Yves-Alexis Perez <corsac@debian.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10ALSA: emu10k1: don't deadlock in proc-functionsMichael Gernoth1-12/+0
The functions snd_emu10k1_proc_spdif_read and snd_emu1010_fpga_read acquire the emu_lock before accessing the FPGA. The function used to access the FPGA (snd_emu1010_fpga_read) also tries to take the emu_lock which causes a deadlock. Remove the outer locking in the proc-functions (guarding only the already safe fpga read) to prevent this deadlock. [removed superfluous flags variables too -- tiwai] Signed-off-by: Michael Gernoth <michael@gernoth.net> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10ALSA: hda/realtek - Fix a typoTakashi Iwai1-1/+1
A comma was used instead of a semicolon, which may lead to a build error. Fixes: cffd39668177 ('ALSA: hda/realtek - Fix the regression by widget power-saving') Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/via - Add missing stream_pm ops setupTakashi Iwai1-0/+1
Similar like the case for Realtek, VIA codec driver needs this ops as well for making the widget power-save working. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/realtek - Fix the regression by widget power-savingTakashi Iwai1-2/+3
While enabling the widget power-saving for ALC269 & co, the important setup was forgotten -- stream_pm ops. Without this setup, the paths for PCM won't be powered up at all. Also, the power_filter callbacks used in ALC269 & co need to chain to the default snd_hda_gen_path_power_filter(). Tested-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/generic - Don't override power_filter when power_save_node is setTakashi Iwai1-1/+2
Currently the generic parser sets codec->power_filter when power_save_node flag is set. But this overrides the existing filter that has been already set by the codec driver, thus it looses some features. Instead, set the default power_filter only when it's not set yet. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/generic - Make snd_hda_gen_path_power_filter() always applicableTakashi Iwai1-0/+4
Add the check of power_save_node flag at the beginning of the function so that it skips the rest if the flag isn't set. In this way, we can call this function safely no matter whether the widget power-saving is really used or not. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/generic - Fix wrong initial power state for fixed pinsTakashi Iwai1-3/+11
When the widget power-saving is enabled, the first automute hook invocation checks through the whole pins and it also tries to synchronize the power state. However, this results in a wrong state because it calls unconditionally snd_hda_jack_detect_state(). This patch adds a check of jack detectability before the actual jack detection call. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/generic - Check power state cap at updating the widget powerTakashi Iwai1-0/+2
The new widget power-saving tries to apply the power change no matter whether the node has a power cap or not. It's bad (although most of codecs chip just ignore it). Check the capability properly beforehand. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda - Fix headphone pin config for Lifebook T731Takashi Iwai1-0/+9
Some BIOS version of Fujitsu Lifebook T731 seems to set up the headphone pin (0x21) without the assoc number 0x0f while it's set only to the output on the docking port (0x1a). With the recent commit [03ad6a8c93b6: ALSA: hda - Fix "PCM" name being used on one DAC when there are two DACs], this resulted in the weird mixer element mapping where the headphone on the laptop is assigned as a shared volume with the speaker and the docking port is assigned as an individual headphone. This patch improves the situation by correcting the headphone pin config to the more appropriate value. Reported-and-tested-by: Taylor Smock <smocktaylor@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda - Work around races of power up/down with runtime PMTakashi Iwai4-12/+14
Currently, snd_hdac_power_up()/down() helpers checks whether the codec is being in pm (suspend/resume), and skips the call of runtime get/put during it. This is needed as there are lots of power up/down sequences called in the paths that are also used in the PM itself. An example is found in hda_codec.c::codec_exec_verb(), where this can power up the codec while it may be called again in its power up sequence, too. The above works in most cases, but sometimes we really want to wait for the real power up. For example, the control element get/put may want explicit power up so that the value change is assured to reach to the hardware. Using the current snd_hdac_power_up(), however, results in a race, e.g. when it's called during the runtime suspend is being performed. In the worst case, as found in patch_ca0132.c, it can even lead to the deadlock because the code assumes the power up while it was skipped due to the check above. For dealing with such cases, this patch makes snd_hdac_power_up() and _down() to two variants: with and without in_pm flag check. The version with pm flag check is named as snd_hdac_power_up_pm() while the version without pm flag check is still kept as snd_hdac_power_up(). (Just because the usage of the former is fewer.) Then finally, the patch replaces each call potentially done in PM with the new _pm() variant. In theory, we can implement a unified version -- if we can distinguish the current context whether it's in the pm path. But such an implementation is cumbersome, so leave the code like this a bit messy way for now... Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96271 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda/realtek - Support Dell headset mode for ALC288Kailang Yang1-0/+67
Dell create new platform with ALC288 codec. This patch will enable headset mode for Dino platform. [slight code refactoring and compile fix by tiwai] Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda/realtek - Support headset mode for ALC286/288Kailang Yang1-0/+77
Support headset mode for ALC286 and ALC288 platforms. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08Merge branch 'for-linus' into for-nextTakashi Iwai2-2/+21
Back merge HD-audio quirks to for-next branch, so that we can apply a couple of more quirks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda/realtek - Make more stable to get pin sense for ALC283Kailang Yang1-0/+2
Pin sense will active when power pin is wake up. Power pin will not wake up immediately during resume state. Add some delay to wait for power pin activated. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-07ALSA: hda_intel: add AZX_DCAPS_I915_POWERWELL for SKL and BSWLibin Yang1-2/+6
HDMI/DP codec on SKL/BSW is in the power well. The power well must be turned on before probing the HDMI/DP codec. This is a temporary patch, which will power on the powerwell by adding AZX_DCAPS_I915_POWERWELL for SKL and BSW. After restructuring and new flag is added, this patch will be reverted. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-05ALSA: emu10k1: add Audigy 5/RxMichael Gernoth1-0/+16
The Audigy 5/Rx is essentially an Audigy 4 behind a PLX PCIe- bridge with an additional TOSLINK output. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-05ALSA: Use const struct ac97_quirkJoe Perches6-6/+7
Use const to reduce data by ~3Kb. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04ALSA: hda: fix possible null dereferenceSudip Mukherjee1-3/+2
we are dereferencing pcm first then checking pcm. instead now lets put them in same if condition so that pcm is checked first. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04ALSA: hda/realtek - Support Dell headset mode for ALC256Kailang Yang1-0/+16
Dell new platform of ALC256 audio codec. Support headset mode for Dell ALC256 platform. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04ALSA: hda - Enable widget power saving for Realtek codecsTakashi Iwai1-0/+1
Recent Realtek codecs support the finer power state control on each widget. Let's enable the new feature. Tested-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>