Commit Graph

3648 Commits (e546f485e1d7520ca0200502cdcc11b503f4805c)

Author SHA1 Message Date
Kailang Yang c027ddcd01 ALSA: hda - Add alc_codec_rename() helper
Added alc_codec_rename() helper for renaming codec->chip_name.
Added Acer-specific codec naming for ALC269/662.

[Clean-up and refactoring by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19 11:40:53 +01:00
Kailang Yang da00c24493 ALSA: hda - Add parse customize define function for Realtek codecs
Added alc_auto_parse_customize_define() to parse the Realtek-specific
attributes from SKU.  Also enable beep controls only when the proper
attribute bit is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19 11:38:53 +01:00
Kailang Yang 6ff86a3f33 ALSA: hda - Take internal mic as Front Mic
Add new check for MIC. Do the internal DMIC as the Front MIC.
It could solve the default record source index issue.

[Fix the check properly using the bitmask by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19 11:14:36 +01:00
Justin P. Mattock b7a5633ab3 fix comment typo in sound/pci/hda/hda_local.h
I think this should be automatic pin instead of ping.
(but could be wrong).

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-03-19 11:00:58 +01:00
Linus Torvalds 01da47059a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: sequencer: clean up remove bogus check
  ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212
  ALSA: hda - Disable MSI for Nvidia controller
  ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220
  ALSA: hda - Fix secondary ADC of ALC260 basic model
  ALSA: hda - Add an error message for invalid mapping NID
  ALSA: hda - New Intel HDA controller
2010-03-18 16:48:19 -07:00
Takashi Iwai e04dd2d21b Merge branch 'fix/hda' into for-linus 2010-03-17 09:01:38 +01:00
Thomas Weber 8839316121 Fix typos in comments
[Ss]ytem => [Ss]ystem
udpate => update
paramters => parameters
orginal => original

Signed-off-by: Thomas Weber <swirl@gmx.li>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-03-16 11:47:56 +01:00
Daniel T Chen 572c0e3c73 ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212
BugLink: https://bugs.launchpad.net/bugs/538895

The OR has verified that both position_fix=1 and model=6stack-dig are
necessary to have capture function properly. (The existing 3stack-6ch
model quirk seems to be incorrect.)

Reported-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Tested-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-16 07:46:31 +01:00
Takashi Iwai 80c43ed724 ALSA: hda - Disable MSI for Nvidia controller
Judging from the member of enable_msi white-list, Nvidia controller
seems to cause troubles with MSI enabled, e.g. boot hang up or other
serious issue may come up.  It's safer to disable MSI as default for
Nvidia controllers again for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-15 15:51:53 +01:00
Anisse Astier b43f6e5e25 ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220
This should make the speakers and jack detection work on MSI all-in-one
computers NetOn AP1900 and Wind Top AE2220.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15 09:11:45 +01:00
Takashi Iwai 9c4cc0bded ALSA: hda - Fix secondary ADC of ALC260 basic model
Fix adc_nids[] for ALC260 basic model to match with num_adc_nids.
Otherwise you get an invalid NID in the secondary "Input Source" mixer
element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-15 09:07:52 +01:00
Takashi Iwai 28d1a85e13 ALSA: hda - Add an error message for invalid mapping NID
Add an error message to snd_hda_add_nid() for invalid mapping NID to make
easier to hunt the buggy code.

Also added a missing space to the error message in snd_hda_build_controls()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15 09:06:38 +01:00
Vitaliy Kulikov c602c8ad45 ALSA: hda - New Intel HDA controller
Added a PCI controller id on new Dell laptops.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15 09:01:26 +01:00
Linus Torvalds 461d208cfb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55
  sound: fix opti92x-ad1848 build
  ALSA: hda - Fix input source elements of secondary ADCs on Realtek
  ALSA: hda - Fix wrong model range check for ALC268
2010-03-13 14:39:54 -08:00
Linus Torvalds c32da02342 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
  doc: fix typo in comment explaining rb_tree usage
  Remove fs/ntfs/ChangeLog
  doc: fix console doc typo
  doc: cpuset: Update the cpuset flag file
  Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
  Remove drivers/parport/ChangeLog
  Remove drivers/char/ChangeLog
  doc: typo - Table 1-2 should refer to "status", not "statm"
  tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
  No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
  devres/irq: Fix devm_irq_match comment
  Remove reference to kthread_create_on_cpu
  tree-wide: Assorted spelling fixes
  tree-wide: fix 'lenght' typo in comments and code
  drm/kms: fix spelling in error message
  doc: capitalization and other minor fixes in pnp doc
  devres: typo fix s/dev/devm/
  Remove redundant trailing semicolons from macros
  fix typo "definetly" -> "definitely" in comment
  tree-wide: s/widht/width/g typo in comments
  ...

Fix trivial conflict in Documentation/laptops/00-INDEX
2010-03-12 16:04:50 -08:00
Takashi Iwai 7d39cf6224 Merge branch 'topic/hda' into for-linus 2010-03-10 09:01:25 +01:00
Ralf Gerbig ecd216260f ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55
without the following patch audio ssttuutteerrs on
ASUS M2N32-SLI PREMIUM ACPI BIOS Revision 1304
the sound device is:
00:0e.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)
worked with 2.6.32

Signed-off-by: Ralf Gerbig <rge@quengel.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-09 18:29:01 +01:00
Jiri Kosina 318ae2edc3 Merge branch 'for-next' into for-linus
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
2010-03-08 16:55:37 +01:00
Takashi Iwai 5311114d48 ALSA: hda - Fix input source elements of secondary ADCs on Realtek
Since alc_auto_create_input_ctls() doesn't set the elements for the
secondary ADCs, "Input Source" elemtns for these also get empty, resulting
in buggy outputs of alsactl like:
	control.14 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		iface MIXER
		name 'Input Source'
		index 1
		value 0
	}

This patch fixes alc_mux_enum_*() (and others) to fall back to the
first entry if the secondary input mux is empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-08 12:17:49 +01:00
Takashi Iwai 50ae0aa8f5 ALSA: hda - Fix wrong model range check for ALC268
Fix a wrong value passed to snd_hda_check_board_codec_sid_config() as
the upper-limit in parse_alc268(), so that any wrong value can't be
passed.

So far, no bogus value was set in the quirk entries, so this won't give
any behavioral changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 12:12:41 +01:00
Takashi Iwai a3087ae970 Merge branch 'topic/misc' into for-linus 2010-03-08 09:35:50 +01:00
Takashi Iwai f1cf9a666d Merge branch 'topic/hda' into for-linus 2010-03-08 09:35:43 +01:00
Wu Fengguang 2abbf4391f ALSA: hdmi - show debug message on changing audio infoframe
Also change printk level for the two others.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 08:21:25 +01:00
Wu Fengguang 079d88ccc3 ALSA: hdmi - merge common code for intelhdmi and nvhdmi
Create patch_hdmi.c to hold common code from intelhdmi and nvhdmi.

For now the patch_hdmi.c file is simply included by patch_intelhdmi.c
and patch_nvhdmi.c, and does not represent a real codec.

There are no behavior changes to intelhdmi. However nvhdmi made several
changes when copying code out of intelhdmi, which are all reverted in
this patch. Wei Ni confirmed that the reverted code actually works fine.

Tested-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 08:21:08 +01:00
Michele Ballabio 4193d13b2c ALSA: hda - Add ASRock mobo to MSI blacklist
This avoids a lockup at boot.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-07 09:29:39 +01:00
Takashi Iwai 7484399fe2 Merge branch 'fix/hda' into topic/hda 2010-03-07 09:29:29 +01:00
Frederik Deweerdt d2db09b87e ALSA: hda: uninitialized variable fix
Commit eaa9b3a748 introduced the following
uninitialized warning:

	sound/pci/hda/patch_realtek.c: In function 'set_capture_mixer':
	sound/pci/hda/patch_realtek.c:4928: warning: 'pin' is used uninitialized in this function
	sound/pci/hda/patch_realtek.c:4918: note: 'pin' was declared here

It appears indeed that 'pin' needs to be initialized to 0.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 16:40:26 +01:00
Daniel T Chen 0321b69569 ALSA: hda: Use LPIB for a Biostar Microtech board
BugLink: https://launchpad.net/bugs/523953

The OR has verified that position_fix=1 is necessary to work around
errors on his machine.

Reported-by: MMarking
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 16:06:01 +01:00
Daniel T Chen 9919c7619c ALSA: hda: Use LPIB for Dell Latitude 131L
BugLink: https://launchpad.net/bugs/530346

The OR has verified that position_fix=1 is necessary to work around
errors on his machine.

Reported-by: Tom Louwrier
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 16:32:01 +01:00
Takashi Iwai dd74b46535 ALSA: hda - Build hda_eld into snd-hda-codec module
Now two modules require hda_eld.o, so we need to put it to the common
place instead of building into two individual modules.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 16:05:24 +01:00
Wei Ni 25045705d4 ALSA: hda - Support NVIDIA MCP89 and GT21x hdmi audio
Support nvidia MCP89 and GT21x 8ch hdmi audio.
Add some eld support.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 15:54:12 +01:00
Wei Ni 7445dfc159 ALSA: hda - Support max codecs to 8 for nvidia hda controller
Support max codecs to 8 for nvidia hda controller.
Change AZX_MAX_CODECS to 8, and add
"#define AZX_DEFAULT_CODECS 4" for default driver.
Set azx_max_codecs to 8 for nvidia controller.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 15:53:56 +01:00
Dan Carpenter 282572b5ab ALSA: riptide: clean up while loop
If getpaths() returned an odd number this would be a buffer under-run and an
endless loop.  It turns out that getpaths() can only return even numbers, but
let's make it easy for people auditing code.  With the new code you don't
need to look at getpaths().

This silences a smatch warning.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-03 22:41:42 +01:00
Clemens Ladisch faf4eb23d5 ALSA: oxygen: change || to &&
In the original code the condition was always true (hopefully) because
WM8776_HPLVOL is zero.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-03 22:39:31 +01:00
Norberto Lopes 28aedaf7bf ALSA: sound/pci/hda/hda_codec.c: various coding style fixes
Signed-off-by: Norberto Lopes <nlopes.ml@gmail.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-02 11:21:18 +01:00
Takashi Iwai 20645d70bd ALSA: hda - Add missing hp_pins definitions for ALC269 quirks
In 2.6.33 ACL269 unsol event handler was changed to look up the pre-defined
pins, but the headphone pins aren't defined properly in each quirk.
This patch adds the missing definitions, and fixes the speaker auto-mute
regression on some ASUS (and possibly other) laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-02 11:14:01 +01:00
Takashi Iwai a91a4aa1ee Merge branch 'topic/hda' into for-linus 2010-03-01 12:38:54 +01:00
Takashi Iwai 12c2a682b5 Merge branch 'topic/misc' into for-linus 2010-03-01 12:38:49 +01:00
Takashi Iwai a86ba28583 Merge branch 'fix/misc' into for-linus 2010-03-01 12:38:39 +01:00
Kailang Yang 61c2d2b5e7 ALSA: hda - Add/fix ALC269 FSC and Quanta models
Specify proper quirk models for FSC and Quanta machines with ALC269 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-25 08:49:06 +01:00
Kailang Yang 6227cdced0 ALSA: hda - Add ALC670 codec support
- Fixed alc_subsystem_id( ) typo and add new function.
   - !(ass & 0x100000)) ==> Delete this check. It is unnecessary check.
   - Add porti
