dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

4495 Commits

Author SHA1 Message Date
Eliot Blennerhassett 938c565a82 ALSA: asihpi - Fix minor typos and spelling
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:51:41 +02:00
Eliot Blennerhassett 4bf8cff05a ALSA: asihpi - Remove unused structures, macros and functions
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:50:57 +02:00
Eliot Blennerhassett 1c073b6797 ALSA: asihpi - Remove spurious adapter index check
Subsystem requests don't have or need a valid adapter index.
The adapter index is already checked further on, before it is used to index
the adapters array. (Reverts 4a122c10f)

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:50:44 +02:00
Eliot Blennerhassett 0a17e99307 ALSA: asihpi - Revise snd_pcm_debug_name, get rid of DEBUG_NAME macro
Work towards moving the function into alsa common header.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:50:03 +02:00
Eliot Blennerhassett 95a4c6e785 ALSA: asihpi - DSP code loader API now independent of OS
The loader API has been revised so that OS specific data is kept
local to hpidspcd.c, and the public API is unchanged across OSes.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:49:23 +02:00
Eliot Blennerhassett 58fbf77ff5 ALSA: asihpi - Remove controlex structs and associated special data transfer code
Some cobranet control data would not fit in an original HPI message.
Now that HPI is able to transfer larger messages, this special handling
is no longer required.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:46:14 +02:00
Eliot Blennerhassett c6c2c9aba1 ALSA: asihpi - Increase request and response buffer sizes
Allow for up to 256 bytes of extra data on top of standard hpi
request and response sizes.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:45:26 +02:00
Eliot Blennerhassett 82b5774fe0 ALSA: asihpi - Give more meaningful name to hpi request message type
Having a 'request message' makes more sense than a 'message message'

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:45:06 +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
Clemens Ladisch c81c6b356b ALSA: virtuoso: fix silent analog output on Xonar Essence ST Deluxe
Commit dd203fa97b (ALSA: virtuoso: remove non-working controls on
Essence ST Deluxe) made it impossible to adjust the volume after the
driver initialized it to muted.

Ensure that those DACs that can be accessed with I2C are initialized
to the same volume that is the reset default of the DAC without I2C.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.38+ <stable@kernel.org>
2011-07-18 09:39:50 +02:00
Daniel T Chen f21169aa87 ALSA: intel8x0: Apply headphones+mute LED quirk for Dell Inspiron 9300
BugLink: https://bugs.launchpad.net/bugs/774895

The original reporter states that his volume keys do not change the
desired Master and PCM mixer elements together, so apply the hp+mute led
quirk for his PCI SSID.

Reported-by: Jeffrey Finkelstein
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-15 07:54:26 +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
Jiri Kosina b7e9c223be Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that
are based on newer code already present upstream.
2011-07-11 14:15:55 +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
Takashi Iwai 9c7a083d94 ALSA: hda - Change all ADCs for dual-adc switching mode for Realtek
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-07 09:25:54 +02:00
Kailang Yang b68785714b ALSA: hda - Add Realtek ALC269VC codec support
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-07-06 09:53:28 +02:00
Takashi Iwai bac4b92cf7 ALSA: hda - Don't add aa-mix for VIA surrounds
Since we now route the front DAC via aa-mix widget, adding the aa-mix
to surrounds will result in a mix-up of both front and surround PCM
signals.  For avoiding this, the aa-mix routes have to be disabled
for surround paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-04 17:37:57 +02:00
Takashi Iwai 18bd2c44b9 ALSA: hda - Create HP-vol control properly for VIA codecs
When the individual DAC is available for the headphone output, the driver
should create the DAC for its volume control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-04 15:55:44 +02:00
Takashi Iwai de6c74f3e3 ALSA: hda - Define some constants in patch_via.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-04 14:53:30 +02:00
Lydia Wang b89596a160 ALSA: hda - Fix invalid multi-channel amplifiers for VT1718S
For VT1718S, the multi-channel path should be like following:
DAC 0-->Mixer 9(index 5)-->Mixer 0(index 1)-->Front Pin;
DAC 1-->Mixer 1(index 0)-->Surround Pin;
DAC 2-->C/LFE Pin;
DAC 3-->Mixer 2(index 0)-->Side Pin;

But current code built Surround and Side path through index 1 of
Mixer 1 and 2. So Adjusting Surround and Side channel amplifier is
invalid. This patch fixes the issue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-04 14:53:25 +02:00
Lydia Wang c4394f5b80 ALSA: hda - Fix issue that front can't output sound for VT1718S
For VT1718S, Mixer 9 doesn't expose the connection to DAC 0. So when
building up a 'PCM Playback' amplifier control, it will fail since
getting DAC 0 index of Mixer 9 returned -1. So I added a dac_mixer_idx
to indicated the actual index of DAC 0 to Mixer 9. Following is the
patch and next mail is another.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-04 14:33:23 +02:00
Lydia Wang e5e1468140 ALSA: hda - Fix the silent front with independent-HP for VIA codecs
Unmute DAC on front speaker path when Independent HP is enabled.

