Commit Graph

2591 Commits (148817ba092f9f6edd35bad3c6c6b8e8f90fe2ed)

Author SHA1 Message Date
Takashi Iwai 76531d4166 Merge branch 'topic/hda' into for-linus 2011-07-22 08:43:27 +02:00
Takashi Iwai 7d339ae997 Merge branch 'topic/misc' into for-linus 2011-07-22 08:43:24 +02:00
Takashi Iwai a353fbb179 ALSA: hda - Remove a superfluous argument of via_auto_init_output()
"force" argument is always true, so let's strip it off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-21 14:24:25 +02:00
Takashi Iwai 020066d1ec ALSA: hda - Fix indep-HP path (de-)activation for VT1708* codecs
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-21 13:55:10 +02:00
Takashi Iwai 3b607e3d3a ALSA: hda - Switch HP DAC dynamically with indep-HP switch for VIA
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-18 16:54:40 +02:00
Takashi Iwai 3214b9665c ALSA: hda - Implement dynamic loopback control for VIA codecs
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-18 16:47:33 +02:00
Takashi Iwai 00ef9610ac ALSA: hda - Fix krealloc() replacement in hda_codec.c
It was obviously wrong, grr....

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-14 15:58:02 +02:00
Takashi Iwai 7b1655f5f2 ALSA: hda - Re-add need_dac_fix check for multi-io jacks of Realtek codecs
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-14 15:33:59 +02:00
Paul Menzel cf01b73e26 ALSA: hda - fix up typos in Kconfig help for default buffer size introduced in acfa634f
This commit is a fix up for commit acfa634f.

	commit acfa634f7e
	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-12 20:17:23 +02:00
Takashi Iwai acfa634f7e ALSA: hda - Add Kconfig for the default buffer size
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-12 17:31:46 +02:00
Takashi Iwai 3101ba035c ALSA: Use krealloc() in possible places
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12 08:05:16 +02:00
Takashi Iwai 30b4503378 ALSA: hda - Expose secret DAC-AA connection of some VIA codecs
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-12 07:45:02 +02:00
Takashi Iwai 9e7717c9eb ALSA: hda - Always read raw connections for proc output
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-12 07:45:01 +02:00
Takashi Iwai b2f934a0df ALSA: hda - Add snd_hda_override_conn_list() helper function
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-12 07:44:46 +02:00
Takashi Iwai 19110595c8 ALSA: hda - Turn on extra EAPDs on Conexant codecs
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-11 14:46:44 +02:00
Takashi Iwai 9499473463 ALSA: hda - Preserve input pin-ctl bits in HP-automute for VIA codec
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-11 11:36:44 +02:00
Takashi Iwai 6e969d9155 ALSA: hda - Set line-out pin-ctls properly when indep-HP mode changes
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-11 11:28:13 +02:00
Takashi Iwai 21ce0b6527 ALSA: hda - Via Fix speaker-mute checks in VIA driver
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-11 10:33:47 +02:00
Takashi Iwai 017f2a104c ALSA: hda - Implement 44kHz workaround for IdeadPad as fixup
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-09 14:42:25 +02:00
Takashi Iwai abaead6ac5 ALSA: hda - Fix a copmile warning
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-09 11:55:28 +02:00
Takashi Iwai 3e6179b844 ALSA: hda - Merge alc*_parse_auto_config() functions in patch_realtek.c
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-08 16:55:13 +02:00
Takashi Iwai 8452a982fb ALSA: hda - Merge ALC260 auto-parser code
Finally the last one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08 16:19:48 +02:00
Takashi Iwai 4c11398edc ALSA: hda - Merge ALC269 parser code
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-08 16:12:05 +02:00
Takashi Iwai be9bc37bcc ALSA: hda - Merge ALC268/269 auto-parser codes
Now coming to ALC268/269 parser codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08 16:01:47 +02:00
Takashi Iwai 72dcd8e76b ALSA: hda - Merge ALC861 auto-parser code
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-08 15:16:55 +02:00
Takashi Iwai 44c0240052 ALSA: hda - Fix amp-cap checks in patch_realtek.c
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-08 15:14:19 +02:00
Takashi Iwai a1f649d547 ALSA: hda - Merge ALC861-VD auto-parse to the standard parser
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-08 14:39:03 +02:00
Takashi Iwai 268ff6fbe7 ALSA: hda - Fix auto-mic detection in Realtek codec-parser
A regression fix from commit 21268961d3
  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-08 14:37:35 +02:00