- ALC670 support

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-25 08:48:44 +01:00
Zhang, Rui dd2b4a7abf ALSA: hda - remove unnecessary msleep on power state transitions
This will save ~15ms boot time.

The first 10ms sleep was introduced in commit d2595d86e5 for (buggy)
Cxt codecs, so better to limit the sleep to the problem hardware.

For the second 10ms sleep, the HDA spec says:

Power State[1:0]:
00: Node Power state (D0) is fully on.
01: Node Power state (D1) allows for (does not require) the lowest possible power consuming state from which it
can return to the "fully on" state (D0) within 10 ms, excepting analog pass through circuits (e.g., CD analog
playback) which must remain fully on.
10: Node Power state (D2) allows for (does not require) the lowest possible power consuming state from which it
can return to the "fully on" state (D0) within 10 ms. For modems, this is the "wake on ring" power state.
11: Node Power state (D3) allows for (does not require) lowest possible power consuming state under software
control. Note that any low power state set by software must retain sufficient operational capability to properly
respond to subsequent software Power State command.

So 10ms is actually the max wait time. It should be safe to
remove/reduce it and rely on the loop of 1ms-sleeps.

CC: Marc Boucher <marc@linuxant.com>
CC: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-24 09:12:57 +01:00
Reimundo Heluani 76e6f5a9ef ALSA: add support for Macbook Air 2,1 internal speaker
Add support for Macbook Air 2,1 (late 2008) internal speaker and
headphones. Create a "mba21" model for snd-hda-intel.

Signed-off-by: Reimundo Heluani <rheluani@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 10:55:03 +01:00
Seth Heasley 32679f95ca ALSA: hda - enable snoop for Intel Cougar Point
This patch enables snoop, eliminating static during playback.
This patch supersedes the previous Cougar Point audio patch.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:15:37 +01:00
Takashi Iwai d01aecdf90 ALSA: hda - Remove identical definitions for macmini3 model
The channel mode definitions for macmini3 model are identical with mb5.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:07:15 +01:00
Takashi Iwai ad6cfc2ac7 Merge remote branch 'alsa/fixes' into fix/misc 2010-02-22 18:45:34 +01:00
Clemens Ladisch bf30a4309d ALSA: via82xx: add quirk for D1289 motherboard
Add a headphones-only quirk for the Fujitsu Siemens D1289.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Marc Haber <mh+alsa201002@zugschlus.de>
Cc: <stable@kernel.org>

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-22 11:15:11 +01:00
Paul Menzel 0708cc582f ALSA: hda-intel: Add position_fix quirk for ASUS M2V-MX SE.
With PulseAudio and an application accessing an input device like `gnome-volume-manager` both have high CPU load as reported in [1].

Loading `snd-hda-intel` with `position_fix=1` fixes this issue. Therefore add a quirk for ASUS M2V-MX SE.

The only downside is, when now exiting for example MPlayer when it is playing an audio file a high pitched sound is outputted by the speaker.

$ lspci -vvnn | grep -A10 Audio
20:01.0 Audio device [0403]: VIA Technologies, Inc. VT1708/A [Azalia HDAC] (VIA High Definition Audio Controller) [1106:3288] (rev 10)
	Subsystem: ASUSTeK Computer Inc. Device [1043:8290]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 17
	Region 0: Memory at fbffc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: HDA Intel

[1] http://sourceforge.net/mailarchive/forum.php?thread_name=1265550675.4642.24.camel%40mattotaupa&forum_name=alsa-user

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:37:15 +01:00
Paul Menzel 2448158ed2 ALSA: Typo. s/distrubs/disturbs/
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:36:56 +01:00
Takashi Iwai 9d54f08bc7 ALSA: hda - Clean up Intel Mac unsol codes
Use the standard unsol_event callback with each setup callback for
IntelMac models with Realtek ALC885 codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:34:40 +01:00
Luke Yelavich e458b1fadf ALSA: hda - Add Macmini 3,1 support
BugLink: https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/343989

Add a model quirk for the NVIDIA based Macmini hardware, aka Macmini 3,1. The
pinout is almost identical to the mb5 quirk, except for no microphone and
the line-in mixer controls being on a different index. Everything works in
2ch mode, but as I am not sure what needs to be changed for 6ch mode, or
whether the Mac Mini's chip supports 6ch mode, I have simply duplicated
the code from the mb5 quirk for the mac mini chmode management. The new
model parameter for this quirk is "macmini3".

Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:27:57 +01:00
Daniel T Chen ba579eb7b3 ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10Q
BugLink: https://bugs.launchpad.net/bugs/524948

The OR has verified that the existing model=laptop-eapd quirk does not
function correctly but instead needs model=3stack.  Make this change
so that manual corrections to module-init-tools file(s) are not
required.

Reported-by: Lasse Havelund <lasse@havelund.org>
CC: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:15:21 +01:00
Florian Zumbiehl 04510a74bf ALSA: cs46xx - fix some typos
Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-18 08:12:30 +01:00
Florian Zumbiehl 7fb2d723e6 ALSA: cs46xx - Do test writes to register AC97_REC_GAIN in
snd_cs46xx_codec_reset() bypassing the register cache, so as to not
clobber the cached register value during resume.

Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-18 08:10:54 +01:00
Takashi Iwai 7fb3a069bc Merge branch 'fix/misc' into topic/misc
Conflicts:
	sound/pci/hda/patch_realtek.c
2010-02-17 14:24:46 +01:00
Giuliano Pochini b721e68bdc ALSA: Echoaudio, fix Guru Meditation #00000005.48454C50
This patch fixes a division by zero error in the irq handler.

There is a small window between the hw_params() callback and when
runtime->frame_bits is set by ALSA middle layer. When another substream is
already running, if an interrupt is delivered during that window the irq
handler calls pcm_pointer() which does a division by zero. The patch below
makes the irq handler skip substreams that are initialized but not started
yet. Cc to Clemens Ladisch because he proposed an alternate fix.

For more information, please read the original thread in the linux-kernel
mailing list: http://lkml.org/lkml/2010/2/2/187

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-17 13:02:29 +01:00
Jaroslav Kysela b8f1f5983f Merge branch 'topic/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel 2010-02-16 11:25:03 +01:00
Jaroslav Kysela ba9341dfef Merge branch 'fixes' into devel 2010-02-16 11:19:18 +01:00
Linus Torvalds d277993f78 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Correct ASUA blacklist for MSI brokenness
2010-02-15 19:54:18 -08:00
Takashi Iwai 0a27fcfaaf ALSA: hda - Correct ASUA blacklist for MSI brokenness
The MSI blacklist entry for ASUS mobo added in the commit
8ce28d6abf was based on the alsa-info
output wrongly posted.  Fix the id to the right one now.

Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 17:05:28 +01:00
Giuliano Pochini 47b5d028fd ALSA: Echoaudio - Add suspend support #2
This patch adds rearranges parts of the initialization code and adds
suspend and resume callbacks.

This patch adds suspend and resume callbacks.
It also rearranges parts of the initialization code so it can be
used in both the first initialization (when the module is loaded we
also have to load default settings) and the resume callback (where
we have to restore the previous settings).

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 10:40:15 +01:00
Giuliano Pochini ad3499f466 ALSA: Echoaudio - Add suspend support #1
Move the controls init code outside the init_hw() function because is must
not be called during resume.

This patch moves the code that initializes the card's controls with
default valued from the init_hw() function into a separated
set_mixer_defaults() function (one for each of the 16 supported
cards). This change is necessary because during resume we must
resurrect the hardware without losing the previous
settings. set_mixer_defaults() must be called only once when the
module is loaded.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 10:39:22 +01:00
Giuliano Pochini 4f8ada444c ALSA: Echoaudio - Add firmware cache #2
This patch implements a simple cache for the firmware files when CONFIG_PM is defined.

This patch changes get_firmware(), free_firmware() and adds
free_firmware_cache(). The first two functions implement a very
simple cache and the latter is used to actually release all the stored
firmwares when the module is unloaded. 
When CONFIG_PM is not enabled those functions act as before, that is
free_firmware() releases the firmware immediately and
free_firmware_cache() does nothing.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 10:38:10 +01:00
Giuliano Pochini 19b5006378 ALSA: Echoaudio - Add firmware cache #1
Changes the way the firmware is passed through functions.

When CONFIG_PM is enabled the firmware cannot be released because the
driver will need it again to resume the card. 
With this patch the firmware is passed as an index of the struct
firmware card_fw[] in place of a pointer. That same index is then used
to locate the firmware in the firmware cache.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 10:36:51 +01:00
Greg Alexander cfd3d8dcf7 ALSA: hda - Add support for Lenovo IdeaPad U150
Add patch for the Conexant 5066 HDA codec to support the Lenovo IdeaPad U150

Signed-off-by: Greg Alexander <greigs@galexander.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-13 10:16:05 +01:00
Linus Torvalds e99cc290ca Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - use WARN_ON_ONCE() for zero-division detection
2010-02-12 10:12:28 -08:00
Takashi Iwai d6d8bf5493 ALSA: hda - use WARN_ON_ONCE() for zero-division detection
Replace the zero-division warning message with WARN_ON_ONCE() per the
advice by Linus.  This shouldn't happen, but if it happens, it's
possible that the bug happens often due to buggy IRQs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-12 18:20:04 +01:00
Linus Torvalds 0e9695d9a4 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda-intel: Avoid divide by zero crash
2010-02-12 08:48:47 -08:00
Takashi Iwai b2d6efe7fa Merge branch 'fix/hda' into topic/hda 2010-02-09 21:34:18 +01:00
Jody Bruchon fed08d036f ALSA: hda-intel: Avoid divide by zero crash
On my AMD780V chipset, hda_intel.c can crash the kernel with a divide by
zero
for as-yet unknown reasons. A simple check for zero prevents it, though
the problem that causes it remains. Since the workaround is harmless and
won't affect anyone except victims of this bug, it should be safe;
moreover,
because this crash can be triggered by a user-mode application, there are
denial of service implications on the systems affected by the bug without
the patch.

Signed-off-by: Jody Bruchon <jody@nctritech.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 21:33:33 +01:00
Daniel Mack 3ad2f3fbb9 tree-wide: Assorted spelling fixes
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-09 11:13:56 +01:00
Alexey Dobriyan cebe41d4b8 sound: use DEFINE_PCI_DEVICE_TABLE
Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to
.devinit.rodata section, so they can be discarded in some cases,
and make them const.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 11:08:33 +01:00
Takashi Iwai dce17d4ff3 ALSA: hda - Fix default polarity of mute-LED GPIO on 92HD83x/88x codecs
The previous commit caused a regression on HP laptops with 92HD83x/88x
codecs.  The default polarity of mute-LED GPIO is inverted on these
devices.