When to enable Independent HP, the front speaker won't output any sound
for VT1708, VT1708B, VT1708S and VT1702.
I find the via_independent_hp_put() routine will mute DAC 0 path in Mixer 0.
For these codecs, when using Independent HP, there could have two
independent streams, one is from DAC0-->Mixer0-->Front Pin, the other is
from DAC3-->GainSW3-->Side Pin.
So I added a check for DAC-->Mixer path in activate_output_path().

If current path is DAC-->Mixer, no need to mute DAC index in Mixer.
In fact, to change connection of Headphone pin or Mux connected with HP
is enough.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-01 08:33:06 +02:00
Takashi Iwai 350434ee53 ALSA: hda - Fix missing initialization in alc662 auto-parser
A missing initialization resulted in wrong DAC assignments in
ALC662 (and other) auto-parsers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-30 21:29:12 +02:00
Takashi Iwai 2525050518 ALSA: hda - Re-implementation of VIA Independent-HP sharing with side stream
This patch adds the re-implementation of Independent-HP mode in the
case where the DAC is shared between HP and side-channel streams.
Now the driver tries to parse the output-path using the pre-parsed
side-channel DAC for the independent HP output, too.

When a playback PCM stream is opened with this shared mode, the
Independent-HP mixer switch can't be changed for avoiding the conflict,
thus it returns -EBUSY error.

One remaining unintuitive issue is that the DAC volume is still
controlled as "Side" volume although it's shared by both independent-HP
and side streams.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-30 17:24:47 +02:00
Takashi Iwai 286bed0f0c ALSA: hdspm - Fix compile warnings with PPC
The char can be unsigned on some architectures.  Since the code checks
the negative values, they should be declared as signed char explicitly.

  sound/pci/rme9652/hdspm.c:5449: warning: comparison is always false due to limited range of data type
  sound/pci/rme9652/hdspm.c:5462: warning: comparison is always false due to limited range of data type

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-30 12:45:36 +02:00
Takashi Iwai 71276410e1 ALSA: cs5535 - Fix invalid big-endian conversions
Fix the wrongly converted short values:
  sound/pci/cs5535audio/cs5535audio_pcm.c:152: warning: large integer implicitly truncated to unsigned type
  sound/pci/cs5535audio/cs5535audio_pcm.c:160: warning: large integer implicitly truncated to unsigned type

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-30 12:35:45 +02:00
Wu Fengguang f5b2d0ef63 ALSA: HDMI - fix ELD monitor name length
I noticed that the last character of the ELD monitor name is lost,
this fixes the issue.

This fix should be confirming to the HDA spec, and works together with
the DRM part of the ELD patch.

The HDA spec does not mention that Monitor_Name_String is an '\0'
ending string, and it allows NML to be 1, which is only valid when MNL
does not count the possible ending '\0'.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29 08:48:24 +02:00
Lydia Wang e322a36d39 ALSA: hda - Fix jack-detection on non-VT1708 VIA codecs
Move codec init verb which is only applicatable for VT1708.

