summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)Author
2018-01-19ALSA: hda - Reduce the suspend time consumption for ALC256Takashi Iwai
ALC256 has its own quirk to override the shutup call, and it contains the COEF update for pulling down the headset jack control. Currently, the COEF update is called after clearing the headphone pin, and this seems triggering a stall of the codec communication, and results in a long delay over a second at suspend. A quick resolution is to swap the calls: at first with the COEF update, then clear the headphone pin. Fixes: 4a219ef8f370 ("ALSA: hda/realtek - Add ALC256 HP depop function") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198503 Reported-by: Paul Menzel <pmenzel@molgen.mpg.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-17ALSA: hda/realtek - update ALC215 depop optimizeKailang Yang
Add ALC215 its own depop functions for alc_init and alc_shutup. Assign it to ALC225 usage. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-17ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289Kailang Yang
This patch will enable headset mode for ALC215/ALC285/ALC289 platform. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-15ALSA: hda - Use IS_REACHABLE() for dependency on inputTakashi Iwai
The commit ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek HD-audio codec") introduced the reverse-selection of CONFIG_INPUT for Realtek codec in order to avoid the mess with dependency between built-in and modules. Later on, we obtained IS_REACHABLE() macro exactly for this kind of problems, and now we can remove th INPUT selection in Kconfig and put IS_REACHABLE(INPUT) to the appropriate places in the code, so that the driver doesn't need to select other subsystem forcibly. Fixes: ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek HD-audio codec") Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # and build-tested Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-15Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merge to the development branch for further fixes of sequencer stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-10ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variantTakashi Iwai
There is another Dell XPS 13 variant (SSID 1028:082a) that requires the existing fixup for reducing the headphone noise. This patch adds the quirk entry for that. BugLink: http://lkml.kernel.org/r/CAHXyb9ZCZJzVisuBARa+UORcjRERV8yokez=DP1_5O5isTz0ZA@mail.gmail.com Reported-and-tested-by: Francisco G. <frangio.1@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-08ALSA: hda/realtek - update ALC225 depop optimizeKailang Yang
Add ALC225 its own depop functions for alc_init and alc_shutup. Add depop optimize step for headset mode functions. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-27ALSA: hda - Clean up ALC299 init codeTakashi Iwai
ALC299 is compatible with ALC225/295, thus it doesn't have to assign its own model. Merge together with ALC225/295 code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-27ALSA: hda - Fix missing COEF init for ALC225/295/299Takashi Iwai
There was a long-standing problem on HP Spectre X360 with Kabylake where it lacks of the front speaker output in some situations. Also there are other products showing the similar behavior. The culprit seems to be the missing COEF setup on ALC codecs, ALC225/295/299, which are all compatible. This patch adds the proper COEF setup (to initialize idx 0x67 / bits 0x3000) for addressing the issue. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195457 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-22ALSA: hda - change the location for one mic on a Lenovo machineHui Wang
There are two front mics on this machine, and current driver assign the same name Mic to both of them, but pulseaudio can't handle them. As a workaround, we change the location for one of them, then the driver will assign "Front Mic" and "Mic" for them. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-22ALSA: hda - fix headset mic detection issue on a Dell machineHui Wang
It has the codec alc256, and add its pin definition to pin quirk table to let it apply ALC255_FIXUP_DELL1_MIC_NO_PRESENCE. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-18ALSA: hda/realtek - Fix Dell AIO LineOut issueKailang Yang
Dell AIO had LineOut jack. Add LineOut verb into this patch. [ Additional notes: the ALC274 codec seems requiring the fixed pin / DAC connections for HP / line-out pins for enabling EQ for speakers; i.e. the HP / LO pins expect to be connected with NID 0x03 while keeping the speaker with NID 0x02. However, by adding a new line-out pin, the auto-parser assigns the NID 0x02 for HP/LO pins as primary outputs. As an easy workaround, we provide the preferred_pairs[] to map forcibly for these pins. -- tiwai ] Fixes: 75ee94b20b46 ("ALSA: hda - fix headset mic problem for Dell machines with alc274") Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-05ALSA: hda/realtek - New codec support for ALC257Kailang Yang
Add new support for ALC257 codec. [ It's supposed to be almost equivalent with other ALC25x variants, just adding another type and id -- tiwai ] Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-23ALSA: hda/realtek - Fix ALC700 family no sound issueKailang Yang
It maybe the typo for ALC700 support patch. To fix the bit value on this patch. Fixes: 6fbae35a3170 ("ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703") Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-20ALSA: hda/realtek: Add headset mic support for Intel NUC Skull CanyonKai-Heng Feng
Users have been using knob "model=dell-headset-multi" on Intel Skull Canyon for a while. Add the equivalent quirk, ALC269_FIXUP_DELL1_MIC_NO_PRESENCE for Skull Canyon. BugLink: https://bugs.launchpad.net/bugs/1732034 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-15ALSA: hda/realtek - Fix ALC275 no sound issueKailang Yang
Sound works after a cold boot but not after a reboot from windows. This patch will solve this issue. This is relation with Class-D power control. [ The bug was reported in Bugzilla below for Sony VAIO SVS13A1C5E -- tiwai] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197737 Cc: <stable@vger.kernel.org> Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-13Merge branch 'for-next' into for-linusTakashi Iwai
Pull 4.15 updates to take over the previous urgent fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-09ALSA: hda - fix headset mic problem for Dell machines with alc274Hui Wang
Confirmed with Kailang of Realtek, the pin 0x19 is for Headset Mic, and the pin 0x1a is for Headphone Mic, he suggested to apply ALC269_FIXUP_DELL1_MIC_NO_PRESENCE to fix this problem. And we verified applying this FIXUP can fix this problem. Cc: <stable@vger.kernel.org> Cc: Kailang Yang <kailang@realtek.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-26ALSA: hda/realtek - Add support for ALC1220Peisen
Add Clevo-P51 mode support for ALC1220. ALC1220 Clevo-p51 Speaker uses I2S output. We therefore want to make sure 0x14 (Headphones) and 0x1b (Speakers) use to stereo DAC 0x02. Signed-off-by: Peisen Hou <pshou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-24ALSA: hda - fix headset mic problem for Dell machines with alc236Hui Wang
We have several Dell laptops which use the codec alc236, the headset mic can't work on these machines. Following the commit 736f20a70, we add the pin cfg table to make the headset mic work. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-20ALSA: hda/realtek - Add support for ALC236/ALC3204Kailang Yang
Add support for ALC236/ALC3204. Add headset mode support for ALC236/ALC3204. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-18ALSA: hda - Add model string for Intel reference board quirkTakashi Iwai
For allowing user to apply the existing quirk on a machine with a different SSID, add a new model string entry, alc700-ref. The quirk itself was introduced in the commit b84e843644f2: "ALSA: hda/realtek - Enable jack detection function for Intel ALC700") Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-09-04ALSA: hda/realtek - Enable jack detection function for Intel ALC700PeiSen Hou
Intel ALC 700 needs this patch for jack detection function. Because ALC700's jack detect function defaults is disable. So alc700 needs pathc to enable jack detection function. Signed-off-by: PeiSen Hou <pshou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-14ALSA: hda/realtek - Fix pincfg for Dell XPS 13 9370Shih-Yuan Lee (FourDollars)
The initial pin configs for Dell headset mode of ALC3271 has changed. /sys/class/sound/hwC0D0/init_pin_configs: (BIOS 0.1.4) 0x12 0xb7a60130 0x13 0xb8a61140 0x14 0x40000000 0x16 0x411111f0 0x17 0x90170110 0x18 0x411111f0 0x19 0x411111f0 0x1a 0x411111f0 0x1b 0x411111f0 0x1d 0x4087992d 0x1e 0x411111f0 0x21 0x04211020 has changed to ... /sys/class/sound/hwC0D0/init_pin_configs: (BIOS 0.2.0) 0x12 0xb7a60130 0x13 0x40000000 0x14 0x411111f0 0x16 0x411111f0 0x17 0x90170110 0x18 0x411111f0 0x19 0x411111f0 0x1a 0x411111f0 0x1b 0x411111f0 0x1d 0x4067992d 0x1e 0x411111f0 0x21 0x04211020 Fixes: b4576de87243 ("ALSA: hda/realtek - Fix typo of pincfg for Dell quirk") Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-02ALSA: hda - Fix speaker output from VAIO VPCL14M1RSergei A. Trusov
Sony VAIO VPCL14M1R needs the quirk to make the speaker working properly. Tested-by: Dmitriy <mexx400@yandex.ru> Cc: <stable@vger.kernel.org> Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-21ALSA: hda/realtek - No loopback on ALC225/ALC295 codecKailang Yang
ALC225/ALC295 also have no loopback mixer. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-21ALSA: hda/realtek - Update headset mode for ALC225Kailang Yang
Dell new platform with new hardware layout. Old headset mode policy will cause headset mode check type has a chance to check fail. So, we update new headset mode to match new hardware layout. New headset mode policy also could suitable to old hardware layout. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-17ALSA: hda/realtek - Update headset mode for ALC298Kailang Yang
Dell new platform with new hardware layout. Old headset mode policy will cause headset mode check type has a chance to check fail. So, we update new headset mode to match new hardware layout. New headset mode policy also could suitable to old hardware layout. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-11ALSA: hda/realtek - New codec device ID for ALC1220Kailang Yang
Codec ID is 0x1168. It is another ALC1220 codec. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-07ALSA: hda/realtek - change the location for one of two front microphonesHui Wang
On this Lenovo machine, there are two front mics, and both of them are assigned the same name "Mic", but pulseaudio can't support two mics with the same name, as a workaround, we change the location for one of them, then the driver will assign "Front Mic" and "Mic" for them. Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-03ALSA: hda/realtek - Remove GPIO_MASKKai-Heng Feng
GPIO_MASK was introduced in commit "df694daa3c01 [ALSA] hda-codec - Add the support of ALC262,ALC883,ALC885,ALC861" but it's not being used. So we can simply remove it. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-03ALSA: hda/realtek - Fix typo of pincfg for Dell quirkShih-Yuan Lee (FourDollars)
The PIN number for Dell headset mode of ALC3271 is wrong. Fixes: fcc6c877a01f ("ALSA: hda/realtek - Support Dell headset mode for ALC3271") Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-30ALSA: hda/realtek - New codecs support for ALC215/ALC285/ALC289Kailang Yang
Add new codecs support for ALC215 ALC285 ALC289. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-30ALSA: hda/realtek - Remove ALC285 device IDKailang Yang
0x0285 Device ID was not used. It just assigned for alias of ALC293 as backup. So, remove it first. Because our new codec will use this device ID. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-29ALSA: hda/realtek - Support Dell headset mode for ALC3271Kailang Yang
Add DELL4_MIC_NO_PRESENCE model. Add the pin configuration value of this machine into the pin_quirk table to make DELL4_MIC_NO_PRESENCE apply to this machine. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-26ALSA: hda/realtek - There is no loopback mixer in the ALC234/274/294Hui Wang
We have a Lenovo machine with the codec ALC294 on it, without the patch, the Node 0x0b is regarded as the loopback mixer, but the Node 0x0b in this codec is "Vendor Defined Widget" instead of the audio mixer, please see the log below: Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono Control: name="Beep Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=4, ofs=0 Control: name="Beep Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=4, ofs=0 And I have consulted with Realtek, so far the ALC234/274/294 all don't have loopback mixer. Cc: Kailang Yang <kailang@realtek.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-21ALSA: hda/realtek - Add default procedure for suspend and resume stateKailang Yang
Except ALC269. This will reduce pop noise from headset or headphone. If codec enter to power save state, when plug headset or headphone.... It has a chance to cut off power by system. Our new codec use this procedure will be more stable during suspend and resume state. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-20ALSA: hda/realtek - Support headset mode for ALC234/ALC274/ALC294Kailang Yang
This patch will enable headset mode for ALC234/ALC274/ALC294 platform. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-16ALSA: hda/realtek - Add ALC256 HP depop functionKailang Yang
Add this functions, it could support ALC256 for HP depop functions. It also can solve some ALC256 machine plug headset cause power off issue. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-07Merge branch 'for-linus' into for-nextTakashi Iwai
For applying more ALSA timer cleanups.
2017-06-06ALSA: hda/realtek - Reorder ALC269 ASUS quirk entriesTakashi Iwai
A disorder is found in some ALC269 quirk entries for ASUS (1043:xxxx), which should have been sorted in PCI SSID order. Rearrange them, so that I won't overlook the already existing entry like I did a couple of times in the past... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-06ALSA: hda/realtek: Fix mic and headset jack sense on Asus X705UDChris Chiu
The ASUS X705UD laptop requires the known fixup ALC256_FIXUP_ASUS_MIC in order to fix headphone jack sensing and to enable use of the internal microphone. Unfortunately jack sensing for the headset mic is still not working. [rearranged the position to keep the PCI SSID order -- tiwai] Signed-off-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-01ALSA: hda - Fix applying MSI dual-codec mobo quirkTakashi Iwai
The previous commit [63691587f7b0: ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo] attempted to apply the existing dual-codec quirk for a MSI mobo. But it turned out that this isn't applied properly due to the MSI-vendor quirk before this entry. I overlooked such two MSI entries just because they were put in the wrong position, although we have a list ordered by PCI SSID numbers. This patch fixes it by rearranging the unordered entries. Fixes: 63691587f7b0 ("ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo") Reported-by: Rudolf Schmidt <info@rudolfschmidt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-22ALSA: hda - Provide dual-codecs model option for a few Realtek codecsTakashi Iwai
Recently some laptops and mobos are equipped with the dual Realtek codecs that require special quirks. For making the debugging easier, add the model "dual-codecs" to be passed via module option. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-22ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming moboTakashi Iwai
MSI Z270-Gamin mobo has also two ALC1220 codecs like Gigabyte AZ370- Gaming mobo. Apply the same quirk to this one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-17ALSA: hda - Simplify bound-beep mute control for ALC268Takashi Iwai
The beep mute switch for ALC268 needs to touch two NIDs, and we used to apply the bind-mixer stuff. But the use case for ALC268 is fairly easy to convert to an open-code in a shorter form. Since this is the only user of the bind-ctls, we can clean up the common helper codes later. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-16ALSA: hda - No loopback on ALC299 codecTakashi Iwai
ALC299 has no loopback mixer, but the driver still tries to add a beep control over the mixer NID which leads to the error at accessing it. This patch fixes it by properly declaring mixer_nid=0 for this codec. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195775 Fixes: 28f1f9b26cee ("ALSA: hda/realtek - Add new codec ID ALC299") Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-26ALSA: hda/realtek - Add Dual Codecs support for Lenovo P520/420Kailang Yang
Lenovo P520/420 build with two codecs. ALC233 for front panel. ALC662 for rear panel. This patch will rename capture name for slove conflicts. And create a card longname for UCM profile. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-24Merge branch 'topic/hda-dual-codecs' into for-nextTakashi Iwai
2017-04-21ALSA: hda - Use a helper function for renaming kctl namesTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>