Reference: Novell bnc#578190
	https://bugzilla.novell.com/show_bug.cgi?id=578190

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 09:25:26 +01:00
Takashi Iwai b99a776d0b ALSA: hda - Remove static gpio_led setup via model
We have now a better mute-LED GPIO detection, and no need to assign the
values statically per model option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:21:09 +01:00
Takashi Iwai c21bd02543 ALSA: hda - Merge HP mute-LED status callback on both IDT 92HD7x and 8x codecs
Merge the mute-LED status callback function for both IDT 92HD7x and 8x
codecs to one function.  Also it's changed to check all DACs, and called
in the initialization to sync with the current status.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:19:51 +01:00
Takashi Iwai 07f804495c ALSA: hda - Detect HP mute-LED GPIO setup from GPIO counts
The GPIO pin number for the mute LED control on HP laptops can be
determined more easily by checking the number of available GPIO pins
of the codec chip.  On a small package with up to 3 GPIOs, GPIO 0 is
used while GPIO 3 is used for others.

This fixes the missing mute GPIO for some HP laptops with new codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:06:13 +01:00
Takashi Iwai 3e0b33f786 Merge remote branch 'alsa/fixes' into for-linus 2010-02-05 19:57:23 +01:00
Jaroslav Kysela 9d4c746445 ALSA: ice1724 - aureon - fix wm8770 volume offset
The volume register is from 0..0x7f and 0..0x1a range is mute.
Also, fix mute combining in wm_vol_put(). The wrong behaviour was
noticed by Peter Christensen.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-05 10:24:25 +01:00
Takashi Iwai 794d620650 Merge branch 'fix/hda' into topic/hda 2010-02-05 09:09:25 +01:00
Maxim Levitsky 9492837a6f ALSA: cosmetic: make hda intel interrupt name consistent with others
This renames the interrupt name in /proc/interrupt.
HDA Intel -> hda_intel

This also eliminates space from the name, probably helping some
parsers.
Don't think anybody depends on this name in userspace

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-05 09:08:14 +01:00
Maxim Levitsky 1eb6dc7dab ALSA: hda - Delay switching to polling mode if an interrupt was missing
My sound codec seems sometimes (very rarely) to omit interrupts (ALC268)
However, interrupt mode still works.
Thus if we get timeout, poll the codec once.

If we get 3 such polls in a row, then switch to polling mode.

This patch is maybe an bandaid, but this might be a workaround for hardware bug.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-05 09:07:21 +01:00
Sebastien Alaiwan 350a514787 ALSA: ice1712: fix: lock samplerate when samplerate locking is enabled
I found that the sampling rate locking setting of the ice1712 sound driver
was only half-respected : when the driver was locked to, let's say, 44100Hz,
and a usermode app was requesting 48000Hz playback, the request was succesful
although the soundcard would continue to run at 44100Hz.

Here's a patch that will make those requests to fail.

Signed-off-by: Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-05 08:58:20 +01:00
Jaroslav Kysela 21956b61f5 ALSA: ctxfi - fix PTP address initialization
After hours of debugging, I finally found the reason why some source
and runtime combination does not work. The PTP (page table pages)
address must be aligned. I am not sure how much, but alignment to
PAGE_SIZE is sufficient. Also, use ALSA's page allocation routines
to ensure proper virtual -> physical address translation.

Cc: <stable@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-04 21:48:00 +01:00
Kailang Yang cec27c891b ALSA: hda - Add support of ALC665
- Add support for ALC665
- Add more ASUS model
- Modify common patch for ALC272 ALC273 ALC661 ALC662 ALC663 ALC665

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 14:18:18 +01:00
Kailang Yang 84898e87cc ALSA: hda - Add ALC269VB support
- Add new models ALC269VB_AMIC ALC269VB_DMIC
- Add alc269vb_laptop_dmic_setup
       The record source index Dmic is 0x6 for ALC269VB.
- Change eeepc words for ALC269
- Modify init_verb tables of patch_alc269 patch_alc662 patch_alc882
- Modify common patch for ALC270 ALC269VB ALC275

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 14:16:14 +01:00
Kailang Yang 88102f3f84 ALSA: hda - Remove superfluous init verb entries for ALC88[235]
The default values are no need to be set in init_verbs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 14:16:01 +01:00
Charles Chin 04b5efe5fa ALSA: hda - Fix docking output for IDT 92HD8xx codecs
This patch fixes docking output support for IDT 92HD81/83/88 family codecs.
Typically one of ports 0xE or 0xF is used for docking output, while only
port 0xF is common on all the three codec families.  We don't want the
pin to select the analog mixer here.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 10:28:02 +01:00
Vitaliy Kulikov a9694faa28 ALSA: hda - Adding support for another IDT 92HD83XXX codec
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 08:58:23 +01:00
Charles Chin 36706005d9 ALSA: hda - Add support for IDT 92HD88 family codecs
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-29 12:05:51 +01:00
Vitaliy Kulikov e108c7b79e ALSA: hda - Add mute LED check for HP laptops with IDT 92HD83xxx codec
This patch adds HP mute LED support for IDT 92HD81/3 family of the codecs.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 19:21:07 +01:00
Takashi Iwai 30ed7ed11c ALSA: hda - Fix index of HP Compaq F700 mic amp
The amp used for the mic input on HP Compaq F700 with Cxt5051 codec
has no multiple inputs, thus its index should be 0 instead of 1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:11:45 +01:00
Takashi Iwai c893622251 ALSA: hda - Define max number of PCM devices in hda_codec.h
Define the constant rather in the common header file.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:08:53 +01:00
Wei Ni 7b36ea967c ALSA: hda - Change the AZX_MAX_PCMS to 10
In hda_codec.c, it has define
"[HDA_PCM_TYPE_HDMI]  = { 3, 7, 8, 9, -1 },",
it support up to device 9 for HDMI.
But in hda_intel.c, it only define AZX_MAX_PCMS as 8.
So if it have 4 hdmi codecs, when run azx_attach_pcm_stream(),
it will show error "Invalid PCM device number 8", and "... number 9",
and return "-EINVAL".
We should change the AZX_MAX_PCMS to 10.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:06:19 +01:00
Takashi Iwai b09f3e78ee ALSA: hda - Allow override more fields via patch loader
Allow the override of vendor-id, subsystem-id, revision-id and chip name
via patch loading.  Updated the document, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 00:04:21 +01:00
Takashi Iwai 8ce28d6abf ALSA: hda - Add an ASUS mobo to MSI blacklist
Sid Boyce reported that his machine locks up without enable_msi=0 option.
This looks like another ASUS mobo with Nvidia combo.

Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-27 20:26:08 +01:00
Takashi Iwai d0d2c38e39 Merge remote branch 'alsa/devel' into topic/misc 2010-01-26 18:13:04 +01:00
Wei Ni ccc5df058d ALSA: hda - Add support for more the 8 streams
In azx_stream_start() and azx_stream_stop(),
it use azx_readb/azx_writeb to read/write SIE,
it just enable/disable 8 streams.
But according to the HDA spec, it support 30 streams,
and the new HDA controller will support more then 8
streams. So we should use azx_readl/azx_writel to
read/write SIE.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-26 10:40:03 +01:00
Florian Zumbiehl cf944ee55c ALSA: cs46xx: Fix cpu idling with resume
Make sure that capture DMA doesn't stay enabled after system resume
as that potentially prevents the processor from entering deep sleep
states.

Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-26 09:06:14 +01:00
Takashi Iwai 0aea778efa ALSA: hda - Remove the COEF setup for ALC267/ALC268
The COEF setup for model=auto seems problematic on some laptops,
resulting in the silent speaker output.  Better to disable it for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 15:45:58 +01:00
Takashi Iwai 95f475f7a2 ALSA: hda - Remove coef output in Realtek proc files
The output of COEF index/value in the proc file for Realtek codecs is
rather useless since the value varies together with the index.
Let's get rid of it again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 15:42:58 +01:00
Łukasz Wojniłowicz 973b8cb0ea ALSA: hda - add possibility to choose speakers configuration for 4930g
Now one can choose speaker configuration in e.g. PulseAudio mixer

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 08:00:02 +01:00
Takashi Iwai 23d2df5b0d ALSA: hda - Change headphone pin control with master volume on cx5051
The HP pin (0x16) control has to be changed dynamically depending on
the master volume switch as well as the speaker pin (0x1a).  Otherwise
the headphone still sounds with master off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:19:27 +01:00
Takashi Iwai ecda0cff9d ALSA: hda - Fix SPDIF output widget for Cxt5051 codec
Fixed the wrongly set up for SPDIF output on Conexant 5051 codec.
It must point to the audio out widget instead of a pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:14:36 +01:00
Takashi Iwai 6953e5524a ALSA: hda - initialize mic port on cxt5051 codec dynamically
Initialize the mic ports B & C on Conexant 5051 codec dynamically
according to the mic jack detection, instead of static init arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:31 +01:00
Takashi Iwai 2c7a3fb3f8 ALSA: hda - Merge playback controls for Cx5051 codec models
All cx5051 codec models have the same Master playback mixer definitions.
Merge them together.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:30 +01:00
Takashi Iwai faddaa5d1c ALSA: hda - Add support for Toshiba Satellite M300
Added the support for Toshiba Satellite M300 with Conexant 5051 codec.
Since the laptop has no port C connection and the pin reports always
the jack sense true, we need to ignore port-C unsol event.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:10 +01:00
Takashi Iwai 4e4ac60030 ALSA: hda - Fix HP dv6736 capture mixer name
Use the standard "Capture" mixer name for HP dv6736 with Cxt5051 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-23 22:29:54 +01:00
Takashi Iwai 5f6c3de6a7 ALSA: hda - Minor fixes for Compaq Presario F700 quirk
Minor fixes for HP Compaq Presario F700 quirks with Cxt5051 codec:
- changed the capture mixer elements to the standard name.
- fixed the quirk name string without a space
- sorted the quirk list
- updated the documentation

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-23 22:21:31 +01:00
Jaroslav Kysela fd0b092a7b ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)
The SPDIF-input pin 0x1c is muted by default in hardware. Unmute appropriate
pin to get captured samples instead zeros. Tested on Lenovo Thinkstation.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-21 14:54:38 +01:00
Takashi Iwai dc99be4766 ALSA: hda - Fix HP T5735 automute
This patch fixes the aut-mute setup on HP T5735 with ALC262 codec.
Instead of wrong amp, use pin control toggling for muting the speaker now.

