summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
AgeCommit message (Collapse)AuthorFilesLines
2014-09-11Merge branch 'for-linus' into for-nextTakashi Iwai4-7/+41
Merging for-linus branch for syncing the latest STAC/IDT codec changes to be affected by the upcoming hda-jack rewrites.
2014-09-11ALSA: hda - Fix invalid pin powermap without jack detectionTakashi Iwai1-5/+12
When a driver is set up without the jack detection explicitly (either by passing a model option or via a specific fixup), the pin powermap of IDT/STAC codecs is set up wrongly, resulting in the silence output. It's because of a logic failure in stac_init_power_map(). It tries to avoid creating a callback for the pins that have other auto-hp and auto-mic callbacks, but the check is done in a wrong way at a wrong time. The stac_init_power_map() should be called after creating other jack detection ctls, and the jack callback should be created only for jack-detectable widgets. This patch fixes the check in stac_init_power_map() and its callee at the right place, after snd_hda_gen_build_controls(). Reported-by: Adam Richter <adam_richter2004@yahoo.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08Merge branch 'topic/pcm-nonatomic' into for-nextTakashi Iwai1-5/+7
This is a merge for exending PCM ops to be non-atomic.
2014-09-03ALSA: hda - Add TLV_DB_SCALE_MUTE bit for relevant controlsTakashi Iwai4-11/+12
The DACs on Sigmatel/IDT codecs do mute at the lowest volume level, and in the earlier drivers, we passed TLV_DB_SCALE_MUTE bit for each volume control element like Speaker and Headphone as well as Master. Along with the translation to the generic parser, however, the TLV bit was lost for the slave controls (e.g. Speaker) but set only to Master. In theory this should have sufficed, but apps, particularly PA, do care the slave volume bits, so we seem to see a regression in the volume controls. This patch adds a flag to hda_gen_spec to specify the DAC mute feature, and adds the TLV bit properly for all relevant volume controls. Also, the TLV bit for vmaster is set in hda_generic.c, so that we can get rid of all tricks from the codec driver side. As the similar hack is applied to Conexant 5051 stuff, we can get rid of it as well. BugLink: https://bugs.launchpad.net/bugs/1357928 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda - Make the ALC269 pin quirk table shorterDavid Henningsson1-171/+40
...by factoring out common parts to the just added pin macros. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda - Add common pin macros for ALC269 familyDavid Henningsson1-0/+31
This will be used in a later patch to make the pin quirk table shorter. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move HP_GPIO_MIC1_LED quirk for alc280Hui Wang1-8/+13
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move HP_LINE1_MIC1_LED quirk for alc282Hui Wang1-9/+11
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move HP_MUTE_LED_MIC1 quirk for alc290Hui Wang1-13/+91
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move HP_MUTE_LED_MIC1 quirk for alc282Hui Wang1-24/+55
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move DELL2_MIC_NO_PRESENCE quirk for alc255Hui Wang1-2/+11
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move DELL1_MIC_NO_PRESENCE quirk for alc255Hui Wang1-1/+0
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move DELL1_MIC_NO_PRESENCE quirk for alc283Hui Wang1-21/+11
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: hda/realtek - move DELL2_MIC_NO_PRESENCE quirk for alc292Hui Wang1-11/+24
Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-02ALSA: hda - Fix COEF setups for ALC1150 codecTakashi Iwai1-0/+2
ALC1150 codec seems to need the COEF- and PLL-setups just like its compatible ALC882 codec. Some machines (e.g. SunMicro X10SAT) show the problem like too low output volumes unless the COEF setup is applied. Reported-and-tested-by: Dana Goyette <danagoyette@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-01ALSA: hda - Fix digital mic on Acer Aspire 3830TGTakashi Iwai1-1/+8
Acer Aspire 3830TG with CX20588 codec has a digital built-in mic that has the same problem like many others, the inverted signal in stereo. Apply the same fixup to this machine, too. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-27ALSA: hda - Set up initial pins for Acer Aspire V5Takashi Iwai1-0/+18
Acer Aspire V5 doesn't set up the pins correctly at the cold boot while the pins are corrected after the warm reboot. This patch gives the proper pin configs statically in the driver as a workaround. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81561 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22ALSA: hda: ca0132_regs.h: Fix typo in include guardRasmus Villemoes1-1/+1
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda/hdmi - apply Valleyview fix-ups to Cherryview display codecLibin Yang1-4/+7
Valleyview and Cherryview have the same behavior on display audio. So this patch defines is_valleyview_plus() to include codecs for both Valleyview and its successor Cherryview, and apply Valleyview fix-ups to Cherryview. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda/hdmi - set depop_delay for haswell plusLibin Yang1-2/+1
Both Haswell and Broadwell need set depop_delay to 0. So apply this setting to haswell plus. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda/realtek - Use tables for batch COEF writes/updtesTakashi Iwai1-245/+314
There are many codes doing writes or updates COEF verbs sequentially in a batch. Rewrite such open codes with tables for optimization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda/realtek - Add alc_update_coef*_idx() helperTakashi Iwai1-195/+82
... and rewrite a few open codes with them. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda/realtek - Use alc_write_coef_idx() in alc269_quanta_automake()Takashi Iwai1-9/+2
Just a refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda/realtek - Optimize alc888_coef_init()Takashi Iwai1-51/+40
Just a refactoring using the existing helper functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda - Remove obsoleted EXPORT_SYMBOL_HDA() macroTakashi Iwai1-2/+0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda - Remove obsoleted snd_hda_check_board_config() & coTakashi Iwai2-121/+0
The helper functions snd_hda_check_board_config() and snd_hda_check_board_codec_sid_config() are no longer used since the transition to the generic parser and all quirks have been replaced with fixups. Let's kill these dead codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19ALSA: hda - restore the gpio led after resumeHui Wang1-0/+9
On some HP laptops, the mute led is controlled by codec gpio. When some machine resume from s3/s4, the codec gpio data will be cleared to 0 by BIOS: Before suspend: IO[3]: enable=1, dir=1, wake=0, sticky=0, data=1, unsol=0 After resume: IO[3]: enable=1, dir=1, wake=0, sticky=0, data=0, unsol=0 To skip the AFG node to enter D3 can't fix this problem. A workaround is to restore the gpio data when the system resume back from s3/s4. It is safe even on the machines without this problem. BugLink: https://bugs.launchpad.net/bugs/1358116 Tested-by: Franz Hsieh <franz.hsieh@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-08-16ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & coTakashi Iwai1-5/+12
ALC269 & co have many vendor-specific setups with COEF verbs. However, some verbs seem specific to some codec versions and they result in the codec stalling. Typically, such a case can be avoided by checking the return value from reading a COEF. If the return value is -1, it implies that the COEF is invalid, thus it shouldn't be written. This patch adds the invalid COEF checks in appropriate places accessing ALC269 and its variants. The patch actually fixes the resume problem on Acer AO725 laptop. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181 Tested-by: Francesco Muzio <muziofg@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-14ALSA: hda - Set TLV_DB_SCALE_MUTE bit for cx5051 vmasterTakashi Iwai1-0/+6
Conexnat HD-audio driver has a workaround for cx5051 (aka CX20561) chip to add fake mute controls to each amp (commit 3868137e). This implies the minimum-as-mute TLV bit in TLV for each corresponding control. Meanwhile we build the virtual master from these, but the TLV bit is missing, even though the slaves have it. This patch simply adds the missing TLV_DB_SCALE_MUTE bit for vmaster, as already done in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-10ALSA: hda/ca0132 - Don't try loading firmware at resume when already failedTakashi Iwai1-1/+6
CA0132 driver tries to reload the firmware at resume. Usually this works since the firmware loader core caches the firmware contents by itself. However, if the driver failed to load the firmwares (e.g. missing files), reloading the firmware at resume goes through the actual file loading code path, and triggers a kernel WARNING like: WARNING: CPU: 10 PID:11371 at drivers/base/firmware_class.c:1105 _request_firmware+0x9ab/0x9d0() For avoiding this situation, this patch makes CA0132 skipping the f/w loading at resume when it failed at probe time. Reported-and-tested-by: Janek Kozicki <cosurgi@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-10ALSA: hda - Fix pop noises on reboot for Dell XPS 13 9333Gabriele Mazzotta1-1/+1
If nid 0x15 (Headphone Playback Switch) is in D3 and headphones are plugged in when the laptop reboots, a pop noise is generated. Prevent this by keeping nid 0x15 in D0 when headphones are plugged in. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611 Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-10ALSA: hda - Set internal mic as default input source on Dell XPS 13 9333Gabriele Mazzotta1-0/+11
If the laptop is powered on with a jack plugged in, independently on what is plugged, the jack is treated as a microphone jack. Initialize the capture source so that by default jacks are treated as headphones jacks. This will also prevent pop noises on boot in case headphones are plugged in since setting/unsetting mic-in as input source causes a pop noise. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611 Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-07ALSA: hda - Fix parsing of CMI8888 codecTakashi Iwai1-0/+47
CMI8888 codec chip has a boost amp (only) on the headphone pin, and this confuses the generic parser, which tends to pick up the most outside amp. This results in the wrong volume setup, as the driver complains like: hda_codec: Mismatching dB step for vmaster slave (-100!=1000) For avoiding this problem, rule out the amp on NID 0x10 and create "Headphone Amp" volume control manually instead. Note that this patch still doesn't fix all problems yet. The sound output from the line out seems still too low. It will be fixed in another patch (hopefully). Reported-and-tested-by: Vincent Lejeune <vljn@ovi.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-07ALSA: hda - Fix probing and stuttering on CMI8888 HD-audio controllerTakashi Iwai1-0/+7
ASUS Phoebus with CMI8888 HD-audio chip (PCI id 13f6:5011) doesn't work with HD-audio driver as is because of some weird nature. For making DMA properly working, we need to disable MSI. The position report buffer doesn't work, thus we need to force reading LPIB instead. And yet, the codec CORB/RIRB communication gives errors unless we disable the snooping (caching). In this patch, all these workarounds are added as a quirk for the device. The HD-audio *codec* chip needs yet another workaround, but it'll be provided in the succeeding patch. Reported-and-tested-by: Vincent Lejeune <vljn@ovi.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-07ALSA: hda/realtek - Fixed ALC286/ALC288 recording delay for Headset MicKailang Yang1-0/+22
It will be recording voice delay for resume back recording for Headset Mic. This alc286 will quickly open Headset Mic, to prevent avoid recording files are missing. The issue was fixed. This is follow ALC286 programing guide. [fix build error, add static and renamed the function by tiwai] Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04ALSA: hda - add codec ID for Braswell display audio codecLibin Yang1-0/+2
This patch adds codec ID (0x80862883) and module alias for Braswell display codec. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04ALSA: hda - add PCI IDs for Intel BraswellLibin Yang1-0/+3
Add HD Audio Device PCI ID for the Intel Braswell platform. It is an HDA Intel PCH controller. AZX_DCAPS_ALIGN_BUFSIZE is not necessary for this controller. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04Merge branch 'for-next' into for-linusTakashi Iwai20-3726/+830
2014-07-31ALSA: hda - add mic mute led hook for dell machinesHui Wang2-0/+89
The mic mute led on dell laptops is controlled by the wmi driver. Followed this part being merged to the kernel, we add the mic mute led hook in the hda driver. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-30ALSA: hda - fix an external mic jack problem on a HP machineHui Wang1-0/+12
ON the machine, two pin complex (0xb and 0xe) are both routed to the same external right-side mic jack, this makes the jack can't work. To fix this problem, set the 0xe to "not connected". BugLink: https://bugs.launchpad.net/bugs/1350148 Tested-by: Franz Hsieh <franz.hsieh@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-07-22ALSA: hda - Fix loopback noise on Dell XPS 15Takashi Iwai1-0/+1
Dell XPS 15 (1028:05fe) gives the bad feedback noise from analog loopback line even if the channels are muted. The similar problem has been seen on XPS 13, and it was fixed by simply disabling loopback. The same fixup was confirmed to be applicable and fix the problem on XPS 15, too. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80821 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22ALSA: hda - Make vendor quirks lowest prio for ALC2xxDavid Henningsson1-4/+10
Add a new quirk table to make sure that pin quirks have a higher priority than quirks that apply to an entire vendor. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22ALSA: hda - Refactor quirk picking and change quirk priorityDavid Henningsson6-10/+17
Previously, calling one quirk function first and another later would make the latter one take priority, this is now changed to make the former take priority. By adding two special values for fixup_id we can also get rid of the fixup_forced flag. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22ALSA: hda - Add mic fixup for Gigabyte BXBT-2807Daniel Drake1-0/+9
The Gigabyte BRIX BXBT-2707 is a mini-PC with Realtek ALC283 HDA, exposing a single headset jack. However, the default pin config information only suggests that one pin is connected: a HP out jack (pin 0x21, default config 0x04211010). The microphone input is behind pin 0x19, which has default config 0x411111f0 (i.e. unused), so it does not show up in userspace, and no microphone input is possible via the headset. Override the pin config so that the headset mic can be used. [rearranged the fixup entry position by tiwai] Signed-off-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22ALSA: hda - Add mute LED pin quirk for HP 15 touchsmartDavid Henningsson1-0/+11
This makes the mute LED work on a HP 15 touchsmart machine. BugLink: https://bugs.launchpad.net/bugs/1334950 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-16ALSA: hda - Add NULL check to all PM ops in hda_intel.cTakashi Iwai1-10/+35
Since devptr can be NULL due to asynchronous probe, all PM ops should have NULL checks at the beginning. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-15ALSA: hda - Add the pin fixup for HP Envy TS bass speakerTakashi Iwai1-0/+11
NID 0x10 seems corresponding to the bass speaker. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-15Merge branch 'for-linus' into for-nextTakashi Iwai5-8/+17
Since init_failed flag was moved to struct hda_intel, its access in the commit [4da63c6f: ALSA: hda - Fix broken PM due to incomplete i915 initialization] is also replaced with hda->init_failed appropriately.
2014-07-15ALSA: hda - Fix broken PM due to incomplete i915 initializationTakashi Iwai1-5/+5
When the initialization of Intel HDMI controller fails due to missing i915 kernel symbols (e.g. HD-audio is built in while i915 is module), the driver discontinues the probe. However, since the probe was done asynchronously, the driver object still remains, thus the relevant PM ops are still called at suspend/resume. This results in the bad access to the incomplete audio card object, eventually leads to Oops or stall at PM. This patch adds the missing checks of chip->init_failed flag at each PM callback in order to fix the problem above. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79561 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14ALSA: hda - Revert stream assignment order for Intel controllersTakashi Iwai3-2/+4
We got a regression report for 3.15.x kernels, and this turned out to be triggered by the fix for stream assignment order. On reporter's machine with Intel controller (8086:1e20) + VIA VT1802 codec, the first playback slot can't work with speaker outputs. But the original commit was actually a fix for AMD controllers where no proper GCAP value is returned, we shouldn't revert the whole commit. Instead, in this patch, a new flag is introduced to determine the stream assignment order, and follow the old behavior for Intel controllers. Fixes: dcb32ecd9a53 ('ALSA: hda - Do not assign streams in reverse order') Reported-and-tested-by: Steven Newbury <steve@snewbury.org.uk> Cc: <stable@vger.kernel.org> [v3.15+] Signed-off-by: Takashi Iwai <tiwai@suse.de>