summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)Author
2010-07-29ALSA: hda - Add a PC-beep workaround for ASUS P5-VTakashi Iwai
ASUS P5-V provides a SSID that unexpectedly matches with the value compilant with Realtek's specification. Thus the driver interprets it badly, resulting in non-working PC beep. This patch adds a white-list for such a case; a white-list of known devices with working PC beep. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28ALSA: hda - Assume PC-beep as default for RealtekTakashi Iwai
Enable PC-beep as default for hardwares that aren't compliant with the SSID value Realtek requires. In such a case, better to enable the beep to avoid a regression. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28ALSA: hda - Don't register beep input device when no beep is availableTakashi Iwai
We check now the availability of PC beep and skip the build of beep mixers, but the driver still registers the input device. This should be checked as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-05ALSA: hda - Enable beep on Realtek codecs with PCI SSID overrideTakashi Iwai
When the PCI SSID gives an overriding SKU assno, PC-beep bit isn't detected (since it's located over 16bit), resulting in no PC beep. Also, many devices seem ignoring the requirement by Realtek's spec for SSID numbers, and it also confuses the PC beep detection. This patch assumes the PC beep is available on every machine with PCI SSID override. It's a regression fix from 2.6.34. Reference: Kernel bug 16251 http://bugzilla.kernel.org/show_bug.cgi?id=16251 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-22ALSA: hda - Add Macbook 5,2 quirkLuke Yelavich
BugLink: https://bugs.launchpad.net/bugs/463178 Set Macbook 5,2 (106b:4a00) hardware to use ALC885_MB5 Cc: <stable@kernel.org> Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-22ALSA: hda - Fix uninitialized variableTakashi Iwai
Fix the following compile warning. kctl should be NULL-initialized. sound/pci/hda/patch_realtek.c: In function ‘alc_build_controls’: sound/pci/hda/patch_realtek.c:2550:23: warning: ‘kctl’ may be used uninitialized in this function Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-14ALSA: hda - Fix line-in for mb5 model MacBook (Pro) 5,1 / 5,2Alex Murray
The line-in input is 0x7 not 0x2 for MacBook (Pro) 5,1 / 5,2 models Signed-off-by: Alex Murray <murray.alex@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-11ALSA: hda - Don't check capture source mixer if no ADC is availableTakashi Iwai
With multiple codec configurations, some codec might have no ADC, thus it keeps spec->adc_nids = NULL. This causes an Oops in alc_build_controls(). Reference: kernel bug #16156 https://bugzilla.kernel.org/show_bug.cgi?id=16156 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08ALSA: hda - Add SSID table for iMac7,1.Justin P. Mattock
This patch add's the iMac7,1 SSID entry to patch_realtek.c which adds sound support. bug entry: https://bugs.launchpad.net/mactel-support/+bug/360866 Note:I do not have this machine on hand only codec#0 file for the machine so please test if you have the appropriate equipment. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08ALSA: hda - Add SSID table for MacBookAir1,1Justin P. Mattock
This patch add's the MacBookAir1,1 SSID entry to patch_realtek.c which adds sound support. bug entry: https://bugs.launchpad.net/mactel-support/+bug/268301 Note:I do not have this machine on hand only codec#0 file for the machine so please test if you have the appropriate equipment. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08ALSA: hda - Add SSID table for MacBookAir2,1Justin P. Mattock
This adds the SSID number to snd_pci_quirk for the MacBookAir2,1 taken from codec#0 at: http://launchpadlibrarian.net/49455483/Card0.Codecs.codec.0.txt keep in mind I do not have one of these machines on hand so please if you do have this machine please test for me.. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-31ALSA: hda: Use mb31 quirk for an iMac modelDaniel T Chen
BugLink: https://launchpad.net/bugs/542550 Symptom: On the reporter's iMac, in Ubuntu 10.04 LTS neither playback nor capture appear audible out-of-the-box. Test case: Boot from an Ubuntu 10.04 LTS live cd or from an installed configuration and attempt to play or capture audio. Resolution: Specify the mb31 quirk for this machine in the codec SSID table. Reported-and-Tested-By: f3a97 Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25ALSA: hda - iMac9,1 sound fixesJustin P. Mattock
First issue: With the original patch, I've noticed by unmuting the mic (and even having it muted), there is a distorted("Noise") coming from the internal speakers, even when the headphones are plugged in. What my finding's revealed is: /* Mic (rear) pin: input vref at 80% */ {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, From the original patch. Looking at codec#0 0x18/0x1a is listed as: Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x0000373c: IN OUT HP Detect Vref caps: HIZ 50 GRD 80 100 Pin Default 0x90100141: [Fixed] Speaker at Int N/A Conn = Unknown, Color = Unknown DefAssociation = 0x4, Sequence = 0x1 Misc = NO_PRESENCE Pin-ctls: 0x41: OUT VREF_50 Unsolicited: tag=00, enabled=0 Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 seems this Node is listed as: [Fixed] Speaker while 0x15 Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x0000373c: IN OUT HP Detect Vref caps: HIZ 50 GRD 80 100 Pin Default 0x018b3020: [Jack] Line In at Ext Rear Conn = Comb, Color = Blue DefAssociation = 0x2, Sequence = 0x0 Pin-ctls: 0x01: VREF_50 Unsolicited: tag=00, enabled=0 Connection: 5 0x0c 0x0d* 0x0e 0x0f 0x26 is [Jack] Line In at Ext Rear. (looking at the other apple products as examples I came up with the fix below). Second issue: alc885_mbp_4ch_modes The original patch does a good job with the HP pin automute function, but from what I noticed is I would have to manually change the channel form 2 to 4 after plugging the headphones in. And not to mention having odd moments to where I was jamming out with the headphones on, then later realized I had sound blasting out of the speakers as well. My findings revealed that changing alc885_mbp_4ch_modes to alc885_mba21_ch_modes and setting - spec->autocfg.speaker_pins[0] = 0x15; + spec->autocfg.speaker_pins[0] = 0x18; gets the automute function when the headphones plugged in working flawlessly(and the no need to manually change the channel number afterwards). Third issue: alc885_imac91_mixer There probably doesnt need to be anything changed with this (esspecially if your one to like lots of sliders),but my findings revealed that mac osx only has a master on the top right, another switch on itunes, and then a slider for the mic. So the changes I did below try and mimic osx as much as possible (only thing I had an issue with is just having one mute switch on the master, instead of having two(still investigating)). fourth issue: alc882_capture_source I endeded up creating alc889A_imac91_capture_source() only because looking at alc882_capture_source I see that the mic is set to 0x1 while this works, I also noticed that adding 0x1 and 0x01 and testing that 0x1 somehow stops working, and 0x01 works(so I figured 0x01 was more of the alpha of the numbers(still need to figure out where that valuse is)). In any case the microphone does work with the original, and with the below patch, but both still record not as clean(lots of "Noise", which I would like to look into too). Note: using alsamixer -Va reveals the capture switches. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-20ALSA: hda: Storage class should be before const qualifierTobias Klauser
The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-05-10ALSA: Revert "ALSA: hda/realtek: quirk for D945GCLF2 mainboard"Stefan Lippers-Hollmann
This reverts commit 7aee67466536bbf8bb44a95712c848a61c5a0acd. As it doesn't seem to be universally valid for all mainboard revisions of the D945GCLF2 and breaks snd-hda-intel/ snd-hda-codec-realtek on the Intel Corporation "D945GCLF2" (LF94510J.86A.0229.2009.0729.0209) mainboard. 00:1b.0 Audio device [0403]: Intel Corporation N10/ICH 7 Family High Definition Audio Controller [8086:27d8] (rev 01) Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Cc: <stable@kernel.org> [2.6.33] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-06ALSA: hda - Remove superfluous external amp setup for ALC888Takashi Iwai
We had a fixed external amp setup enabled for ALC888, but this seems unnecessary. The amps are controlled rather by GPIOs. Let's remove it now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-06Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-04-22ALSA: hda: Use ALC880_F1734 quirk for Fujitsu Siemens AMILO Xi 1526Daniel T Chen
BugLink: https://launchpad.net/bugs/567494 The OR has verified that the existing model quirk, ALC880_UNIWILL, is insufficient for audible playback and capture by default. Instead, the ALC880_F1734 model quirk needs to be used. This change is necessary for both 2.6.32.11 and 2.6.33.2. Reported-by: Arnaud Malpeyre <amalpeyre@gmail.com> Tested-by: Arnaud Malpeyre <amalpeyre@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-15Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-04-15ALSA: hda - add a quirk for Clevo M570U laptopJoerg Schirottke
Added the matching model for Clevo laptop M570U. Signed-off-by: Joerg Schirottke <master@kanotix.com> Tested-by: Maximilian Gerhard <maxbox@directbox.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-14Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-04-12ALSA: hda - Add fix-up for Sony VAIO with ALC269Takashi Iwai
Sony VAIO models with ALC269 need to initialize the pin 0x19 to VREF ground or Hi-Z to make the headphone working. Other than that, model=auto works fine, so let's use model=auto with a specific fix-up table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-12ALSA: hda - Enhance fix-up table for Realtek codecsTakashi Iwai
A few enhancement / fixes for fix-up table of some Realtek codecs: - Apply fix-ups only for the auto model - Apply additional verbs after normal init verbs - Add a debug print to show the fix-up application This is basically a preliminary work for the next fix for Sony VAIO. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-09Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-04-09ALSA: hda - Fix initial capture source connections of ALC880/260Takashi Iwai
The widget connections of ADC of ALC880 and ALC2260 aren't initialized, thus it might point to invalid pin. This can be a problem when mode=auto and there is only one input pin. Then user can't change the connection at all. This patch adds the code to initialize the input pin connection of these codecs. Reference: Novell bnc#594363 https://bugzilla.novell.com/show_bug.cgi?id=594363 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-09ALSA: hda - Fix setup for ALC269vb amic and dmic modelsKailang Yang
Corrected HP and mic pins for ALC269vb amic and dmic models. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-09ALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21Kailang Yang
ALC269vb has an alternative HP pin 0x21 in addition. Fix the parser to recognize it. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07ALSA: hda: Add support for Medion WIM2160Maurus Cuelenaere
This adds support for the Medion WIM2160 soundcard. There's no PCI quirk added because it has the same PCI id as the Medion MD2. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07ALSA: hda - Remove left-over debug printk in patch_realtek.cTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07ALSA: hda - Fix ALC882 DAC connections in auto modeTakashi Iwai
Assign DACs properly to each output. Currently, the front output is bound to HP/speaker outputs blindly, but they should be assigned to individual DACs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-04-05ALSA: hda - Fix a wrong array range check in patch_realtek.cTakashi Iwai
The commit 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 introduced a wrong comparision for the array range check, which effectively skips the whole initialization of DAC connections. Fixed now. Reference: bko#15689 https://bugzilla.kernel.org/show_bug.cgi?id=15689 Reported-by: Adrian Ulrich <kernel@blinkenlights.ch> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-05ALSA: hda - Enable amplifiers on Acer Inspire 6530GTony Vroon
After more tests it appears that EAPD needs to be enabled on both the 0x14 and 0x15 NIDs to enable the main speaker and headphone amplifiers. The maximum volume setting is now equal to what the machine achieves under other operating systems. Disabling Front or LFE playback triggers EAPD and disables the amplifier. As such, these two playback switches have been removed from the mixer. Signed-off-by: Tony Vroon <tony@linx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-30ALSA: hda - introduce snd_hda_codec_update_cache()Takashi Iwai
Add a new helper, snd_hda_codec_update_cache(), for reducing the unneeded verbs. This function checks the cached value and skips if it's identical with the given one. Otherwise it works like snd_hda_codec_write_cache(). The alc269 code uses this function as an example. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-30ALSA: hda - Add mute LED support for HP laptop with ALC269Takashi Iwai
Some HP laptops have a mute LED that is controlled over the unused MIC2 VREF pin. Implement the LED updater like patch_sigmatel.c for this model. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-30Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-03-30ALSA: hda - Add missing printk argument in previous patchTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29ALSA: hda - Fix ADC/MUX assignment of ALC269 codecTakashi Iwai
ALC269 codec has a few different variants, and each of them may have different ADC and MUX widgets. For example, one model has ADC 0x08 with MUX 0x23 while others has ADC 0x09 or ADC 0x07 with MUX 022 or 0x24. The difference of ADC appears usually as the capability of the digital mic pin (0x12), and the current driver sometimes misses the internal mic pin due to the mismatching ADC. This patch adds a bit more clever way to find the matching ADC instead of the static list. Now the driver checks all active input pins and fills only the ADC/MUX's that contain all of them. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-03-29ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()Takashi Iwai
The mask and value parameters passed to snd_hda_codec_amp_stereo() should be 8-bit values for mute and volume. Passing AMP_IN_MUTE() is wrong, which is found in many places in patch_realtek.c as a left-over from the conversion to snd_hda_codec_amp_stereo(). Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-25Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2010-03-25ALSA: hda - Don't set invalid connection index in Realtek initialiaitonTakashi Iwai
Skip initialization of connections of DAC widgets that aren't used, which resulted in invalid verb parameters. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22ALSA: hda - Fix uninitialized variable warning in ↵Takashi Iwai
alc_auto_parse_customize_define() Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22ALSA: hda - Fix access-after-free in patch_realtek.cTakashi Iwai
alc_free_kctls() has to be called after all jobs done in alc_build_controls(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19ALSA: hda - Add alc_codec_rename() helperKailang Yang
Added alc_codec_rename() helper for renaming codec->chip_name. Added Acer-specific codec naming for ALC269/662. [Clean-up and refactoring by tiwai] Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19ALSA: hda - Add parse customize define function for Realtek codecsKailang Yang
Added alc_auto_parse_customize_define() to parse the Realtek-specific attributes from SKU. Also enable beep controls only when the proper attribute bit is set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-16ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212Daniel T Chen
BugLink: https://bugs.launchpad.net/bugs/538895 The OR has verified that both position_fix=1 and model=6stack-dig are necessary to have capture function properly. (The existing 3stack-6ch model quirk seems to be incorrect.) Reported-by: Reuben Bailey <reuben.e.bailey@gmail.com> Tested-by: Reuben Bailey <reuben.e.bailey@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220Anisse Astier
This should make the speakers and jack detection work on MSI all-in-one computers NetOn AP1900 and Wind Top AE2220. Signed-off-by: Anisse Astier <anisse@astier.eu> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15ALSA: hda - Fix secondary ADC of ALC260 basic modelTakashi Iwai
Fix adc_nids[] for ALC260 basic model to match with num_adc_nids. Otherwise you get an invalid NID in the secondary "Input Source" mixer element. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>