Tested-by: Lee Trager <lee.trager@hp.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-20 08:35:06 +01:00
Takashi Iwai 9e4c84967e Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2010-01-19 15:53:43 +01:00
Takashi Iwai 3fb4a508b8 ALSA: hda - Turn on EAPD only if available for Realtek codecs
Some codecs disable widgets used for output pins and reserve as vendor-
spec widgets.  Thus we need to check the widget type and pin cap before
actually sending SET_EAPD verbs in the auto-configuration mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-19 15:50:26 +01:00
Takashi Iwai 4feabefe53 ALSA: hda - Fix parsing pin node 0x21 on ALC259
ALC259 has a widget NID 0x21 for the output pin, but it wasn't handled
properly in alc268_new_analog_output().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-19 15:38:44 +01:00
Takashi Iwai 88501ce18e Merge remote branch 'alsa/devel' into topic/misc 2010-01-18 18:23:23 +01:00
Clemens Ladisch d1db38c015 sound: virtuoso: add Xonar DS support
Add experimental support for the Asus Xonar DS.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-18 16:38:41 +01:00
Takashi Iwai eaa9b3a748 ALSA: hda - Fix capture on Sony VAIO with single input
Sony VAIO VGN-P11G with ALC262 codec has only one input pin, and the
recording doesn't work with model=auto because ALC262 parser sets the
wrong cap NIDs to choose the route and the default route for the sole
input pin wasn't initialized properly.  This patch solves these issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-17 13:09:33 +01:00
Kunal Gangakhedkar d38cce7046 ALSA: hda - Fix mute led GPIO on HP dv-series notebooks
On my laptop (HP dv6-1110ax), there are no OEM strings in SMBIOS of type
"HP_Mute_LED*". Hence, the GPIO for the mute button LED doesn't get set
properly. I didn't find the strings in my cousin's laptop (HP dv9500t CTO)
either.

As per the documentation of find_mute_led_gpio(), these strings occur
in HP B-series systems - so, before scanning the SMBIOS strings, we need to
check if we're dealing with a B-series system.
Need to get confirmation from HP if this logic takes care of all the
systems. I'm trying to poke a friend there.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-15 18:15:42 +01:00
Takashi Iwai c7a8eb1032 ALSA: hda - Fix missing capture mixer for ALC861/660 codecs
The capture-related mixer elements are missing with ALC861/ALC660 codecs
when quirks are present, due to missing call of set_capture_mixer().

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-01-14 12:39:02 +01:00
Takashi Iwai 408bffd01c ALSA: ctxfi - Add subsystem option
Added a new option "subsystem" to override the PCI SSID for identifying
the card type.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-14 09:23:10 +01:00
Alex Murray a76221d47e ALSA: hda - Improved MacBook (Pro) 5,1 / 5,2 support
This patch adds support for automatically muting the speakers when headphones
are inserted, as well as relabelling the headphone widgets from the
non-standard "HP" to the standard "Headphone" for the mb5 model.

Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 18:58:38 +01:00
Takashi Iwai 4dee8baa18 ALSA: hda - Fix Toshiba NB20x quirk entry
The alc664-mode4 model doesn't seem to fit with Toshiba NB205 correctly.
NB205 uses the pin 0x17 connected with the mixer 0x0f for the speaker
output, which isn't controlled by mode4 model at all.
Rather model=auto works fine as is on the latest driver, so let it back
again.

Tested-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 17:22:40 +01:00
Seth Heasley d2f2fcd254 ALSA: hda_intel: ALSA HD Audio patch for Intel Cougar Point DeviceIDs
This patch adds the Intel Cougar Point (PCH) HD Audio Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 08:34:34 +01:00
Takashi Iwai 47e9134845 Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc 2010-01-13 08:32:53 +01:00
Takashi Iwai c96350a298 Merge branch 'fix/hda' into for-linus 2010-01-12 17:50:03 +01:00
Takashi Iwai 9c0afc861a ALSA: hda - Fix ALC861-VD capture source mixer
The capture source or input source mixer element wasn't created properly
for ALC861-VD codec due to the wrong NID passed to
alc_auto_create_input_ctls().

References: Novell bnc#568305
	http://bugzilla.novell.com/show_bug.cgi?id=568305

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-01-12 14:02:13 +01:00
Takashi Iwai dba9532388 Merge remote branch 'alsa/fixes' into fix/misc 2010-01-12 09:40:48 +01:00
Takashi Iwai a29fb94ff4 Merge commit alsa/devel into topic/misc
Conflicts:
	include/sound/version.h
2010-01-12 09:40:08 +01:00
Krzysztof Helt c68db7175f ALSA: ac97: add AC97 STMicroelectronics' codecs
Add the STMicroelectronics ST7597 codec and an unknown codec
from the same manufacturer found on the Creative SB 128 card (CT4810).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-10 19:03:09 +01:00
Daniel T Chen af9a75dd1a ALSA: ac97: Add Dell Dimension 2400 to Headphone/Line Jack Sense blacklist
This model needs both 'Headphone Jack Sense' and 'Line Jack Sense' muted
for audible playback, so just add it to the ad1981 jack sense blacklist.

Cc: stable@kernel.org
Tested-by: Pete <x41215201@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-10 19:01:12 +01:00
Daniel Drake c4cfe66c4c ALSA: hda - support OLPC XO-1.5 DC input
The XO's audio hardware is wired up to allow DC sensors (e.g. light
sensors, thermistors, etc) to be plugged in through the microphone jack.

Add sound mixer controls to allow this mode to be enabled and tweaked.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:14:07 +01:00
Daniel Drake 75f8991d0e ALSA: hda - Configure XO-1.5 microphones at capture time
The XO-1.5 has a microphone LED designed to indicate to the user when
something is being recorded.

This light is controlled by the microphone bias voltage and it is
currently coming on all the time.

This patch defers the microphone port configuration until when recording
is actually taking place, fixing the behaviour of the LED.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:11:34 +01:00
Jaroslav Kysela a4ad68d57e Merge branch 'topic/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel 2010-01-08 09:11:18 +01:00
Ken Prox cd9d95a555 ALSA: hda - conexant - Fixed microphone mixer for HP Compaq Presario F700
Added patch for Hewlett-Packard Company Device Subsystem id - 103c:30ea.

Signed-off-by: Ken Prox <kprox@users.sourceforge.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:07:50 +01:00
Krzysztof Helt dd3533eca8 ALSA: ac97_codec: merge WM9703 and WM9705 ops
The WM9705 and WM9703 ops are the same actually so use
the same code for both.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 08:53:16 +01:00
Daniel T Chen c97259df3f ALSA: hda: Refactor powerdown for Realtek HDA codecs
This patch converts the alc889 Aspire-specific powerdown to a generic
one. Like the previous effort, it currently only handles Front and PCM
but can be easily extended to cover other nids. The existing hook for
alc889 Aspire-specific remains enabled. Upon further testing, I've added
its use for ALC861_AUTO as well. Following patches will enable them for
other quirks.

