Commit graph

6144 commits

Author SHA1 Message Date
Lydia Wang bc7e7e5ce0 ALSA: HDA VIA: Move backdoor verbs to vt17xx_volume_init_verb
As init verbs, vt17xx_volume_init_verb is a better place to hold them.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:30 +02:00
Lydia Wang 6369bcfccb ALSA: HDA VIA: Replace MIC_BOOST_VOLUME.
With snd_hda_override_amp_caps.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:22 +02:00
Lydia Wang 4483a2f590 ALSA: HDA VIA: Modify vt1709_auto_create_multi_out_ctls.
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:13 +02:00
Lydia Wang 9645c2039d ALSA: HDA VIA: Modify vt1708_auto_create_multi_out_ctls.
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:51 +02:00
Lydia Wang c873cc2528 ALSA: HDA VIA: Replace via_playback_pcm_prepare/cleanup
Replaced with via_playback_multi_pcm_prepare/cleanup to support
multi-stream operations

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:40 +02:00
Lydia Wang 82ef9e45c4 ALSA: HDA VIA: Modify vt1708_set_pinconfig_connect function.
like seqassoc 0xff, seqassoc 0xf0 of vt1708 should override Port
Connectivity field into 'AC_JACK_PORT_COMPLEX'

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:33 +02:00
Lydia Wang 1f2e99febd ALSA: HDA VIA: Add Jack detect feature for VT1708.
VT1708 does not support unsolicited response, but we need hp detect to
automute speaker. Implemented in workqueue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:25 +02:00
Lydia Wang dcf34c8cc6 ALSA: HDA VIA: Refresh front playback mute in via_hp_automute.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:18 +02:00
Lydia Wang a34df19a65 ALSA: HDA VIA: Add VIA_JACK_EVENT process in via_unsol_event.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:10 +02:00
Lydia Wang a80e6e3c8c ALSA: HDA VIA: When changing input source, update power state.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:01 +02:00
Lydia Wang 1564b2878f ALSA: HDA VIA: Add smart5.1 function.
Smart 5.1 is for 3-jacks model, to reuse input pins as outputs.
While off, they act as "line out" / "line in" / "mic in".
While on, they acts as "line out" / "back left/right" / "center/lfe".

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:53 +02:00
Lydia Wang cdc1784d49 ALSA: HDA VIA: Rewrite via_independent_hp_put
Use hp_independent_mode_index to store hp index, and simplify function
via_independent_hp_put with it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:42 +02:00
Lydia Wang 0713efebfa ALSA: HDA VIA: Change VT1708S & VT1702 hp mode controls
For VT1708S and VT1702, deactivate "Headphone Playback Volume" and
"Headphone Playback Mute" control if "Independent HP" mode is OFF.
and rename VT1702 "Independent HP" text.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:33 +02:00
Lydia Wang 9510e8dd9c ALSA: HDA VIA: Remove unused argument of via_new_analog_input
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:55:18 +02:00
Lydia Wang 1731437910 ALSA: HDA VIA: Add low current mode for power saving.
For VT1708B, VT1708S and VT1702, enter low current mode if no analog
stream is opened and all aa path mute.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:55:00 +02:00
Lydia Wang f5271101fa ALSA HDA VIA: Add VIA_CTL_WIDGET_ANALOG_MUTE control type
Enter low power state if AA-Path volume is muted.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:47 +02:00
Lydia Wang c2c02ea326 ALSA: HDA VIA: Limit VT1702 AA-Path max volume
according to customer request, VT1702 AA-Path max volume (12 dB) is too
high, so limit to 0 dB.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:28 +02:00
Lydia Wang 518bf3ba75 ALSA: HDA VIA: Add VT1708B-CE codec support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:15 +02:00
Lydia Wang 744ff5f487 ALSA: HDA VIA: Change get_codec_type argument to hda_codec type
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:01 +02:00
Lydia Wang b6153e1175 ALSA: HDA VIA: Remove unused IS_VT17xx_VENDORID macro
IS_VT17*_VENDORID macros are used nowhere, so clean them up.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:53:47 +02:00
Takashi Iwai 26917499fd Merge branch 'fix/hda' into topic/hda 2009-10-11 17:53:33 +02:00
Takashi Iwai f0613d5752 ALSA: hda - Add full rates/formats support for Nvidia HDMI
Allow Nvidia HDMI to support more possible sample rates and formats.
At best, the really supported rates and formats should be determined
together with the negotiation with the HDMI receiver, but it's currently
not implemented yet (Nvidia stuff seems incompatible with HDMI 1.3
standard in this regard).  As a compromise, we enable all bits, assuming
that all recent devices do support such rates/formats.

