aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-21ALSA: hda/realtek - Create individual mute switches for shared DACTakashi Iwai1-30/+20
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 Iwai1-0/+3
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 Iwai1-82/+22
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 Iwai1-51/+92
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 Iwai1-0/+7
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 Iwai1-40/+179
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 Iwai1-1/+2
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 Iwai1-0/+6
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 Iwai1-0/+20
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 Iwai1-0/+13
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 Iwai1-0/+12
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 Iwai1-0/+1
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 Iwai1-0/+24
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 Iwai1-2/+74
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 Iwai1-16/+16
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 Iwai1-0/+13
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 Iwai1-0/+11
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 Iwai1-77/+77
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 Iwai1-0/+13
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 Iwai1-0/+14
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 Iwai1-62/+134
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 Iwai1-0/+5
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17ALSA: hda/realtek - Fix surround output regression on Acer Aspire 5935Takashi Iwai1-0/+8
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 Iwai1-33/+91
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 Iwai1-84/+293
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 Iwai1-1/+5
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 Iwai1-3/+31
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 Iwai1-3/+8
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>
2012-02-16ALSA: hda/realtek - Disable static fixups for ASUS with ALC269Takashi Iwai1-1/+1
We've enabled the static fixups for ASUS machines with ALC269 codec, just for making things compatible during the transition to the auto- parser. However, it seems that the static configurations do more harmful than good, as some of entries don't match with the actual hardware setups. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Remove leftover static quirks for ALC260Takashi Iwai1-40/+8
Now we can clean up all static quirks for ALC260. Also many codes in alc_quirks.c can be ripped off since they have been used only by ALC260 static quirks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Drop model=favorit100 for ALC260Takashi Iwai1-0/+1
It's working with the auto-parser just with the standard GPIO 1 setup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Add the support for HP Presario B1900Takashi Iwai1-0/+8
HP Presario B1900 needs a similar hack like Replacer, toggling GPIO1 per the jack state, in addition to the COEF setup used for other Acer laptops. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Replace ALC260 model=replacer with the auto-parserTakashi Iwai1-0/+44
The support for Replacer 627V in the auto-parser needs the unique unsol event handling: although the machine has a single output pin 0x0f, it's used for both the headphone and the speaker, and the driver needs to toggle the output route via GPIO 1. In addition, it needs a special COEF setup with 0x3050. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Replace ALC260 model=acer with the auto-parserTakashi Iwai1-0/+7
The ALC260 model=acer needs GPIO1 setup. It could be selected well if the codec SSID is set properly by BIOS, but to make sure, enable it forcibly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16ALSA: hda/realtek - Add the fixup codes for ALC260 model=willTakashi Iwai1-3/+24
The model=will for ALC260 requires the pin 0x0f to be a headphone and some special verbs for the COEF to turn on the amp. Now added these as fixup entries and removed the static model quirk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13Merge branch 'fix/acer-alc889-fix' into fix/hdaTakashi Iwai1-0/+23
Conflicts: sound/pci/hda/patch_realtek.c Merged back the fix for Acer Aspire 6935 with ALC889 codec. The fix commit was based on 3.2 kernel so that it can be applied to stable kernel cleanly.
2012-02-13ALSA: hda - Fix silent speaker output on Acer Aspire 6935Takashi Iwai1-0/+23
Since 3.2 kernel, the driver starts trying to assign the multi-io DACs before the speaker, thus it assigns DAC2/3 for multi-io and DAC4 for the speaker for a standard laptop setup like a HP, a speaker, a mic-in and a line-in. However, on Acer Aspire 6935, it seems that the speaker pin 0x14 must be connected with either DAC1 or 2; otherwise it results in silence by some reason, although the codec itself allows the routing to DAC3/4. As a workaround, the connection list of each pin is reduced to be mapped to either only DAC1/2 or DAC3/4, so that the compatible assignment as in kernel 3.1 is achieved. 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-13ALSA: hda - Add another jack-detection suppression for ASUS ALC892Takashi Iwai1-0/+6
Add the jack-detect suppression for an ASUS machine with ALC892 codec. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42655 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13ALSA: hda - Suppress auto-mute feature on some machines with ALC861Takashi Iwai1-8/+30
A few machines with ALC861 & co are reported not to work properly with the auto-mute feature in software. The auto-mute feature is implemented in the hardware level, and the jack-detection never works with them. Also, rename the fixup index as ALC861_FIXUP_* to follow the standard. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-1/+2
Necessary for working on the jack-detection suppression feature.
2012-02-07ALSA: hda - add support for Uniwill ECS M31EI notebookJaroslav Kysela1-0/+1
This hardware requires same fixup for the node 0x0f like Asus A6Rp. More information: https://bugzilla.redhat.com/show_bug.cgi?id=785417 Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-06ALSA: hda/realtek - Fix a wrong conditionTakashi Iwai1-1/+1
sparse complains that "spec->multiout.dac_nids" is a pointer. sound/pci/hda/patch_realtek.c:2321:37: error: incompatible types for operation (>) sound/pci/hda/patch_realtek.c:2321:37: left side has type unsigned short const [usertype] *dac_nids sound/pci/hda/patch_realtek.c:2321:37: right side has type int It was meant to be num_dacs instead of dac_nids. Although the current code still works as expected (when num_dacs is zero, dac_nids should be NULL, too), better to fix now, of course. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03ALSA: hda - Add suffix argument to snd_hda_add_vmaster()Takashi Iwai1-32/+8
In most cases, the slave strings for vmaster are identical between volumes and switches except for "xxx Volume" and "xxx Switch" suffix. Now snd_hda_add_vmaster() takes the optional suffix argument so that each string can be composed with the given suffix, and we can share the slave name strings in both volume and switch calls nicely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03ALSA: hda/realtek - Add missing Bass and CLFE as vmaster slavesTakashi Iwai1-0/+4
The recent changes in Realtek auto-parser added the new "Bass Speaker" and "CLFE" mixer elements which should be tracked as vmaster slaves, too. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42720 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-31ALSA: HDA: Remove quirk for Toshiba Qosmio G50David Henningsson1-13/+0
The user reports that model=auto works better than current handling on a 3.2 based kernel (with jack detection patches backported). Since model=auto is what we prefer these days anyway, the quirk should be removed. Alsa-info for the relevant machine: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/923316/+attachment/2702812/+files/alsa-info.txt.Pbfno2x7bp BugLink: https://bugs.launchpad.net/bugs/923316 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-30ALSA: hda - Apply 0x0f-VREF fix to all ASUS laptops with ALC861/660Takashi Iwai1-8/+35
It turned out that other ASUS laptops require the similar fix to enable the VREF on the pin 0x0f for the secret output amp, not only ASUS A6Rp. Moreover, it's required even when the pin is being used as the output. Thus, writing a fixed value doesn't work always. This patch applies the VREF-fix for all ASUS laptops with ALC861/660 in a fixup function that checks the current value and turns on only the VREF value no matter whether input or output direction is set. The automute function is modified as well to keep the pin VREF upon muting/unmuting via pin-control; otherwise the pin VREF is reset at plugging/unplugging a jack. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588 Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-27ALSA: HDA: Remove quirk for Asus N53JqDavid Henningsson1-1/+0
The user reports that he needs to add model=auto for audio to work properly. In fact, since node 0x15 is not even a pin node, the existing fixup is definitely wrong. Relevant information can be found in the buglink below. Cc: stable@kernel.org (3.2+) BugLink: https://bugs.launchpad.net/bugs/918254 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-26ALSA: hda - Fix silent output on Haier W18 laptopTakashi Iwai1-0/+1
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 Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-25ALSA: hda - Fix silent output on ASUS A6RpTakashi Iwai1-0/+10
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 Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-20ALSA: hda - Fix a unused variable warningTakashi Iwai1-1/+0
Just overlooked. sound/pci/hda/patch_realtek.c: In function ‘alc_sku_unsol_event’: sound/pci/hda/patch_realtek.c:643:19: warning: unused variable ‘spec’ [-Wunused-variable] Signed-off-by: Takashi Iwai <tiwai@suse.de>