Tested-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:15:47 +01:00
Daniel T Chen ea52bf260e ALSA: hda: Add powerdown for Analog Devices HDA codecs
This patch ports powerdown fixes to AD198x. Currently we only turn off
Front and HP for suspend, but this is easily extended for additional
nids.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:15:17 +01:00
Roel Kluin 9980c6209e ALSA: test off by one in setsamplerate()
With `while (i++ < MAX_WRITE_RETRY)' i reaches MAX_WRITE_RETRY + 1 after the loop

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:14:39 +01:00
Daniel T Chen dfb12eeb0f ALSA: atiixp: Specify codec for Foxconn RC4107MA-RS2
BugLink: https://bugs.launchpad.net/ubuntu/+bug/498863

This mainboard needs ac97_codec=0.

Cc: stable@kernel.org
Tested-by: Apoorv Parle <apparle@yahoo.co.in>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:14:07 +01:00
Takashi Iwai 014c41fce1 ALSA: hda - Use strict_strtoul()
Rewrite the codes to use strict_strtoul() instead of simple_strtoul().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:53:24 +01:00
Takashi Iwai b82855a0d7 ALSA: hda - Add sanity check for storing the user-defined pin configs
Check whether the given NID is a pin widget before storing the
user-defined pin configs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:25 +01:00
Takashi Iwai a4e09aa3cf ALSA: hda - Fix click noises at suspend/free with Realtek codecs
Call snd_hda_shutup_pins() at suspend and free for avoiding click noises.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:24 +01:00
Takashi Iwai 92ee6162c4 ALSA: hda - Add snd_hda_shutup_pins() helper function
Add a common helper function for clearing pin controls before suspend.
Use the pincfg array instead of looking through all widget tree.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:14 +01:00
Takashi Iwai 54f7190b23 ALSA: hda - Fix Oops at reloading beep devices
The recent change for supporting dynamic beep device allocation caused
a problem resulting in Oops at reloading the driver.  Also, it ignores
the error from input device registration.

This patch fixes the wrong check in snd_hda_detach_beep_device(), and
returns an error when the input device registration fails properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:34:01 +01:00
Takashi Iwai 411fe85c76 ALSA: hda - Don't cache beep controls
The beep control verbs don't need to be cached for resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 10:44:02 +01:00
Takashi Iwai 043958e602 ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecs
gpio_led, gpio_led_polarity and gpio_mute are added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-26 10:36:12 +01:00
Takashi Iwai a252c81a69 ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c
Use snd_hda_jack_detect() again for jack-sensing.
The triggering problem can be worked around with codec->no_trigger_sense
flag now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 22:56:20 +01:00
Takashi Iwai 729d55ba97 ALSA: hda - Disable tigger at pin-sensing on AD codecs
Analog Device codecs seem to have problems with the triggering of
pin-sensing although their pincaps give the trigger requirements.
Some reported that constant CPU load on HP laptops with AD codecs.

For avoiding this regression, add a flag to codec struct to notify
explicitly that the codec doesn't suppot the trigger at pin-sensing.

Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 22:49:01 +01:00
Takashi Iwai 15e7f8b92a Merge branch 'fix/hda' into topic/hda 2009-12-25 14:17:48 +01:00
Wu Fengguang ef18beded8 ALSA: hda - HDMI sticky stream tag support
When we run the following commands in turn (with
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0),

	speaker-test -Dhw:0,3 -c2 -twav  # HDMI
	speaker-test -Dhw:0,0 -c2 -twav  # Analog

The second command will produce sound in the analog lineout _as well as_
HDMI sink. The root cause is, device 0 "reuses" the same stream tag that
was used by device 3, and the "intelhdmi - sticky stream id" patch leaves
the HDMI codec in a functional state. So the HDMI codec happily accepts
the audio samples which reuse its stream tag.

The proposed solution is to remember the last device each azx_dev was
assigned to, and prefer to
1) reuse the azx_dev (and hence the stream tag) the HDMI codec last used
2) or assign a never-used azx_dev for HDMI

With this patch and the above two speaker-test commands,
HDMI codec will use stream tag 8 and Analog codec will use 5.

The stream tag used by HDMI codec won't be reused by others, as long
as we don't run out of the 4 playback azx_dev's. The legacy Analog
codec will continue to use stream tag 5 because its device id is 0
(this is a bit tricky).

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 14:17:36 +01:00
Takashi Iwai 52e04ea89d Merge branch 'fix/misc' into topic/misc 2009-12-25 14:15:31 +01:00
Takashi Iwai 54a26089a2 Merge branch 'fix/hda' into for-linus 2009-12-23 18:50:17 +01:00
Anisse Astier 95e70e8753 ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 18:49:22 +01:00
Takashi Iwai f62faedbed ALSA: hda - Set mixer name after codec patch
Postpone the mixer name setup after the codec patch since the codec
patch may change the codec name string in itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 09:27:51 +01:00
Takashi Iwai 21949f00a0 ALSA: hda - Fix NID association for capture mixers
Fix the wrong implementation of NID <-> kctl mapping for capture mixers
introduced by the ocmmit 5b0cb1d850.
So far, the driver returns an error at probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 08:38:28 +01:00
Takashi Iwai 524027916e Merge branch 'fix/hda' into topic/hda 2009-12-23 08:38:23 +01:00
Takashi Iwai 75d1aeb9d6 ALSA: hda - Add Bass Speaker switch for HP dv7
The bass speaker is controlled via GPIO5.

Tested-by: Wael Nasreddine <mla@nasreddine.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 11:56:32 +01:00
Takashi Iwai 41116e926c ALSA: cs46xx - Fix suspend/resume with new DSP
Fix the basic suspend/resume of snd-cs46xx drivers with new DSP.

References:
	https://bugzilla.redhat.com/show_bug.cgi?id=498287
	https://bugzilla.redhat.com/show_bug.cgi?id=160751

Tested-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 09:00:14 +01:00
Takashi Iwai 9dc8398bab ALSA: hda - Add MSI blacklist
A machine with AMD CPU with Nvidia board doesn't work with MSI.

Reported-by: Robert J. King <peritus@gurunetwork.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 08:15:01 +01:00
Rafael Avila de Espindola 1a5ba2e9fc ALSA: hda - Add support for the new 27 inch IMacs
With the attached patch I am able to use the sound on a new IMac 27.
What works:

*) Internal speakers
*) Internal microphone
*) Headphone

I don't have an external mic or a SPDIF device to test the rest.

Signed-off-by: Rafael Avila de Espindola <rafael.espindola@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 08:01:07 +01:00
Takashi Iwai d8d881dd2c ALSA: hda - Fix NULL dereference with enable_beep=0 option
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 07:52:49 +01:00
Takashi Iwai 1f26cb92a2 Merge branch 'fix/misc' into for-linus 2009-12-21 12:05:40 +01:00
Takashi Iwai a6c56f611a Merge branch 'fix/hda' into for-linus 2009-12-21 12:05:31 +01:00
Takashi Iwai de8853bc38 Merge remote branch 'alsa/fixes' into fix/hda 2009-12-21 11:21:15 +01:00
Hector Martin f5de24b06a ALSA: HDA: add powersaving hook for Realtek
The current Realtek code makes no specific provision for turning stuff
off. The codec chip is placed into low-power mode generically, but this
doesn't turn off any external hardware connected to it, in particular
external amplifiers.

This patch creates a hook function that is called by the codec
suspend/resume functions. It ought to disable any external hardware in a
device-specific way. I've implemented a generic ALC889 function that
sets the EAPD pin properly, and used it for the Acer Aspire 8930G which
can benefit from this feature.

On my laptop, this results in ~0.5W extra savings.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:20:29 +01:00
Hector Martin 556eea9a92 ALSA: HDA: remove useless mixers on Aspire 8930G
This patch removes some extra mixers that do nothing on the Acer Aspire
8930G.

The CD mixer is useless because the SATA DVD/Blu-Ray drive has no analog
audio output, and the Side mixer is useless because we max out at 6ch
anyway.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:18:31 +01:00
Hector Martin 0f86a228f4 ALSA: HDA: simplify Aspire 8930G verb array
This patch just simplifies the 8930G verb array a bit. Just use the
common ALC889 EAPD verb array to make things more consistent. The file
is already huge enough already.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:17:23 +01:00
Daniel T Chen e2595322a3 ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410
BugLink: https://bugs.launchpad.net/bugs/479373

The OR has verified with hda-verb that the internal microphone needs
VREF50 set for audible capture.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:16:19 +01:00
Jaroslav Kysela 440b004cf9 ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-20 12:04:08 +01:00
Jaroslav Kysela 77623f62a9 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into fixes 2009-12-20 12:00:30 +01:00
Julia Lawall ef86f581f7 ALSA: Use kzalloc for allocating only one thing
Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-19 09:40:26 +01:00
Takashi Iwai 0c2fd1bf4c ALSA: hda - Check class to identify Nvidia controller chips
Instead of listing all individual PCI IDs, check the matching with
the PCI class together with the vendor id for Nvidia.
This simplifies the pci id entries.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-18 16:41:39 +01:00
Takashi Iwai 2fef62c825 ALSA: hda - Fix quirk for Maxdata obook4-1
Works fine with the auto-parser.

Reference: Novell bnc#564940
	https://bugzilla.novell.com/show_bug.cgi?id=564940

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-18 08:51:30 +01:00
Takashi Iwai d1409ae4ce ALSA: hda - Fix NULL dereference in kctl-NID mapping in patch_realtek.c
capsrc_nids can be NULL, and adc_nids should be taken as fallback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 15:01:31 +01:00
Takashi Iwai 035eb0cff0 ALSA: hda - Fix missing capsrc_nids for ALC88x
Some model quirks missed the corresponding capsrc_nids.  This resulted in
non-working capture source selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-12-17 15:00:26 +01:00
Einar RĂźnkaru c0f8faf0c7 ALSA: hda - Make use of beep device found in Dell Vostro 1015n
Conexant CX20583-10Z has digital beep device with volume control.
Making use of them.

Signed-off-by: Einar RĂźnkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 12:31:29 +01:00
Einar RĂźnkaru 254bba6a7e ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015
Fixed initialization of internal mic and added internal mic boost control
Renamed analog mic boost control to ext mic boost contol.
Name pair analog/digital seems too confusing for a normal user.

Signed-off-by: Einar RĂźnkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 12:30:03 +01:00
Takashi Iwai 9e671deb85 Merge branch 'fix/hda' into topic/hda 2009-12-17 12:27:39 +01:00
Kailang Yang ebb83eeb64 ALSA: hda - More ALC663 fixes and support of compatible chips
1. Add more ASUS NB model.
2. Fixed alc663_m51va_setup
   M51VA has Digital Mic that NID is 0x12. The record source index is
   0x9 for ALC663.
   So, to modify the alc663_m51va_setup function to index 0x9
   and add analog Mic aupport function alc663_mode1_setup.
3. Add ASUS mode7 and mode8 modules for ALC663

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 12:23:00 +01:00
Linus Torvalds a8aa1ebdf8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ac97_codec - increase timeout for analog sections to 5 second
  ASoC: Correct code taking the size of a pointer
  ALSA: hda - Add PCI IDs for Nvidia G2xx-series
  ALSA: sound/isa/gus: Correct code taking the size of a pointer
  ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
  ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)
2009-12-15 09:11:05 -08:00
AndrĂŠ Goddard Rosa e7d2860b69 tree-wide: convert open calls to remove spaces to skip_spaces() lib function
Makes use of skip_spaces() defined in lib/string.c for removing leading
spaces from strings all over the tree.

It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
   text    data     bss     dec     hex filename
  64688     584     592   65864   10148 (TOTALS-BEFORE)
  64641     584     592   65817   10119 (TOTALS-AFTER)

Also, while at it, if we see (*str && isspace(*str)), we can be sure to
remove the first condition (*str) as the second one (isspace(*str)) also
evaluates to 0 whenever *str == 0, making it redundant. In other words,
"a char equals zero is never a space".

Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
and found occurrences of this pattern on 3 more files:
    drivers/leds/led-class.c
    drivers/leds/ledtrig-timer.c
    drivers/video/output.c

@@
expression str;
@@

( // ignore skip_spaces cases
while (*str &&  isspace(*str)) { \(str++;\|++str;\) }
|
- *str &&
isspace(*str)
)

Signed-off-by: AndrĂŠ Goddard Rosa <andre.goddard@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Neil Brown <neilb@suse.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: David Howells <dhowells@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:32 -08:00
Andres Salomon 3c55494670 ALSA: cs5535audio: free OLPC quirks from reliance on MGEODE_LX cpu optimization
Previously, OLPC support for the mic extensions was only enabled in the
ALSA driver if CONFIG_OLPC and CONFIG_MGEODE_LX were both set.  This was
because the old geode GPIO code was written in a manner that assumed
CONFIG_MGEODE_LX.  With the new cs553x-gpio driver, this is no longer the
case; as such, we can drop the requirement on CONFIG_MGEODE_LX and instead
include a requirement on GPIOLIB.

We use the generic GPIO API rather than the cs553x-specific API.

Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:27 -08:00
Takashi Iwai 7093505065 Merge remote branch 'alsa/devel' into topic/hda 2009-12-15 10:45:10 +01:00
Takashi Iwai a9e060571a Merge branch 'fix/hda' into for-linus 2009-12-15 10:33:51 +01:00
Jaroslav Kysela 5e26dfd061 ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAG
The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move
get_amp_nid_() call to the snd_hda_ctl_add() function.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:32 +01:00
Jaroslav Kysela 9e3fd8719f ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)
The purpose of this changeset is to show information about amplifier
setting in the codec proc file. Something like:

  Control: name="Front Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Front Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:17 +01:00
Jaroslav Kysela 5b0cb1d850 ALSA: hda - add more NID->Control mapping
This set of changes add missing NID values to some static control
elemenents. Also, it handles all "Capture Source" or "Input Source"
controls.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:04 +01:00
Steve Soule f74890277a ALSA: ac97_codec - increase timeout for analog sections to 5 second
I have a Soundblaster 16PCI. For many years, alsa has had a bug where
not all of the card's controls are detected (many alsa versions,
many kernel versions). In particular, Master Playback Volume is
usually not detected, and so I get no sound or extremely faint sound.
The problem has always been inconsistent: sometimes all of the controls
are detected correctly, and sometimes a partial set is detected. It works
correctly about 10% of the time.

Finally, I got around to tracking down the problem. When the driver
fails, it prints the kernel message "AC'97 0 analog subsections not
ready". This message is generated from the function snd_ac97_mixer()
in ac97_codec.c. The message indicates that the card failed to come
back after reset within the time limit. The time limit is
120 milliseconds.

I tried increasing the time limit to 1 second, and found that this
made the driver work about 70% of the time. I tried increasing it
to 5 seconds, and it now seems to work 100% of the time.

I expect that this change would be completely harmless for
existing cards that work, and would only introduce additional
delay for cards that do not work.

ALSA bug#4032.

Signed-off-by: Steve Soule <sts11dbxr@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:31:31 +01:00
Stefan Ringel 6dd7dc767e ALSA: hda - Add PCI IDs for Nvidia G2xx-series
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-14 11:27:11 +01:00
Daniel T Chen 01f5966d2f ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
BugLink: https://bugs.launchpad.net/bugs/461062

The original reporter states that PCM maxes at +12 dB and results in
very bad distortion.  Cap PCM at 0 dB to resolve this symptom.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-14 11:08:39 +01:00
Daniel T Chen 950200e2ff ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)
BugLink: https://bugs.launchpad.net/bugs/418627

The original reporter states that this quirk is necessary to obtain
reasonable gain for playback.  Without it, sound is inaudible.  Tested
with playback (spkr and hp) and capture.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-14 11:08:22 +01:00
Linus Torvalds 6eb7365db6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Overwrite pin config on intel DG45ID board.
  intelhdmi - dont power off HDA link
  ALSA: hrtimer - Fix lock-up
  ALSA: intelhdmi - add channel mapping for typical configurations
  ALSA: intelhdmi - channel mapping applies to Pin
  ALSA: intelhdmi - accept DisplayPort pin
  ALSA: hda - show HBR(High Bit Rate) pin cap in procfs
  ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs
  ASoC: Fix build of OMAP sound drivers
  ALSA: opti93x: fix irq releasing if the irq cannot be allocated
2009-12-12 11:40:50 -08:00
Takashi Iwai 84a3bd061c Merge branch 'topic/hda' into for-linus 2009-12-12 18:18:08 +01:00
Alexey Fisher 52dc438606 ALSA: hda - Overwrite pin config on intel DG45ID board.
The pin config provided by BIOS have some problems:
0x0221401f: [Jack] HP Out at Ext Front  <-- other association and sequence
0x02a19020: [Jack] Mic at Ext Front     <-- other association
0x01113014: [Jack] Speaker at Ext Rear  <-- line out (not speaker)
0x01114010: [Jack] Speaker at Ext Rear  <-- line out
0x01a19030: [Jack] Mic at Ext Rear      <-- other association
0x01111012: [Jack] Speaker at Ext Rear  <-- line out
0x01116011: [Jack] Speaker at Ext Rear  <-- line out
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x01451140: [Jack] SPDIF Out at Ext Rear
0x40f000f0: [N/A] Other at Ext N/A

just overwrite it.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-12 10:41:50 +01:00
Wu Fengguang 0287d97065 intelhdmi - dont power off HDA link
For codecs without EPSS support (G45/IbexPeak), the hotplug event will
be lost if the HDA is powered off during the time. After that the pin
presence detection verb returns inaccurate info.

So always power-on HDA link for !EPSS codecs.

KarL offers the fact and Takashi recommends to flag hda_bus. Thanks!

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 14:06:18 +01:00
Wu Fengguang b14224bb74 ALSA: intelhdmi - add channel mapping for typical configurations
IbexPeak is the first Intel HDMI audio codec to support channel mapping.

Currently the outstanding problem is, the HDMI channel order do not
agree with that of ALSA.  This patch presents workaround for some
typical use cases. It gives priority to the typical ALSA surround
configurations, and defines channel mapping for them.

We may need better kernel+userspace interactive channel mapping scheme.
For example, in current scheme if user plays with the surround50 device,
the kernel is unaware of this and will still select the surround41
channel allocation and channel mapping..

Thanks to Marcin for offering good tips!

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:56:18 +01:00
Wu Fengguang 1ffc69a6e8 ALSA: intelhdmi - channel mapping applies to Pin
HDA036-A specifies that the Audio Sample Packet (ASP) Channel Mapping
verbs apply to Digital Display Pin Complex instead of Converter.

With this fix, channel mapping is working as expected for IbexPeak.

Thanks to Marcin for pointing this out!

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:56:10 +01:00
Wu Fengguang 728765b30a ALSA: intelhdmi - accept DisplayPort pin
HDA036 spec states:
  DP (Display Port) indicates whether the Pin Complex Widget supports
  connection to a Display Port sink.  Supported if set to 1. Note that
  it is possible for the pin widget to support more than one digital
  display connection type, e.g. HDMI and DP bit are both set to 1.

Also export the DP pin cap in procfs.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:56:04 +01:00
Wu Fengguang b923528ed2 ALSA: hda - show HBR(High Bit Rate) pin cap in procfs
Note that the HBR capability only applies to HDMI pin.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:55:55 +01:00
Vitaliy Kulikov c357aab02e ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs
This patch fixes an error in processing of the HP BIOS configuration to enable
GPIO based mute LED indicator control. That error causes driver to enable
such control on all HP systems with the 92HD75 IDT codecs and results in
unnecessary toggling of the GPIO on mute control manipulation.

It also adds support of the future HP BIOS configuration extension for the
named control. New configuration string has a format HP_Mute_LED_P_G
where P can be 0 or 1 and defines mute LED GPIO control state (low/high)
that corresponds to the NOT muted state of the master volume
and G is the index of the GPIO to use (0..9)

Lastly, it adds more systems to the support of the audio implementation
as found on HP B-series systems

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:51:54 +01:00
Linus Torvalds 78f1ae193d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ice1724 - aureon - modify WM8770 Master & DAC volume
  ALSA: hda/realtek: quirk for D945GCLF2 mainboard
  ALSA: hda - Terradici HDA controllers does not support 64-bit mode
  ALSA: document: Add direct git link to grub hda-analyzer
  ALSA: radio/sound/miro: fix build, cleanup depends/selects
  ALSA: hda - Generalize EAPD inversion check in patch_analog.c
  ASoC: Wrong variable returned on error
  ALSA: snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
  ALSA: hda - Exclude unusable ADCs for ALC88x
  ALSA: hda - Add missing Line-Out and PCM switches as slave
  ALSA: hda - iMac 9,1 sound patch.
  ALSA: opti93x: set MC indirect registers base from PnP data
2009-12-09 19:52:13 -08:00
Linus Torvalds 4ef58d4e2a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
  tree-wide: fix misspelling of "definition" in comments
  reiserfs: fix misspelling of "journaled"
  doc: Fix a typo in slub.txt.
  inotify: remove superfluous return code check
  hdlc: spelling fix in find_pvc() comment
  doc: fix regulator docs cut-and-pasteism
  mtd: Fix comment in Kconfig
  doc: Fix IRQ chip docs
  tree-wide: fix assorted typos all over the place
  drivers/ata/libata-sff.c: comment spelling fixes
  fix typos/grammos in Documentation/edac.txt
  sysctl: add missing comments
  fs/debugfs/inode.c: fix comment typos
  sgivwfb: Make use of ARRAY_SIZE.
  sky2: fix sky2_link_down copy/paste comment error
  tree-wide: fix typos "couter" -> "counter"
  tree-wide: fix typos "offest" -> "offset"
  fix kerneldoc for set_irq_msi()
  spidev: fix double "of of" in comment
  comment typo fix: sybsystem -> subsystem
  ...
2009-12-09 19:43:33 -08:00
Takashi Iwai 8a7469064b Merge branch 'topic/hda' into for-linus 2009-12-09 18:16:11 +01:00
Jaroslav Kysela 482e46d4b7 ALSA: ice1724 - aureon - modify WM8770 Master & DAC volume
The volume levels in original implementation are incorrect and does
not match the dB scale. The real range is linear (in the sense of
the dB scale) from 0dB to -100dB. Remove logaritmic table and make
all volumes from range 0dB..100dB.

The tests are in RedHat's bugzilla #540817.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-09 14:09:11 +01:00
David Santinoli 7aee674665 ALSA: hda/realtek: quirk for D945GCLF2 mainboard
Quirk for the ALC662 found on the Intel D945GCLF2 (and possibly other)
mainboards.

Signed-off-by: David Santinoli <david@santinoli.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-09 12:34:26 +01:00
Jaroslav Kysela 396087eaea ALSA: hda - Terradici HDA controllers does not support 64-bit mode
Confirmed from vendor and tests in RedHat bugzilla #536782 .

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-09 12:29:25 +01:00
Takashi Iwai ee6e365e30 ALSA: hda - Generalize EAPD inversion check in patch_analog.c
Add a flag to spec field so that the EAPD inversion can be checked
outside the relevant control callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 17:23:33 +01:00
Takashi Iwai d11f74c62f ALSA: hda - Exclude unusable ADCs for ALC88x
On Realtek codecs, a digital mic pin is connected often only to a single
ADC.  But the parser tries to set up all ADCs no matter whether the
digital mic is available, and results in non-selectable input source.

This patch adds a check of input-source availability of each ADC, and
excludes ones that don't support all input sources.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 12:52:47 +01:00
Takashi Iwai 23033b2bce ALSA: hda - Add missing Line-Out and PCM switches as slave
Realtek codecs may have "PCM" and "Line-Out" playback switches, and
they can be slaves for vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 12:36:52 +01:00
Justin P. Mattock 4b7e180335 ALSA: hda - iMac 9,1 sound patch.
This is an updated patch for the Apple iMac 9,1 model to add sound.
Original patch posted here:
http://article.gmane.org/gmane.linux.alsa.devel/61361/match=

I have been using this patch for a while now
and have to say it works vary well, except for a few minor 
things:

	With the iMac 24-inch 3.06GHz Intel Core 2 Duo
	everything seems to be working as it should,
        although I have not looked into the microphone
	(never really use one, nor have any apps to test,
	my guess is it doesn't work, or I never figured out how
	to get it to work).

	With the iMac 24-inch 2.66GHz Intel Core 2 Duo
	everything is the same as with the above machine 
	except I'm hearing a light scratchy/distortion noise
	come out of the speakers when using headphones(above machine
	does not do this).

Other than that the sound level is great(especially with good Dj headphones).

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Tested-by:     Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 12:31:44 +01:00
Jiri Kosina d014d04386 Merge branch 'for-next' into for-linus
Conflicts:

	kernel/irq/chip.c
2009-12-07 18:36:35 +01:00
Takashi Iwai 86e1d57e4f Merge branch 'topic/hda' into for-linus 2009-12-04 16:22:45 +01:00
Takashi Iwai 57648cd52b Merge branch 'topic/misc' into for-linus 2009-12-04 16:22:37 +01:00
AndrĂŠ Goddard Rosa af901ca181 tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: AndrĂŠ Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:55 +01:00
Ondrej Zary fb716c0b7b snd-fm801: autodetect SF64-PCR (tuner-only) card
When primary AC97 is not found, don't fail with tons of AC97 errors.
Assume that the card is SF64-PCR (tuner-only).
This makes the SF64-PCR radio card work "out of the box".

Also fixes a bug that can cause an oops here:
        if (tea575x_tuner > 0 && (tea575x_tuner & 0x000f) < 4) {
when tea575x_tuner == 16, it passes this check and causes problems
a couple lines below:
        chip->tea.ops = &snd_fm801_tea_ops[(tea575x_tuner & 0x000f) - 1];

Tested with SF64-PCR, but I don't have any of those sound or sound+radio cards
to test if I didn't break anything.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-03 18:25:40 +01:00
Takashi Iwai ac2c92e0cd ALSA: hda - Fix memory leaks in the previous patch
The previous hack for replacing the codec name give memory leaks at
error paths.  This patch fixes them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-03 10:14:10 +01:00
Kailang Yang 274693f370 ALSA: hda - Add ALC661/259, ALC892/888VD support
Fixed List:
   1. Add alc_read_coef_idx function
   2. Add ALC661 ALC259
   3. Add ALC892 ALC888VD

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-03 10:07:50 +01:00
Takashi Iwai b00615d163 Merge branch 'topic/pcm-dma-fix' into topic/core-change 2009-12-01 15:58:15 +01:00
Takashi Iwai 75639e7ee1 Merge branch 'topic/beep-rename' into topic/core-change 2009-12-01 15:58:10 +01:00
Takashi Iwai 980f31c46b Merge branch 'topic/ice1724-quartet' into topic/hda 2009-12-01 15:57:01 +01:00
Takashi Iwai 9e298f449e Merge branch 'topic/oxygen' into topic/hda 2009-12-01 15:56:52 +01:00
Takashi Iwai 2f703e7a2e ALSA: hda - Add position_fix quirk for HP dv3
HP dv3 requires position_fix=1.

Reference: Novell bnc#555935
	https://bugzilla.novell.com/show_bug.cgi?id=555935

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-01 14:17:37 +01:00
Takashi Iwai cfc9b06f0b ALSA: hda - Add a pin-fix for FSC Amilo Pi1505
FSC Amilo Pi 1505 has a buggy BIOS and doesn't set up the HP and
speaker pins properly.  Add the pinfix entry for that.

Reference: Novell bnc#557403
	https://bugzilla.novell.com/show_bug.cgi?id=557403

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-01 12:26:18 +01:00
Takashi Iwai ef47bf386e Merge branch 'fix/misc' into topic/misc 2009-12-01 08:36:05 +01:00
Takashi Iwai 854206b074 ALSA: hda - Fix Cxt5047 test mode
The NID 0x1a of Conexant 5047 chip is a mic boost volume only with
the output amp unlike 5045 chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-30 18:22:04 +01:00
Takashi Iwai 45d4ebf1a6 ALSA: hda - Add a position_fix quirk for MSI Wind U115
MSI Wind U115 seems to require position_fix=1 explicitly.
Otherwise it screws up PulseAudio.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-30 11:59:17 +01:00
Takashi Iwai bfc9902599 ALSA: hda - Don't trigger pin-sense for STAC/IDT codecs
STAC/IDT codecs seem to behave weird when SET_PIN_SENSE verb is issued
before reading the jack-detection although the TRIG_REQ pin capability
is given by the hardware.

Since snd_hda_jack_detect() issues the SET_PIN_SENSE verb simply judging
from the pincap, we have to revert the change in the commit
  d56757abc1
    ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
to plain GET_PIN_SENSE verb without triggering.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-27 12:22:44 +01:00
Daniel T Chen 0b587fc4d3 ALSA: hda: Fix max PCM level to 0 dB for Fujitsu-Siemens laptops using CX20549 (Venice)
BugLink: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4792

Cristian reported that these models have really bad sound above 6 dB
and proposed the original patch. I've updated the comment to reflect
this change.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Reported-by: Cristian Klein
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-26 10:12:14 +01:00
Daniel T Chen bbb3c644bd ALSA: intel8x0: Mute External Amplifier by default for Gateway 4525GZ
BugLink: https://bugs.launchpad.net/bugs/487884

This Gateway model needs External Amplifier muted for audible playback,
so set the inv_eapd quirk for it.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-25 10:01:20 +01:00
Einar RĂźnkaru 95a618bdac ALSA: hda - Make Dell Vostro 1015n mic and speaker switching work
Dell Vostro 1015n uses Conexant CX20583-10Z (0x14f1:5067). Patch is
based on "olpc-xo-1_5" branch. Dell uses digital mic.

Signed-off-by: Einar RĂźnkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-24 09:01:48 +01:00
Takashi Iwai 83dd7408b5 Revert "ALSA: hda - Change quirk for Acer Aspire 5930G"
This reverts commit f2624791a0.

Łukasz Wojniłowicz reported that the change causes both internal and
external mics not working any more.  The headphone jacking issue was
fixed by his previous patch, it's better to revert to acer-aspire-4930g
model.

Reported-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-24 08:57:53 +01:00
Takashi Iwai fc08722510 ALSA: hda - Fix input and jack Kconfig depenencies
CONFIG_SND_JACK needs to be selected explicitly only when INPUT=y or
INPUT_SND.  The current way, INPUT=SND_HDA_INTEL isn't strict enough.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-21 19:57:11 +01:00
Łukasz Wojniłowicz 7cef4cf1c5 ALSA: hda - 4930g mute lfe and side when pluging in headphones
Fixes first issue from comment 0021423 in bug 0004317 for Acer Aspire 5930g

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-20 12:14:35 +01:00
Takashi Iwai f2624791a0 ALSA: hda - Change quirk for Acer Aspire 5930G
Change the quirk for Acer Aspire 5930G from model=acer-aspire-4930g to
model=acer-aspre-6530g.  The tuba bass gets muted along with the other
built-in speakers upon headphones insertion, the internal mic works
perfectly etc.

Reported-by: Claudio Viano <claudio.viano@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-19 11:51:46 +01:00
Takashi Iwai b4e818768d ALSA: hda - Fix mute-LED sync on HP laptops with IDT92HD83xxx codecs
The mute-LED isn't synchronized with the actual mute state on some
HP laptops with IDT 92HD83xxx codecs.  A similar hack using
check_power_status callback is added for this codec, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 17:22:07 +01:00
Takashi Iwai ef4b18e2af Merge branch 'fix/hda' into for-linus 2009-11-18 16:38:49 +01:00
Takashi Iwai 8af3aeb498 ALSA: hda - Fix detection of dual headphones
The dual-headphone mode with STAC/IDT codecs is useful only for machines
that have two (or more) built-in headphones.

But, some HP laptops give multiple headphone pin configs, one for the
built-in and another for the separate (likely a docking station) one.
This results in a missing speaker volume control.

This patch adds more check for the dual-headphone mode to avoid this
problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 14:23:37 +01:00
Takashi Iwai d56757abc1 ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 08:00:14 +01:00
Wu Fengguang 83d605fd63 ALSA: hda - show EPSS capability in proc
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:48:28 +01:00
Wu Fengguang 81bf31e2d0 ALSA: intelhdmi - sticky channel count
Don't change channel count if not necessary.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:46:36 +01:00
Wu Fengguang 5779191e0e ALSA: intelhdmi - sticky stream id and format
We tracked down the first-0.5s-hdmi-audio-samples-lost problem to the
AC_VERB_SET_CHANNEL_STREAMID command. It is suspected that many HDMI
sinks need some time to adapt to the new state.

The workaround is to avoid changing stream id/format whenever possible.
Proposed by David.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:46:19 +01:00
Wu Fengguang 848de598ee ALSA: intelhdmi - sticky infoframe
Remember the active infoframe, so as to avoid stop/restart infoframe
transmission when switching between audio clips of the same format.

Proposed by Shang and David.

CC: Shane W <shane-alsa@csy.ca>
CC: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:45:42 +01:00
Wu Fengguang 978be6d711 ALSA: intelhdmi - separate out infoframe checksum routine
And make it right when called for more than one times.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:43:12 +01:00
Wu Fengguang 3f54aa5091 ALSA: intelhdmi - probe for monitor/eld presence at module init time
This avoids lost of presence info on module reloading.
The presence info used to be only updated at the (rare) hotplug events.

Proposed by David, thanks!

CC: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:42:07 +01:00
Wu Fengguang 864f92be7e ALSA: hda - introduce snd_hda_jack_detect() and snd_hda_pin_sense()
This helps merge duplicate code.

v2: add snd_hda_jack_detect() and comments recommended by Takashi.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:40:57 +01:00
Wu Fengguang 23ccc2bd24 ALSA: intelhdmi - export monitor-presence and ELD-valid status
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:37:49 +01:00
Wu Fengguang 1e7c10fefa ALSA: intelhdmi - fix channel mapping slot mask
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:37:22 +01:00
Wu Fengguang 6f539a9861 ALSA: intelhdmi - fix audio infoframe fill size
Reported-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 07:37:06 +01:00
Takashi Iwai c5b5165ce2 ALSA: hda - Disable default quirk for Sony VAIO with ALC262 codec
The ALC262 has a quirk entry matching with all Sony Vaio laptops
to use model=sony-assamd as default.  But, model=auto works much better
for new models in the recent driver versions, thus it's safer to disable
that default quirk entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-17 16:03:34 +01:00
Takashi Iwai 5a35598299 Merge branch 'fix/hda' into topic/hda 2009-11-17 16:00:33 +01:00
Takashi Iwai 12929baea4 ALSA: hda - Fix quirk for VAIO type G
Vaio type G laptop doesn't work with the current quirk setup.
After some tests, it turned out that it should be model=auto as default.

Reported-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-17 15:58:35 +01:00
Takashi Iwai 67d634c07a ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=n
Disable beep-related codes when CONFIG_SND_HDA_INPUT_BEEP isn't set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 15:35:59 +01:00
Takashi Iwai 9bb1fe390d ALSA: hda - Fix beep_mode option value
The beep_mode option value was wrongly defined: it must be 0 = off and
1 = on.

Also, evaluate the beep_mode value at snd_hda_attach_beep_device()
properly so that no device is created when beep_mode=0 is given.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 15:33:49 +01:00
Takashi Iwai d5191e50b2 ALSA: hda - Update / add kerneldoc comments to exported functions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 14:58:17 +01:00
Jaroslav Kysela 85dd662ff4 ALSA: hda - move snd_hda_pcm_type_name from hda_codec.h to hda_local.h
The snd_hda_pcm_type_name array is local only.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 14:14:28 +01:00
Takashi Iwai 828d44536c Merge branch 'fix/hda' into for-linus 2009-11-16 12:20:02 +01:00
Takashi Iwai 9c96fa599f ALSA: hda - Get rid of magic digits for subdev hack
Define a proper const for a magic 31bit flag for subdev / NID setup
with a brief comment.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:23 +01:00
Jaroslav Kysela 4d02d1b638 ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping
This patch adds support for dynamically created controls to proc codec file
(Control: lines).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:19 +01:00
Jaroslav Kysela 3911a4c19e ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment
This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:14 +01:00
Jaroslav Kysela 2dca0bba70 ALSA: hda - add beep_mode module parameter
The beep_mode parameter for snd-hda-intel module allows to choose among
different digital beep device registation to the input layer.

0 = do not register to the input layer
1 = register to the input layer all time
2 = use "Beep Switch" control exported to user space mixer applications

Also, introduce CONFIG_SND_HDA_INPUT_BEEP_MODE for default value.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:10 +01:00
Jaroslav Kysela 5f81669750 ALSA: hda: beep - add missing cancel_delayed_work
The unregister work should be also canceled in snd_hda_detach_beep_device()
function.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:05 +01:00
Jaroslav Kysela 13dab0808b ALSA: hda_intel: Digital PC Beep - delay input device unregistration
The massive register/unregister calls for input device layer might be
overkill. Delay unregister call by one HZ as workaround.

Also, as benefit, beep->enabled variable is changed immediately now
(not from workqueue).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:00 +01:00
Jaroslav Kysela 123c07aedd ALSA: hda_intel: Digital PC Beep - change behaviour for input layer
Original implementation was keeping registered input device for SND_BEEP
and SND_TONE events all time. This patch changes this behaviour:
If digital PC Beep is turned off using universal control switch,
the input device is unregistered.

Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last
registered device acceping those events. It means that the HDA Intel
audio driver blocks also the internal PC Speaker device (pcspkr.c
driver) even if the HDA Beep is muted. The user can easy disable
all beeps using 'setterm -blength 0' or 'xset b off' command.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:34:41 +01:00
Takashi Iwai fe705ab152 Merge branch 'topic/beep-rename' into topic/hda 2009-11-16 11:33:41 +01:00
Takashi Iwai 7d1794e81b Merge branch 'fix/hda' into topic/hda 2009-11-16 11:33:35 +01:00
Dan Carpenter bf97402052 ALSA: ice1724 - make some bitfields unsigned
This is a clean up and doesn't change the behavior.

Bit fields should always be unsigned.  Otherwise pm_suspend_enabled will
be -1 when you want it to be 1.  The other bad thing is that the sparse
checker will complain 36 times if they aren't unsigned.

The other bitfields in that struct are unsigned already.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 10:13:13 +01:00
Daniel J Blueman 8ef5837a47 ALSA: hda - Dell Studio 1557 hd-audio quirk
Add the Dell Studio 15 (model 1557, Core i7) laptop to the hd-audio
quirk list, enabling audio.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-15 11:09:19 +01:00
Takashi Iwai 0c3c35e148 Merge branch 'fix/misc' into topic/misc 2009-11-14 14:38:28 +01:00
Takashi Iwai 5e08fe570c ALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()
Remove invlid __devinit prefix from the suspend callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14 14:37:48 +01:00
Aleksey Kunitskiy 50d40f187f ALSA: ice1724 - Patch for suspend/resume for ESI Juli@
Add proper suspend/resume code for Juli@ cards. Based on ice1724
suspend/resume work of Igor Chernyshev.
Fixes bug https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413
Tested on linux-2.6.31.6

Signed-off-by: Aleksey Kunitskiy <alexey.kv@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14 14:32:51 +01:00
akpm@linux-foundation.org 01a1796bc5 sound/pci/hda/patch_via.c: work around gcc-4.0.2 ICE
sound/pci/hda/patch_via.c: In function 'via_hp_bind_automute':
sound/pci/hda/patch_via.c:2074: internal compiler error: in do_SUBST, at combine.c:462
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

[added a comment by tiwai]

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14 09:53:06 +01:00
Akinobu Mita 401de8184a ALSA: ice1712: Use bitrev8
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-13 08:30:22 +01:00
Takashi Iwai e2e527ae7f ALSA: hda - Add another Nvidia HDMI codec id (10de:0005)
Found on Nvidia 9800M GTS.

Reported-by: Chris Balcum <sherl0k@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-13 08:28:03 +01:00
Takashi Iwai 7288561af9 ALSA: hda - Fix build error without CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_POWER_SAVE is independent from CONFIG_SND_HDA_HWDEP.
Thus snd_hda_hwdep_add_power_sysfs() needs the check of both kconfigs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-12 10:01:18 +01:00
Takashi Iwai f8b7163529 ALSA: hda - Don't access invalid substream in proc file
The commit e330323520
"ALSA: hda - proc - show which I/O NID is associated to PCM device"
introduces the access to substream pointer.  But, PCMs may have no
substreams in one or both directions, and this results in NULL
dereference.  Also, print the first substream number doesn't make
sense.

This patch removes the access to the substream pointer, and reformat
to fit to the standard coding style.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-12 09:50:28 +01:00
Daniel T Chen 46ef6ec9da ALSA: hda: Use model=mb5 for MacBookPro 5,2
BugLink: https://bugs.launchpad.net/bugs/462098

Until we can look closer at the verbs, let's use ALC885_MB5 for
codec SSID 0x106b4600 to enable playback and capture for MacBookPro
5,2s.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-12 07:38:14 +01:00
Takashi Iwai a2f6309e83 ALSA: hda - Add power on/off counter
Added the power on/off counter and expose via sysfs files.
The sysfs files, power_on_acct and power_off_acct, are created under
each codec hwdep sysfs directory (e.g. /sys/class/sound/hwC0D0).
The files show the msec length of the codec power-on and power-off,
respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-11 09:37:08 +01:00
Roel Kluin 71121d9fcc ALSA: hda - possible read past array alc88[02]_parse_auto_config()
The test of index `i' is after the read - too late - and
unsafe: if snd_hda_get_connections() fails in the last
iteration a read beyond the array is possible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-11 08:07:05 +01:00
Takashi Iwai 8f217a226c ALSA: hda - Add missing export for snd_hda_bus_reboot_notify
... forgot to add for modules.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 18:26:12 +01:00
Takashi Iwai 4ac5598290 ALSA: hda - Avoid quirk for HP dc5750
The present quirk for HP dc5750 seems broken and maps the pins wrongly.
Since the auto-parser works well for this device, set the default entry
to use model=auto.