Lydia Wang 28dc10a5f1 ALSA: hda - Fix output-path of VT1812 codec
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-08 12:37:19 +02:00
Takashi Iwai 21d45d2ba9 ALSA: hda - Fix Oops in smart51 parsing in VIA codec
Typical off-by-one thinko.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08 11:35:11 +02:00
Takashi Iwai e477062958 ALSA: hda - Provide the standard auto_init for Realtek codecs
Remove redundant definitions.  Ideally, all init functions should be
identical in future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08 11:12:09 +02:00
Takashi Iwai afcd551508 ALSA: hda - Merge ALC680 auto-parser to the standard parser
Improved the standard Realtek auto-parser to support the codec topology
like ALC680.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08 11:07:59 +02:00
Takashi Iwai e59ea3ed9f ALSA: hda - Add a fix-up for HP RP5800
The BIOS provides bogus pin configs, and also invalid SSID.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08 10:20:18 +02:00
Lydia Wang a2a870c827 ALSA: hda - Fix Independent-HP detection on VT2002P/1802/1812 codecs
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-08 08:20:05 +02:00
Lydia Wang 5c9a5615de ALSA: hda - Fix DAC checks for VT2002P/1802/1812 codecs
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-08 08:19:28 +02:00
Lydia Wang d69607b3c3 ALSA: hda - Fix VIA output-path init for VT2002P/1802/1812
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-08 08:18:29 +02:00
Takashi Iwai 1d045db96a ALSA: hda - Split quirk codes from patch_realtek.c
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-07 18:27:29 +02:00
Takashi Iwai 0e4a73ae58 ALSA: hda - Use common paser for digital I/O for ALC260
Avoid open-codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07 18:03:12 +02:00
Takashi Iwai 21268961d3 ALSA: hda - More flexible dynamic-ADC switching for Realtek codecs
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-07 18:02:43 +02:00
Takashi Iwai a926757f04 ALSA: hda - Fix warning with ALC882 digital-out detection
The digital out pin on ALC882 may have multiple connections.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07 16:08:13 +02:00
Takashi Iwai c2d986b0d2 ALSA: hda - Clean-up PCM assignments in patch_realtek.c
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-07 09:35:17 +02:00
Takashi Iwai f970de2555 ALSA: hda - Unify alc*_auto_init_input_src() in patch_realtek.c
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-07 09:35:14 +02:00
Takashi Iwai d6cc9fabd5 ALSA: hda - Parse ADCs and CAPSRCs dynamically for Realtek auto-parser
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-07 09:34:46 +02:00
Takashi Iwai 0a7f532090 ALSA: hda - Unify alc_auto_init_analog_input() calls
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-07 09:31:25 +02:00
Takashi Iwai b78217096b ALSA: hda - Parse ADCs in alc_auto_create_input_ctls()
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-07 09:31:21 +02:00
Takashi Iwai 343a04be37 ALSA: hda - Code consolidation for ALC88x and ALC662 auto-parsers
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-07 09:31:18 +02:00
Takashi Iwai 97aaab7b49 ALSA: hda - Create bind-mutes appropriately for ALC662 auto-parser
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-07 09:31:15 +02:00
Takashi Iwai cd51155676 ALSA: hda - Initialize DACs in ALC662 auto-parser mode
The initialization of DACs was missing in ALC662 parser code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-07 09:31:13 +02:00
Takashi Iwai bb8bf4d40c ALSA: hda - Parse HP and speaker DACs even for multi connections for ALC662
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-07 09:31:09 +02:00
Takashi Iwai 8e89995c58 Merge branch 'fix/hda' into topic/hda 2011-07-07 09:28:47 +02:00