summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)Author
2012-04-19ALSA: hda/realtek - Fix regression on Quanta/Gericom KN1Takashi Iwai
Through the transition to the auto-parser, the support for Quanta/Gericom KN1 got broken. There are two problems behind it: - This machine doesn't like the default COEF setup for ALC260 we take now as default - BIOS doesn't set the pins correctly at all; especially the machine uses only the pin 0x0f for both headphone and speaker This patch adds the fixup as a workaround for these issues. Reported-and-tested-by: Uros Vampl <mobile.leecher@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).Jesper Juhl
In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the 'for (;;)' loop, if the 'badness' value returned from fill_and_eval_dacs() is negative, then we'll return from the function without freeing the memory we allocated for 'best_cfg', thus leaking. Fix the leak by kfree()'ing the memory when badness is negative. While I was there I also noticed some trailing whitespace in the function that I removed (along with all other trailing whitespace in the file) - it didn't seem worth-while to do that as two patches, so I hope it's OK that I just did it all as one patch. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machinesJosh Boyer
A user reported that setting model=imac24 used to allow sound to work on their Mac Pro 5,1 machine. Commit 5671087ffa "Move ALC885 macpro and imac24 models to auto-parser" removed this model option. All Mac machines are now explicitly handled with a quirk and the auto-parser. This adds a quirk for the device found on the Mac Pro 5,1 machines. This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559 [sorted the new entry in the ID number order by tiwai] Reported-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Josh Boyer <jwboyer@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940GTakashi Iwai
It's compatible with 8930G. Using the same fixup gives the proper 5.1 sound back. Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com> Cc: <stable@kernel.org> [v3.3+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & coTakashi Iwai
Add GPIO1 setup explicitly for Acer Aspire 493x & co. This could be set by alc_auto_init_amp(), but it's safer to set it more explicitly in the fixup table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-11ALSA: hda/realtek - Add a few ALC882 model strings backTakashi Iwai
Since there are still many Acer models that might not be covered by the current fixup table, let's add back a few typical model names so that user can test the fixup without recompiling. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-22ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pinTakashi Iwai
The recent Realtek driver tries to assign an extra input via the headphone plug when only a single input source is found. The code worked on Samsung Q1, but it broke ASUS 1015 where the mic is a digital-mic and only a specific ADC works. This patch fixes the assignment of ADC in the shared mic/hp case. Instead of assuming the single ADC at first, reduce the ADCs after trying to assign both mic and HP pins. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42973 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()Takashi Iwai
Since it's not always safe to assume that the vmaster hook is purely the mute-LED control, add the flag indicating whether to expose the mute-LED enum control or not. Currently, conexant codec sets this off for non-HP laptops where EAPD may be used really as EAPD. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13ALSA: hda - Add "Mute-LED Mode" enum controlTakashi Iwai
Create snd_hda_add_vmaster_hook() and snd_hda_sync_vmaster_hook() helper functions to handle the mute-LED in vmaster hook more commonly. In the former function, a new enum control "Mute-LED Mode" is added. This provides user to choose whether the mute-LED should be turned on/off explicitly or to follow the master-mute status. Reviewed-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12ALSA: hda - Rewrite the mute-LED control with vmaster hook for ALC269Takashi Iwai
We've had ugly static handling of the mute-LED with a powersave hook for ALC269 HP laptops just like done in patch_sigmatel.c. This is now rewritten with the new vmaster hook and a fixup code. For that, the new fixup action, ALC_FIXUP_ACT_BUILD, is introduced. It's called after build_controls is called. The reason of this new action is that vmaster hook must be added at this stage (not in init or probe). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-07ALSA: hda/realtek - Reuse init_hook for ALC269VB coef setupTakashi Iwai
Move the currently unused spec->init_hook at the beginning of the init sequence so that the recently added ALC269VB coef setup can be put there. The alc_init() is again clean without an ugly check. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-07Merge branch 'fix/hda' into topic/hdaTakashi Iwai
Conflicts: sound/pci/hda/patch_realtek.c
2012-03-07ALSA: hda/realtek - Apply the coef-setup only to ALC269VBKailang Yang
The coef setup in alc269_fill_coef() was designed only for ALC269VB model, and this has some bad effects for other ALC269 variants, such as turning off the external mic input. Apply it only to ALC269VB. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-06ALSA: hda - Add Gigabyte GA-MA790X to the beep whitelistTakashi Iwai
Its BIOS suppresses the PC beep although it's implemented. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-06ALSA: hda - add quirk to detect CD input on Gigabyte EP45-DS3Marton Balint
My CD input got lost in commit 68ef0561efe494143516df38c03a16b837b8e79c. Raymond helped me to add the necessary pin fixup to make it appear again. In fact, this is basically his patch. It fixes alsa bug #5541. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-05ALSA: hda - fix broken automute/autoswitch for RealtekDavid Henningsson
The recent addition of volume-knob widget in the auto-parser broke automute/autoswitch for some Realtek devices. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-02Merge branch 'fix/hda' into topic/hdaTakashi Iwai
Speaker-Out renames are merged. Conflicts: sound/pci/hda/patch_realtek.c
2012-03-02ALSA: hda - Kill hyphenated namesTakashi Iwai
Kill hyphens from "Line-Out" name strings, as suggested by Mark Brown. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-25ALSA: hda/realtek - Fix resume of multiple input sourcesTakashi Iwai
When there are multiple input sources, the driver wrongly overwrites with the value of the last input source on other slots at resume. Thus the primary input source may be shown wrongly. Reported-and-tested-by: Julian Sikorski <belegdol@gmail.com> Cc: <stable@kernel.org> [v3.1+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21ALSA: hda/realtek - Small code cleanupsTakashi Iwai
A few clean-ups for post-static-quirk time: - Call alc_auto_init_std() statically in alc_init() instead of setting spec->init_hook in each caller. spec->init_hook field is left unused for any future use. - Move the call of set_capture_mixer() to to alc_parse_auto_config() instead of each caller. - Get rid of the ADC-filling and imux check in each parser function. This is no longer needed since the auto-parser always check ADCs and imux. It was only for the static quirks. - Kill unused defines Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21ALSA: hda/realtek - Fix the wrong offset for two-speaker systemsTakashi Iwai
When the machine has two speakers but wants to put more multi-io jacks, the parser shouldn't consider about the shared DAC but try to assign the individual DACs. Otherwise the channel mapping would be fairly confused and lead to the wrong DACs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21ALSA: hda/realtek - Fix the possible conflicts of Bass Speaker nameTakashi Iwai
When the multi-io is added to the two speaker output configuration, the parser would try to add yet another "Bass Speaker" control since it checks only cfg->line_outs. Add a workaround for it by simply passing the channel name in the case of multi-io outputs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21ALSA: hda/realtek - Create individual mute switches for shared DACTakashi Iwai
Even if the outputs are using shared DACs, we can still create individual mute siwtches since they are assigned per pin. This allows to create, e.g. Speaker and Bass Speaker mute switches while the single volume is used for these outputs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21ALSA: hda/realtek - Fix possible Oops with NULL input_muxTakashi Iwai
When BIOS is damn crazy and gives no pin-config at all, the driver might lead to a NULL dereference. Let's add a NULL check for such a case. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21ALSA: hda/realtek - Parse aa-loopback items dynamicallyTakashi Iwai
Similarly in patch_via.c, parse the active analog-loopback connections and create a list dynamically rather than static arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21ALSA: hda/realtek - Remove the last static quirks for ALC882Takashi Iwai
Resitance is futile. The remaining static model quirks for Apple machines with ALC882-compatible codecs are converted to the auto-parser now. We can remove all alc*_quirks.c finally. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Add model=fixup not to apply fix-upsTakashi Iwai
If anyone wants to debug the driver and avoid the existing fix-ups, pass model=nofixup option. Then the driver will skip to pick up the fixup list. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Drop all ALC880 static quirksTakashi Iwai
Finally the all static quirks for ALC880 are converted to the auto-parser. Since we are never sure whether the BIOS on so many old machines are really correct, the quirk table entries are copied as they are, but just providing the proper pin-config values accordingly. Since alc880_quirks.c is removed, alc882_quirks.c has to be adjusted slightly to be built again. There might be some compile warnings due to the remaining alc882 quirks, but these shall be killed sooner or later, I don't care it much at this point. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Drop model=asus* from ALC880Takashi Iwai
It turned out that BIOS on most of ASUS mobo's set the pin-config tables reasonably well for the auto-parser. We'd need GPIO setups, but should work as is other than that. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Rewrite ALC880 model=asus-w1v with auto-parserTakashi Iwai
ASUS W1V has a sane pin-config table set by BIOS. The only missing piece is the setup of GPIO1. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Rewrite ALC880 model=z71v with auto-parserTakashi Iwai
ASUS Z71V has a totally broken BIOS setup (at least the info I got), thus we need to override the whole pin-config table to make the auto-parser working correctly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Rewrite ALC880 model=uniwill-dig with auto-parserTakashi Iwai
ALC880 model=uniwill-dig requires the fix-up of bogus BIOS pin default configurations. Other than that, it's pretty normal. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Rewrite ALC880 model=uniwill with auto-parserTakashi Iwai
The model=uniwill would work almost as is, but a couple of adjustments are needed to make the mutli-io working correctly. The headphone and speaker pins have to be marked properly in pin configs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Rewrite ALC880 model=uniwill-p53 with auto-parserTakashi Iwai
Uniwill p53 has a sane BIOS setup but just needs the volume-knob handling like Fujitsu laptops with ALC880. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Rewrite ALC880 model=F1734 with auto-parserTakashi Iwai
Similar as the previous patch for model=fujitsu, we can now move the static quirk for F1734 to the auto-parser. The only difference is the default pin configurations: F1734 has less pins than Amilo's. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Rewrite ALC880 model=futjisu with auto-parserTakashi Iwai
Now adding the support for the volume-knob widget, we can move the static quirk for ALC880 model=fujitsu to the auto-parser completely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: hda/realtek - Apply probe-fixup really after probingTakashi Iwai
Move the call of alc_apply_fixup() with ALC_FIXUP_ACT_PROBE after the whole setups of patch_ops & co, so that the fix-up function may override the default setup. This will be needed for installing the own unsol event handler (e.g. for volume-knob controls). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Replace ALC880 model=tcl with auto-parserTakashi Iwai
It needs a few extra setups for EAPD, but others look fairly straightforward. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Drop ALC880 model=clevoTakashi Iwai
Clevo machines with ALC880 are all well with proper BIOS setup. It seems still requiring the additional COEF setup for the EAPD. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Refactor the DAC filler functionTakashi Iwai
Refactor the DAC filling function to be used for both the primary line outputs and extra outputs using the individual badness tables. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Rewrite ALC880 model=w810 with auto-parserTakashi Iwai
The Medion W810 with ALC880 has a typical BIOS bug, copying the pin-defaults without disabling the unused pins. At least, the pin 0x17 must be disabled. Also, it requires GPIO-2 setup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Rewrite ALC880 model=lg with the auto-parserTakashi Iwai
ALC880 model=lg could work fine with the auto-parser due to the recent rewrite, but it still needs the manual adjustment; namely, the BIOS leaves unused pins as some real active jacks. This confuses the parser. Thus we just cover these pins and override the pin-configs as a fix-up. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Adjust badness calculation for multi-iosTakashi Iwai
Try harder to fit the multi-io pins also by checking the hard-wired connections for multi-ios. Also, the badness values are adjusted to prioritize the multi-ios as more valuable. These changes will enable the multi-io on some machines without losing the current capability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Show multi-io pins in debug printsTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Fix surround output regression on Acer Aspire 5935Takashi Iwai
The previous fix for the speaker on Acer Aspire 59135 introduced another problem for surround outputs. It changed the connections on the line-in/mic pins for limiting the routes, but it left the modified connections. Thus wrong connection indices were written when set to 4ch or 6ch mode. This patch fixes it by restoring the right connections just after parsing the tree but before the initialization. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42740 Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Try harder to fit the single-connectionsTakashi Iwai
So far, the Realtek driver tires to assign the single-connected routes for all pins only once at the beginning. However, since some DACs have been already mapped, the rest pins might have also single conections. In this patch, the driver does the single-connection assignment in a loop until all possbile single-connections are checked. This will improve the DAC assignment, e.g. for ASUS G72. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Finer tuning of auto-parser with badness evaluationTakashi Iwai
This patch improves the Realtek auto-parser for assigning the DACs and mixers in more suitable ways by evaluating the assignment with "badness" calculations. When assigning a DAC hinders the assignment of individual DACs for other pins, some badness point is given. Similarly, when it blocks the assignment of unique mixer controls, another badness point is added. Also, if no DAC, even shared DAC, can be assigned, more badness is pointed. Finally, comparing the accumulated badness, the best route is chosen among several trials. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Improve the signel-connection checkTakashi Iwai
When the connections from the pin selector contain only two widgets, a route to DAC and the aa-mixer, it's certainly a single connection. In such a case, get_dac_if_single() should return the connected DAC, too. This will improve the detection of the individual DAC assignment for each pin. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16Merge branch 'fix/hda' into topic/hdaTakashi Iwai
The fix for bitmap-overflow in Realtek codec driver is needed for the further development of the auto-parser with badness evaluation.
2012-02-16ALSA: hda/realtek - Fix overflow of vol/sw check bitmapTakashi Iwai
The bitmap introduced in the commit [527e4d73: ALSA: hda/realtek - Fix missing volume controls with ALC260] is too narrow for some codecs, which may have more NIDs than 0x20, thus it may overflow the bitmap array on them. Just double the number to cover all and also add a sanity-check code to be safer. Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>