Reference: Novell bnc#552154
	https://bugzilla.novell.com/show_bug.cgi?id=552154

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:11:00 +01:00
Jaroslav Kysela e330323520 ALSA: hda - proc - show which I/O NID is associated to PCM device
Output something like:

Node 0x02 [Audio Output] wcaps 0x11: Stereo
  Device: name="ALC888 Analog", type="Audio", device=0, substream=0
  Converter: stream=0, channel=0
  ...

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:06:57 +01:00
Takashi Iwai fb8d1a344d ALSA: hda - Add reboot notifier to each codec
Add reboot notifier to each codec so that it can do some workarounds
needed for reboot.

So far, patch_sigmatel.c calls its shutup routine for avoiding noises
at reboot on some HP machines.

References: Novell bnc#544779
	http://bugzilla.novell.com/show_bug.cgi?id=544779

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:02:29 +01:00
Daniel Drake dbaccc0cca ALSA: hda - Tweak OLPC XO-1.5 microphone bias
Our contacts at Conexant suggested that we reduce the external
microphone bias to 50% in order to center the input signal with
the DC input range of the codec. This is because the microphone
port is DC coupled for potential use with sensors.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 08:36:26 +01:00
Daniel T Chen 95491d902b ALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262
BugLink: https://bugs.launchpad.net/bugs/478309