Tested-by: Alan Alan <alanwww1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-09 17:44:08 +02:00
Takashi Iwai defb5ab2e0 ALSA: hda - Fix yet another auto-mic bug in ALC268
Since patch_alc268() doesn't call set_capture_mixer() (due to its h/w
design different from other siblings), it needs to call fixup_automic_adc()
explicitly to set up the auto-mic routing.  Otherwise the indices for
int/ext mics aren't set properly.

Reference: Novell bnc#544899
	http://bugzilla.novell.com/show_bug.cgi?id=544899

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-07 15:12:27 +02:00
Takashi Iwai 01d4825df6 ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()
alc_subsystem_id() tries to pick up a headphone pin if not configured,
but this caused side-effects as the problem in commit
15870f05e9.

This patch fixes the driver behavior to pick up invalid HP pins; at least,
the pins that are listed as the primary outputs aren't taken any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 13:21:54 +02:00
Takashi Iwai f8f25ba356 ALSA: hda - Add a workaround for ASUS A7K
ASUS A7K needs additional GPIO1 bit setup; it has to be cleared.
Added a new fixup hook for this laptop so that it works as is.

Refernece: Novell bnc#494309
	http://bugzilla.novell.com/show_bug.cgi?id=494309

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 08:31:29 +02:00
Takashi Iwai 15870f05e9 ALSA: hda - Fix invalid initializations for ALC861 auto mode
The recent auto-parser doesn't work for machines with a single output
with ALC861, such as Toshiba laptops, because alc_subsystem_id() sets
the hp_pins[0] while it's listed in line_outs[0].
This ends up with the doubled initialization of the same mixer widget,
and it mutes the DAC route because hp_pins has no DAC assigned.

To fix this problem, just check spec->autocfg.hp_outs and speaker_outs
so that they are really detected pins.

Reference: Novell bnc#544161
	http://bugzilla.novell.com/show_bug.cgi?id=544161

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-05 08:29:49 +02:00
Takashi Iwai 0afe5f8915 ALSA: hda - Clean up name string creation in patch_realtek.c
Use a common helper to create playback controls.
This gives less chance of typos.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 09:24:14 +02:00
Takashi Iwai 081a8c4502 Merge branch 'fix/hda' into topic/hda 2009-10-02 09:19:40 +02:00
Takashi Iwai 7085ec12a6 ALSA: hda - Fix / improve ALC66x parser
The auto-parser for ALC662/663/272 codecs doesn't work properly when
a speaker is connected to mono NID 0x17, and doesn't handle the dynamic
DAC assignment properly.

This patch fixes the issues and also improves the assignment of DACs
so that HP and speakers can have independent volume controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 09:03:58 +02:00
Takashi Iwai 02d3332285 ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
When the auto-mic switching between an analog and a digital mic is
needed with IDT codecs, the current driver doesn't reset the connection
of the digital mux.

This patch fixes the behavior by checking both mux connections properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 16:38:11 +02:00
Manoj Iyer 3db6c037c6 ALSA: hda - Added quirk to enable sound on Toshiba NB200
Patch was tested on Toshiba NB200 and is found to enable sound.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 10:24:08 +02:00
Takashi Iwai 432fd13359 ALSA: hda - Resurrect input-source mixer of ALC268 model=acer
In the commit fdbc66266c, I mistakenly
replaced the capture mixer array for ALC268_ACER to nosrc version
although this should be kept to alt_mixer.  Now fixed back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-30 08:13:44 +02:00
Miguel de Barros a72cb4bc85 ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
Reference: ALSA bug #0004614
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4614

port-A (0x11)      - front hp-out
port-D (0x12)      - rear line out
port-E (0x1c)      - front mic-in
port-F (0x16)      - Internal speakers
digital-mic (0x17) - Internal mic

