aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-08ALSA: hda - Merge ALC861-VD auto-parse to the standard parserTakashi Iwai1-138/+3
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 Iwai1-1/+1
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 Iwai1-84/+21
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 Iwai1-141/+90
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 Iwai1-0/+11
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 Iwai1-13921/+1089
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 Iwai1-2/+2
Avoid open-codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - More flexible dynamic-ADC switching for Realtek codecsTakashi Iwai1-486/+429
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 Iwai1-1/+3
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 Iwai1-171/+58
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 Iwai1-45/+17
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 Iwai1-192/+131
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 Iwai1-23/+11
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 Iwai1-74/+67
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 Iwai1-353/+75
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 Iwai1-24/+34
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 Iwai1-12/+24
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 Iwai1-0/+7
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 Iwai1-10/+23
2011-07-07ALSA: hda - Change all ADCs for dual-adc switching mode for RealtekTakashi Iwai1-10/+23
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 Yang1-14/+20
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 Iwai1-1/+1
A missing initialization resulted in wrong DAC assignments in ALC662 (and other) auto-parsers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29ALSA: hda - Create snd_hda_get_conn_index() helper functionTakashi Iwai1-12/+2
Create snd_hda_get_conn_index() helper function for obtaining the connection index of the widget. Replaced the similar codes used in several codec-drivers with this common helper. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - More volume-init fixes for ALC267 codecTakashi Iwai1-3/+13
More similar fixes like previous commits: handle the exceptional case like ALC267 where no volume amp is found in ADC widget but in the capsrc widget instead. Also minor checks for avoiding possible erros: no connection-select when the pin has a single selection, and add beep verbs only when the 0x1d is used for beep. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - Fix volume-init for ALC259 with invalid widget capsTakashi Iwai1-9/+7
ALC259 seems to provide an invalid widget capability for the input-src selector widget. The widget shows the input-amp while it's a selector, and this confuses the current ALC882 initialization code that is used for ALC259, too. For fixing this, check the amp capability and handle the connection selection individually. Also, ALC259 has no mute bit in DAC volume, so we need to initialize it as ZERO instead of MUTE. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - Fix volume-init of ALC299 & coTakashi Iwai1-9/+20
ALC269 and compatible codecs have the output volume in DACs, thus we can't use the ALC880's code as is. Fixed by checking the amp caps and picking up the right widget for initialization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - Simplify EAPD control in patch_realtek.cTakashi Iwai1-23/+7
Look through the known NIDs that may have EAPD capabilities and turn on/off them appropriately instead of checking the individual vendor ids. This will also avoid the forgotten entries of newly added codec ids in future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - Fix auto-init of output volumes of Realtek codecsTakashi Iwai1-33/+31
Fix the regression introduced by the commit 1f0f4b8036b1fe1347cb4f1f199601b87de9be46 ALSA: hda - Reduce static init verbs for Realtek auto-parsers The input amps of mixer widgets should be unmuted as default (as usually they have no assigned mixer switches). More fixes in this commit are, however, for ALC260: ALC260 codec can have multiple output mixers connnected to a single DAC althouh the driver didn't pick up them properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - Check hard-wired DACs at first for ALC662 & coTakashi Iwai1-31/+81
Some Realtek codecs have the output pins hardwired with certain DACs. These DACs have to be assigned at first and assign the rest for multi-DAC pins so that all DACs can be assigned properly. Without such an optimization, speaker outputs may be assigned to the same DAC as the headphone or others. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - Call proper DAC-filler function for Realtek auto-parserTakashi Iwai1-19/+23
In alc_auto_add_multi_channel_mode(), when the primary HP workaround is enabled, it re-initializes the DAC list but calls alc662's function in a fixed way. This isn't pretty suitable for other codecs, of course. Now we call it with fill_dac function pointer so that the proper function can be called at that point. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-27ALSA: hda - Reduce static init verbs for Realtek auto-parsersTakashi Iwai1-361/+140
Instead of using fixed init verbs, initialize DACs, ADCs and mixers more dynamically for Realtek auto-parsers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24ALSA: hda - Use alc_get_pfx_name() for all Realtek codecsTakashi Iwai1-14/+6
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24ALSA: hda - Clean up multi-channel mixer name assignment in patch_realtek.cTakashi Iwai1-56/+36
Change alc_get_line_out_pfx() in patch_realtek.c to provide the channel specific name and assign the index so that each caller doesn't have to set the channel name by itself. Also, check the multi-io case with the primary hp-out; for the multi-io channels, assign the channel name instead of "Headphone" with indices. This makes the mixer names more intuitive and reduces confusion. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-2/+11
2011-06-24ALSA: hda - Allow multi-io with HP output for ALC662 & coTakashi Iwai1-1/+16
Even if the machine has no line-out but only HP-out, try to detect the multi-io. It'll allow more possibilities for 5.1 outputs on laptops. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-23ALSA: HDA: Pinfix quirk for HP Z200 WorkstationDavid Henningsson1-0/+11
BIOS lists the internal speaker as an internal line-out. Change to internal speaker + model=auto for better auto-mute capabilities. BugLink: http://bugs.launchpad.net/bugs/754964 Reported-by: Marc Legris <marc.legris@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-21ALSA: hda - Remove ALC268 model override for CPR2000Tony Vroon1-1/+0
The "diverse" Quanta ID 0x0763 is overridden to ALC268_ACER. This keeps headphone automute and microphone input from operating on at least one laptop from Opti Systems. Without the override, the BIOS parser does a fine job setting the card up and everything works. Tested-By: Peter Schneider <e.at.chi.kaen@googlemail.com> Signed-off-by: Tony Vroon <tony@linx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20ALSA: HDA: Remove quirk for an HP deviceDavid Henningsson1-1/+0
The reporter, who is running kernel 2.6.38, reports that he needs to set model=auto for the headphone output to work correctly. BugLink: http://bugs.launchpad.net/bugs/761022 Cc: stable@kernel.org (v2.6.38+) Reported-by: Jo Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-13Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-8/+10
2011-06-13ALSA: hda - Fix wrong auto-mute type for Acer Aspire-oneTakashi Iwai1-2/+1
The auto-mute setup for Acer Aspire-one with ALC268 was set wrongly during the clean-up of auto-mute function. Fixed now. Tested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: hda - Fix initialization of hp pins with master_mute in RealtekTakashi Iwai1-5/+7
Some Reatlek model quirks use master_mute bool switch for controlling the master-mute of outputs. For these cases, the initialization of HP pins/amps were forgotten during the transition to the common automute helper function in 3.0 development time, and resulted in the muted HP output as default. This patch fixes the issue by adjusting the HP output explicitly with master_mute switch. Tested-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: hda - Fix invalid unsol tag for some alc262 model quirksTakashi Iwai1-1/+1
The tag number was forgotten to be fixed after cleaning up the model quirks for ALC262 fujitsu and lenovo-3000 models. Tested-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-07ALSA: hda: Fix quirk for Dell Inspiron 910Daniel T Chen1-0/+1
BugLink: https://launchpad.net/bugs/792712 The original reporter states that sound from the internal speakers is inaudible until using the model=auto quirk. This symptom is due to an existing quirk mask for 0x102802b* that uses the model=dell quirk. To limit the possible regressions, leave the existing quirk mask but add a higher priority specific mask for the reporter's PCI SSID. Reported-and-tested-by: rodni hipp Cc: <stable@kernel.org> [2.6.38+] Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06ALSA: hda: Virtualize SPDIF out controlsStephen Warren1-0/+1
The SPDIF output controls apply to converter widgets. A future change will create a PCM device per pin widget, and hence a set of SPDIF output controls per pin widget, for certain HDMI codecs. To support this, we need the ability to virtualize the SPDIF output controls. Specifically: * Controls can be "unassigned" from real hardware when a converter is not used for the PCM the control was created for. * Control puts only write to hardware when they are assigned. * Controls can be "assigned" to real hardware when a converter is picked to support output for a particular PCM. * When a converter is assigned, the hardware is updated to the cached configuration. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20ALSA: hda - Remove PCM mixer elements from Virtual Master of realtekRaymond Yau1-2/+0
Afer commit aa202455eec51699e44f658530728162cefa1307 , none of realtek codec has hardware volume control "PCM Playback Volume" and "PCM Playback Switch". As Virtual Master require all slave controls must have same number of step and dB range. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19ALSA: hda - Enable Realtek ALC269 codec input layer beepMadis Janson1-0/+1
This fixes the input layer beep not working on some EeePC 1000 models by adding the subsystem id into whitelist. Otherwise the corresponding ALSA mixer is not enabled and stays muted, resulting in no console beep. Signed-off-by: Madis Janson <madis@cyber.ee> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18ALSA: hda - Fix no sound after Windows boot with ALC269Kailang Yang1-2/+9
Change power control register to default. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18ALSA: hda - Add support of ALC221 / ALC276 codecsKailang Yang1-0/+2
Compatible with ALC269. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18ALSA: hda - Add support of ALC898/899 codecKailang Yang1-0/+10
These are compatible with ALC882 codec. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17ALSA: hda - Add dock-mic detection support to Realtek auto-parserTakashi Iwai1-17/+65
In addition to the normal mic jack, the mic (or line-in) jack on the docking-station is checked also as a candidate for auto-selection. Signed-off-by: Takashi Iwai <tiwai@suse.de>