The internal microphone on this VAIO model does not work unless the
"auto" quirk is used.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-09 21:07:13 +01:00
Uwe Kleine-König b71a8eb0fa tree-wide: fix typos "selct" + "slect" -> "select"
This patch was generated by

	git grep -E -i -l 's(le|el)ct' | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/

with only skipping net/netfilter/xt_SECMARK.c and
include/linux/netfilter/xt_SECMARK.h which have a struct member called
selctx.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:56 +01:00
Dirk Hohndel 06fe9fb418 tree-wide: fix a very frequent spelling mistake
something-bility is spelled as something-blity
so a grep for 'blit' would find these lines

this is so trivial that I didn't split it by subsystem / copy
additional maintainers - all changes are to comments
The only purpose is to get fewer false positives when grepping
around the kernel sources.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:54 +01:00
Takashi Iwai dede17b8e9 Merge branch 'fix/hda' into for-linus 2009-11-08 09:16:15 +01:00
Takashi Iwai f645073961 Merge branch 'fix/misc' into for-linus 2009-11-08 09:16:06 +01:00
Takashi Iwai 1a6969788e ALSA: hda - Don't initialize CORB/RIRB for single_cmd mode
So far, CORB/RIRB still remains even if the driver is switched to the
single_cmd mode.  The specification says that this should be disabled,
but I hoped this isn't the case; indeed most devices worked together with
CORB/RIRB.

