summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)Author
2013-03-14apalis_t30: Realtek HDA hackApalis_T30_LinuxImageV2.0Alpha1_20130315Marcel Ziswiler
Hack for Realtek HDA driver not to crash due to PCI structure not being initialised as expected.
2012-02-09commit b3a81520bd37a28f77cb0f7002086fb14061824d upstream.Takashi Iwai
The very same problem is seen on Haier W18 laptop with ALC861 as seen on ASUS A6Rp, which was fixed by the commit 3b25eb69. Now we just need to add a new SSID entry pointing to the same fixup. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42656 Change-Id: I3aa7e2b665fd04d3ffccee77d91798dd082a84e1 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/79662 Reviewed-by: Automatic_Commit_Validation_User
2012-02-09commit 3b25eb690e8c7424eecffe1458c02b87b32aa001 upstream.Takashi Iwai
The refactoring of Realtek codec driver in 3.2 kernel caused a regression for ASUS A6Rp laptop; it doesn't give any output. The reason was that this machine has a secret master mute (or EAPD) control via NID 0x0f VREF. Setting VREF50 on this node makes the sound working again. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588 Change-Id: I62fd76bc3d3bc6321da52341531d32dbd1292edd Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/79661 Reviewed-by: Automatic_Commit_Validation_User
2011-12-21ALSA: hda/realtek - Fix Oops in alc_mux_select()Takashi Iwai
commit cce4aa378a049f4275416ee6302dd24f37b289df upstream. When no imux is available (e.g. a single capture source), alc_auto_init_input_src() may trigger an Oops due to the access to -1. Add a proper zero-check to avoid it. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09ALSA: hda/realtek - Fix missing inits of item indices for auto-micTakashi Iwai
commit 6759dc323826c2c806c998cd93945c5476688dd2 upstream. When the imux entries are rebuilt in alc_rebuild_imux_for_auto_mic(), the initialization of index field is missing. It may work without it casually when the original imux was created by the auto-parser, but it's definitely broken in the case of static configs where no imux was parsed beforehand. Because of this, the auto-mic switching doesn't work properly on some model options. This patch adds the missing initialization of index field. Reported-by: Dmitry Nezhevenko <dion@inhex.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11ALSA: hda - Fix silent output regression with ALC861Takashi Iwai
commit 43dea228a3ba5463392281535dfb3d3fe56f4c2c upstream. The 3.1 kernel has a regression for ALC861 codec where no sound output is heard with the default setup. It's because the amps in DACs aren't properly unmuted while the output mixers are assigned only to pins. This patch fixes the missing initialization of DACs when no mixer is assigned to them. Tested-by: Andrea Iob <andrea_iob@yahoo.it> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11ALSA: hda/realtek - Skip invalid digital out pinsTakashi Iwai
commit 51e4152a969aa6d2306492ebf143932dcb535c9b upstream. Some BIOS report invalid pins as digital output pins. The driver checks the connection but it doesn't do it fully correctly, and it leaves some undefined value as the audio-out widget, which makes the driver spewing warnings. This patch fixes the issue. Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11ALSA: hda/realtek - Don't create alt-stream for capture when unnecessaryTakashi Iwai
commit 1fa1757366783fb52e6e85c2d735db49b818d382 upstream. When the driver finds multiple ADCs, it tries to create an alternative capture PCM stream. However, these secondary ADCs might be useless or in uncontrolled paths in some cases, e.g. when auto-mic or dynamic ADC-switching is enabled. Also, when only a single capture source is available, the multi-streams don't make sense, too. With this patch, the driver checks such condition and skips the alt stream appropriately. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11ALSA: HDA: Add new revision for ALC662David Henningsson
commit cc667a72d471e79fd8e5e291ea115923cf44dca0 upstream. The revision 0x100300 was found for ALC662. It seems to work well with patch_alc662. BugLink: http://bugs.launchpad.net/bugs/877373 Tested-by: Shengyao Xue <Shengyao.xue@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Acked-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26ALSA: hda/realtek - Don't detect LO jack when identical with HPTakashi Iwai
The spec->autocfg.line_out_pins[] may contain the same pins as hp_pins[] depending on the configuration. When they are identical, detecting the line_jack_present flag screws up the auto-mute because alc_line_automute() is called unconditionally at initialization while it won't be triggered by unsol events, thus the old line_jack_present flag is kept for the whole run. For fixing this buggy behavior, the driver needs to check whether the line-outs are really individual, and skip if same as headphone jacks. Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-26ALSA: hda/realtek - Avoid bogus HP-pin assignmentTakashi Iwai
When the headphone pin is assigned as primary output to line_out_pins[], the automatic HP-pin assignment by ASSID must be suppressed. Otherwise a wrong pin might be assigned to the headphone and breaks the auto-mute. Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104 Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
2011-09-19ALSA: hda/realtek - Fix auto-mute with HP+LO configurationTakashi Iwai
When the system has only the headphone and the line-out jacks without speakers, the current auto-mute code doesn't work. It's because the spec->automute_lines flag is wrongly referred in update_speakers(). This flag must be meaningless when spec->automute_hp_lo isn't set, thus they should be always coupled. The patch fixes the problem and add a comment to indicate the relationship briefly. BugLink: http://bugs.launchpad.net/bugs/851697 Reported-by: David Henningsson <david.henningsson@canonical.com> Tested-By: Jayne Han <jayne.han@canonical.com> Cc: stable@kernel.org (3.0) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23ALSA: hda - Update jack-sense info even when no automute is setTakashi Iwai
The internal states, jack_present and line_jack_present should be updated upon unsolicited events even if no automute is set. Otherwise the wrong state is referred when the automute behavior is changed by the mixer control. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23ALSA: hda - Fix output-path initialization for Realtek auto-parserTakashi Iwai
When the headphone or speaker output has no own DAC, initialize the path using the primary DAC. Otherwise the path won't be set properly and can result in the silence. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-18ALSA: hda - Add "PCM" volume to vmaster slave listTakashi Iwai
The new parser may use "PCM" volume, but it was missing the vmaster slave list, thus "Master" volume didn't control it. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=41342 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04ALSA: hda - Fix digital-mic mono recording on ASUS Eee PCTakashi Iwai
The digital-mic unit on ASUS Eee PC gives PDM signals instead of the normal stereo PCM, thus you can't record a mono stream from the stereo stream as is; the summed stereo signal results in almost zero level, and you'll hear only soft noise. As a workaround, use ALC269-specific COEF to manipulate the dmic route for mono, like used for ALC271x. This is implemented as a fix-up, thus it works only with model=auto or without REALTEK_QUIRKS Kconfig. Reported-and-tested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27ALSA: hda - Fix duplicated DAC assignments for RealtekTakashi Iwai
Copying hp_pins and speaker_pins from line_out_pins may confuse the parser, and it can lead to duplicated initializations for the same pin with a wrong DAC assignment. The problem appears in 3.0 kernel code. Cc: <stable@kernel.org> (for 3.0) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27ALSA: hda - Fix Oops with Realtek quirks with NULL adc_nidsTakashi Iwai
Somce quirk models don't set adc_nids but let the parser filling it. But the recent code has unnecessary NULL-checks of spec->input_mux, and it resulted in NULL dereferences. This patch fixes that regression. Reported-and-tested-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PMTakashi Iwai
It makes little sense to enable power-saving without PM. This removes SND_HDA_NEEDS_RESUME define so that we can use CONFIG_PM in all places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-23ALSA: hda - Fix DAC filling for multi-connection pins in Realtek parserTakashi Iwai
Fix a regression in the DAC filling code in patch_realtek.c. The already filled DACs in multiout.dac_nids[] were ignored because of num_dacs=0, thus always pointed to the first DAC. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-14ALSA: hda - Re-add need_dac_fix check for multi-io jacks of Realtek codecsTakashi Iwai
During the rewrite, the check of spec->need_dac_fix and the corresponding num_dacs change was dropped from the channel-mode control. This patch re-adds it, and also enables need_dac_fix for ALC880 as default, as this feature was originally introduced to fix h/w bugs of this chip. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-09ALSA: hda - Implement 44kHz workaround for IdeadPad as fixupTakashi Iwai
Instead of checking the model quirk, use a fixup table for workaround of 44kHz-fixed PCM for Lenovo IdeaPad with ALC269. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge alc*_parse_auto_config() functions in patch_realtek.cTakashi Iwai
Now all alc*_parse_auto_config() do almost same thing except for the NID list to ignore and the PINs for SSID-check, we can merge all these to a single function. A good amount of code reduction. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC260 auto-parser codeTakashi Iwai
Finally the last one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC269 parser codeTakashi Iwai
One more code reduction. This codec has less DACs, thus the wiring to DAC can't be filled uniquely for all output pins, i.e. some outputs share the same volume control. Except for that, all seems working fine. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC268/269 auto-parser codesTakashi Iwai
Now coming to ALC268/269 parser codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC861 auto-parser codeTakashi Iwai
Merge more auto-parser code in patch_realtek.c, now for ALC861. The topology of this codec is pretty simple, and can be parsed well by the current starndard parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Fix amp-cap checks in patch_realtek.cTakashi Iwai
query_amp_caps() may return non-zero if the amp cap isn't supported by the codec. Thus one needs to check widget-caps first, then check the corresponding amp-caps. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC861-VD auto-parse to the standard parserTakashi Iwai
The existing standard auto-parser can work well with this codec, too. Let's merge. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Fix auto-mic detection in Realtek codec-parserTakashi Iwai
A regression fix from commit 21268961d3d1bbdd22a19b68adb80119e8c72dcd ALSA: hda - More flexible dynamic-ADC switching for Realtek codecs The auto-mic wasn't detected properly when no ADC-switch is needed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Provide the standard auto_init for Realtek codecsTakashi Iwai
Remove redundant definitions. Ideally, all init functions should be identical in future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC680 auto-parser to the standard parserTakashi Iwai
Improved the standard Realtek auto-parser to support the codec topology like ALC680. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Add a fix-up for HP RP5800Takashi Iwai
The BIOS provides bogus pin configs, and also invalid SSID. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Split quirk codes from patch_realtek.cTakashi Iwai
Put the all static quirk codes out of patch_realtek.c, split into the file for each codec model. For controlling the build of quirk codes, a new Kconfig, CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS is introduced. By setting this off, all quirk codes won't be built, thus you can save lots of memory. The codes in patch_realtek.c are also shuffled and more comments are given, but the contents aren't changed. This is just a refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Use common paser for digital I/O for ALC260Takashi Iwai
Avoid open-codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - More flexible dynamic-ADC switching for Realtek codecsTakashi Iwai
This patch changes the auto-parser and the auto-mic handling codes to allow more flexible dynamic ADC-switching with Realtek codecs. In the new code, the following strategy is taken: - When a cap-src can't handle all input-sources, either skip it, or switch to the ADC-switching mode. In ADC-switching mode, like the former dual-ADC mode for ALC275, it changes ADC on the fly according to the current input source. - When auto-mic is possible, always assign imux. If the mic pins are set statically via a quirk, rebuild imux according to the pins. In the auto-mic mode, the driver always changes the imux (although the imux isn't exposed as a mixer element). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Fix warning with ALC882 digital-out detectionTakashi Iwai
The digital out pin on ALC882 may have multiple connections. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Clean-up PCM assignments in patch_realtek.cTakashi Iwai
Instead of assigning each default hda_pcm_stream pointers, do NULL-checks and assign default values in alc_build_pcms(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Unify alc*_auto_init_input_src() in patch_realtek.cTakashi Iwai
The only different implmentation was alc880_auto_init_input_src(), and now it covers this variant, and we can use the single function for all codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Parse ADCs and CAPSRCs dynamically for Realtek auto-parserTakashi Iwai
Now with the new code for looking for ADCs and MUXs, we can replace the whole ADC assignment with the parsed results. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Unify alc_auto_init_analog_input() callsTakashi Iwai
All alc*_auto_init_analog_input() calls are identical, so let's use the same function more clearly without aliases. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Parse ADCs in alc_auto_create_input_ctls()Takashi Iwai
Parse ADCs and cap-srcs in alc_auto_create_input_ctls() by itself instead of passing explicitly from the caller. By this change, all alc*_auto_create_input_ctls() can be unified to the same calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Code consolidation for ALC88x and ALC662 auto-parsersTakashi Iwai
Use the same common code for auto-parsing the output paths and their initializations, based on the existing ALC662 code, which is smarter than the old ALC880/2 code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Create bind-mutes appropriately for ALC662 auto-parserTakashi Iwai
When multiple inputs are present on the mixer widget (typically a DAC and a loopback), mute/unmute both inputs with the corresponding mixer element. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Initialize DACs in ALC662 auto-parser modeTakashi Iwai
The initialization of DACs was missing in ALC662 parser code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Parse HP and speaker DACs even for multi connections for ALC662Takashi Iwai
In alc662_auto_fill_dac_nids(), the HP and speaker DACs aren't parsed when the corresponding pins aren't fixed with single DACs. Now check these DACs even for non-fixed pins. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-07-07ALSA: hda - Change all ADCs for dual-adc switching mode for RealtekTakashi Iwai
When the dual-adc switching mode is active in Realtek auto-parser, we need to couple all ADCs as a single capture-volume. Currently, the volume control changes only the first ADC, thus others may remain silent. This patch fixes the problem. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-06ALSA: hda - Add Realtek ALC269VC codec supportKailang Yang
Add the support of ALC269VC codec. Also delete the unnecessary codec_variant type enum list: now only three variants (ALC269VA ALC269VB ALC269VC) are needed. In addition, added some aliases: - Add ALC269VB alias name ALC277 - Add ALC269VC alias name ALC259 ALC281X - Add ALC269VC for Lenovo device 0x21f3 name ALC3202 Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-30ALSA: hda - Fix missing initialization in alc662 auto-parserTakashi Iwai
A missing initialization resulted in wrong DAC assignments in ALC662 (and other) auto-parsers. Signed-off-by: Takashi Iwai <tiwai@suse.de>