summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda/realtek - Fix the problem of the front MIC on the Lenovo M715Hui Wang2018-10-101-0/+6
| | | | | | | | | | The front MIC on the Lenovo M715 can't record sound, after applying the ALC294_FIXUP_LENOVO_MIC_LOCATION, the problem is fixed. So add the pin configuration of this machine to the pin quirk table. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix headphone pin config for ASUS G751Takashi Iwai2018-10-091-1/+11
| | | | | | | | | | BIOS on ASUS G751 doesn't seem to map the headphone pin (NID 0x16) correctly. Add a quirk to address it, as well as chaining to the previous fix for the microphone. Reported-by: Håvard <hovardslill@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add ASUS G751 quirk model entryTakashi Iwai2018-10-071-0/+1
| | | | | | | | Add a corresponding model list entry for ASUS G751 so that user can test the quirk for another compatible machines more easily. Reported-and-tested-by: Håvard <hovardslill@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add quirk for ASUS G751 laptopTakashi Iwai2018-10-071-0/+10
| | | | | | | | | ASUS G751 requires the extra COEF initialization to make it microphone working properly. Reported-and-tested-by: Håvard <hovardslill@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2018-10-041-0/+1
|\ | | | | | | | | | | | | Back-merge 4.19-devel branch into 4.20 for applying FireWire patches cleanly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Cannot adjust speaker's volume on Dell XPS 27 7760Kai-Heng Feng2018-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The issue is the same as commit dd9aa335c880 ("ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO"), the output requires to connect to a node with Amp-out capability. Applying the same fixup ALC298_FIXUP_SPK_VOLUME can fix the issue. BugLink: https://bugs.launchpad.net/bugs/1775068 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: move hda_codec.h to include/soundPierre-Louis Bossart2018-08-301-1/+1
|/ | | | | | | | As suggested by Takashi, move this header file to make it easier to include from e.g. the Intel Skylake driver in follow-up patches Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ALSA: hda/realtek - Fix HP Headset Mic can't recordKailang Yang2018-08-211-1/+17
| | | | | | | | This patch will fix HP workstation Headset Mic not recording. Signed-off-by: Kailang Yang <kailang@realtek.com> Tested-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Add mute LED quirk for HP Spectre x360Alexandru Gagniuc2018-08-051-0/+1
| | | | | | | | | | This device has the same issues as the HP x360 wrt the MUTE LED and the front speakers not working. This patch fixes the MUTE LED issue, but doesn't touch the HDA verbs. The fix for the x360 does not work on the Spectre. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into topic/virmidiTakashi Iwai2018-07-291-0/+1
|\ | | | | | | | | | | | | Pull the latest ALSA sequencer fixes for the further development of virmidi. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Yet another Clevo P950 quirk entryTakashi Iwai2018-07-181-0/+1
| | | | | | | | | | | | | | | | | | The PCI SSID 1558:95e1 needs the same quirk for other Clevo P950 models, too. Otherwise no sound comes out of speakers. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1101143 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2018-07-171-1/+14
|\| | | | | | | | | | | | | Back-merge for further cleanup / improvements on rawmidi and HD-audio stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Add Panasonic CF-SZ6 headset jack quirkYOKOTA Hiroshi2018-07-161-0/+1
| | | | | | | | | | | | | | | | | | This adds some required quirk when uses headset or headphone on Panasonic CF-SZ6. Signed-off-by: YOKOTA Hiroshi <yokota.hgml@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - two more lenovo models need fixup of MIC_LOCATIONHui Wang2018-07-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | We have two new lenovo desktop models which need to apply the fixup of ALC294_FIXUP_LENOVO_MIC_LOCATION, and they have the same pin cfg as the machine with subsystem id:0x17aa3136, now use the pincfg table to apply the fixup for them. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Fix the problem of two front mics on more machinesHui Wang2018-06-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have 3 more Lenovo machines, they all have 2 front mics on them, so they need the fixup to change the location for one of two mics. Among these 3 Lenovo machines, one of them has the same pin cfg as the machine with subid 0x17aa3138, so use the pin cfg table to apply fixup for them. The rest machines don't share the same pin cfg, so far use the subid to apply fixup for them. Fixes: a3dafb2200bf ("ALSA: hda/realtek - adjust the location of one mic") Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210Takashi Iwai2018-06-221-0/+1
| | | | | | | | | | | | | | | | | | Fujitsu Seimens ESPRIMO Mobile U9210 requires the same fixup as H270 for the correct pin configs. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200107 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC882 & coTakashi Iwai2018-06-261-0/+25
| | | | | | | | | | | | | | | | More comprehensive list of model strings for ALC882 & co. Also corrected the subsection in models.rst, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC262Takashi Iwai2018-06-261-0/+8
| | | | | | | | | | | | | | Added a few missing entries for ALC262 model strings. All about specific hardwares. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC268Takashi Iwai2018-06-261-0/+1
| | | | | | | | | | | | | | Add the missing entry for ALC268 model strings. Only "spdif" was missing, and that's it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC259 & coTakashi Iwai2018-06-261-0/+82
| | | | | | | | | | | | | | Like the previous commit for ALC662, let's give more comprehensive list of model entries for ALC269 & co as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Comprehensive model list for ALC662 & coTakashi Iwai2018-06-261-0/+18
| | | | | | | | | | | | | | | | ALC662 and others have far more fixup entries than the model table. Let's add more model string entries so that user can test / debug without compiling kernels at each time. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Apply PRE_PROBE fixup after ALC269 codec variant setupsTakashi Iwai2018-06-251-15/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently patch_alc269() calls the fixup with HDA_FIXUP_ACT_PRE_PROBE before setting up the codec model-specific setups (e.g. setting codec_variant or mixer_nid setup). This is rather confusing as others do call the *_PRE_PROBE fixup after such a setup. Due to this disorder, we have to override spec->shutup not at the usual HDA_FIXUP_ACT_PRE_PROBE but the unusual HDA_FIXUP_ACT_PROBE time. This patch corrects the fixup call orders in patch_alc269(), and also corrects the action to set up spec->shutup accordingly. No functional changes but just refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use common helper for creating beep controlsTakashi Iwai2018-06-251-49/+65
| | | | | | | | | | | | | | | | | | | | | | | | In the Realtek codec driver, we used to build kctl elements for beep mixer in the own build_controls callback. This is an open-code and can be covered by the standard feature of the generic parser with snd_hda_gen_add_kctl() instead. Also, after the conversion, spec->beep_amp becomes superfluous; hence it's removed along with the conversion. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use common helper for creating ALC268 beep controlsTakashi Iwai2018-06-251-24/+9Star
| | | | | | | | | | | | | | | | | | | | | | The beep mixer controls are the only remaining stuff that uses spec->mixers[] array, and they can be well converted to the standard helper in the generic parser, snd_hda_gen_add_kctl(). This simplifies the code, especially the superfluous mixers and num_mixers fields can be now removed from alc_spec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use common GPIO mask for ALC660VD ASUS fixupTakashi Iwai2018-06-251-8/+13
| | | | | | | | | | | | | | | | The ALC660VD_FIX_ASUS_GPIO1 quirk requires to set up GPIO bit0 ON while bit 1 OFF. Implement the fixup function and convert from the static init verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify Dell XPS13 GPIO handlingTakashi Iwai2018-06-251-18/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Dell XPS13 has multi-step fixups, and one of them (ALC288_FIXUP_DELL_XPS_13_GPIO6) corresponds to the management of GPIO bit6 (0x40). It used to be a static init verbs (to turn *off* the bit6). In this patch, we convert it as the gpio_mask and gpio_dir initializations folded in the existing fixup function. With this change, ALC288_FIXUP_DELL_XPS_13_GPIO6 becomes superfluous, thus it's removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Convert some manual GPIO setupsTakashi Iwai2018-06-251-23/+26
| | | | | | | | | | | | | | | | | | This patch converts the remaining static init verbs for GPIO bits with the common gpio_* fields management. Only the verbs setting the GPIO data bits are targeted in this patch. The rest will be changed in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify mute LED GPIO handlingTakashi Iwai2018-06-251-103/+46Star
| | | | | | | | | | | | | | | | | | Now we can simplify the mute LED GPIO handling as well. Each fixup dealing with GPIO for the mute LED controls defined the static init verbs, and they are converted to the common GPIO bit fields with the new helper, alc_fixup_hp_gpio_led(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify alc885_fixup_macpro_gpio()Takashi Iwai2018-06-251-37/+7Star
| | | | | | | | | | | | | | | | | | | | | | The fixup for Macbook Pro is nothing but setting the GPIO bits as usual but with one exception: it adds some delay at writing the GPIO bits. Add a flag to put the conditional delay in the common helper, and clean up alc885_fixup_macpro_gpio() with the new flag. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Consolidate gpio_data and gpio_ledTakashi Iwai2018-06-251-24/+4Star
| | | | | | | | | | | | | | | | | | | | | | Until now, two fields, gpio_data and gpio_led, coexist in alc_spec although basically both of them serve for the same purpose -- the GPIO data bits. This patch consolidates both usages and eliminates the superfluous gpio_led field. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Add GPIO data update helperTakashi Iwai2018-06-251-2/+16
| | | | | | | | | | | | | | | | For updating GPIO bits dynamically, provide a new helper, and use it from the alc260 automute hook. This helper will be used by other places in future, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Manage GPIO bits commonlyTakashi Iwai2018-06-251-48/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently the GPIO bits are managed by individual verbs in some cases while toggled dynamically in other cases. For simplifying the GPIO management, define the GPIO mask, dir and data bits in alc_spec fields, and refer to / set them consistently from all places. As a first step, along with the definition of the new gpio_* fields, this patch replaces the static verbs that are used at initialization and fixups with the common helper functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Allow skipping spec->init_amp detectionTakashi Iwai2018-06-251-23/+21Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices have the overrides of spec->init_amp at HDA_FIXUP_ACT_PROBE just because alc_ssid_check() gives the false-positive values from the SSID. For more consistent behavior, define the logic in the following way: - Define ALC_INIT_UNDEFINED as the default value before calling alc_ssid_check() - Each fixup may set up spec->init_amp with another value at HDA_FIXUP_ACT_PRE_PROBE - At detection, check whether spec->init_amp is ALC_INIT_UNDEFINED or not; if it's different, we skip the detection Also, it turned out that ASUS TX300 requires the spec->init_amp override, too; currently it ignores the GPIO bits implicitly by its static init verb, but this will be changed in the later patchset. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Simplify alc269_fixup_hp_line1_mic1_led()Takashi Iwai2018-06-211-5/+1Star
| | | | | | | | | | | | | | alc269_fixup_hp_line1_mic1_led() can be simplified more with the existing helper code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Sanity check of unexpected cap_sync_hook overrideTakashi Iwai2018-06-211-0/+1
| | | | | | | | | | | | | | | | | | There are a couple of places setting cap_sync_hook in the codec drivers, and they just overwrite the value. Add a sanity check via WARN_ON() in case if an old non-NULL value is overridden and forgotten. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use the mic-mute LED helper for HP and othersTakashi Iwai2018-06-211-31/+18Star
|/ | | | | | | | Similar as the previous commit, convert to use the common helper for controlling the mic mute LED for HP and other machines in the Realtek codec driver, too. This will give the mic mute LED enum as gratis. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Fix pop noise on Lenovo P50 & coTakashi Iwai2018-06-171-2/+8
| | | | | | | | | | | | | | | Some Lenovo laptops, e.g. Lenovo P50, showed the pop noise at resume or runtime resume. It turned out to be reduced by applying alc_no_shutup() just like TPT440 quirk does. Since there are many Lenovo models showing the same behavior, put this workaround in ALC269_FIXUP_THINKPAD_ACPI entry so that it's applied commonly to all such Lenovo machines. Reported-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Benjamin Berg <bberg@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Add shutup hintTakashi Iwai2018-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pin shutup callback seems working well on some devices while it does harm on some other devices; e.g. Lenovo laptops show often the noises at (runtime) PM with the pin shutup enabled. Currently, the only way to disable the pin shutup is to hard-code spec->shutup = alc_no_shutup; in the fixup, and this makes the debugging harder for normal users. For allowing users to test the similar effect without recompiling the kernel, this patch adds a new hint string "shutup". It's a boolean value, and by passing false to this, user can turn off the pin shutup call. For example, to turn off the shutup on Lenovo P50, create a "firmware patch" file (e.g. /lib/firmware/alsa/lenovo-p50) containing the following lines: [codec] 0x10ec0298 0x17aa222e 0 [hint] shutup = no and pass the file via patch option of snd-hda-intel module (e.g. patch=alsa/lenovo-p50). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Enable mic-mute hotkey for several Lenovo AIOsHui Wang2018-05-301-1/+5
| | | | | | | | | | | | We have several Lenovo AIOs like M810z, M820z and M920z, they have the same design for mic-mute hotkey and led and they use the same codec with the same pin configuration, so use the pin conf table to apply fix to all of them. Fixes: 29693efcea0f ("ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine") Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Fixup for HP x360 laptops with B&O speakersTom Briden2018-05-291-1/+11
| | | | | | | | | | | | | | | | | | Added a new helper file for these fixups due to requiring a huge number of coefs being set to get the top speakers to work, as well as setting pin 0x17 for the top speakers and the correct input source of 0x17 for volume control [ Note: this is a revised work based on Tom's fixup patch with the replacement of the full COEF tables provided by Realtek. Also, the fixup function has a proper HDA_FIXUP_ACT_* handling now. The credit for the new COEF table goes to Kailang -- tiwai ] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189331 Cc: Kailang Yang <kailang@realtek.com> Signed-off-by: Tom Briden <tom@decompile.me.uk> Tested-by: Tom Briden <tom@decompile.me.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Refactor alc269_fixup_hp_mute_led_mic*()Takashi Iwai2018-05-291-19/+13Star
| | | | | | | Just a code refactoring to use the common helper for the all three functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Fixup mute led on HP Spectre x360Tom Briden2018-05-291-0/+19
| | | | | | | | | | | | | This patch adds the mute LED control for HP Spectre x360 Kabylake model. The mute LED is controlled via VREF bits on NID 0x1b, so we need a new fixup function. Note that this doesn't fix the other issues like the missing speaker output on the machine. They will be addressed by later patches. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189331 Signed-off-by: Tom Briden <tom@decompile.me.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2018-05-151-1/+2
|\ | | | | | | | | | | Back-merge of UAC3 fixes for applying further enhancements. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Clevo P950ER ALC1220 FixupJeremy Soller2018-05-131-0/+1
| | | | | | | | | | | | | | | | | | This adds support for the P950ER, which has the same required fixup as the P950HR, but has a different PCI ID. Signed-off-by: Jeremy Soller <jeremy@system76.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix incorrect usage of IS_REACHABLE()Takashi Iwai2018-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | The commit c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input") simplified the dependencies with IS_REACHABLE() macro, but it broke due to its incorrect usage: it should have been IS_REACHABLE(CONFIG_INPUT) instead of IS_REACHABLE(INPUT). Fixes: c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2018-04-251-0/+8
|\| | | | | | | | | | | | | Back-merge 4.17-rc3 fixes for further development. This will bump the base to 4.17-rc2, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - change the location for one of two front micsKailang Yang2018-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | On this Lenovo ThinkCentre machine. There are two front mics, we change the location for one of them. Relation: f33f79f3d0e5 ("ALSA: hda/realtek - change the location for one of two front microphones") Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Update ALC255 depop optimizeKailang Yang2018-04-251-0/+2
| | | | | | | | | | | | | | | | | | Add ALC255 its own depop functions for alc_init and alc_shutup. Assign it to ALC256 usage. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Add some fixes for ALC233Kailang Yang2018-04-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fill COEF to change EAPD to verb control. Assigned codec type. This is an additional fix over 92f974df3460 ("ALSA: hda/realtek - New vendor ID for ALC233"). [ More notes: according to Kailang, the chip is 10ec:0235 bonding for ALC233b, which is equivalent with ALC255. It's only used for Lenovo. The chip needs no alc_process_coef_fw() for headset unlike ALC255. ] Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - adjust the location of one micHui Wang2018-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There are two front mics on this machine, if we don't adjust the location for one of them, they will have the same mixer name, pulseaudio can't handle this situation. After applying this FIXUP, they will have different mixer name, then pulseaudio can handle them correctly. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>