However, Poulsbo (US15W) seems problematic with this setup, and it
requires to disable CORB/RIRB when single_cmd is used.

Now this patch disables CORB/RIRB initialization when the single_cmd
mode is used.  Also the unsolicited event is disabled because it can't
work without RIRB.

Reported-and-tested-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-07 09:49:04 +01:00
Takashi Iwai 167eae5a17 ALSA: hda - Reset pins of IDT/STAC codecs at free
Some laptops cause annoying clicks or noises at shutdown/reboot since
the speaker pin is set still high.  Apply the same procedure used for
the suspend to avoid such clicks/noises for freeing the codec, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-06 15:47:50 +01:00
Takashi Iwai 9ad6a46b64 Merge branch 'fix/hda' into topic/hda 2009-11-06 15:45:59 +01:00
Randy Dunlap 78987bdc4e ALSA: hda, move hp_bseries_system
Function hp_bseries_system() is always used, outside of
CONFIG_ boundaries/controls, so move it.

sound/pci/hda/patch_sigmatel.c:5458: error: implicit declaration of function 'hp_bseries_system'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 18:30:53 +01:00
Jaroslav Kysela d355c82a01 ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"
To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.

Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 09:00:18 +01:00
Takashi Iwai 7d5ab41870 Merge branch 'fix/hda' into topic/hda 2009-11-05 08:56:20 +01:00
Daniel T Chen 7e6c3989af ALSA: intel8x0: Mute External Amplifier by default for another Sony model
BugLink: https://bugs.launchpad.net/bugs/474972

This Sony model needs External Amplifier muted for audible playback, so
make sure we set the inv_eapd quirk.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 08:11:09 +01:00
Daniel Drake 798a8a1501 ALSA: hda - Add OLPC XO-1.5 PCI ID
The XO-1.5 laptop now has a unique subvendor/subproduct ID, which can
be used to automatically select the correct CXT5066 configuration.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-04 12:18:47 +01:00
Vitaliy Kulikov 5bdaaada16 ALSA: hda - Enable GPIO control for mute LED on HP systems
This patch enables GPIO to control mute LED indicator on the HP systems
with the special string in BIOS and applies it with the correct polarity on
HP B-series systems.

It also restores configuration of the pin intended as the second Headphone
on HP B-series systems but configured as something else in the BIOS to
pass MS DTM.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-04 07:57:45 +01:00
Takashi Iwai 8fd6959de1 Merge branch 'fix/hda' into for-linus 2009-11-02 16:18:33 +01:00
Takashi Iwai ad87c64f00 ALSA: hda - Don't check invalid HP pin
alc_automute_pin() might be called even if any HP pin is defined, and
it will result in verbs with NID=0.

This patch adds a check for the validity of HP widget before issuing
any verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-02 14:23:15 +01:00
Daniel T Chen a1bf808849 ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
BugLink: https://bugs.launchpad.net/bugs/368629

We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-02 11:24:10 +01:00
Takashi Iwai e87a3dd33e Merge branch 'fix/misc' into topic/misc 2009-11-01 11:11:07 +01:00