init verbs, mixers, jack sensing and PCI_QUIRK to support this hardware

Signed-off-by: Miguel de Barros <miguel.de.barros@bluewin.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-29 09:15:05 +02:00
Takashi Iwai 71623855e2 ALSA: hda - Enable MSI as default
Since the recent kernel can handle MSI properly on non-Intel platforms,
let's enable MSI as default.

If any borken device is found, we can add the quirk entry to the list,
which is currently empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 13:15:30 +02:00
Takashi Iwai 08d7a253e4 Merge branch 'fix/hda' into topic/hda 2009-09-28 13:01:57 +02:00
Alexey Dobriyan f0f37e2f77 const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-27 11:39:25 -07:00
Russell King baea7b946f Merge branch 'origin' into for-linus
Conflicts:
	MAINTAINERS
2009-09-24 21:22:33 +01:00
Daniel T Chen 3d80dcaca1 ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547994

Enable MSI by default for this Pavilion model.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-24 12:14:37 +02:00
Lukasz Marcinowski 22e141300e ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
After puting a cd-audio inside my laptop there was no sound out here,
so I decided to install alsa-driver with debug level and setup a
model=test, it didn't help, but then I look at source code and added
this few lines, now cd-audio is working both when playback/recording.

[Additional minor fixes of mixer element/item names by tiwai]

Signed-off-by: Lukasz Marcinowski <nowymarluk@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-24 09:49:25 +02:00
Linus Torvalds 0c9af28074 Merge branch 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: lx6464es - remove unused struct member
  ALSA: lx6464es - cleanup of rmh message bus function
  ALSA: pcm - Simplify snd_pcm_drain() implementation
2009-09-23 10:04:14 -07:00
Linus Torvalds fe61c99a12 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: wm8753: fix mapping when MONOMIX is set to Stereo
  ASoC: some minor changes for AD1836 and AD1938 codec drivers
  ASoC: DaVinci: Fixes to McASP configuration
  ASoC: Blackfin I2S: fix resuming when device hasn't been used
  ASoC: Blackfin I2S: add lost platform_device parameter to resume function
  ASoC: fix typos in Blackfin headers
  ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long
  ASoC: Blackfin AC97: add a few missing multichannel define handling
2009-09-23 10:02:43 -07:00
Russell King ae19ffbadc Merge branch 'master' into for-linus 2009-09-22 21:01:40 +01:00
Phil Vandry 877ae70763 ASoC: wm8753: fix mapping when MONOMIX is set to Stereo
When MONOMIX is set to Stereo, Left PGA was not powered on but should be.
Add a mapping from Capture Left Mux to Capture Left Mixer to fix the issue.

Signed-off-by: Phil Vandry <vandry@TZoNE.ORG>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 16:58:43 -07:00
Barry Song 98235a4bb0 ASoC: some minor changes for AD1836 and AD1938 codec drivers
1. delete redundant assignment to bus field in spi_driver structure
2. fix lost assignment to set_bias_level entry in ad1938 codec dai
3. change spi driver name of ad1836 from "ad1836-spi" to "ad1836"

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 16:58:33 -07:00
Russell King 28f9f19db9 Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-09-21 16:02:30 +01:00
Joe Perches a419aef8b8 trivial: remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:58 +02:00
Robert P. J. Day 786d8ca341 trivial: Remove commented out usage of dead MODULE_PARM() in swarm_cs4297a
Get rid of that commented usage of the now defunct MODULE_PARM macro.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:54 +02:00
Tim Blechmann 8fdc9e870c ALSA: lx6464es - remove unused struct member
we cannot set the sampling rate of the device, but can only read it
from the board, so we don't need the member for it.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:57 +02:00
Tim Blechmann 95eff499c9 ALSA: lx6464es - cleanup of rmh message bus function
the rmh bus is not used asynchronously, so it is safe to remove the
specific code pieces.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:53 +02:00
Takashi Iwai d3a7dcfeeb ALSA: pcm - Simplify snd_pcm_drain() implementation
Simplify snd_pcm_drain() implementation and avoid unneeded array-
allocation for waitqueues.  Instead, one waitqueue is used for the
first draining stream, and wait until all streams finished.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:09 +02:00