I've found the root cause that jack plugged in can't be detected.
The verb in vt1708_init_verbs is used to power down jack detect circuit.
This verb is only applicable to VT1708. vt1708 didn't implement jack
detect function in hardware, so we should shut down this function to
avoid noise. But for other codecs, hardware implement jack detect
function. If sending this verb during initialization, jack detect will
be invalid. So I move this verb from via_parse_auto_config() to
patch_vt1708().

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29 08:02:46 +02:00
Takashi Iwai 94230c11da ALSA: hda - Fix unused variable warning
sound/pci/hda/patch_cmedia.c: In function ‘cmi9880_fill_multi_init’:
sound/pci/hda/patch_cmedia.c:401:15: warning: unused variable ‘len’

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29 08:02:33 +02:00
Takashi Iwai c82693db52 ALSA: hda - Enable auto-parser as default for Conexant codecs
Let's use auto-parser as default now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29 08:02:21 +02:00
Takashi Iwai c2549312d2 Merge branch 'fix/hda' into topic/hda 2011-06-29 08:02:09 +02:00
Takashi Iwai 8d087c7600 ALSA: hda - Create snd_hda_get_conn_index() helper function
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-29 08:01:46 +02:00
Lydia Wang 63f10d2ca7 ALSA: hda - Fix unsol event initializations for VIA codecs
Fix a issue to enable unsolicited response to line-out pins.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29 08:01:23 +02:00
David Henningsson 9966db22ca ALSA: HDA: Add model=auto quirk for Acer Aspire 3830TG
Since we're not using the new auto parser as a fallback yet,
add it manually as a quirk.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-28 14:09:57 +02:00
David Henningsson f0ca89b031 ALSA: HDA: Add a new Conexant codec ID (506c)
Conexant ID 506c was found on Acer Aspire 3830TG. As users report
no playback, sending to stable should be safe.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/783582
Reported-by: andROOM
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-28 14:09:41 +02:00
Takashi Iwai ff2b7e2a3f ALSA: hda - Fix warnings with CONFIG_SND_POWER_SAVE=n
Use static inline for dummy function to fix the warnings like below
  sound/pci/hda/patch_sigmatel.c: In function ‘stac92xx_init’:
  sound/pci/hda/patch_sigmatel.c:4387:3: warning: statement with no effect
  sound/pci/hda/patch_sigmatel.c: In function ‘stac92xx_resume’:
  sound/pci/hda/patch_sigmatel.c:4927:3: warning: statement with no effect

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-28 08:59:30 +02:00
Stephen Rothwell 880a050f4a ALSA: hda - remove SND_HDA_POWER_SAVE protection of struct hda_loopback_check
to fix build problems when it is disabled.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-28 08:55:56 +02:00
Takashi Iwai 4f574b7b1a ALSA: hda - More volume-init fixes for ALC267 codec
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-27 16:17:07 +02:00
Takashi Iwai 7ec9c6ccc6 ALSA: hda - Fix volume-init for ALC259 with invalid widget caps
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-27 15:53:38 +02:00
Takashi Iwai 050ea75317 ALSA: hda - Fix volume-init of ALC299 & co
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-27 15:48:17 +02:00
Takashi Iwai 39fa84e94a ALSA: hda - Simplify EAPD control in patch_realtek.c
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-27 15:28:57 +02:00
Takashi Iwai 6d86b4fb40 ALSA: hda - Fix auto-init of output volumes of Realtek codecs
Fix the regression introduced by the commit
1f0f4b8036
  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-27 15:07:28 +02:00
Takashi Iwai 00c6850dde Merge branch 'topic/via-cleanup' into topic/hda 2011-06-27 14:32:50 +02:00
Takashi Iwai 3af9ee6b83 ALSA: hda - Check hard-wired DACs at first for ALC662 & co
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-27 12:34:01 +02:00
Takashi Iwai cb053a8265 ALSA: hda - Call proper DAC-filler function for Realtek auto-parser
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-27 11:32:07 +02:00
Takashi Iwai 1f0f4b8036 ALSA: hda - Reduce static init verbs for Realtek auto-parsers
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-27 10:52:59 +02:00
Takashi Iwai dce2079b89 ALSA: hda - Add snd_hda_get_conn_list() helper function
Add a new helper function snd_hda_get_conn_list().
Unlike snd_hda_get_connections(), this function doesn't copy the
connection-list but gives the raw pointer for the cached list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-25 09:19:49 +02:00
Tim Blechmann 80b52490cd ALSA: lx6464es - include mac address in device name
each device has a unique mac address, which can be used to distinguish
multiple devices in the same machine. we therefore include the full mac
address in the device shortname and the last 6 bytes in the device id.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-25 09:15:31 +02:00
Markus Bollinger 1470579913 ALSA: lola - Fix for Lola280 board
- add/fix comments and debug messages
- fix incomplete matrix init
- comment out creation of buggy lola_dest_gain_mixer controls
- minor optimisations

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24 12:54:43 +02:00
Jesper Juhl 16866741bd ALSA: Remove unneeded version.h includes from sound/
In the sound/ directory there are two files (flagged by 'make
versioncheck'); sound/pci/asihpi/asihpi.c and
sound/soc/codecs/wm8991.c that include linux/version.h although they
don't need it. This patch removes the unneeded includes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24 11:28:17 +02:00
Takashi Iwai 2e925ddeb9 ALSA: hda - Use alc_get_pfx_name() for all Realtek codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24 11:27:22 +02:00
Joe Perches 7c9d440e90 treewide: transciever/transceiver spelling fixes
Just tyops.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-24 11:20:14 +02:00
Takashi Iwai 6843ca16f5 ALSA: hda - Clean up multi-channel mixer name assignment in patch_realtek.c
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-24 11:06:17 +02:00
Takashi Iwai 1af7c5f0d4 ALSA: hda - Add a workaround for invalid line-out setups
Some BIOS set up the pin config wrongly as line-out although it's
supposed to be a speaker out.  In most cases, though, we can judge
the validity by checking the connection type -- when it's FIXED,
mostly it's an invalid line-out but a speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24 10:43:03 +02:00
Takashi Iwai f9a09e003f Merge branch 'fix/hda' into topic/hda 2011-06-24 10:36:25 +02:00