summaryrefslogtreecommitdiff
path: root/sound/pci/hda
AgeCommit message (Collapse)AuthorFilesLines
2011-07-27ALSA: hda - Fix duplicated DAC assignments for RealtekTakashi Iwai1-2/+5
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 Iwai1-11/+11
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-27ALSA: hda - Add support for vref-out based mute LED control on IDT codecsVitaliy Kulikov1-43/+156
This patch also registers all necessary callbacks to support mute LED only when such control is enabled. And it keeps codec AFG in D0 or D1 state all the time when aggressive power managemnt is enabled for vref-out control (and mute LED) work correctly. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Cirrus Logic CS421x supportTim Howe1-34/+709
This update includes the changes necessary for supporting the CS421x family of codecs. Previously this file only supported the CS420x family of codecs. This file also contains init verbs to correct several issues in the CS421x hardware. Behavior between the CS421x and CS420x codec families is similar, so several functions have been reused with "if" statements to determine which codec family (CS421x or CS420x) is present. Also, this file will be updated sometime in the near future in order to add support for a system using CS421x that requires mono mix on the speaker output only. [Fix const usages and adaption for new APIs by tiwai] Signed-off-by: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Allow codec-specific set_power_state opsTakashi Iwai3-41/+56
The procedure for codec D-state change may have exceptional cases depending on the codec chip, such as a longer delay or suppressing D3. This patch adds a new codec ops, set_power_state() to override the system default function. For ease of porting, snd_hda_codec_set_power_to_all() helper function is extracted from the default set_power_state() function. As an example, the Conexant codec-specific delay is removed from the default routine but moved to patch_conexant.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Add post_suspend patch opsTakashi Iwai2-10/+9
Add a new ops, post_suspend(), which is called after suspend() ops is performed. This is called only in the case of the real PM suspend, and the codec driver can use this for further changing of D-state or clearing the LED, etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PMTakashi Iwai8-30/+25
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-26ALSA: hda - Make sure mute led reflects master mute stateVitaliy Kulikov1-18/+35
This patch adds checking of mute state on all outputs besides just speakers to calculate the master mute state for mute led support. It also renames and splits the function that does it for better code clarity. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26ALSA: hda - Fix invalid mute led state on resume of IDT codecsVitaliy Kulikov3-0/+17
Codec state is not restored immediately on resume but on the first access when power-save is enabled. That leads to an invalid mute led state after resume until either sound is played or some control is changed. This patch adds a possibility for a vendor specific patch to restore codec state immediately after resume if required. And it adds code to restore IDT codecs state immediately on resume on HP systems with mute led support. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-24ALSA: hda - Add support of the 4 internal speakers on certain HP laptopsVitaliy Kulikov1-1/+50
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-23ALSA: hda - Fix DAC filling for multi-connection pins in Realtek parserTakashi Iwai1-1/+4
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-22Merge branch 'topic/hda' into for-linusTakashi Iwai29-21220/+18596
2011-07-22Merge branch 'topic/misc' into for-linusTakashi Iwai2-8/+6
2011-07-21ALSA: hda - Remove a superfluous argument of via_auto_init_output()Takashi Iwai1-14/+10
"force" argument is always true, so let's strip it off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-21ALSA: hda - Fix indep-HP path (de-)activation for VT1708* codecsTakashi Iwai1-40/+52
This patch fixes non-working indep-HP control on VT1708* codecs. The problems are that via_independent_hp_put() wasn't fixed to follow the recent change of three HP paths, and hp_indep_path didn't contain the amp nids of mixer elements. Together with the fixes, a few code clean-ups are done. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-18ALSA: hda - Switch HP DAC dynamically with indep-HP switch for VIATakashi Iwai1-34/+125
This patch changes the behavior of independent-HP enum switch. Now instead of returning a busy error, the driver switches dynamically the stream of the HP (and shared) DACs according to the current mode. The logic is similar like the dual-mic ADC switch, but a bit more complicated because of the presence of shared DAC. Together with the change, a mutex is introduced to protect against the possible races for the indep-HP mode setting. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-18ALSA: hda - Implement dynamic loopback control for VIA codecsTakashi Iwai1-140/+260
This patch adds the dynamic control of analog-loopback for VIA codecs. When the loopback is enabled, the inputs from line-ins and mics are mixed with the front DAC, and sent to the front outputs. The very same input is routed to the headhpones and speakers in loopback mode. However, since the loopback mix can't take other than the front DAC, there is no longer individual volume controls for headphones and speakers. Once when the loopback control is off, these volumes take effect. Since the individual volumes are more desired in general use caess, the loopback mode is set to off as default for now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-14ALSA: hda - Fix krealloc() replacement in hda_codec.cTakashi Iwai1-1/+2
It was obviously wrong, grr.... 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 Iwai1-0/+3
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-12ALSA: hda - fix up typos in Kconfig help for default buffer size introduced ↵Paul Menzel1-3/+3
in acfa634f This commit is a fix up for commit acfa634f. commit acfa634f7e199193ec28282e82a5a6dd8edebcb7 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jul 12 17:27:46 2011 +0200 ALSA: hda - Add Kconfig for the default buffer size Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12ALSA: hda - Add Kconfig for the default buffer sizeTakashi Iwai2-1/+20
Add a Kconfig entry to specify the default buffer size. Distros using PulseAudio can choose a larger value here. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12ALSA: Use krealloc() in possible placesTakashi Iwai1-6/+3
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12ALSA: hda - Expose secret DAC-AA connection of some VIA codecsTakashi Iwai1-6/+38
VT1718S and co have a secret connection from DAC to AA-mix, which doesn't appear in the connection list obtained from the h/w. Currently the driver fixes the connection index locally at init, but now we can expose it statically via snd_hda_override_connections() so that this conection can be checked better by the parser in future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12ALSA: hda - Always read raw connections for proc outputTakashi Iwai3-7/+17
In the codec proc outputs, read the raw connections instead of the cached connection list, i.e. proc files contain only raw values. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12ALSA: hda - Add snd_hda_override_conn_list() helper functionTakashi Iwai2-30/+71
Add a function to add/modify the connection-list cache entry. It'll be useful to fix a buggy hardware result. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-11ALSA: hda - Turn on extra EAPDs on Conexant codecsTakashi Iwai1-0/+39
Some machines seem to use EAPD control of the unused pin for controlling the overall EAPD. Since the driver currently doesn't check the EAPD of unused pins, the EAPD isn't enabled. For avoiding such a problem, turn all extra EAPDs on as default. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-11ALSA: hda - Preserve input pin-ctl bits in HP-automute for VIA codecTakashi Iwai1-3/+11
For smart51 pins, we need to preserve the input pin-control bits at auto-mute controls instead of overwriting zero or pin-out-only. Otherwise the VREF won't be set properly when smart51 is disabled again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-11ALSA: hda - Set line-out pin-ctls properly when indep-HP mode changesTakashi Iwai1-10/+11
When Independent-HP mode is changed for VIA, the driver needs to re-issue the auto-mute check so that the line-out pins are set properly without influence of HP pin state. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-11ALSA: hda - Via Fix speaker-mute checks in VIA driverTakashi Iwai1-4/+1
When the line-jack is plugged/unplugged, the driver must check also the headphone jack state in addition to the line-out jack. Currently it checks only the line-out state and ignores the headphone. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-09ALSA: hda - Implement 44kHz workaround for IdeadPad as fixupTakashi Iwai1-11/+22
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-09ALSA: hda - Fix a copmile warningTakashi Iwai1-1/+1
It's harmless but annyoing. sound/pci/hda/patch_realtek.c: In function ‘alc_cap_getput_caller’: sound/pci/hda/patch_realtek.c:2722:9: warning: ‘err’ may be used uninitialized in this function Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge alc*_parse_auto_config() functions in patch_realtek.cTakashi Iwai1-526/+160
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 Iwai1-142/+11
Finally the last one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC269 parser codeTakashi Iwai1-114/+10
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 Iwai1-239/+26
Now coming to ALC268/269 parser codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Merge ALC861 auto-parser codeTakashi Iwai1-187/+8
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 Iwai1-12/+22
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 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 - Fix output-path of VT1812 codecLydia Wang1-0/+1
For VT1812, add dac_mixer_idx for initialization. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Fix Oops in smart51 parsing in VIA codecTakashi Iwai1-1/+1
Typical off-by-one thinko. 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-08ALSA: hda - Fix Independent-HP detection on VT2002P/1802/1812 codecsLydia Wang1-0/+6
For VT2002P, VT1802 and VT1812 codecs, to create Independent HP control. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Fix DAC checks for VT2002P/1802/1812 codecsLydia Wang1-3/+11
For VT2002P, VT1802 and VT1812 codecs, there're only two DACs. So smart51 control shouldn't be created. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08ALSA: hda - Fix VIA output-path init for VT2002P/1802/1812Lydia Wang1-37/+67
For VT2002P, VT1802 and VT1812 codecs, the original activate_output_path() function can't initialize output and hp path correctly, since mixers connected to output pin widgets are not considered. So modify the activate_output_path() function to satisify this kind of codec. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07ALSA: hda - Split quirk codes from patch_realtek.cTakashi Iwai13-13921/+14124
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>